diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2b3c43005..1dbc270b9 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -6,6 +6,15 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
+## [2338.01] - 2023-09-21
+
+### Added
+
+### Changed
+- (Trabajadores -> Calendario) Icono de check arreglado cuando pulsas un tipo de dia
+
+### Fixed
+
## [2336.01] - 2023-09-07
### Added
diff --git a/back/methods/docuware/checkFile.js b/back/methods/docuware/checkFile.js
index 19224057c..76789649f 100644
--- a/back/methods/docuware/checkFile.js
+++ b/back/methods/docuware/checkFile.js
@@ -71,11 +71,10 @@ module.exports = Self => {
}
try {
- const response = await Self.get(fileCabinet, filter);
- const [documents] = response.Items;
- if (!documents) return false;
+ const [response] = await Self.get(fileCabinet, filter);
+ if (!response) return false;
- return {id: documents.Id};
+ return {id: response['Document ID']};
} catch (error) {
return false;
}
diff --git a/back/methods/docuware/deliveryNoteEmail.js b/back/methods/docuware/deliveryNoteEmail.js
index 1557a3a87..a654eb262 100644
--- a/back/methods/docuware/deliveryNoteEmail.js
+++ b/back/methods/docuware/deliveryNoteEmail.js
@@ -65,7 +65,7 @@ module.exports = Self => {
const email = new Email('delivery-note', params);
- const docuwareFile = await models.Docuware.download(ctx, id, 'deliveryNote');
+ const docuwareFile = await models.Docuware.download(id, 'deliveryNote');
return email.send({
overrideAttachments: true,
diff --git a/back/methods/docuware/specs/checkFile.spec.js b/back/methods/docuware/specs/checkFile.spec.js
index 8460bb561..c60809e85 100644
--- a/back/methods/docuware/specs/checkFile.spec.js
+++ b/back/methods/docuware/specs/checkFile.spec.js
@@ -16,19 +16,9 @@ describe('docuware download()', () => {
it('should return the document data', async() => {
const docuwareId = 1;
- const response = {
- Items: [
- {
- Id: docuwareId,
- Fields: [
- {
- FieldName: 'ESTADO',
- Item: 'Firmado'
- }
- ]
- }
- ]
- };
+ const response = [{
+ 'Document ID': docuwareId
+ }];
spyOn(docuwareModel, 'get').and.returnValue((new Promise(resolve => resolve(response))));
const result = await models.Docuware.checkFile(ticketId, fileCabinetName, null, true);
diff --git a/back/methods/docuware/upload.js b/back/methods/docuware/upload.js
index 096301e56..7055bf8d5 100644
--- a/back/methods/docuware/upload.js
+++ b/back/methods/docuware/upload.js
@@ -111,7 +111,7 @@ module.exports = Self => {
throw new UserError('Action not allowed on the test environment');
// delete old
- const docuwareFile = await models.Docuware.checkFile(ctx, id, fileCabinet, false);
+ const docuwareFile = await models.Docuware.checkFile(id, fileCabinet, false);
if (docuwareFile) {
const deleteJson = {
'Field': [{'FieldName': 'ESTADO', 'Item': 'Pendiente eliminar', 'ItemElementName': 'String'}]
diff --git a/back/methods/osticket/sendToSupport.js b/back/methods/osticket/sendToSupport.js
index 320691e23..5b9ebb4e3 100644
--- a/back/methods/osticket/sendToSupport.js
+++ b/back/methods/osticket/sendToSupport.js
@@ -33,14 +33,14 @@ module.exports = Self => {
await Self.app.models.EmailUser.findById(ctx.req.accessToken.userId, {fields: ['email']});
let html = `Motivo:
${reason}
`;
+ html += `Usuario:
${ctx.req.accessToken.userId} ${emailUser.email}
`;
for (const data in additionalData)
html += `${data}:
${tryParse(additionalData[data])}
`;
const subjectReason = JSON.parse(additionalData?.httpRequest)?.data?.error;
smtp.send({
- to: config.app.reportEmail,
- replyTo: emailUser.email,
+ to: `${config.app.reportEmail}, ${emailUser.email}`,
subject:
'[Support-Salix] ' +
additionalData?.frontPath + ' ' +
diff --git a/db/changes/233001/00-aclSaleTracking.sql b/db/changes/233001/00-aclSaleTracking.sql
new file mode 100644
index 000000000..6a699091a
--- /dev/null
+++ b/db/changes/233001/00-aclSaleTracking.sql
@@ -0,0 +1,4 @@
+INSERT INTO `salix`.`ACL` (model, property, accessType, permission, principalType, principalId)
+ VALUES
+ ('SaleTracking', 'deleteSaleGroupDetail', 'WRITE', 'ALLOW', 'ROLE', 'employee'),
+ ('SaleTracking', 'replaceOrCreate', 'WRITE', 'ALLOW', 'ROLE', 'employee');
diff --git a/db/changes/233401/01-deviceLog_acl.sql b/db/changes/233401/01-deviceLog_acl.sql
new file mode 100644
index 000000000..ebe3f8ed5
--- /dev/null
+++ b/db/changes/233401/01-deviceLog_acl.sql
@@ -0,0 +1,6 @@
+
+ALTER TABLE `vn`.`deviceLog` ADD serialNumber varchar(45) DEFAULT NULL NULL;
+
+INSERT INTO `salix`.`ACL` ( model, property, accessType, permission, principalType, principalId)
+VALUES( 'DeviceLog', 'create', 'WRITE', 'ALLOW', 'ROLE', 'employee');
+
diff --git a/db/changes/233601/00-aclWorker.sql b/db/changes/233601/00-aclWorker.sql
new file mode 100644
index 000000000..e79d8f738
--- /dev/null
+++ b/db/changes/233601/00-aclWorker.sql
@@ -0,0 +1,3 @@
+INSERT INTO `salix`.`ACL` (model, property, accessType, permission, principalType, principalId)
+ VALUES
+ ('Worker', 'search', 'READ', 'ALLOW', 'ROLE', 'employee');
diff --git a/db/changes/233601/00-addExpeditionState.sql b/db/changes/233601/00-addExpeditionState.sql
new file mode 100644
index 000000000..fb236b0c3
--- /dev/null
+++ b/db/changes/233601/00-addExpeditionState.sql
@@ -0,0 +1,2 @@
+INSERT INTO `salix`.`ACL` (`model`,`property`,`accessType`,`permission`,`principalType`,`principalId`)
+ VALUES ('ExpeditionState','addExpeditionState','WRITE','ALLOW','ROLE','delivery');
\ No newline at end of file
diff --git a/db/changes/233601/00-createClaimReader.sql b/db/changes/233601/00-createClaimReader.sql
new file mode 100644
index 000000000..666bf232e
--- /dev/null
+++ b/db/changes/233601/00-createClaimReader.sql
@@ -0,0 +1,32 @@
+INSERT INTO `account`.`role` (`id`, `name`, `description`, `hasLogin`)
+ VALUES ('claimViewer','Trabajadores que consulta las reclamaciones ',1);
+
+INSERT INTO `account`.`roleInherit` (`role`,`inheritsFrom`)
+ SELECT `r`.`id`, `r2`.`id`
+ FROM `account`.`role` `r`
+ JOIN `account`.`role` `r2` ON `r2`.`name` = 'claimViewer'
+ WHERE `r`.`name` IN (
+ 'salesPerson',
+ 'buyer',
+ 'deliveryBoss',
+ 'handmadeBoss'
+ )
+
+DELETE FROM `salix`.`ACL`
+ WHERE `model`= 'claim'
+ AND `property` IN (
+ 'filter',
+ 'find',
+ 'findById',
+ 'getSummary'
+ );
+
+INSERT INTO `salix`.`ACL` (`model`,`property`,`accessType`,`permission`,`principalType`,`principalid`)
+ VALUES ('Claim','filter','READ','ALLOW','ROLE','claimViewer');
+INSERT INTO `salix`.`ACL` (`model`,`property`,`accessType`,`permission`,`principalType`,`principalid`)
+ VALUES ('Claim','find','READ','ALLOW','ROLE','claimViewer');
+INSERT INTO `salix`.`ACL` (`model`,`property`,`accessType`,`permission`,`principalType`,`principalid`)
+ VALUES ('Claim','findById','READ','ALLOW','ROLE','claimViewer');
+INSERT INTO `salix`.`ACL` (`model`,`property`,`accessType`,`permission`,`principalType`,`principalid`)
+ VALUES ('Claim','getSummary','READ','ALLOW','ROLE','claimViewer');
+
diff --git a/db/changes/233601/00-department.sql b/db/changes/233601/00-department.sql
new file mode 100644
index 000000000..777d26b9f
--- /dev/null
+++ b/db/changes/233601/00-department.sql
@@ -0,0 +1,3 @@
+UPDATE `vn`.`department`
+ SET code='VN'
+WHERE name='VERDNATURA';
diff --git a/db/changes/233601/00-saleGroupDetail.sql b/db/changes/233601/00-saleGroupDetail.sql
new file mode 100644
index 000000000..d16478716
--- /dev/null
+++ b/db/changes/233601/00-saleGroupDetail.sql
@@ -0,0 +1,7 @@
+DELETE FROM `vn`.`saleGroupDetail` WHERE id IN (468106,468104,468107,468105,495210,495208,495207,495209,462879,462880,447186,450623,450622,455606,455605,455827,455829,455828,459067,460689,460691,460690,460692,462408,463403,463405,463404,463129,463127,463126,463128,468098,468096,468099,468097,468310,468314,468313,475654,468325,473248,474803,474739,475042,475052,475047,475041,475051,475046,475040,475050,475045,475039,475049,475044,475038,475048,475043,474888,474892,474890,474887,474891,474889,481109,481107,481105,481108,481106,481110,479008,490787,490792,490791,485295,485294,485293,485528,490796,487853,487959,491303,490789,490914,490913,492305,492310,492307,492304,492309,492306,492303,492308,494111,494110,494480,494482,494481,494483,495202,495200,495199,495201,497209,499765,499763,499767,499764,499768,499766,502014,502013,508820,508819,508818,463133,463131,463130,463132,468102,468100,468103,468101,468311,468316,468315,468327,474894,474898,474896,474893,474897,474895,495206,495204,495203,495205,499771,499769,499773,499770,499774,499772);
+ALTER TABLE `vn`.`saleGroupDetail` ADD CONSTRAINT saleGroupDetail_UN UNIQUE KEY (saleFk);
+
+INSERT INTO `salix`.`ACL` (`model`,`property`,`accessType`,`permission`,`principalId`)
+ VALUES
+ ('SaleGroupDetail','deleteById','WRITE','ALLOW','employee');
+
diff --git a/db/changes/233801/.gitkeep b/db/changes/233801/.gitkeep
new file mode 100644
index 000000000..e69de29bb
diff --git a/db/dump/dumpedFixtures.sql b/db/dump/dumpedFixtures.sql
index be4828c2d..2e1511b59 100644
--- a/db/dump/dumpedFixtures.sql
+++ b/db/dump/dumpedFixtures.sql
@@ -1,8 +1,8 @@
USE `util`;
--- MariaDB dump 10.19 Distrib 10.5.15-MariaDB, for debian-linux-gnu (x86_64)
+-- MariaDB dump 10.19 Distrib 10.5.19-MariaDB, for debian-linux-gnu (x86_64)
--
--- Host: db1.static.verdnatura.es Database: util
+-- Host: db2.static.verdnatura.es Database: util
-- ------------------------------------------------------
-- Server version 10.7.7-MariaDB-1:10.7.7+maria~deb11-log
@@ -22,7 +22,7 @@ USE `util`;
LOCK TABLES `config` WRITE;
/*!40000 ALTER TABLE `config` DISABLE KEYS */;
-INSERT INTO `config` VALUES (1,'232401',0,'production',NULL,'2001-01-01 11:00:00',NULL,0);
+INSERT INTO `config` VALUES (1,'233401',0,'production',NULL,'2001-01-01 11:00:00',NULL,0);
/*!40000 ALTER TABLE `config` ENABLE KEYS */;
UNLOCK TABLES;
@@ -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','10649','4a8ae703b8ce8219887432ad1d1677a44e0cbdd8','2023-06-22 10:03:04','10654');
+INSERT INTO `version` VALUES ('salix','10230','53f69ae8e526a4a5d827c237a5b076d38507b392','2020-11-09 11:06:43',NULL),('vn-database','10714','aeb89a7b54f62398ddbcf3a48c8d387f275fee47','2023-08-29 12:49:52','10716');
/*!40000 ALTER TABLE `version` ENABLE KEYS */;
UNLOCK TABLES;
@@ -42,7 +42,7 @@ UNLOCK TABLES;
LOCK TABLES `versionLog` WRITE;
/*!40000 ALTER TABLE `versionLog` DISABLE KEYS */;
-INSERT INTO `versionLog` VALUES ('vn-database','00001','00-test.sql','juan@10.5.1.3','2022-01-31 10:12:26',NULL,NULL),('vn-database','00003','00-sage.sql','juan@10.5.1.3','2022-01-31 10:12:26',NULL,NULL),('vn-database','10008','00-alterRoleConfig.sql','juan@10.5.1.3','2022-01-31 10:12:26',NULL,NULL),('vn-database','10014','00-rolePrefix.sql','jenkins@10.0.2.68','2022-02-11 00:13:25',NULL,NULL),('vn-database','10017','01-firstScript.sql','jenkins@10.0.2.70','2022-03-09 11:36:54',NULL,NULL),('vn-database','10021','00-bankAccount.sql','jenkins@10.0.2.69','2022-03-16 14:11:22',NULL,NULL),('vn-database','10023','00-firstScript.sql','jenkins@10.0.2.69','2022-03-16 15:05:29',NULL,NULL),('vn-database','10026','00-invoiceInIntrastat.sql','jenkins@10.0.2.69','2022-03-21 15:10:53',NULL,NULL),('vn-database','10027','00-Clientes_cedidos.sql','jenkins@10.0.2.69','2022-03-22 15:58:12',NULL,NULL),('vn-database','10028','00-item_last_buy_.sql','jenkins@10.0.2.69','2022-03-22 15:58:12',NULL,NULL),('vn-database','10029','00-bankToViewAccountingToTable.sql','jenkins@10.0.2.69','2022-03-22 15:58:12',NULL,NULL),('vn-database','10030','00-KkejarNiche.sql','jenkins@10.0.2.69','2022-03-22 15:58:12',NULL,NULL),('vn-database','10036','00-updateBuyConfig.sql','jenkins@10.0.2.69','2022-03-29 12:36:54',NULL,NULL),('vn-database','10037','00-firstScript.sql','jenkins@10.0.2.69','2022-03-28 11:14:26',NULL,NULL),('vn-database','10038','00-printServerQueue.sql','jenkins@10.0.2.69','2022-03-29 08:13:24',NULL,NULL),('vn-database','10048','00-firstScript.sql','jenkins@10.0.2.69','2022-03-30 12:29:06',NULL,NULL),('vn-database','10058','00-vehicleAddFields.sql','jenkins@10.0.2.69','2022-04-06 08:48:34',NULL,NULL),('vn-database','10060','00-firstScript.sql','jenkins@10.0.2.69','2022-04-07 08:50:11',NULL,NULL),('vn-database','10062','00-firstScript.sql','jenkins@10.0.2.69','2022-04-06 10:51:45',NULL,NULL),('vn-database','10064','00-firstScript.sql','jenkins@10.0.2.69','2022-04-06 13:57:11',NULL,NULL),('vn-database','10066','00-firstScript.sql','jenkins@10.0.2.69','2022-04-07 08:50:12',NULL,NULL),('vn-database','10067','00-firstScript.sql','jenkins@10.0.2.69','2022-04-08 10:18:20',NULL,NULL),('vn-database','10071','00-packingSiteLog.sql','jenkins@10.0.2.69','2022-04-08 09:37:30',NULL,NULL),('vn-database','10072','00-firstScript.sql','jenkins@10.0.2.69','2022-04-08 11:01:46',NULL,NULL),('vn-database','10073','00-firstScript.sql','jenkins@10.0.2.69','2022-04-08 13:40:56',NULL,NULL),('vn-database','10074','00-firstScript.sql','jenkins@10.0.2.69','2022-04-10 13:15:05',NULL,NULL),('vn-database','10077','00-firstScript.sql','jenkins@10.0.2.69','2022-04-12 08:07:15',NULL,NULL),('vn-database','10078','00-firstScript.sql','jenkins@10.0.2.69','2022-04-13 07:44:21',NULL,NULL),('vn-database','10079','00-firstScript.sql','jenkins@10.0.2.69','2022-04-12 12:01:37',NULL,NULL),('vn-database','10086','00-firstScript.sql','jenkins@10.0.2.69','2022-04-13 08:58:34',NULL,NULL),('vn-database','10087','00-firstScript.sql','jenkins@10.0.2.69','2022-04-13 09:39:49',NULL,NULL),('vn-database','10088','00-firstScript.sql','jenkins@10.0.2.69','2022-04-13 15:05:12',NULL,NULL),('vn-database','10089','00-firstScript.sql','jenkins@10.0.2.69','2022-04-18 14:12:52',NULL,NULL),('vn-database','10090','00-firstScript.sql','jenkins@10.0.2.69','2022-04-18 14:34:46',NULL,NULL),('vn-database','10092','00-firstScript.sql','jenkins@10.0.2.69','2022-04-19 14:45:46',NULL,NULL),('vn-database','10093','00-autoradioConfig.sql','jenkins@10.0.2.69','2022-05-03 09:16:47',NULL,NULL),('vn-database','10094','00-firstScript.sql','jenkins@10.0.2.69','2022-04-20 10:57:30',NULL,NULL),('vn-database','10097','00-firstScript.sql','jenkins@10.0.2.69','2022-05-05 10:12:59',NULL,NULL),('vn-database','10099','00-firstScript.sql','jenkins@10.0.2.69','2022-04-20 14:35:27',NULL,NULL),('vn-database','10100','00-firstScript.sql','jenkins@10.0.2.69','2022-04-20 14:35:27',NULL,NULL),('vn-database','10101','00-firstScript.sql','jenkins@10.0.2.69','2022-04-21 14:59:31',NULL,NULL),('vn-database','10103','00-awbVolume.sql','jenkins@10.0.2.69','2022-05-05 10:12:59',NULL,NULL),('vn-database','10104','00-firstScript.sql','jenkins@10.0.2.69','2022-05-05 10:12:59',NULL,NULL),('vn-database','10105','00-firstScript.sql','jenkins@10.0.2.69','2022-05-05 10:13:00',NULL,NULL),('vn-database','10107','00-firstScript.sql','jenkins@10.0.2.69','2022-04-23 10:53:53',NULL,NULL),('vn-database','10112','00-firstScript.sql','jenkins@10.0.2.69','2022-05-09 09:14:53',NULL,NULL),('vn-database','10113','00-firstScript.sql','jenkins@10.0.2.69','2022-05-05 10:13:00',NULL,NULL),('vn-database','10114','00-updateConfig.sql','jenkins@10.0.2.69','2022-04-27 13:37:25',NULL,NULL),('vn-database','10116','00-firstScript.sql','jenkins@10.0.2.69','2022-04-28 11:10:14',NULL,NULL),('vn-database','10118','00-firstScript.sql','jenkins@10.0.2.69','2022-04-29 08:10:15',NULL,NULL),('vn-database','10119','00-AfegirFKPart1.sql','jenkins@10.0.2.69','2022-05-05 10:13:00',NULL,NULL),('vn-database','10119','01-AfegirFkPart2.sql','jenkins@10.0.2.69','2022-05-05 10:22:25',NULL,NULL),('vn-database','10125','00-firstScript.sql','jenkins@10.0.2.68','2022-05-18 18:44:30',NULL,NULL),('vn-database','10127','00-firstScript.sql','jenkins@10.0.2.69','2022-05-02 11:04:46',NULL,NULL),('vn-database','10128','00-firstScript.sql','jenkins@10.0.2.69','2022-05-02 13:04:31',NULL,NULL),('vn-database','10129','00-firstScript.sql','jenkins@10.0.2.69','2022-05-03 08:21:01',NULL,NULL),('vn-database','10132','00-firstScript.sql','jenkins@10.0.2.69','2022-05-05 10:22:25',NULL,NULL),('vn-database','10133','00-firstScript.sql','jenkins@10.0.2.69','2022-05-05 14:32:30',NULL,NULL),('vn-database','10134','00-firstScript.sql','jenkins@10.0.2.69','2022-05-06 07:45:25',NULL,NULL),('vn-database','10135','00-firstScript.sql','jenkins@10.0.2.69','2022-06-17 08:46:17',NULL,NULL),('vn-database','10136','00-workerTimeControl.sql','jenkins@10.0.2.69','2022-05-09 13:51:12',NULL,NULL),('vn-database','10138','00-firstScript.sql','jenkins@10.0.2.69','2022-05-10 13:58:05',NULL,NULL),('vn-database','10139','00-firstScript.sql','jenkins@10.0.2.68','2022-05-16 14:32:37',NULL,NULL),('vn-database','10139','01-secondScript.sql','jenkins@10.0.2.68','2022-05-17 12:16:13',NULL,NULL),('vn-database','10141','00-firstScript.sql','jenkins@10.0.2.70','2022-05-12 08:27:31',NULL,NULL),('vn-database','10142','00-firstScript.sql','jenkins@10.0.2.68','2022-05-20 09:20:31',NULL,NULL),('vn-database','10143','00-firstScript.sql','jenkins@10.0.2.68','2022-05-20 09:20:31',NULL,NULL),('vn-database','10144','00-AfegirFKPArt1.sql','jenkins@10.0.2.68','2022-05-20 09:22:33',NULL,NULL),('vn-database','10144','00-firstScript.sql','jenkins@10.0.2.68','2022-05-13 09:44:25',NULL,NULL),('vn-database','10147','00-firstScript.sql','jenkins@10.0.2.68','2022-05-20 09:22:33',NULL,NULL),('vn-database','10149','00-firstScript.sql','jenkins@10.0.2.68','2022-05-20 09:22:33',NULL,NULL),('vn-database','10150','00-firstScript.sql','jenkins@10.0.2.68','2022-05-17 09:57:16',NULL,NULL),('vn-database','10152','00-firstScript.sql','jenkins@10.0.2.68','2022-05-20 09:22:34',NULL,NULL),('vn-database','10153','00-firstScript.sql','jenkins@10.0.2.68','2022-05-20 09:22:34',NULL,NULL),('vn-database','10154','00-compressionKk.sql','jenkins@10.0.2.68','2022-05-20 09:22:34',NULL,NULL),('vn-database','10157','00-firstScript.sql','jenkins@10.0.2.68','2022-05-20 09:22:35',NULL,NULL),('vn-database','10158','00-firstScript.sql','jenkins@10.0.2.68','2022-06-02 12:47:21',NULL,NULL),('vn-database','10160','00-firstScript.sql','jenkins@10.0.2.69','2022-06-30 09:30:50',NULL,NULL),('vn-database','10163','00-firstScript.sql','jenkins@10.0.2.68','2022-05-23 08:17:14',NULL,NULL),('vn-database','10164','00-borrarSectorsDesus.sql','jenkins@10.0.2.68','2022-06-02 12:47:21',NULL,NULL),('vn-database','10165','00-firstScript.sql','jenkins@10.0.2.68','2022-06-02 12:47:22',NULL,NULL),('vn-database','10166','00-firstScript.sql','jenkins@10.0.2.68','2022-05-24 16:11:21',NULL,NULL),('vn-database','10167','00-renameVnActiveContrat.sql','jenkins@10.0.2.68','2022-06-02 12:47:22',NULL,NULL),('vn-database','10168','00-firstScript.sql','jenkins@10.0.2.68','2022-06-02 12:47:22',NULL,NULL),('vn-database','10169','00-createTableBankEntityConfig.sql','jenkins@10.0.2.68','2022-06-02 12:47:22',NULL,NULL),('vn-database','10169','02-addNotNullToBankEntityBic.sql','jenkins@10.0.2.68','2022-06-02 12:47:22',NULL,NULL),('vn-database','10171','00-volumeConfig.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-08-18 14:11:11',NULL,NULL),('vn-database','10171','01-itemWeight.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-08-18 16:01:34',NULL,NULL),('vn-database','10171','02-agencymode.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-08-18 16:01:34',NULL,NULL),('vn-database','10172','00-firstScript.sql','jenkins@10.0.2.68','2022-06-02 12:47:22',NULL,NULL),('vn-database','10174','00-firstScript.sql','jenkins@10.0.2.69','2022-06-17 08:46:17',NULL,NULL),('vn-database','10175','00-firstScript.sql','jenkins@10.0.2.69','2022-06-17 09:03:41',NULL,NULL),('vn-database','10177','00-crearTablaSpecialLabels.sql','jenkins@10.0.2.68','2022-06-02 12:47:22',NULL,NULL),('vn-database','10178','00-firstScript.sql','jenkins@10.0.2.68','2022-06-02 12:47:24',NULL,NULL),('vn-database','10179','00-firstScript.sql','jenkins@10.0.2.68','2022-06-02 12:47:24',NULL,NULL),('vn-database','10183','00-firstScript.sql','jenkins@10.0.2.68','2022-06-02 12:47:24',NULL,NULL),('vn-database','10184','00-firstScript.sql','jenkins@10.0.2.68','2022-06-03 08:05:34',NULL,NULL),('vn-database','10185','00-firstScript.sql','jenkins@10.0.2.68','2022-06-06 09:07:45',NULL,NULL),('vn-database','10186','00-desactivar_trigger.sql','jenkins@10.0.2.68','2022-06-07 09:31:23',NULL,NULL),('vn-database','10186','01-alter_Table_buy.sql','jenkins@10.0.2.68','2022-06-07 09:34:47',NULL,NULL),('vn-database','10186','02-alter_table_entryConfig.sql','jenkins@10.0.2.68','2022-06-07 09:34:47',NULL,NULL),('vn-database','10186','04-regularizar_Sticker_Inventario.sql','jenkins@10.0.2.68','2022-06-07 09:34:51',NULL,NULL),('vn-database','10186','09-reactivar_trigger.sql','jenkins@10.0.2.68','2022-06-07 09:34:51',NULL,NULL),('vn-database','10187','00-firstScript.sql','jenkins@10.0.2.68','2022-06-06 12:37:31',NULL,NULL),('vn-database','10188','00-firstScript.sql','jenkins@10.0.2.68','2022-06-06 14:03:36',NULL,NULL),('vn-database','10189','00-firstScript.sql','jenkins@10.0.2.69','2022-06-17 09:03:41',NULL,NULL),('vn-database','10191','00-firstScript.sql','jenkins@10.0.2.69','2022-06-17 09:03:41',NULL,NULL),('vn-database','10193','00-delete.sql','jenkins@db-proxy2.static.verdnatura.es','2023-06-15 12:14:35',NULL,NULL),('vn-database','10193','01-botanicExport.sql','jenkins@db-proxy2.static.verdnatura.es','2023-06-15 12:14:43',NULL,NULL),('vn-database','10193','02-item.sql','jenkins@db-proxy2.static.verdnatura.es','2023-06-15 12:14:44',NULL,NULL),('vn-database','10193','03-autonomy.sql','jenkins@db-proxy2.static.verdnatura.es','2023-06-15 12:14:44',NULL,NULL),('vn-database','10193','03-turn.sql','jenkins@db-proxy2.static.verdnatura.es','2023-06-15 12:14:44',NULL,NULL),('vn-database','10193','04-country.sql','jenkins@db-proxy2.static.verdnatura.es','2023-06-15 12:14:44',NULL,NULL),('vn-database','10194','00-firstScript.sql','jenkins@10.0.2.69','2022-06-17 09:03:41',NULL,NULL),('vn-database','10195','00-firstScript.sql','jenkins@10.0.2.69','2022-06-17 09:03:41',NULL,NULL),('vn-database','10200','00-firstScript.sql','jenkins@10.0.2.69','2022-06-17 09:04:00',NULL,NULL),('vn-database','10201','00-firstScript.sql','jenkins@10.0.2.69','2022-06-17 09:04:00',NULL,NULL),('vn-database','10202','00-Remove_FK_to_ediGenus.sql','jenkins@10.0.2.69','2022-06-17 09:04:00',NULL,NULL),('vn-database','10203','00-firstScript.sql','jenkins@10.0.2.69','2022-06-17 09:04:01',NULL,NULL),('vn-database','10204','00-firstScript.sql','jenkins@10.0.2.69','2022-06-17 09:04:01',NULL,NULL),('vn-database','10205','00-firstScript.sql','jenkins@10.0.2.69','2022-06-17 09:04:21',NULL,NULL),('vn-database','10207','00-Alter_table_entry.sql','jenkins@10.0.2.69','2022-06-16 07:22:50',NULL,NULL),('vn-database','10207','01-Update_invoiceAmount.sql','jenkins@10.0.2.69','2022-06-16 07:23:00',NULL,NULL),('vn-database','10208','00-firstScript.sql','jenkins@10.0.2.69','2022-06-30 09:31:26',NULL,NULL),('vn-database','10209','00-firstScript.sql','jenkins@10.0.2.69','2022-06-16 08:47:40',NULL,NULL),('vn-database','10210','00-firstScript.sql','jenkins@10.0.2.69','2022-06-16 17:39:17',1046,'Base de datos no seleccionada'),('vn-database','10211','01-firstScript.sql','jenkins@10.0.2.69','2022-06-17 07:11:27',NULL,NULL),('vn-database','10215','00-renameIsInventory.sql','jenkins@10.0.2.69','2022-06-30 09:31:26',NULL,NULL),('vn-database','10216','00-firstScript.sql','jenkins@10.0.2.69','2022-06-23 11:15:28',NULL,NULL),('vn-database','10216','01-batchIndex.sql','jenkins@10.0.2.70','2022-06-27 18:10:55',NULL,NULL),('vn-database','10219','00-AddCollectionFkOnPackingSite.sql','jenkins@10.0.2.70','2022-06-29 09:23:42',NULL,NULL),('vn-database','10219','01-AddFkToCollectionFk.sql','jenkins@10.0.2.70','2022-06-29 09:23:43',NULL,NULL),('vn-database','10220','00-createPersonalProtectionEquipment.sql','jenkins@10.0.2.69','2022-06-30 09:31:26',NULL,NULL),('vn-database','10222','00-firstScript.sql','jenkins@10.0.2.69','2022-07-14 09:12:40',NULL,NULL),('vn-database','10223','00-firstScript.sql','jenkins@10.0.2.69','2022-07-14 09:13:52',NULL,NULL),('vn-database','10224','00-cosetes.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-07-21 12:03:45',NULL,NULL),('vn-database','10229','00-firstScript.sql','jenkins@10.0.2.69','2022-07-01 11:59:34',NULL,NULL),('vn-database','10231','01-tablaEktConfig.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-08-11 09:25:39',NULL,NULL),('vn-database','10233','00-firstScript.sql','jenkins@10.0.2.69','2022-07-14 09:13:53',NULL,NULL),('vn-database','10235','00-firstScript.sql','jenkins@10.0.2.69','2022-07-14 09:13:53',NULL,NULL),('vn-database','10236','00-firstScript.sql','jenkins@10.0.2.69','2022-07-05 12:11:40',NULL,NULL),('vn-database','10237','00-firstScript.sql','jenkins@10.0.2.69','2022-07-14 09:13:53',NULL,NULL),('vn-database','10238','00-worker_mobileExtension.sql','jenkins@10.0.2.69','2022-07-14 09:14:09',NULL,NULL),('vn-database','10239','00-firstScript.sql','jenkins@10.0.2.69','2022-07-07 21:51:58',NULL,NULL),('vn-database','10241','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-07-29 08:14:01',NULL,NULL),('vn-database','10242','00-firstScript.sql','jenkins@10.0.2.69','2022-07-14 09:14:32',NULL,NULL),('vn-database','10243','00-firstScript.sql','jenkins@10.0.2.69','2022-07-14 09:14:32',NULL,NULL),('vn-database','10245','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-07-28 08:34:51',NULL,NULL),('vn-database','10247','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-07-28 08:34:51',NULL,NULL),('vn-database','10248','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-07-20 17:27:51',NULL,NULL),('vn-database','10250','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-07-28 08:36:40',NULL,NULL),('vn-database','10253','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-07-28 08:36:57',NULL,NULL),('vn-database','10254','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-07-28 08:38:48',NULL,NULL),('vn-database','10256','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-07-28 08:38:48',NULL,NULL),('vn-database','10258','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-12-16 09:14:48',NULL,NULL),('vn-database','10259','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-08-02 08:54:56',NULL,NULL),('vn-database','10261','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-07-22 08:42:20',NULL,NULL),('vn-database','10262','00-createTablepackagingWithFreight.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-09-02 17:22:13',NULL,NULL),('vn-database','10262','01-alterTablePackagingConfig.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-09-02 17:22:13',NULL,NULL),('vn-database','10262','02-insertsInicials.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-09-02 17:22:13',NULL,NULL),('vn-database','10262','03-createTablepackingWithoutFreight.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-09-02 17:22:14',NULL,NULL),('vn-database','10263','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-07-28 08:38:48',NULL,NULL),('vn-database','10265','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-07-28 08:38:48',NULL,NULL),('vn-database','10267','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-08-11 09:34:17',NULL,NULL),('vn-database','10267','01-fixMerge.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-08-11 09:34:17',NULL,NULL),('vn-database','10275','00-improvedGeneralLog.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-08-01 09:55:56',NULL,NULL),('vn-database','10277','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-09-08 10:26:32',NULL,NULL),('vn-database','10278','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-08-01 17:51:41',NULL,NULL),('vn-database','10279','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-08-11 09:34:17',NULL,NULL),('vn-database','10281','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-08-11 09:34:18',NULL,NULL),('vn-database','10282','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-08-11 09:34:18',NULL,NULL),('vn-database','10283','00-alterTable.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-08-11 09:34:18',NULL,NULL),('vn-database','10284','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-08-04 16:59:08',NULL,NULL),('vn-database','10285','00-firstScript.sql','jenkins@swarm-worker3.static.verdnatura.es','2022-08-05 09:19:33',NULL,NULL),('vn-database','10287','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-08-11 09:35:24',NULL,NULL),('vn-database','10288','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-08-11 09:35:24',NULL,NULL),('vn-database','10289','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-09-22 08:29:36',NULL,NULL),('vn-database','10291','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-08-10 14:19:34',NULL,NULL),('vn-database','10293','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-09-08 10:26:32',NULL,NULL),('vn-database','10297','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-08-16 12:43:36',NULL,NULL),('vn-database','10298','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-08-13 21:04:13',NULL,NULL),('vn-database','10299','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-09-02 17:22:14',NULL,NULL),('vn-database','10301','00-productionConfig.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-09-02 17:22:14',NULL,NULL),('vn-database','10301','01-drop.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-09-02 17:22:14',NULL,NULL),('vn-database','10301','02-collection.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-09-02 17:22:15',NULL,NULL),('vn-database','10302','00-CreateTableEntryType.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-09-02 17:22:15',NULL,NULL),('vn-database','10302','01-insertDataEntryType.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-09-02 17:22:15',NULL,NULL),('vn-database','10302','02-alterTableEntry.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-09-02 17:22:22',NULL,NULL),('vn-database','10303','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-09-02 17:22:23',NULL,NULL),('vn-database','10304','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-09-02 17:23:48',NULL,NULL),('vn-database','10304','01-altertableticket.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-09-02 17:23:51',NULL,NULL),('vn-database','10305','00-ektAssign.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-09-02 17:24:52',NULL,NULL),('vn-database','10306','00-deliveryInformation.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-09-02 17:25:25',NULL,NULL),('vn-database','10307','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-09-02 17:25:26',NULL,NULL),('vn-database','10308','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-09-02 17:26:43',NULL,NULL),('vn-database','10309','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-09-06 11:37:54',NULL,NULL),('vn-database','10310','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-09-08 10:26:33',NULL,NULL),('vn-database','10311','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-09-06 11:37:55',NULL,NULL),('vn-database','10312','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-09-08 10:26:33',NULL,NULL),('vn-database','10313','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-09-08 10:27:21',NULL,NULL),('vn-database','10314','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-09-20 12:37:19',NULL,NULL),('vn-database','10315','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-09-08 10:31:43',NULL,NULL),('vn-database','10317','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-09-08 10:31:43',NULL,NULL),('vn-database','10318','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-09-08 10:31:43',NULL,NULL),('vn-database','10319','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-09-20 12:37:41',NULL,NULL),('vn-database','10320','00-operator.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-09-22 08:29:37',NULL,NULL),('vn-database','10320','01-collection.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-09-22 08:29:37',NULL,NULL),('vn-database','10320','02-productionConfig.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-09-22 08:29:38',NULL,NULL),('vn-database','10321','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-09-08 11:11:12',NULL,NULL),('vn-database','10322','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-09-09 09:19:05',NULL,NULL),('vn-database','10326','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-09-22 08:29:38',NULL,NULL),('vn-database','10328','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-09-22 08:29:38',NULL,NULL),('vn-database','10329','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-09-22 08:29:38',NULL,NULL),('vn-database','10330','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-09-22 08:34:30',NULL,NULL),('vn-database','10332','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-09-22 08:34:30',NULL,NULL),('vn-database','10334','00-collectionHotbed.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-09-22 08:34:30',NULL,NULL),('vn-database','10334','01-saleGroupDetail.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-09-22 08:34:32',NULL,NULL),('vn-database','10335','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-10-06 09:52:38',NULL,NULL),('vn-database','10336','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-09-22 08:34:32',NULL,NULL),('vn-database','10337','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-09-22 08:34:32',NULL,NULL),('vn-database','10339','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-09-19 09:41:19',NULL,NULL),('vn-database','10340','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-09-29 11:08:03',NULL,NULL),('vn-database','10341','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-09-22 08:34:32',NULL,NULL),('vn-database','10342','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-09-29 11:08:03',NULL,NULL),('vn-database','10343','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-09-22 08:35:30',NULL,NULL),('vn-database','10345','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-11-04 08:25:16',NULL,NULL),('vn-database','10347','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-09-29 11:08:03',NULL,NULL),('vn-database','10347','01-addVirtualField.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-09-29 11:08:03',NULL,NULL),('vn-database','10349','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-10-06 09:52:38',NULL,NULL),('vn-database','10350','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-09-30 10:11:56',NULL,NULL),('vn-database','10352','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-11-04 08:25:16',NULL,NULL),('vn-database','10353','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-10-06 09:52:38',NULL,NULL),('vn-database','10354','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-10-06 09:52:38',NULL,NULL),('vn-database','10356','00-firstScript.sql','jenkins@swarm-worker1.static.verdnatura.es','2022-11-10 22:35:00',NULL,NULL),('vn-database','10356','01-orderConfigFk.sql','jenkins@swarm-worker1.static.verdnatura.es','2022-11-10 22:35:00',NULL,NULL),('vn-database','10356','02-orderConfigDrop.sql','jenkins@swarm-worker1.static.verdnatura.es','2022-11-10 22:35:00',NULL,NULL),('vn-database','10357','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-10-06 09:52:38',NULL,NULL),('vn-database','10359','00-improvedGeneralLog_collate.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-10-06 09:52:39',NULL,NULL),('vn-database','10360','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-10-06 09:52:39',NULL,NULL),('vn-database','10361','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-10-06 11:16:07',NULL,NULL),('vn-database','10362','00-dropUdfs.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-10-10 11:01:15',NULL,NULL),('vn-database','10363','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-11-04 08:25:17',NULL,NULL),('vn-database','10365','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-10-13 19:30:46',NULL,NULL),('vn-database','10368','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-11-04 08:25:17',NULL,NULL),('vn-database','10369','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-10-14 13:38:06',NULL,NULL),('vn-database','10370','00-deleteForeignKey.sql','jenkins@swarm-worker1.static.verdnatura.es','2022-11-17 14:32:41',NULL,NULL),('vn-database','10370','01-firstScript.sql','jenkins@swarm-worker1.static.verdnatura.es','2022-11-17 14:32:47',NULL,NULL),('vn-database','10370','02-deleteTable.sql','jenkins@swarm-worker1.static.verdnatura.es','2022-11-17 14:32:49',NULL,NULL),('vn-database','10370','03-accion.sql','jenkins@swarm-worker1.static.verdnatura.es','2022-11-17 14:32:49',NULL,NULL),('vn-database','10370','04-inter.sql','jenkins@swarm-worker1.static.verdnatura.es','2022-11-17 14:32:53',NULL,NULL),('vn-database','10371','00-firstScript.sql','jenkins@swarm-worker1.static.verdnatura.es','2023-01-12 10:56:23',NULL,NULL),('vn-database','10372','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-12-16 09:14:48',NULL,NULL),('vn-database','10373','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-10-19 08:31:58',NULL,NULL),('vn-database','10378','00-rename_routeUserPercentage.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-11-04 08:25:17',NULL,NULL),('vn-database','10379','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-03-09 08:40:16',NULL,NULL),('vn-database','10382','00-firstScript.sql','jenkins@swarm-worker1.static.verdnatura.es','2022-12-01 08:47:20',NULL,NULL),('vn-database','10383','00-firstScript.sql','jenkins@swarm-worker1.static.verdnatura.es','2022-11-17 14:32:53',NULL,NULL),('vn-database','10384','00-business_workcenterFk.sql','jenkins@db-proxy2.static.verdnatura.es','2023-05-12 09:18:01',NULL,NULL),('vn-database','10385','00-firstScript.sql','jenkins@swarm-worker1.static.verdnatura.es','2022-11-17 14:32:54',NULL,NULL),('vn-database','10386','00-firstScript.sql','jenkins@swarm-worker1.static.verdnatura.es','2022-11-17 14:32:54',NULL,NULL),('vn-database','10387','00-firstScript.sql','jenkins@swarm-worker1.static.verdnatura.es','2022-11-16 14:05:33',NULL,NULL),('vn-database','10388','00-resizeUtilVerionLogCode.sql','jenkins@swarm-worker1.static.verdnatura.es','2022-12-01 08:47:20',NULL,NULL),('vn-database','10388','01-resizeUtilVersionCode.sql','jenkins@swarm-worker1.static.verdnatura.es','2022-12-01 08:47:20',NULL,NULL),('vn-database','10390','00-firstScript.sql','jenkins@swarm-worker1.static.verdnatura.es','2022-12-01 08:50:16',NULL,NULL),('vn-database','10391','00-firstScript.sql','jenkins@swarm-worker1.static.verdnatura.es','2023-01-12 10:56:23',NULL,NULL),('vn-database','10394','00-firstScript.sql','jenkins@swarm-worker1.static.verdnatura.es','2022-12-01 08:50:24',NULL,NULL),('vn-database','10395','00-firstScript.sql','jenkins@swarm-worker1.static.verdnatura.es','2022-12-01 08:50:29',NULL,NULL),('vn-database','10396','00-firstScript.sql','jenkins@swarm-worker1.static.verdnatura.es','2022-11-17 15:36:38',NULL,NULL),('vn-database','10397','00-firstScript.sql','jenkins@swarm-worker1.static.verdnatura.es','2022-12-01 08:50:29',NULL,NULL),('vn-database','10399','00-firstScript.sql','jenkins@swarm-worker1.static.verdnatura.es','2022-12-01 08:50:29',NULL,NULL),('vn-database','10400','00-firstScript.sql','jenkins@swarm-worker1.static.verdnatura.es','2022-12-01 08:50:29',NULL,NULL),('vn-database','10402','00-firstScript.sql','jenkins@swarm-worker1.static.verdnatura.es','2022-11-21 14:11:31',NULL,NULL),('vn-database','10404','00-firstScript.sql','jenkins@swarm-worker1.static.verdnatura.es','2022-12-01 08:50:29',NULL,NULL),('vn-database','10405','00-firstScript.sql','jenkins@swarm-worker1.static.verdnatura.es','2023-02-16 09:58:22',NULL,NULL),('vn-database','10407','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-12-16 09:14:49',NULL,NULL),('vn-database','10408','00-firstScript.sql','jenkins@swarm-worker1.static.verdnatura.es','2023-01-12 10:56:23',NULL,NULL),('vn-database','10409','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-12-16 09:14:49',NULL,NULL),('vn-database','10412','00-firstScript.sql','jenkins@swarm-worker1.static.verdnatura.es','2022-11-30 12:45:44',NULL,NULL),('vn-database','10413','00-firstScript.sql','jenkins@swarm-worker1.static.verdnatura.es','2023-01-12 10:56:24',NULL,NULL),('vn-database','10416','00-firstScript.sql','jenkins@swarm-worker1.static.verdnatura.es','2023-01-12 10:56:24',NULL,NULL),('vn-database','10420','00-firstScript.sql','jenkins@swarm-worker1.static.verdnatura.es','2023-01-12 10:56:25',NULL,NULL),('vn-database','10421','00-firstScript.sql','jenkins@swarm-worker1.static.verdnatura.es','2023-01-12 10:56:26',NULL,NULL),('vn-database','10426','00-firstScript.sql','jenkins@db-proxy1.static.verdnatura.es','2023-04-20 09:07:40',NULL,NULL),('vn-database','10428','00-firstScript.sql','jenkins@swarm-worker1.static.verdnatura.es','2023-01-26 13:27:05',NULL,NULL),('vn-database','10431','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-03-23 09:09:22',NULL,NULL),('vn-database','10433','00-firstScript.sql','jenkins@swarm-worker1.static.verdnatura.es','2023-01-26 13:27:05',NULL,NULL),('vn-database','10434','00-firstScript.sql','jenkins@swarm-worker1.static.verdnatura.es','2023-01-26 13:27:05',NULL,NULL),('vn-database','10435','00-firstScript.sql','jenkins@swarm-worker1.static.verdnatura.es','2023-01-13 07:30:10',NULL,NULL),('vn-database','10436','00-createFkWorker.sql','jenkins@swarm-worker1.static.verdnatura.es','2023-02-16 09:58:59',NULL,NULL),('vn-database','10436','01-addStateToWorkerProductivity.sql','jenkins@swarm-worker1.static.verdnatura.es','2023-02-16 09:59:00',NULL,NULL),('vn-database','10436','02-DeprecateVnSaleTrackingState.sql','jenkins@swarm-worker1.static.verdnatura.es','2023-02-16 09:59:00',NULL,NULL),('vn-database','10436','03-DeprecateColumnVnSaleTrackingActionFk.sql','jenkins@swarm-worker1.static.verdnatura.es','2023-02-16 09:59:01',NULL,NULL),('vn-database','10436','04-DropSchemaVnControl.sql','jenkins@swarm-worker1.static.verdnatura.es','2023-02-16 09:59:01',NULL,NULL),('vn-database','10436','05-RemoveFkWorkerProductivity.sql','jenkins@db-proxy2.static.verdnatura.es','2023-02-17 14:51:19',NULL,NULL),('vn-database','10439','00-fixRole.sql','jenkins@db-proxy2.static.verdnatura.es','2023-05-25 09:13:26',NULL,NULL),('vn-database','10440','00-firstScript.sql','jenkins@db-proxy1.static.verdnatura.es','2023-02-23 10:28:41',NULL,NULL),('vn-database','10444','00-firstScript.sql','jenkins@swarm-worker1.static.verdnatura.es','2023-02-16 09:59:01',NULL,NULL),('vn-database','10445','00-firstScript.sql','jenkins@swarm-worker1.static.verdnatura.es','2023-02-16 09:59:31',NULL,NULL),('vn-database','10448','00-firstScript.sql','jenkins@swarm-worker1.static.verdnatura.es','2023-02-16 09:59:31',NULL,NULL),('vn-database','10450','00-firstScript.sql','jenkins@swarm-worker1.static.verdnatura.es','2023-01-27 08:28:04',NULL,NULL),('vn-database','10451','00-firstScript.sql','jenkins@swarm-worker1.static.verdnatura.es','2023-02-06 08:08:32',NULL,NULL),('vn-database','10452','00-firstScript.sql','jenkins@swarm-worker1.static.verdnatura.es','2023-01-31 12:30:04',NULL,NULL),('vn-database','10453','00-firstScript.sql','jenkins@swarm-worker1.static.verdnatura.es','2023-01-31 14:04:37',NULL,NULL),('vn-database','10454','00-firstScript.sql','jenkins@swarm-worker1.static.verdnatura.es','2023-01-31 12:30:04',NULL,NULL),('vn-database','10455','00-firstScript.sql','jenkins@swarm-worker1.static.verdnatura.es','2023-01-31 12:30:04',NULL,NULL),('vn-database','10456','00-firstScript.sql','jenkins@swarm-worker1.static.verdnatura.es','2023-01-31 12:00:30',NULL,NULL),('vn-database','10457','00-firstScript.sql','jenkins@swarm-worker1.static.verdnatura.es','2023-01-31 12:00:33',NULL,NULL),('vn-database','10458','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-03-09 08:40:17',NULL,NULL),('vn-database','10459','00-alterTableUtilConfig.sql','jenkins@db-proxy1.static.verdnatura.es','2023-02-23 10:28:41',NULL,NULL),('vn-database','10459','01-createFunctionCurdate.sql','jenkins@db-proxy1.static.verdnatura.es','2023-02-23 10:28:41',NULL,NULL),('vn-database','10459','02-createFunctionMockTime.sql','jenkins@db-proxy1.static.verdnatura.es','2023-02-23 10:28:41',NULL,NULL),('vn-database','10459','03-createFunctionMockTimeBase.sql','jenkins@db-proxy1.static.verdnatura.es','2023-02-23 10:28:41',NULL,NULL),('vn-database','10459','04-createFunctionNow.sql','jenkins@db-proxy1.static.verdnatura.es','2023-02-23 10:28:41',NULL,NULL),('vn-database','10460','00-firstScript.sql','jenkins@swarm-worker1.static.verdnatura.es','2023-02-16 09:59:31',NULL,NULL),('vn-database','10461','00-firstScript.sql','jenkins@swarm-worker1.static.verdnatura.es','2023-02-16 09:59:31',NULL,NULL),('vn-database','10463','00-firstScript.sql','jenkins@swarm-worker1.static.verdnatura.es','2023-02-03 12:59:26',NULL,NULL),('vn-database','10468','00-firstScript.sql','jenkins@swarm-worker1.static.verdnatura.es','2023-02-16 09:59:31',NULL,NULL),('vn-database','10469','00-firstScript.sql','jenkins@swarm-worker1.static.verdnatura.es','2023-02-16 09:59:31',NULL,NULL),('vn-database','10470','00-firstScript.sql','jenkins@db-proxy1.static.verdnatura.es','2023-02-23 10:28:54',NULL,NULL),('vn-database','10471','00-firstScript.sql','jenkins@db-proxy1.static.verdnatura.es','2023-02-23 10:28:54',NULL,NULL),('vn-database','10472','00-firstScript.sql','jenkins@db-proxy1.static.verdnatura.es','2023-02-23 10:28:54',NULL,NULL),('vn-database','10477','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-03-23 09:09:31',NULL,NULL),('vn-database','10478','00-dropBasket.sql','jenkins@db-proxy1.static.verdnatura.es','2023-02-23 10:28:54',NULL,NULL),('vn-database','10478','00-firstScript.sql','jenkins@db-proxy1.static.verdnatura.es','2023-02-23 10:28:54',NULL,NULL),('vn-database','10478','01-orderConfigured.sql','jenkins@db-proxy1.static.verdnatura.es','2023-02-23 10:29:16',NULL,NULL),('vn-database','10478','02-configuredUpdate.sql','jenkins@db-proxy1.static.verdnatura.es','2023-02-23 10:29:53',NULL,NULL),('vn-database','10478','99-privileges.sql','jenkins@db-proxy1.static.verdnatura.es','2023-02-23 10:29:53',NULL,NULL),('vn-database','10480','00-firstScript.sql','jenkins@db-proxy1.static.verdnatura.es','2023-02-17 15:09:26',NULL,NULL),('vn-database','10481','00-firstScript.sql','jenkins@db-proxy1.static.verdnatura.es','2023-02-17 16:37:22',NULL,NULL),('vn-database','10482','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-02-21 10:00:28',NULL,NULL),('vn-database','10485','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-03-09 08:40:17',NULL,NULL),('vn-database','10488','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-03-09 08:40:17',NULL,NULL),('vn-database','10491','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-03-09 08:40:18',NULL,NULL),('vn-database','10492','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-03-09 08:40:18',NULL,NULL),('vn-database','10493','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-05-12 09:18:01',NULL,NULL),('vn-database','10495','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-03-09 08:40:19',NULL,NULL),('vn-database','10498','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-03-23 09:09:38',NULL,NULL),('vn-database','10500','00-firstScript.sql','jenkins@db-proxy1.static.verdnatura.es','2023-03-03 07:06:03',NULL,NULL),('vn-database','10501','00-firstScript.sql','jenkins@db-proxy1.static.verdnatura.es','2023-03-03 10:52:24',NULL,NULL),('vn-database','10502','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-03-23 09:09:48',NULL,NULL),('vn-database','10504','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-05-25 09:13:27',NULL,NULL),('vn-database','10506','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-03-23 09:09:48',NULL,NULL),('vn-database','10506','01-firstScript.sql','jenkins@db-proxy1.static.verdnatura.es','2023-06-15 12:30:18',NULL,NULL),('vn-database','10506','02-secondScript.sql','jenkins@db-proxy1.static.verdnatura.es','2023-06-15 12:30:18',NULL,NULL),('vn-database','10506','03-thirdScript.sql','jenkins@db-proxy1.static.verdnatura.es','2023-06-15 12:30:18',NULL,NULL),('vn-database','10507','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-04-05 10:35:23',NULL,NULL),('vn-database','10508','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-04-05 10:36:43',NULL,NULL),('vn-database','10510','00-dropBusinessFk.sql','jenkins@db-proxy2.static.verdnatura.es','2023-04-05 10:36:47',NULL,NULL),('vn-database','10510','01-createTableProfessionalCategory.sql','jenkins@db-proxy2.static.verdnatura.es','2023-04-05 10:36:47',NULL,NULL),('vn-database','10510','02-exportToNewTable.sql','jenkins@db-proxy2.static.verdnatura.es','2023-04-05 10:36:47',NULL,NULL),('vn-database','10510','03-RecreateFK.sql','jenkins@db-proxy2.static.verdnatura.es','2023-04-05 10:36:51',NULL,NULL),('vn-database','10510','04-kkPostgresqlTable.sql','jenkins@db-proxy2.static.verdnatura.es','2023-04-05 10:36:51',NULL,NULL),('vn-database','10511','00-firstScript.sql','jenkins@db-proxy1.static.verdnatura.es','2023-04-20 09:07:41',NULL,NULL),('vn-database','10512','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-04-05 10:36:52',NULL,NULL),('vn-database','10513','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-04-05 10:36:56',NULL,NULL),('vn-database','10514','00-firstScript.sql','jenkins@db-proxy1.static.verdnatura.es','2023-04-20 09:07:41',NULL,NULL),('vn-database','10516','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-03-23 09:09:48',NULL,NULL),('vn-database','10521','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-03-21 06:58:13',NULL,NULL),('vn-database','10522','00-firstScript.sql','jenkins@db-proxy1.static.verdnatura.es','2023-04-20 09:07:41',NULL,NULL),('vn-database','10523','00-firstScript.sql','jenkins@db-proxy1.static.verdnatura.es','2023-04-20 09:07:41',NULL,NULL),('vn-database','10525','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-03-21 12:42:50',NULL,NULL),('vn-database','10526','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-04-05 10:36:57',NULL,NULL),('vn-database','10528','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-04-05 10:37:00',NULL,NULL),('vn-database','10530','00-firstScript.sql','jenkins@db-proxy1.static.verdnatura.es','2023-03-23 14:49:30',NULL,NULL),('vn-database','10531','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-03-24 11:47:10',NULL,NULL),('vn-database','10532','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-03-24 11:17:38',NULL,NULL),('vn-database','10533','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-04-05 10:37:04',NULL,NULL),('vn-database','10537','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-03-29 15:18:36',NULL,NULL),('vn-database','10538','00-createChronopostConfig.sql','jenkins@db-proxy1.static.verdnatura.es','2023-04-20 09:07:41',NULL,NULL),('vn-database','10538','01-createChronopostService.sql','jenkins@db-proxy1.static.verdnatura.es','2023-04-20 09:07:41',NULL,NULL),('vn-database','10538','02-createChronopostExpedition.sql','jenkins@db-proxy1.static.verdnatura.es','2023-04-20 09:07:41',NULL,NULL),('vn-database','10538','03-createChronopostSenderAddress.sql','jenkins@db-proxy1.static.verdnatura.es','2023-04-20 09:07:41',NULL,NULL),('vn-database','10538','04-addgrantPrivilegies.sql','jenkins@db-proxy1.static.verdnatura.es','2023-04-20 09:07:41',NULL,NULL),('vn-database','10538','05-updateChronopostConfig.sql','jenkins@db-proxy1.static.verdnatura.es','2023-04-21 11:54:57',NULL,NULL),('vn-database','10539','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-04-05 10:37:07',NULL,NULL),('vn-database','10540','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-05-12 09:18:01',NULL,NULL),('vn-database','10545','00-firstScript.sql','jenkins@db-proxy1.static.verdnatura.es','2023-04-11 08:31:03',NULL,NULL),('vn-database','10546','00-firstScript.sql','jenkins@db-proxy1.static.verdnatura.es','2023-04-20 09:08:10',NULL,NULL),('vn-database','10547','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-05-12 09:21:58',NULL,NULL),('vn-database','10549','00-updateUpdateLog.sql','jenkins@db-proxy1.static.verdnatura.es','2023-04-21 07:29:22',NULL,NULL),('vn-database','10549','01-updateInsertLog.sql','jenkins@db-proxy1.static.verdnatura.es','2023-04-21 07:30:11',NULL,NULL),('vn-database','10549','02-updateDeleteLog.sql','jenkins@db-proxy1.static.verdnatura.es','2023-04-21 07:30:51',NULL,NULL),('vn-database','10549','03-deleteEmptyLog.sql','jenkins@db-proxy1.static.verdnatura.es','2023-04-21 07:31:34',NULL,NULL),('vn-database','10549','04-optimizeLogTables.sql','jenkins@db-proxy1.static.verdnatura.es','2023-04-21 07:33:58',NULL,NULL),('vn-database','10550','00-editorFk.sql','jenkins@db-proxy2.static.verdnatura.es','2023-05-12 09:42:33',NULL,NULL),('vn-database','10550','01-originFk.sql','jenkins@db-proxy2.static.verdnatura.es','2023-05-12 09:45:28',NULL,NULL),('vn-database','10552','00-firstScript.sql','jenkins@db-proxy1.static.verdnatura.es','2023-04-13 08:25:10',NULL,NULL),('vn-database','10554','00-firstScript.sql','jenkins@db-proxy1.static.verdnatura.es','2023-04-20 09:08:10',NULL,NULL),('vn-database','10557','00-firstScript.sql','jenkins@db-proxy1.static.verdnatura.es','2023-04-17 07:45:56',NULL,NULL),('vn-database','10559','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-04-18 10:53:50',NULL,NULL),('vn-database','10560','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-04-17 09:19:31',NULL,NULL),('vn-database','10562','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-05-12 09:45:28',NULL,NULL),('vn-database','10563','00-delivery_ticketFk.sql','jenkins@db-proxy2.static.verdnatura.es','2023-04-20 09:30:53',NULL,NULL),('vn-database','10566','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-04-20 10:08:41',NULL,NULL),('vn-database','10567','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-04-20 10:18:06',NULL,NULL),('vn-database','10568','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-05-12 09:45:28',NULL,NULL),('vn-database','10569','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-04-24 09:14:35',NULL,NULL),('vn-database','10570','00-createSendingConfig.sql','jenkins@db-proxy2.static.verdnatura.es','2023-05-12 09:45:28',NULL,NULL),('vn-database','10570','01-createSendingServiceWeekday.sql','jenkins@db-proxy2.static.verdnatura.es','2023-05-12 09:45:28',NULL,NULL),('vn-database','10570','02-createSendingService.sql','jenkins@db-proxy2.static.verdnatura.es','2023-05-12 09:45:28',NULL,NULL),('vn-database','10570','03-permisos.sql','jenkins@db-proxy2.static.verdnatura.es','2023-05-12 09:45:28',NULL,NULL),('vn-database','10571','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-05-25 09:13:27',NULL,NULL),('vn-database','10575','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-04-26 11:27:32',NULL,NULL),('vn-database','10577','00-firstScript.sql','jenkins@db-proxy1.static.verdnatura.es','2023-04-27 14:00:12',NULL,NULL),('vn-database','10578','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-05-12 09:45:28',NULL,NULL),('vn-database','10579','00-firstScript.sql','jenkins@db-proxy1.static.verdnatura.es','2023-04-28 11:27:36',NULL,NULL),('vn-database','10580','00-itemTypeDropConstraint.sql','jenkins@db-proxy2.static.verdnatura.es','2023-04-28 18:18:52',NULL,NULL),('vn-database','10580','01-itemTypeAddConstraint.sql','jenkins@db-proxy2.static.verdnatura.es','2023-04-28 18:19:10',NULL,NULL),('vn-database','10581','00-itemTypeAutoIncrement.sql','jenkins@db-proxy2.static.verdnatura.es','2023-04-28 19:06:46',NULL,NULL),('vn-database','10582','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-05-12 09:45:28',NULL,NULL),('vn-database','10583','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-05-12 09:45:28',NULL,NULL),('vn-database','10584','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-05-12 09:45:28',NULL,NULL),('vn-database','10585','00-ticketLog.sql','jenkins@db-proxy2.static.verdnatura.es','2023-05-25 09:20:10',NULL,NULL),('vn-database','10585','01-entryLog.sql','jenkins@db-proxy2.static.verdnatura.es','2023-05-25 09:21:12',NULL,NULL),('vn-database','10585','02-claimLog.sql','jenkins@db-proxy1.static.verdnatura.es','2023-05-25 09:28:36',NULL,NULL),('vn-database','10585','03-clientLog.sql','jenkins@db-proxy1.static.verdnatura.es','2023-05-25 09:28:54',NULL,NULL),('vn-database','10585','04-invoiceInLog.sql','jenkins@db-proxy1.static.verdnatura.es','2023-05-25 09:28:55',NULL,NULL),('vn-database','10585','05-itemLog.sql','jenkins@db-proxy1.static.verdnatura.es','2023-05-25 09:29:46',NULL,NULL),('vn-database','10585','06-routeLog.sql','jenkins@db-proxy1.static.verdnatura.es','2023-05-25 09:30:18',NULL,NULL),('vn-database','10585','07-shelvingLog.sql','jenkins@db-proxy1.static.verdnatura.es','2023-05-25 09:30:32',NULL,NULL),('vn-database','10585','08-supplierLog.sql','jenkins@db-proxy1.static.verdnatura.es','2023-05-25 09:30:32',NULL,NULL),('vn-database','10585','09-travelLog.sql','jenkins@db-proxy1.static.verdnatura.es','2023-05-25 09:30:41',NULL,NULL),('vn-database','10585','10-workerLog.sql','jenkins@db-proxy1.static.verdnatura.es','2023-05-25 09:30:42',NULL,NULL),('vn-database','10585','11-zoneLog.sql','jenkins@db-proxy1.static.verdnatura.es','2023-05-25 09:30:43',NULL,NULL),('vn-database','10585','12-userLog.sql','jenkins@db-proxy1.static.verdnatura.es','2023-05-25 09:30:44',NULL,NULL),('vn-database','10585','13-roleLog.sql','jenkins@db-proxy1.static.verdnatura.es','2023-05-25 09:30:44',NULL,NULL),('vn-database','10587','00-arcRead_addMinimum.sql','jenkins@db-proxy1.static.verdnatura.es','2023-05-16 13:13:15',NULL,NULL),('vn-database','10593','00-firstScript.sql','jenkins@db-proxy1.static.verdnatura.es','2023-05-25 09:30:44',NULL,NULL),('vn-database','10596','00-firstScript.sql','jenkins@db-proxy1.static.verdnatura.es','2023-05-25 09:30:44',NULL,NULL),('vn-database','10597','00-firstScript.sql','jenkins@db-proxy1.static.verdnatura.es','2023-05-25 09:30:44',NULL,NULL),('vn-database','10598','00-workerLog.sql','jenkins@db-proxy2.static.verdnatura.es','2023-05-12 09:45:29',NULL,NULL),('vn-database','10598','01-supplierLog.sql','jenkins@db-proxy2.static.verdnatura.es','2023-05-12 09:45:29',NULL,NULL),('vn-database','10598','02-workerTimeControlLog.sql','jenkins@db-proxy2.static.verdnatura.es','2023-05-12 09:45:29',NULL,NULL),('vn-database','10598','03-workerClockLog.sql','jenkins@db-proxy2.static.verdnatura.es','2023-05-12 09:45:29',NULL,NULL),('vn-database','10599','00-firstScript.sql','jenkins@db-proxy1.static.verdnatura.es','2023-05-25 09:30:44',NULL,NULL),('vn-database','10601','00-firstScript.sql','jenkins@db-proxy1.static.verdnatura.es','2023-05-17 09:26:26',NULL,NULL),('vn-database','10602','00-firstScript.sql','jenkins@db-proxy1.static.verdnatura.es','2023-05-18 08:52:15',NULL,NULL),('vn-database','10606','00-firstScript.sql','jenkins@db-proxy1.static.verdnatura.es','2023-05-18 09:26:00',NULL,NULL),('vn-database','10608','00-firstScript.sql','jenkins@db-proxy1.static.verdnatura.es','2023-05-18 12:36:31',NULL,NULL),('vn-database','10609','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-06-01 08:28:07',NULL,NULL),('vn-database','10610','00-updateCompanyId.sql','jenkins@db-proxy1.static.verdnatura.es','2023-06-01 09:11:07',NULL,NULL),('vn-database','10610','01-updateSupplierId.sql','jenkins@db-proxy1.static.verdnatura.es','2023-06-01 09:11:39',NULL,NULL),('vn-database','10610','02-invoiceOutCompany.sql','jenkins@db-proxy2.static.verdnatura.es','2023-06-01 09:49:55',NULL,NULL),('vn-database','10611','00-firstScript.sql','jenkins@db-proxy1.static.verdnatura.es','2023-05-19 14:39:41',NULL,NULL),('vn-database','10613','00-firstScript.sql','jenkins@db-proxy1.static.verdnatura.es','2023-06-15 12:30:18',NULL,NULL),('vn-database','10614','00-firstScript.sql','jenkins@db-proxy1.static.verdnatura.es','2023-06-01 09:11:40',NULL,NULL),('vn-database','10615','00-firstScript.sql','jenkins@db-proxy1.static.verdnatura.es','2023-06-01 09:11:40',NULL,NULL),('vn-database','10617','00-firstScript.sql','jenkins@db-proxy1.static.verdnatura.es','2023-06-01 09:11:41',NULL,NULL),('vn-database','10618','00-firstScript.sql','jenkins@db-proxy1.static.verdnatura.es','2023-05-25 12:55:56',NULL,NULL),('vn-database','10619','00-firstScript.sql','jenkins@db-proxy1.static.verdnatura.es','2023-06-15 12:30:18',NULL,NULL),('vn-database','10624','00-firstScript.sql','jenkins@db-proxy1.static.verdnatura.es','2023-05-30 19:01:10',NULL,NULL),('vn-database','10628','00-firstScript.sql','jenkins@db-proxy1.static.verdnatura.es','2023-06-15 12:30:18',NULL,NULL),('vn-database','10630','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-06-02 13:30:58',NULL,NULL),('vn-database','10631','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-06-05 08:37:25',NULL,NULL),('vn-database','10632','00-firstScript.sql','jenkins@db-proxy1.static.verdnatura.es','2023-06-15 12:30:18',NULL,NULL),('vn-database','10633','00-firstScript.sql','jenkins@db-proxy1.static.verdnatura.es','2023-06-15 12:30:18',NULL,NULL),('vn-database','10634','00-firstScript.sql','jenkins@db-proxy1.static.verdnatura.es','2023-06-06 12:15:55',NULL,NULL),('vn-database','10637','00-firstScript.sql','jenkins@db-proxy1.static.verdnatura.es','2023-06-15 12:30:19',NULL,NULL),('vn-database','10640','00-companyFkDrop.sql','jenkins@db-proxy2.static.verdnatura.es','2023-06-07 14:43:23',NULL,NULL),('vn-database','10640','00-updateCompany.sql','jenkins@db-proxy1.static.verdnatura.es','2023-06-07 14:22:13',1205,'Tiempo de espera de bloqueo excedido; intente rearrancar la transacción'),('vn-database','10640','01-companyFkAi.sql','jenkins@db-proxy2.static.verdnatura.es','2023-06-07 14:43:23',NULL,NULL),('vn-database','10640','02-companyFkCreate.sql','jenkins@db-proxy2.static.verdnatura.es','2023-06-07 14:47:04',NULL,NULL),('vn-database','10640','04-supplierFkDrop.sql','jenkins@db-proxy2.static.verdnatura.es','2023-06-07 14:48:30',NULL,NULL),('vn-database','10640','05-supplierFkAi.sql','jenkins@db-proxy2.static.verdnatura.es','2023-06-07 14:53:17',NULL,NULL),('vn-database','10640','06-supplierFkCreate.sql','jenkins@db-proxy2.static.verdnatura.es','2023-06-07 15:06:00',NULL,NULL),('vn-database','10643','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-06-09 15:04:35',NULL,NULL),('vn-database','10649','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-06-16 10:59:06',NULL,NULL);
+INSERT INTO `versionLog` VALUES ('vn-database','00001','00-test.sql','juan@10.5.1.3','2022-01-31 10:12:26',NULL,NULL),('vn-database','00003','00-sage.sql','juan@10.5.1.3','2022-01-31 10:12:26',NULL,NULL),('vn-database','10008','00-alterRoleConfig.sql','juan@10.5.1.3','2022-01-31 10:12:26',NULL,NULL),('vn-database','10014','00-rolePrefix.sql','jenkins@10.0.2.68','2022-02-11 00:13:25',NULL,NULL),('vn-database','10017','01-firstScript.sql','jenkins@10.0.2.70','2022-03-09 11:36:54',NULL,NULL),('vn-database','10021','00-bankAccount.sql','jenkins@10.0.2.69','2022-03-16 14:11:22',NULL,NULL),('vn-database','10023','00-firstScript.sql','jenkins@10.0.2.69','2022-03-16 15:05:29',NULL,NULL),('vn-database','10026','00-invoiceInIntrastat.sql','jenkins@10.0.2.69','2022-03-21 15:10:53',NULL,NULL),('vn-database','10027','00-Clientes_cedidos.sql','jenkins@10.0.2.69','2022-03-22 15:58:12',NULL,NULL),('vn-database','10028','00-item_last_buy_.sql','jenkins@10.0.2.69','2022-03-22 15:58:12',NULL,NULL),('vn-database','10029','00-bankToViewAccountingToTable.sql','jenkins@10.0.2.69','2022-03-22 15:58:12',NULL,NULL),('vn-database','10030','00-KkejarNiche.sql','jenkins@10.0.2.69','2022-03-22 15:58:12',NULL,NULL),('vn-database','10036','00-updateBuyConfig.sql','jenkins@10.0.2.69','2022-03-29 12:36:54',NULL,NULL),('vn-database','10037','00-firstScript.sql','jenkins@10.0.2.69','2022-03-28 11:14:26',NULL,NULL),('vn-database','10038','00-printServerQueue.sql','jenkins@10.0.2.69','2022-03-29 08:13:24',NULL,NULL),('vn-database','10048','00-firstScript.sql','jenkins@10.0.2.69','2022-03-30 12:29:06',NULL,NULL),('vn-database','10058','00-vehicleAddFields.sql','jenkins@10.0.2.69','2022-04-06 08:48:34',NULL,NULL),('vn-database','10060','00-firstScript.sql','jenkins@10.0.2.69','2022-04-07 08:50:11',NULL,NULL),('vn-database','10062','00-firstScript.sql','jenkins@10.0.2.69','2022-04-06 10:51:45',NULL,NULL),('vn-database','10064','00-firstScript.sql','jenkins@10.0.2.69','2022-04-06 13:57:11',NULL,NULL),('vn-database','10066','00-firstScript.sql','jenkins@10.0.2.69','2022-04-07 08:50:12',NULL,NULL),('vn-database','10067','00-firstScript.sql','jenkins@10.0.2.69','2022-04-08 10:18:20',NULL,NULL),('vn-database','10071','00-packingSiteLog.sql','jenkins@10.0.2.69','2022-04-08 09:37:30',NULL,NULL),('vn-database','10072','00-firstScript.sql','jenkins@10.0.2.69','2022-04-08 11:01:46',NULL,NULL),('vn-database','10073','00-firstScript.sql','jenkins@10.0.2.69','2022-04-08 13:40:56',NULL,NULL),('vn-database','10074','00-firstScript.sql','jenkins@10.0.2.69','2022-04-10 13:15:05',NULL,NULL),('vn-database','10077','00-firstScript.sql','jenkins@10.0.2.69','2022-04-12 08:07:15',NULL,NULL),('vn-database','10078','00-firstScript.sql','jenkins@10.0.2.69','2022-04-13 07:44:21',NULL,NULL),('vn-database','10079','00-firstScript.sql','jenkins@10.0.2.69','2022-04-12 12:01:37',NULL,NULL),('vn-database','10086','00-firstScript.sql','jenkins@10.0.2.69','2022-04-13 08:58:34',NULL,NULL),('vn-database','10087','00-firstScript.sql','jenkins@10.0.2.69','2022-04-13 09:39:49',NULL,NULL),('vn-database','10088','00-firstScript.sql','jenkins@10.0.2.69','2022-04-13 15:05:12',NULL,NULL),('vn-database','10089','00-firstScript.sql','jenkins@10.0.2.69','2022-04-18 14:12:52',NULL,NULL),('vn-database','10090','00-firstScript.sql','jenkins@10.0.2.69','2022-04-18 14:34:46',NULL,NULL),('vn-database','10092','00-firstScript.sql','jenkins@10.0.2.69','2022-04-19 14:45:46',NULL,NULL),('vn-database','10093','00-autoradioConfig.sql','jenkins@10.0.2.69','2022-05-03 09:16:47',NULL,NULL),('vn-database','10094','00-firstScript.sql','jenkins@10.0.2.69','2022-04-20 10:57:30',NULL,NULL),('vn-database','10097','00-firstScript.sql','jenkins@10.0.2.69','2022-05-05 10:12:59',NULL,NULL),('vn-database','10099','00-firstScript.sql','jenkins@10.0.2.69','2022-04-20 14:35:27',NULL,NULL),('vn-database','10100','00-firstScript.sql','jenkins@10.0.2.69','2022-04-20 14:35:27',NULL,NULL),('vn-database','10101','00-firstScript.sql','jenkins@10.0.2.69','2022-04-21 14:59:31',NULL,NULL),('vn-database','10103','00-awbVolume.sql','jenkins@10.0.2.69','2022-05-05 10:12:59',NULL,NULL),('vn-database','10104','00-firstScript.sql','jenkins@10.0.2.69','2022-05-05 10:12:59',NULL,NULL),('vn-database','10105','00-firstScript.sql','jenkins@10.0.2.69','2022-05-05 10:13:00',NULL,NULL),('vn-database','10107','00-firstScript.sql','jenkins@10.0.2.69','2022-04-23 10:53:53',NULL,NULL),('vn-database','10112','00-firstScript.sql','jenkins@10.0.2.69','2022-05-09 09:14:53',NULL,NULL),('vn-database','10113','00-firstScript.sql','jenkins@10.0.2.69','2022-05-05 10:13:00',NULL,NULL),('vn-database','10114','00-updateConfig.sql','jenkins@10.0.2.69','2022-04-27 13:37:25',NULL,NULL),('vn-database','10116','00-firstScript.sql','jenkins@10.0.2.69','2022-04-28 11:10:14',NULL,NULL),('vn-database','10118','00-firstScript.sql','jenkins@10.0.2.69','2022-04-29 08:10:15',NULL,NULL),('vn-database','10119','00-AfegirFKPart1.sql','jenkins@10.0.2.69','2022-05-05 10:13:00',NULL,NULL),('vn-database','10119','01-AfegirFkPart2.sql','jenkins@10.0.2.69','2022-05-05 10:22:25',NULL,NULL),('vn-database','10125','00-firstScript.sql','jenkins@10.0.2.68','2022-05-18 18:44:30',NULL,NULL),('vn-database','10127','00-firstScript.sql','jenkins@10.0.2.69','2022-05-02 11:04:46',NULL,NULL),('vn-database','10128','00-firstScript.sql','jenkins@10.0.2.69','2022-05-02 13:04:31',NULL,NULL),('vn-database','10129','00-firstScript.sql','jenkins@10.0.2.69','2022-05-03 08:21:01',NULL,NULL),('vn-database','10132','00-firstScript.sql','jenkins@10.0.2.69','2022-05-05 10:22:25',NULL,NULL),('vn-database','10133','00-firstScript.sql','jenkins@10.0.2.69','2022-05-05 14:32:30',NULL,NULL),('vn-database','10134','00-firstScript.sql','jenkins@10.0.2.69','2022-05-06 07:45:25',NULL,NULL),('vn-database','10135','00-firstScript.sql','jenkins@10.0.2.69','2022-06-17 08:46:17',NULL,NULL),('vn-database','10136','00-workerTimeControl.sql','jenkins@10.0.2.69','2022-05-09 13:51:12',NULL,NULL),('vn-database','10138','00-firstScript.sql','jenkins@10.0.2.69','2022-05-10 13:58:05',NULL,NULL),('vn-database','10139','00-firstScript.sql','jenkins@10.0.2.68','2022-05-16 14:32:37',NULL,NULL),('vn-database','10139','01-secondScript.sql','jenkins@10.0.2.68','2022-05-17 12:16:13',NULL,NULL),('vn-database','10141','00-firstScript.sql','jenkins@10.0.2.70','2022-05-12 08:27:31',NULL,NULL),('vn-database','10142','00-firstScript.sql','jenkins@10.0.2.68','2022-05-20 09:20:31',NULL,NULL),('vn-database','10143','00-firstScript.sql','jenkins@10.0.2.68','2022-05-20 09:20:31',NULL,NULL),('vn-database','10144','00-AfegirFKPArt1.sql','jenkins@10.0.2.68','2022-05-20 09:22:33',NULL,NULL),('vn-database','10144','00-firstScript.sql','jenkins@10.0.2.68','2022-05-13 09:44:25',NULL,NULL),('vn-database','10147','00-firstScript.sql','jenkins@10.0.2.68','2022-05-20 09:22:33',NULL,NULL),('vn-database','10149','00-firstScript.sql','jenkins@10.0.2.68','2022-05-20 09:22:33',NULL,NULL),('vn-database','10150','00-firstScript.sql','jenkins@10.0.2.68','2022-05-17 09:57:16',NULL,NULL),('vn-database','10152','00-firstScript.sql','jenkins@10.0.2.68','2022-05-20 09:22:34',NULL,NULL),('vn-database','10153','00-firstScript.sql','jenkins@10.0.2.68','2022-05-20 09:22:34',NULL,NULL),('vn-database','10154','00-compressionKk.sql','jenkins@10.0.2.68','2022-05-20 09:22:34',NULL,NULL),('vn-database','10157','00-firstScript.sql','jenkins@10.0.2.68','2022-05-20 09:22:35',NULL,NULL),('vn-database','10158','00-firstScript.sql','jenkins@10.0.2.68','2022-06-02 12:47:21',NULL,NULL),('vn-database','10160','00-firstScript.sql','jenkins@10.0.2.69','2022-06-30 09:30:50',NULL,NULL),('vn-database','10163','00-firstScript.sql','jenkins@10.0.2.68','2022-05-23 08:17:14',NULL,NULL),('vn-database','10164','00-borrarSectorsDesus.sql','jenkins@10.0.2.68','2022-06-02 12:47:21',NULL,NULL),('vn-database','10165','00-firstScript.sql','jenkins@10.0.2.68','2022-06-02 12:47:22',NULL,NULL),('vn-database','10166','00-firstScript.sql','jenkins@10.0.2.68','2022-05-24 16:11:21',NULL,NULL),('vn-database','10167','00-renameVnActiveContrat.sql','jenkins@10.0.2.68','2022-06-02 12:47:22',NULL,NULL),('vn-database','10168','00-firstScript.sql','jenkins@10.0.2.68','2022-06-02 12:47:22',NULL,NULL),('vn-database','10169','00-createTableBankEntityConfig.sql','jenkins@10.0.2.68','2022-06-02 12:47:22',NULL,NULL),('vn-database','10169','02-addNotNullToBankEntityBic.sql','jenkins@10.0.2.68','2022-06-02 12:47:22',NULL,NULL),('vn-database','10171','00-volumeConfig.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-08-18 14:11:11',NULL,NULL),('vn-database','10171','01-itemWeight.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-08-18 16:01:34',NULL,NULL),('vn-database','10171','02-agencymode.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-08-18 16:01:34',NULL,NULL),('vn-database','10172','00-firstScript.sql','jenkins@10.0.2.68','2022-06-02 12:47:22',NULL,NULL),('vn-database','10174','00-firstScript.sql','jenkins@10.0.2.69','2022-06-17 08:46:17',NULL,NULL),('vn-database','10175','00-firstScript.sql','jenkins@10.0.2.69','2022-06-17 09:03:41',NULL,NULL),('vn-database','10177','00-crearTablaSpecialLabels.sql','jenkins@10.0.2.68','2022-06-02 12:47:22',NULL,NULL),('vn-database','10178','00-firstScript.sql','jenkins@10.0.2.68','2022-06-02 12:47:24',NULL,NULL),('vn-database','10179','00-firstScript.sql','jenkins@10.0.2.68','2022-06-02 12:47:24',NULL,NULL),('vn-database','10183','00-firstScript.sql','jenkins@10.0.2.68','2022-06-02 12:47:24',NULL,NULL),('vn-database','10184','00-firstScript.sql','jenkins@10.0.2.68','2022-06-03 08:05:34',NULL,NULL),('vn-database','10185','00-firstScript.sql','jenkins@10.0.2.68','2022-06-06 09:07:45',NULL,NULL),('vn-database','10186','00-desactivar_trigger.sql','jenkins@10.0.2.68','2022-06-07 09:31:23',NULL,NULL),('vn-database','10186','01-alter_Table_buy.sql','jenkins@10.0.2.68','2022-06-07 09:34:47',NULL,NULL),('vn-database','10186','02-alter_table_entryConfig.sql','jenkins@10.0.2.68','2022-06-07 09:34:47',NULL,NULL),('vn-database','10186','04-regularizar_Sticker_Inventario.sql','jenkins@10.0.2.68','2022-06-07 09:34:51',NULL,NULL),('vn-database','10186','09-reactivar_trigger.sql','jenkins@10.0.2.68','2022-06-07 09:34:51',NULL,NULL),('vn-database','10187','00-firstScript.sql','jenkins@10.0.2.68','2022-06-06 12:37:31',NULL,NULL),('vn-database','10188','00-firstScript.sql','jenkins@10.0.2.68','2022-06-06 14:03:36',NULL,NULL),('vn-database','10189','00-firstScript.sql','jenkins@10.0.2.69','2022-06-17 09:03:41',NULL,NULL),('vn-database','10191','00-firstScript.sql','jenkins@10.0.2.69','2022-06-17 09:03:41',NULL,NULL),('vn-database','10193','00-delete.sql','jenkins@db-proxy2.static.verdnatura.es','2023-06-15 12:14:35',NULL,NULL),('vn-database','10193','01-botanicExport.sql','jenkins@db-proxy2.static.verdnatura.es','2023-06-15 12:14:43',NULL,NULL),('vn-database','10193','02-item.sql','jenkins@db-proxy2.static.verdnatura.es','2023-06-15 12:14:44',NULL,NULL),('vn-database','10193','03-autonomy.sql','jenkins@db-proxy2.static.verdnatura.es','2023-06-15 12:14:44',NULL,NULL),('vn-database','10193','03-turn.sql','jenkins@db-proxy2.static.verdnatura.es','2023-06-15 12:14:44',NULL,NULL),('vn-database','10193','04-country.sql','jenkins@db-proxy2.static.verdnatura.es','2023-06-15 12:14:44',NULL,NULL),('vn-database','10194','00-firstScript.sql','jenkins@10.0.2.69','2022-06-17 09:03:41',NULL,NULL),('vn-database','10195','00-firstScript.sql','jenkins@10.0.2.69','2022-06-17 09:03:41',NULL,NULL),('vn-database','10200','00-firstScript.sql','jenkins@10.0.2.69','2022-06-17 09:04:00',NULL,NULL),('vn-database','10201','00-firstScript.sql','jenkins@10.0.2.69','2022-06-17 09:04:00',NULL,NULL),('vn-database','10202','00-Remove_FK_to_ediGenus.sql','jenkins@10.0.2.69','2022-06-17 09:04:00',NULL,NULL),('vn-database','10203','00-firstScript.sql','jenkins@10.0.2.69','2022-06-17 09:04:01',NULL,NULL),('vn-database','10204','00-firstScript.sql','jenkins@10.0.2.69','2022-06-17 09:04:01',NULL,NULL),('vn-database','10205','00-firstScript.sql','jenkins@10.0.2.69','2022-06-17 09:04:21',NULL,NULL),('vn-database','10207','00-Alter_table_entry.sql','jenkins@10.0.2.69','2022-06-16 07:22:50',NULL,NULL),('vn-database','10207','01-Update_invoiceAmount.sql','jenkins@10.0.2.69','2022-06-16 07:23:00',NULL,NULL),('vn-database','10208','00-firstScript.sql','jenkins@10.0.2.69','2022-06-30 09:31:26',NULL,NULL),('vn-database','10209','00-firstScript.sql','jenkins@10.0.2.69','2022-06-16 08:47:40',NULL,NULL),('vn-database','10210','00-firstScript.sql','jenkins@10.0.2.69','2022-06-16 17:39:17',1046,'Base de datos no seleccionada'),('vn-database','10211','01-firstScript.sql','jenkins@10.0.2.69','2022-06-17 07:11:27',NULL,NULL),('vn-database','10215','00-renameIsInventory.sql','jenkins@10.0.2.69','2022-06-30 09:31:26',NULL,NULL),('vn-database','10216','00-firstScript.sql','jenkins@10.0.2.69','2022-06-23 11:15:28',NULL,NULL),('vn-database','10216','01-batchIndex.sql','jenkins@10.0.2.70','2022-06-27 18:10:55',NULL,NULL),('vn-database','10219','00-AddCollectionFkOnPackingSite.sql','jenkins@10.0.2.70','2022-06-29 09:23:42',NULL,NULL),('vn-database','10219','01-AddFkToCollectionFk.sql','jenkins@10.0.2.70','2022-06-29 09:23:43',NULL,NULL),('vn-database','10220','00-createPersonalProtectionEquipment.sql','jenkins@10.0.2.69','2022-06-30 09:31:26',NULL,NULL),('vn-database','10222','00-firstScript.sql','jenkins@10.0.2.69','2022-07-14 09:12:40',NULL,NULL),('vn-database','10223','00-firstScript.sql','jenkins@10.0.2.69','2022-07-14 09:13:52',NULL,NULL),('vn-database','10224','00-cosetes.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-07-21 12:03:45',NULL,NULL),('vn-database','10229','00-firstScript.sql','jenkins@10.0.2.69','2022-07-01 11:59:34',NULL,NULL),('vn-database','10231','01-tablaEktConfig.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-08-11 09:25:39',NULL,NULL),('vn-database','10233','00-firstScript.sql','jenkins@10.0.2.69','2022-07-14 09:13:53',NULL,NULL),('vn-database','10235','00-firstScript.sql','jenkins@10.0.2.69','2022-07-14 09:13:53',NULL,NULL),('vn-database','10236','00-firstScript.sql','jenkins@10.0.2.69','2022-07-05 12:11:40',NULL,NULL),('vn-database','10237','00-firstScript.sql','jenkins@10.0.2.69','2022-07-14 09:13:53',NULL,NULL),('vn-database','10238','00-worker_mobileExtension.sql','jenkins@10.0.2.69','2022-07-14 09:14:09',NULL,NULL),('vn-database','10239','00-firstScript.sql','jenkins@10.0.2.69','2022-07-07 21:51:58',NULL,NULL),('vn-database','10241','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-07-29 08:14:01',NULL,NULL),('vn-database','10242','00-firstScript.sql','jenkins@10.0.2.69','2022-07-14 09:14:32',NULL,NULL),('vn-database','10243','00-firstScript.sql','jenkins@10.0.2.69','2022-07-14 09:14:32',NULL,NULL),('vn-database','10245','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-07-28 08:34:51',NULL,NULL),('vn-database','10247','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-07-28 08:34:51',NULL,NULL),('vn-database','10248','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-07-20 17:27:51',NULL,NULL),('vn-database','10250','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-07-28 08:36:40',NULL,NULL),('vn-database','10253','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-07-28 08:36:57',NULL,NULL),('vn-database','10254','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-07-28 08:38:48',NULL,NULL),('vn-database','10256','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-07-28 08:38:48',NULL,NULL),('vn-database','10258','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-12-16 09:14:48',NULL,NULL),('vn-database','10259','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-08-02 08:54:56',NULL,NULL),('vn-database','10261','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-07-22 08:42:20',NULL,NULL),('vn-database','10262','00-createTablepackagingWithFreight.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-09-02 17:22:13',NULL,NULL),('vn-database','10262','01-alterTablePackagingConfig.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-09-02 17:22:13',NULL,NULL),('vn-database','10262','02-insertsInicials.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-09-02 17:22:13',NULL,NULL),('vn-database','10262','03-createTablepackingWithoutFreight.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-09-02 17:22:14',NULL,NULL),('vn-database','10263','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-07-28 08:38:48',NULL,NULL),('vn-database','10265','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-07-28 08:38:48',NULL,NULL),('vn-database','10267','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-08-11 09:34:17',NULL,NULL),('vn-database','10267','01-fixMerge.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-08-11 09:34:17',NULL,NULL),('vn-database','10275','00-improvedGeneralLog.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-08-01 09:55:56',NULL,NULL),('vn-database','10277','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-09-08 10:26:32',NULL,NULL),('vn-database','10278','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-08-01 17:51:41',NULL,NULL),('vn-database','10279','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-08-11 09:34:17',NULL,NULL),('vn-database','10281','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-08-11 09:34:18',NULL,NULL),('vn-database','10282','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-08-11 09:34:18',NULL,NULL),('vn-database','10283','00-alterTable.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-08-11 09:34:18',NULL,NULL),('vn-database','10284','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-08-04 16:59:08',NULL,NULL),('vn-database','10285','00-firstScript.sql','jenkins@swarm-worker3.static.verdnatura.es','2022-08-05 09:19:33',NULL,NULL),('vn-database','10287','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-08-11 09:35:24',NULL,NULL),('vn-database','10288','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-08-11 09:35:24',NULL,NULL),('vn-database','10289','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-09-22 08:29:36',NULL,NULL),('vn-database','10291','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-08-10 14:19:34',NULL,NULL),('vn-database','10293','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-09-08 10:26:32',NULL,NULL),('vn-database','10297','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-08-16 12:43:36',NULL,NULL),('vn-database','10298','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-08-13 21:04:13',NULL,NULL),('vn-database','10299','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-09-02 17:22:14',NULL,NULL),('vn-database','10301','00-productionConfig.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-09-02 17:22:14',NULL,NULL),('vn-database','10301','01-drop.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-09-02 17:22:14',NULL,NULL),('vn-database','10301','02-collection.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-09-02 17:22:15',NULL,NULL),('vn-database','10302','00-CreateTableEntryType.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-09-02 17:22:15',NULL,NULL),('vn-database','10302','01-insertDataEntryType.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-09-02 17:22:15',NULL,NULL),('vn-database','10302','02-alterTableEntry.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-09-02 17:22:22',NULL,NULL),('vn-database','10303','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-09-02 17:22:23',NULL,NULL),('vn-database','10304','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-09-02 17:23:48',NULL,NULL),('vn-database','10304','01-altertableticket.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-09-02 17:23:51',NULL,NULL),('vn-database','10305','00-ektAssign.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-09-02 17:24:52',NULL,NULL),('vn-database','10306','00-deliveryInformation.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-09-02 17:25:25',NULL,NULL),('vn-database','10307','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-09-02 17:25:26',NULL,NULL),('vn-database','10308','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-09-02 17:26:43',NULL,NULL),('vn-database','10309','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-09-06 11:37:54',NULL,NULL),('vn-database','10310','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-09-08 10:26:33',NULL,NULL),('vn-database','10311','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-09-06 11:37:55',NULL,NULL),('vn-database','10312','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-09-08 10:26:33',NULL,NULL),('vn-database','10313','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-09-08 10:27:21',NULL,NULL),('vn-database','10314','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-09-20 12:37:19',NULL,NULL),('vn-database','10315','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-09-08 10:31:43',NULL,NULL),('vn-database','10317','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-09-08 10:31:43',NULL,NULL),('vn-database','10318','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-09-08 10:31:43',NULL,NULL),('vn-database','10319','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-09-20 12:37:41',NULL,NULL),('vn-database','10320','00-operator.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-09-22 08:29:37',NULL,NULL),('vn-database','10320','01-collection.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-09-22 08:29:37',NULL,NULL),('vn-database','10320','02-productionConfig.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-09-22 08:29:38',NULL,NULL),('vn-database','10321','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-09-08 11:11:12',NULL,NULL),('vn-database','10322','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-09-09 09:19:05',NULL,NULL),('vn-database','10326','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-09-22 08:29:38',NULL,NULL),('vn-database','10328','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-09-22 08:29:38',NULL,NULL),('vn-database','10329','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-09-22 08:29:38',NULL,NULL),('vn-database','10330','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-09-22 08:34:30',NULL,NULL),('vn-database','10332','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-09-22 08:34:30',NULL,NULL),('vn-database','10334','00-collectionHotbed.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-09-22 08:34:30',NULL,NULL),('vn-database','10334','01-saleGroupDetail.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-09-22 08:34:32',NULL,NULL),('vn-database','10335','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-10-06 09:52:38',NULL,NULL),('vn-database','10336','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-09-22 08:34:32',NULL,NULL),('vn-database','10337','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-09-22 08:34:32',NULL,NULL),('vn-database','10339','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-09-19 09:41:19',NULL,NULL),('vn-database','10340','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-09-29 11:08:03',NULL,NULL),('vn-database','10341','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-09-22 08:34:32',NULL,NULL),('vn-database','10342','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-09-29 11:08:03',NULL,NULL),('vn-database','10343','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-09-22 08:35:30',NULL,NULL),('vn-database','10345','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-11-04 08:25:16',NULL,NULL),('vn-database','10347','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-09-29 11:08:03',NULL,NULL),('vn-database','10347','01-addVirtualField.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-09-29 11:08:03',NULL,NULL),('vn-database','10349','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-10-06 09:52:38',NULL,NULL),('vn-database','10350','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-09-30 10:11:56',NULL,NULL),('vn-database','10352','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-11-04 08:25:16',NULL,NULL),('vn-database','10353','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-10-06 09:52:38',NULL,NULL),('vn-database','10354','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-10-06 09:52:38',NULL,NULL),('vn-database','10356','00-firstScript.sql','jenkins@swarm-worker1.static.verdnatura.es','2022-11-10 22:35:00',NULL,NULL),('vn-database','10356','01-orderConfigFk.sql','jenkins@swarm-worker1.static.verdnatura.es','2022-11-10 22:35:00',NULL,NULL),('vn-database','10356','02-orderConfigDrop.sql','jenkins@swarm-worker1.static.verdnatura.es','2022-11-10 22:35:00',NULL,NULL),('vn-database','10357','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-10-06 09:52:38',NULL,NULL),('vn-database','10359','00-improvedGeneralLog_collate.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-10-06 09:52:39',NULL,NULL),('vn-database','10360','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-10-06 09:52:39',NULL,NULL),('vn-database','10361','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-10-06 11:16:07',NULL,NULL),('vn-database','10362','00-dropUdfs.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-10-10 11:01:15',NULL,NULL),('vn-database','10363','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-11-04 08:25:17',NULL,NULL),('vn-database','10365','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-10-13 19:30:46',NULL,NULL),('vn-database','10368','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-11-04 08:25:17',NULL,NULL),('vn-database','10369','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-10-14 13:38:06',NULL,NULL),('vn-database','10370','00-deleteForeignKey.sql','jenkins@swarm-worker1.static.verdnatura.es','2022-11-17 14:32:41',NULL,NULL),('vn-database','10370','01-firstScript.sql','jenkins@swarm-worker1.static.verdnatura.es','2022-11-17 14:32:47',NULL,NULL),('vn-database','10370','02-deleteTable.sql','jenkins@swarm-worker1.static.verdnatura.es','2022-11-17 14:32:49',NULL,NULL),('vn-database','10370','03-accion.sql','jenkins@swarm-worker1.static.verdnatura.es','2022-11-17 14:32:49',NULL,NULL),('vn-database','10370','04-inter.sql','jenkins@swarm-worker1.static.verdnatura.es','2022-11-17 14:32:53',NULL,NULL),('vn-database','10371','00-firstScript.sql','jenkins@swarm-worker1.static.verdnatura.es','2023-01-12 10:56:23',NULL,NULL),('vn-database','10372','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-12-16 09:14:48',NULL,NULL),('vn-database','10373','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-10-19 08:31:58',NULL,NULL),('vn-database','10378','00-rename_routeUserPercentage.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-11-04 08:25:17',NULL,NULL),('vn-database','10379','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-03-09 08:40:16',NULL,NULL),('vn-database','10382','00-firstScript.sql','jenkins@swarm-worker1.static.verdnatura.es','2022-12-01 08:47:20',NULL,NULL),('vn-database','10383','00-firstScript.sql','jenkins@swarm-worker1.static.verdnatura.es','2022-11-17 14:32:53',NULL,NULL),('vn-database','10384','00-business_workcenterFk.sql','jenkins@db-proxy2.static.verdnatura.es','2023-05-12 09:18:01',NULL,NULL),('vn-database','10385','00-firstScript.sql','jenkins@swarm-worker1.static.verdnatura.es','2022-11-17 14:32:54',NULL,NULL),('vn-database','10386','00-firstScript.sql','jenkins@swarm-worker1.static.verdnatura.es','2022-11-17 14:32:54',NULL,NULL),('vn-database','10387','00-firstScript.sql','jenkins@swarm-worker1.static.verdnatura.es','2022-11-16 14:05:33',NULL,NULL),('vn-database','10388','00-resizeUtilVerionLogCode.sql','jenkins@swarm-worker1.static.verdnatura.es','2022-12-01 08:47:20',NULL,NULL),('vn-database','10388','01-resizeUtilVersionCode.sql','jenkins@swarm-worker1.static.verdnatura.es','2022-12-01 08:47:20',NULL,NULL),('vn-database','10390','00-firstScript.sql','jenkins@swarm-worker1.static.verdnatura.es','2022-12-01 08:50:16',NULL,NULL),('vn-database','10391','00-firstScript.sql','jenkins@swarm-worker1.static.verdnatura.es','2023-01-12 10:56:23',NULL,NULL),('vn-database','10394','00-firstScript.sql','jenkins@swarm-worker1.static.verdnatura.es','2022-12-01 08:50:24',NULL,NULL),('vn-database','10395','00-firstScript.sql','jenkins@swarm-worker1.static.verdnatura.es','2022-12-01 08:50:29',NULL,NULL),('vn-database','10396','00-firstScript.sql','jenkins@swarm-worker1.static.verdnatura.es','2022-11-17 15:36:38',NULL,NULL),('vn-database','10397','00-firstScript.sql','jenkins@swarm-worker1.static.verdnatura.es','2022-12-01 08:50:29',NULL,NULL),('vn-database','10399','00-firstScript.sql','jenkins@swarm-worker1.static.verdnatura.es','2022-12-01 08:50:29',NULL,NULL),('vn-database','10400','00-firstScript.sql','jenkins@swarm-worker1.static.verdnatura.es','2022-12-01 08:50:29',NULL,NULL),('vn-database','10402','00-firstScript.sql','jenkins@swarm-worker1.static.verdnatura.es','2022-11-21 14:11:31',NULL,NULL),('vn-database','10404','00-firstScript.sql','jenkins@swarm-worker1.static.verdnatura.es','2022-12-01 08:50:29',NULL,NULL),('vn-database','10405','00-firstScript.sql','jenkins@swarm-worker1.static.verdnatura.es','2023-02-16 09:58:22',NULL,NULL),('vn-database','10407','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-12-16 09:14:49',NULL,NULL),('vn-database','10408','00-firstScript.sql','jenkins@swarm-worker1.static.verdnatura.es','2023-01-12 10:56:23',NULL,NULL),('vn-database','10409','00-firstScript.sql','jenkins@swarm-worker2.static.verdnatura.es','2022-12-16 09:14:49',NULL,NULL),('vn-database','10412','00-firstScript.sql','jenkins@swarm-worker1.static.verdnatura.es','2022-11-30 12:45:44',NULL,NULL),('vn-database','10413','00-firstScript.sql','jenkins@swarm-worker1.static.verdnatura.es','2023-01-12 10:56:24',NULL,NULL),('vn-database','10416','00-firstScript.sql','jenkins@swarm-worker1.static.verdnatura.es','2023-01-12 10:56:24',NULL,NULL),('vn-database','10420','00-firstScript.sql','jenkins@swarm-worker1.static.verdnatura.es','2023-01-12 10:56:25',NULL,NULL),('vn-database','10421','00-firstScript.sql','jenkins@swarm-worker1.static.verdnatura.es','2023-01-12 10:56:26',NULL,NULL),('vn-database','10426','00-firstScript.sql','jenkins@db-proxy1.static.verdnatura.es','2023-04-20 09:07:40',NULL,NULL),('vn-database','10428','00-firstScript.sql','jenkins@swarm-worker1.static.verdnatura.es','2023-01-26 13:27:05',NULL,NULL),('vn-database','10431','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-03-23 09:09:22',NULL,NULL),('vn-database','10433','00-firstScript.sql','jenkins@swarm-worker1.static.verdnatura.es','2023-01-26 13:27:05',NULL,NULL),('vn-database','10434','00-firstScript.sql','jenkins@swarm-worker1.static.verdnatura.es','2023-01-26 13:27:05',NULL,NULL),('vn-database','10435','00-firstScript.sql','jenkins@swarm-worker1.static.verdnatura.es','2023-01-13 07:30:10',NULL,NULL),('vn-database','10436','00-createFkWorker.sql','jenkins@swarm-worker1.static.verdnatura.es','2023-02-16 09:58:59',NULL,NULL),('vn-database','10436','01-addStateToWorkerProductivity.sql','jenkins@swarm-worker1.static.verdnatura.es','2023-02-16 09:59:00',NULL,NULL),('vn-database','10436','02-DeprecateVnSaleTrackingState.sql','jenkins@swarm-worker1.static.verdnatura.es','2023-02-16 09:59:00',NULL,NULL),('vn-database','10436','03-DeprecateColumnVnSaleTrackingActionFk.sql','jenkins@swarm-worker1.static.verdnatura.es','2023-02-16 09:59:01',NULL,NULL),('vn-database','10436','04-DropSchemaVnControl.sql','jenkins@swarm-worker1.static.verdnatura.es','2023-02-16 09:59:01',NULL,NULL),('vn-database','10436','05-RemoveFkWorkerProductivity.sql','jenkins@db-proxy2.static.verdnatura.es','2023-02-17 14:51:19',NULL,NULL),('vn-database','10439','00-fixRole.sql','jenkins@db-proxy2.static.verdnatura.es','2023-05-25 09:13:26',NULL,NULL),('vn-database','10440','00-firstScript.sql','jenkins@db-proxy1.static.verdnatura.es','2023-02-23 10:28:41',NULL,NULL),('vn-database','10444','00-firstScript.sql','jenkins@swarm-worker1.static.verdnatura.es','2023-02-16 09:59:01',NULL,NULL),('vn-database','10445','00-firstScript.sql','jenkins@swarm-worker1.static.verdnatura.es','2023-02-16 09:59:31',NULL,NULL),('vn-database','10448','00-firstScript.sql','jenkins@swarm-worker1.static.verdnatura.es','2023-02-16 09:59:31',NULL,NULL),('vn-database','10450','00-firstScript.sql','jenkins@swarm-worker1.static.verdnatura.es','2023-01-27 08:28:04',NULL,NULL),('vn-database','10451','00-firstScript.sql','jenkins@swarm-worker1.static.verdnatura.es','2023-02-06 08:08:32',NULL,NULL),('vn-database','10452','00-firstScript.sql','jenkins@swarm-worker1.static.verdnatura.es','2023-01-31 12:30:04',NULL,NULL),('vn-database','10453','00-firstScript.sql','jenkins@swarm-worker1.static.verdnatura.es','2023-01-31 14:04:37',NULL,NULL),('vn-database','10454','00-firstScript.sql','jenkins@swarm-worker1.static.verdnatura.es','2023-01-31 12:30:04',NULL,NULL),('vn-database','10455','00-firstScript.sql','jenkins@swarm-worker1.static.verdnatura.es','2023-01-31 12:30:04',NULL,NULL),('vn-database','10456','00-firstScript.sql','jenkins@swarm-worker1.static.verdnatura.es','2023-01-31 12:00:30',NULL,NULL),('vn-database','10457','00-firstScript.sql','jenkins@swarm-worker1.static.verdnatura.es','2023-01-31 12:00:33',NULL,NULL),('vn-database','10458','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-03-09 08:40:17',NULL,NULL),('vn-database','10459','00-alterTableUtilConfig.sql','jenkins@db-proxy1.static.verdnatura.es','2023-02-23 10:28:41',NULL,NULL),('vn-database','10459','01-createFunctionCurdate.sql','jenkins@db-proxy1.static.verdnatura.es','2023-02-23 10:28:41',NULL,NULL),('vn-database','10459','02-createFunctionMockTime.sql','jenkins@db-proxy1.static.verdnatura.es','2023-02-23 10:28:41',NULL,NULL),('vn-database','10459','03-createFunctionMockTimeBase.sql','jenkins@db-proxy1.static.verdnatura.es','2023-02-23 10:28:41',NULL,NULL),('vn-database','10459','04-createFunctionNow.sql','jenkins@db-proxy1.static.verdnatura.es','2023-02-23 10:28:41',NULL,NULL),('vn-database','10460','00-firstScript.sql','jenkins@swarm-worker1.static.verdnatura.es','2023-02-16 09:59:31',NULL,NULL),('vn-database','10461','00-firstScript.sql','jenkins@swarm-worker1.static.verdnatura.es','2023-02-16 09:59:31',NULL,NULL),('vn-database','10463','00-firstScript.sql','jenkins@swarm-worker1.static.verdnatura.es','2023-02-03 12:59:26',NULL,NULL),('vn-database','10468','00-firstScript.sql','jenkins@swarm-worker1.static.verdnatura.es','2023-02-16 09:59:31',NULL,NULL),('vn-database','10469','00-firstScript.sql','jenkins@swarm-worker1.static.verdnatura.es','2023-02-16 09:59:31',NULL,NULL),('vn-database','10470','00-firstScript.sql','jenkins@db-proxy1.static.verdnatura.es','2023-02-23 10:28:54',NULL,NULL),('vn-database','10471','00-firstScript.sql','jenkins@db-proxy1.static.verdnatura.es','2023-02-23 10:28:54',NULL,NULL),('vn-database','10472','00-firstScript.sql','jenkins@db-proxy1.static.verdnatura.es','2023-02-23 10:28:54',NULL,NULL),('vn-database','10477','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-03-23 09:09:31',NULL,NULL),('vn-database','10478','00-dropBasket.sql','jenkins@db-proxy1.static.verdnatura.es','2023-02-23 10:28:54',NULL,NULL),('vn-database','10478','00-firstScript.sql','jenkins@db-proxy1.static.verdnatura.es','2023-02-23 10:28:54',NULL,NULL),('vn-database','10478','01-orderConfigured.sql','jenkins@db-proxy1.static.verdnatura.es','2023-02-23 10:29:16',NULL,NULL),('vn-database','10478','02-configuredUpdate.sql','jenkins@db-proxy1.static.verdnatura.es','2023-02-23 10:29:53',NULL,NULL),('vn-database','10478','99-privileges.sql','jenkins@db-proxy1.static.verdnatura.es','2023-02-23 10:29:53',NULL,NULL),('vn-database','10480','00-firstScript.sql','jenkins@db-proxy1.static.verdnatura.es','2023-02-17 15:09:26',NULL,NULL),('vn-database','10481','00-firstScript.sql','jenkins@db-proxy1.static.verdnatura.es','2023-02-17 16:37:22',NULL,NULL),('vn-database','10482','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-02-21 10:00:28',NULL,NULL),('vn-database','10485','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-03-09 08:40:17',NULL,NULL),('vn-database','10488','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-03-09 08:40:17',NULL,NULL),('vn-database','10491','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-03-09 08:40:18',NULL,NULL),('vn-database','10492','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-03-09 08:40:18',NULL,NULL),('vn-database','10493','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-05-12 09:18:01',NULL,NULL),('vn-database','10495','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-03-09 08:40:19',NULL,NULL),('vn-database','10498','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-03-23 09:09:38',NULL,NULL),('vn-database','10500','00-firstScript.sql','jenkins@db-proxy1.static.verdnatura.es','2023-03-03 07:06:03',NULL,NULL),('vn-database','10501','00-firstScript.sql','jenkins@db-proxy1.static.verdnatura.es','2023-03-03 10:52:24',NULL,NULL),('vn-database','10502','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-03-23 09:09:48',NULL,NULL),('vn-database','10504','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-05-25 09:13:27',NULL,NULL),('vn-database','10506','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-03-23 09:09:48',NULL,NULL),('vn-database','10506','01-firstScript.sql','jenkins@db-proxy1.static.verdnatura.es','2023-06-15 12:30:18',NULL,NULL),('vn-database','10506','02-secondScript.sql','jenkins@db-proxy1.static.verdnatura.es','2023-06-15 12:30:18',NULL,NULL),('vn-database','10506','03-thirdScript.sql','jenkins@db-proxy1.static.verdnatura.es','2023-06-15 12:30:18',NULL,NULL),('vn-database','10507','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-04-05 10:35:23',NULL,NULL),('vn-database','10508','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-04-05 10:36:43',NULL,NULL),('vn-database','10510','00-dropBusinessFk.sql','jenkins@db-proxy2.static.verdnatura.es','2023-04-05 10:36:47',NULL,NULL),('vn-database','10510','01-createTableProfessionalCategory.sql','jenkins@db-proxy2.static.verdnatura.es','2023-04-05 10:36:47',NULL,NULL),('vn-database','10510','02-exportToNewTable.sql','jenkins@db-proxy2.static.verdnatura.es','2023-04-05 10:36:47',NULL,NULL),('vn-database','10510','03-RecreateFK.sql','jenkins@db-proxy2.static.verdnatura.es','2023-04-05 10:36:51',NULL,NULL),('vn-database','10510','04-kkPostgresqlTable.sql','jenkins@db-proxy2.static.verdnatura.es','2023-04-05 10:36:51',NULL,NULL),('vn-database','10511','00-firstScript.sql','jenkins@db-proxy1.static.verdnatura.es','2023-04-20 09:07:41',NULL,NULL),('vn-database','10512','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-04-05 10:36:52',NULL,NULL),('vn-database','10513','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-04-05 10:36:56',NULL,NULL),('vn-database','10514','00-firstScript.sql','jenkins@db-proxy1.static.verdnatura.es','2023-04-20 09:07:41',NULL,NULL),('vn-database','10516','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-03-23 09:09:48',NULL,NULL),('vn-database','10521','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-03-21 06:58:13',NULL,NULL),('vn-database','10522','00-firstScript.sql','jenkins@db-proxy1.static.verdnatura.es','2023-04-20 09:07:41',NULL,NULL),('vn-database','10523','00-firstScript.sql','jenkins@db-proxy1.static.verdnatura.es','2023-04-20 09:07:41',NULL,NULL),('vn-database','10524','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-08-10 11:50:12',NULL,NULL),('vn-database','10524','01-rateEditorFk.sql','jenkins@db-proxy2.static.verdnatura.es','2023-08-10 11:50:12',NULL,NULL),('vn-database','10525','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-03-21 12:42:50',NULL,NULL),('vn-database','10526','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-04-05 10:36:57',NULL,NULL),('vn-database','10528','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-04-05 10:37:00',NULL,NULL),('vn-database','10530','00-firstScript.sql','jenkins@db-proxy1.static.verdnatura.es','2023-03-23 14:49:30',NULL,NULL),('vn-database','10531','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-03-24 11:47:10',NULL,NULL),('vn-database','10532','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-03-24 11:17:38',NULL,NULL),('vn-database','10533','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-04-05 10:37:04',NULL,NULL),('vn-database','10537','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-03-29 15:18:36',NULL,NULL),('vn-database','10538','00-createChronopostConfig.sql','jenkins@db-proxy1.static.verdnatura.es','2023-04-20 09:07:41',NULL,NULL),('vn-database','10538','01-createChronopostService.sql','jenkins@db-proxy1.static.verdnatura.es','2023-04-20 09:07:41',NULL,NULL),('vn-database','10538','02-createChronopostExpedition.sql','jenkins@db-proxy1.static.verdnatura.es','2023-04-20 09:07:41',NULL,NULL),('vn-database','10538','03-createChronopostSenderAddress.sql','jenkins@db-proxy1.static.verdnatura.es','2023-04-20 09:07:41',NULL,NULL),('vn-database','10538','04-addgrantPrivilegies.sql','jenkins@db-proxy1.static.verdnatura.es','2023-04-20 09:07:41',NULL,NULL),('vn-database','10538','05-updateChronopostConfig.sql','jenkins@db-proxy1.static.verdnatura.es','2023-04-21 11:54:57',NULL,NULL),('vn-database','10539','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-04-05 10:37:07',NULL,NULL),('vn-database','10540','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-05-12 09:18:01',NULL,NULL),('vn-database','10545','00-firstScript.sql','jenkins@db-proxy1.static.verdnatura.es','2023-04-11 08:31:03',NULL,NULL),('vn-database','10546','00-firstScript.sql','jenkins@db-proxy1.static.verdnatura.es','2023-04-20 09:08:10',NULL,NULL),('vn-database','10547','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-05-12 09:21:58',NULL,NULL),('vn-database','10549','00-updateUpdateLog.sql','jenkins@db-proxy1.static.verdnatura.es','2023-04-21 07:29:22',NULL,NULL),('vn-database','10549','01-updateInsertLog.sql','jenkins@db-proxy1.static.verdnatura.es','2023-04-21 07:30:11',NULL,NULL),('vn-database','10549','02-updateDeleteLog.sql','jenkins@db-proxy1.static.verdnatura.es','2023-04-21 07:30:51',NULL,NULL),('vn-database','10549','03-deleteEmptyLog.sql','jenkins@db-proxy1.static.verdnatura.es','2023-04-21 07:31:34',NULL,NULL),('vn-database','10549','04-optimizeLogTables.sql','jenkins@db-proxy1.static.verdnatura.es','2023-04-21 07:33:58',NULL,NULL),('vn-database','10550','00-editorFk.sql','jenkins@db-proxy2.static.verdnatura.es','2023-05-12 09:42:33',NULL,NULL),('vn-database','10550','01-originFk.sql','jenkins@db-proxy2.static.verdnatura.es','2023-05-12 09:45:28',NULL,NULL),('vn-database','10552','00-firstScript.sql','jenkins@db-proxy1.static.verdnatura.es','2023-04-13 08:25:10',NULL,NULL),('vn-database','10554','00-firstScript.sql','jenkins@db-proxy1.static.verdnatura.es','2023-04-20 09:08:10',NULL,NULL),('vn-database','10557','00-firstScript.sql','jenkins@db-proxy1.static.verdnatura.es','2023-04-17 07:45:56',NULL,NULL),('vn-database','10559','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-04-18 10:53:50',NULL,NULL),('vn-database','10560','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-04-17 09:19:31',NULL,NULL),('vn-database','10562','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-05-12 09:45:28',NULL,NULL),('vn-database','10563','00-delivery_ticketFk.sql','jenkins@db-proxy2.static.verdnatura.es','2023-04-20 09:30:53',NULL,NULL),('vn-database','10566','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-04-20 10:08:41',NULL,NULL),('vn-database','10567','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-04-20 10:18:06',NULL,NULL),('vn-database','10568','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-05-12 09:45:28',NULL,NULL),('vn-database','10569','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-04-24 09:14:35',NULL,NULL),('vn-database','10570','00-createSendingConfig.sql','jenkins@db-proxy2.static.verdnatura.es','2023-05-12 09:45:28',NULL,NULL),('vn-database','10570','01-createSendingServiceWeekday.sql','jenkins@db-proxy2.static.verdnatura.es','2023-05-12 09:45:28',NULL,NULL),('vn-database','10570','02-createSendingService.sql','jenkins@db-proxy2.static.verdnatura.es','2023-05-12 09:45:28',NULL,NULL),('vn-database','10570','03-permisos.sql','jenkins@db-proxy2.static.verdnatura.es','2023-05-12 09:45:28',NULL,NULL),('vn-database','10571','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-05-25 09:13:27',NULL,NULL),('vn-database','10573','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-07-27 09:17:23',NULL,NULL),('vn-database','10575','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-04-26 11:27:32',NULL,NULL),('vn-database','10577','00-firstScript.sql','jenkins@db-proxy1.static.verdnatura.es','2023-04-27 14:00:12',NULL,NULL),('vn-database','10578','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-05-12 09:45:28',NULL,NULL),('vn-database','10579','00-firstScript.sql','jenkins@db-proxy1.static.verdnatura.es','2023-04-28 11:27:36',NULL,NULL),('vn-database','10580','00-itemTypeDropConstraint.sql','jenkins@db-proxy2.static.verdnatura.es','2023-04-28 18:18:52',NULL,NULL),('vn-database','10580','01-itemTypeAddConstraint.sql','jenkins@db-proxy2.static.verdnatura.es','2023-04-28 18:19:10',NULL,NULL),('vn-database','10581','00-itemTypeAutoIncrement.sql','jenkins@db-proxy2.static.verdnatura.es','2023-04-28 19:06:46',NULL,NULL),('vn-database','10582','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-05-12 09:45:28',NULL,NULL),('vn-database','10583','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-05-12 09:45:28',NULL,NULL),('vn-database','10584','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-05-12 09:45:28',NULL,NULL),('vn-database','10585','00-ticketLog.sql','jenkins@db-proxy2.static.verdnatura.es','2023-05-25 09:20:10',NULL,NULL),('vn-database','10585','01-entryLog.sql','jenkins@db-proxy2.static.verdnatura.es','2023-05-25 09:21:12',NULL,NULL),('vn-database','10585','02-claimLog.sql','jenkins@db-proxy1.static.verdnatura.es','2023-05-25 09:28:36',NULL,NULL),('vn-database','10585','03-clientLog.sql','jenkins@db-proxy1.static.verdnatura.es','2023-05-25 09:28:54',NULL,NULL),('vn-database','10585','04-invoiceInLog.sql','jenkins@db-proxy1.static.verdnatura.es','2023-05-25 09:28:55',NULL,NULL),('vn-database','10585','05-itemLog.sql','jenkins@db-proxy1.static.verdnatura.es','2023-05-25 09:29:46',NULL,NULL),('vn-database','10585','06-routeLog.sql','jenkins@db-proxy1.static.verdnatura.es','2023-05-25 09:30:18',NULL,NULL),('vn-database','10585','07-shelvingLog.sql','jenkins@db-proxy1.static.verdnatura.es','2023-05-25 09:30:32',NULL,NULL),('vn-database','10585','08-supplierLog.sql','jenkins@db-proxy1.static.verdnatura.es','2023-05-25 09:30:32',NULL,NULL),('vn-database','10585','09-travelLog.sql','jenkins@db-proxy1.static.verdnatura.es','2023-05-25 09:30:41',NULL,NULL),('vn-database','10585','10-workerLog.sql','jenkins@db-proxy1.static.verdnatura.es','2023-05-25 09:30:42',NULL,NULL),('vn-database','10585','11-zoneLog.sql','jenkins@db-proxy1.static.verdnatura.es','2023-05-25 09:30:43',NULL,NULL),('vn-database','10585','12-userLog.sql','jenkins@db-proxy1.static.verdnatura.es','2023-05-25 09:30:44',NULL,NULL),('vn-database','10585','13-roleLog.sql','jenkins@db-proxy1.static.verdnatura.es','2023-05-25 09:30:44',NULL,NULL),('vn-database','10587','00-arcRead_addMinimum.sql','jenkins@db-proxy1.static.verdnatura.es','2023-05-16 13:13:15',NULL,NULL),('vn-database','10593','00-firstScript.sql','jenkins@db-proxy1.static.verdnatura.es','2023-05-25 09:30:44',NULL,NULL),('vn-database','10596','00-firstScript.sql','jenkins@db-proxy1.static.verdnatura.es','2023-05-25 09:30:44',NULL,NULL),('vn-database','10597','00-firstScript.sql','jenkins@db-proxy1.static.verdnatura.es','2023-05-25 09:30:44',NULL,NULL),('vn-database','10598','00-workerLog.sql','jenkins@db-proxy2.static.verdnatura.es','2023-05-12 09:45:29',NULL,NULL),('vn-database','10598','01-supplierLog.sql','jenkins@db-proxy2.static.verdnatura.es','2023-05-12 09:45:29',NULL,NULL),('vn-database','10598','02-workerTimeControlLog.sql','jenkins@db-proxy2.static.verdnatura.es','2023-05-12 09:45:29',NULL,NULL),('vn-database','10598','03-workerClockLog.sql','jenkins@db-proxy2.static.verdnatura.es','2023-05-12 09:45:29',NULL,NULL),('vn-database','10599','00-firstScript.sql','jenkins@db-proxy1.static.verdnatura.es','2023-05-25 09:30:44',NULL,NULL),('vn-database','10601','00-firstScript.sql','jenkins@db-proxy1.static.verdnatura.es','2023-05-17 09:26:26',NULL,NULL),('vn-database','10602','00-firstScript.sql','jenkins@db-proxy1.static.verdnatura.es','2023-05-18 08:52:15',NULL,NULL),('vn-database','10606','00-firstScript.sql','jenkins@db-proxy1.static.verdnatura.es','2023-05-18 09:26:00',NULL,NULL),('vn-database','10608','00-firstScript.sql','jenkins@db-proxy1.static.verdnatura.es','2023-05-18 12:36:31',NULL,NULL),('vn-database','10609','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-06-01 08:28:07',NULL,NULL),('vn-database','10610','00-updateCompanyId.sql','jenkins@db-proxy1.static.verdnatura.es','2023-06-01 09:11:07',NULL,NULL),('vn-database','10610','01-updateSupplierId.sql','jenkins@db-proxy1.static.verdnatura.es','2023-06-01 09:11:39',NULL,NULL),('vn-database','10610','02-invoiceOutCompany.sql','jenkins@db-proxy2.static.verdnatura.es','2023-06-01 09:49:55',NULL,NULL),('vn-database','10611','00-firstScript.sql','jenkins@db-proxy1.static.verdnatura.es','2023-05-19 14:39:41',NULL,NULL),('vn-database','10613','00-firstScript.sql','jenkins@db-proxy1.static.verdnatura.es','2023-06-15 12:30:18',NULL,NULL),('vn-database','10614','00-firstScript.sql','jenkins@db-proxy1.static.verdnatura.es','2023-06-01 09:11:40',NULL,NULL),('vn-database','10615','00-firstScript.sql','jenkins@db-proxy1.static.verdnatura.es','2023-06-01 09:11:40',NULL,NULL),('vn-database','10616','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-07-13 11:18:55',NULL,NULL),('vn-database','10616','01-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-07-13 11:18:55',NULL,NULL),('vn-database','10617','00-firstScript.sql','jenkins@db-proxy1.static.verdnatura.es','2023-06-01 09:11:41',NULL,NULL),('vn-database','10618','00-firstScript.sql','jenkins@db-proxy1.static.verdnatura.es','2023-05-25 12:55:56',NULL,NULL),('vn-database','10619','00-firstScript.sql','jenkins@db-proxy1.static.verdnatura.es','2023-06-15 12:30:18',NULL,NULL),('vn-database','10620','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-07-13 11:20:53',NULL,NULL),('vn-database','10624','00-firstScript.sql','jenkins@db-proxy1.static.verdnatura.es','2023-05-30 19:01:10',NULL,NULL),('vn-database','10626','00-firstScript.sql','jenkins@db-proxy1.static.verdnatura.es','2023-06-29 13:32:32',NULL,NULL),('vn-database','10628','00-firstScript.sql','jenkins@db-proxy1.static.verdnatura.es','2023-06-15 12:30:18',NULL,NULL),('vn-database','10630','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-06-02 13:30:58',NULL,NULL),('vn-database','10631','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-06-05 08:37:25',NULL,NULL),('vn-database','10632','00-firstScript.sql','jenkins@db-proxy1.static.verdnatura.es','2023-06-15 12:30:18',NULL,NULL),('vn-database','10633','00-firstScript.sql','jenkins@db-proxy1.static.verdnatura.es','2023-06-15 12:30:18',NULL,NULL),('vn-database','10634','00-firstScript.sql','jenkins@db-proxy1.static.verdnatura.es','2023-06-06 12:15:55',NULL,NULL),('vn-database','10637','00-firstScript.sql','jenkins@db-proxy1.static.verdnatura.es','2023-06-15 12:30:19',NULL,NULL),('vn-database','10640','00-companyFkDrop.sql','jenkins@db-proxy2.static.verdnatura.es','2023-06-07 14:43:23',NULL,NULL),('vn-database','10640','00-updateCompany.sql','jenkins@db-proxy1.static.verdnatura.es','2023-06-07 14:22:13',1205,'Tiempo de espera de bloqueo excedido; intente rearrancar la transacción'),('vn-database','10640','01-companyFkAi.sql','jenkins@db-proxy2.static.verdnatura.es','2023-06-07 14:43:23',NULL,NULL),('vn-database','10640','02-companyFkCreate.sql','jenkins@db-proxy2.static.verdnatura.es','2023-06-07 14:47:04',NULL,NULL),('vn-database','10640','04-supplierFkDrop.sql','jenkins@db-proxy2.static.verdnatura.es','2023-06-07 14:48:30',NULL,NULL),('vn-database','10640','05-supplierFkAi.sql','jenkins@db-proxy2.static.verdnatura.es','2023-06-07 14:53:17',NULL,NULL),('vn-database','10640','06-supplierFkCreate.sql','jenkins@db-proxy2.static.verdnatura.es','2023-06-07 15:06:00',NULL,NULL),('vn-database','10642','00-firstScript.sql','jenkins@db-proxy1.static.verdnatura.es','2023-06-29 14:04:13',NULL,NULL),('vn-database','10643','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-06-09 15:04:35',NULL,NULL),('vn-database','10644','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-07-13 11:22:18',NULL,NULL),('vn-database','10647','00-renombrarTabla.sql','jenkins@db-proxy1.static.verdnatura.es','2023-06-29 14:04:13',NULL,NULL),('vn-database','10648','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-07-27 09:17:24',NULL,NULL),('vn-database','10649','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-06-16 10:59:06',NULL,NULL),('vn-database','10652','00-firstScript.sql','jenkins@db-proxy1.static.verdnatura.es','2023-06-29 14:04:13',NULL,NULL),('vn-database','10653','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-07-13 11:22:20',NULL,NULL),('vn-database','10655','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-07-13 11:22:24',NULL,NULL),('vn-database','10656','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-07-27 09:17:24',NULL,NULL),('vn-database','10658','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-07-13 11:22:27',NULL,NULL),('vn-database','10659','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-07-27 09:17:24',NULL,NULL),('vn-database','10662','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-07-13 11:22:33',NULL,NULL),('vn-database','10663','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-07-13 11:22:34',NULL,NULL),('vn-database','10665','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-06-30 08:52:51',NULL,NULL),('vn-database','10666','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-07-13 11:22:34',NULL,NULL),('vn-database','10667','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-07-27 09:17:24',NULL,NULL),('vn-database','10668','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-08-10 11:50:13',NULL,NULL),('vn-database','10671','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-07-25 14:56:50',NULL,NULL),('vn-database','10675','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-07-27 09:17:24',NULL,NULL),('vn-database','10676','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-07-27 09:17:24',NULL,NULL),('vn-database','10679','00-tables.sql','jenkins@db-proxy2.static.verdnatura.es','2023-07-27 09:17:24',NULL,NULL),('vn-database','10680','00-firstScript.sql','jenkins@db-proxy1.static.verdnatura.es','2023-07-18 14:58:36',NULL,NULL),('vn-database','10682','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-08-10 11:50:13',NULL,NULL),('vn-database','10690','00-firstScript.sql','jenkins@db-proxy1.static.verdnatura.es','2023-07-27 10:52:26',NULL,NULL),('vn-database','10691','00-firstScript.sql','jenkins@db-proxy1.static.verdnatura.es','2023-07-31 13:37:21',NULL,NULL),('vn-database','10692','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-08-10 11:50:13',NULL,NULL),('vn-database','10693','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-08-10 11:50:13',NULL,NULL),('vn-database','10694','00-firstScript.sql','jenkins@db-proxy1.static.verdnatura.es','2023-08-02 09:50:53',NULL,NULL),('vn-database','10695','00-firstScript.sql','jenkins@db-proxy1.static.verdnatura.es','2023-08-02 13:40:16',NULL,NULL),('vn-database','10696','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-08-03 16:54:57',NULL,NULL),('vn-database','10698','00-firstScript.sql','jenkins@db-proxy1.static.verdnatura.es','2023-08-03 08:53:12',NULL,NULL),('vn-database','10699','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-08-03 15:24:30',NULL,NULL),('vn-database','10700','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-08-29 09:42:11',NULL,NULL),('vn-database','10702','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-08-10 12:50:46',NULL,NULL),('vn-database','10704','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-08-29 09:42:14',NULL,NULL),('vn-database','10705','00-firstScript.sql','jenkins@db-proxy1.static.verdnatura.es','2023-08-16 14:16:05',NULL,NULL),('vn-database','10707','00-firstScript.sql','jenkins@db-proxy1.static.verdnatura.es','2023-08-21 12:31:18',NULL,NULL),('vn-database','10714','00-firstScript.sql','jenkins@db-proxy2.static.verdnatura.es','2023-08-28 13:01:45',NULL,NULL);
/*!40000 ALTER TABLE `versionLog` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
@@ -54,11 +54,11 @@ UNLOCK TABLES;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
--- Dump completed on 2023-06-26 8:40:00
+-- Dump completed on 2023-08-30 15:53:14
USE `account`;
--- MariaDB dump 10.19 Distrib 10.5.15-MariaDB, for debian-linux-gnu (x86_64)
+-- MariaDB dump 10.19 Distrib 10.5.19-MariaDB, for debian-linux-gnu (x86_64)
--
--- Host: db1.static.verdnatura.es Database: account
+-- Host: db2.static.verdnatura.es Database: account
-- ------------------------------------------------------
-- Server version 10.7.7-MariaDB-1:10.7.7+maria~deb11-log
@@ -78,7 +78,7 @@ USE `account`;
LOCK TABLES `role` WRITE;
/*!40000 ALTER TABLE `role` DISABLE KEYS */;
-INSERT INTO `role` VALUES (1,'employee','Empleado básico',1,'2017-05-19 07:04:58','2023-06-08 16:47:57',NULL),(2,'customer','Privilegios básicos de un cliente',1,'2017-05-19 07:04:58','2023-06-02 20:33:28',NULL),(3,'agency','Consultar tablas de predicciones de bultos',1,'2017-05-19 07:04:58','2017-05-19 07:04:58',NULL),(5,'administrative','Tareas relacionadas con la contabilidad',1,'2017-05-19 07:04:58','2017-05-19 07:04:58',NULL),(6,'guest','Privilegios para usuarios sin cuenta',1,'2017-05-19 07:04:58','2017-05-19 07:04:58',NULL),(9,'developer','Desarrolladores del sistema',1,'2017-05-19 07:04:58','2017-05-19 07:04:58',NULL),(11,'account','Privilegios relacionados con el login',0,'2017-05-19 07:04:58','2017-09-20 17:06:35',NULL),(13,'teamBoss','Jefe de equipo/departamento',1,'2017-05-19 07:04:58','2021-06-30 13:29:30',NULL),(15,'logistic','Departamento de compras, responsables de la logistica',1,'2017-05-19 07:04:58','2018-02-12 10:50:10',NULL),(16,'logisticBoss','Jefe del departamento de logística',1,'2017-05-19 07:04:58','2017-05-19 07:04:58',NULL),(17,'adminBoss','Jefe del departamento de administración',1,'2017-05-19 07:04:58','2017-05-19 07:04:58',NULL),(18,'salesPerson','Departamento de ventas',1,'2017-05-19 07:04:58','2017-05-19 07:04:58',NULL),(19,'salesBoss','Jefe del departamento de ventas',1,'2017-05-19 07:04:58','2017-08-16 12:38:27',NULL),(20,'manager','Gerencia',1,'2017-06-01 14:57:02','2022-07-29 07:36:15',NULL),(21,'salesAssistant','Jefe auxiliar de ventas',1,'2017-08-16 12:40:52','2017-08-16 12:40:52',NULL),(22,'teamManager','Jefe de departamento con privilegios de auxiliar de venta.',1,'2017-09-07 09:08:12','2017-09-07 09:08:12',NULL),(30,'financialBoss','Director finaciero',1,'2017-09-21 11:05:36','2017-09-21 11:05:36',NULL),(31,'freelancer','Trabajadores por cuenta ajena',1,'2017-10-10 12:57:26','2017-10-10 12:59:27',NULL),(32,'ett','Trabajadores de empresa temporal',1,'2017-10-10 12:58:58','2017-10-10 12:59:20',NULL),(33,'invoicing','Personal con acceso a facturación',0,'2018-01-29 16:43:34','2018-01-29 16:43:34',NULL),(34,'agencyBoss','Jefe/a del departamento de agencias',1,'2018-01-29 16:44:39','2018-02-23 07:58:53',NULL),(35,'buyer','Departamento de compras',1,'2018-02-12 10:35:42','2018-02-12 10:35:42',NULL),(36,'replenisher','Trabajadores de camara',1,'2018-02-16 14:07:10','2019-04-12 05:38:08',NULL),(37,'hr','Gestor/a de recursos humanos',1,'2018-02-22 17:34:53','2018-02-22 17:34:53',NULL),(38,'hrBoss','Jefe/a de recursos humanos',1,'2018-02-22 17:35:09','2018-02-22 17:35:09',NULL),(39,'adminAssistant','Jefe auxiliar administrativo',1,'2018-02-23 10:37:36','2018-02-23 10:38:41',NULL),(40,'handmade','Departamento de confección',1,'2018-02-23 11:14:53','2018-02-23 11:39:12',NULL),(41,'handmadeBoss','Jefe de departamento de confección',1,'2018-02-23 11:15:09','2018-02-23 11:39:26',NULL),(42,'artificial','Departamento de artificial',1,'2018-02-23 11:39:59','2018-02-23 11:39:59',NULL),(43,'artificialBoss','Jefe del departamento de artificial',1,'2018-02-23 11:40:16','2018-02-23 11:40:16',NULL),(44,'accessory','Departamento de complementos',1,'2018-02-23 11:41:12','2018-02-23 11:41:12',NULL),(45,'accessoryBoss','Jefe del departamento de complementos',1,'2018-02-23 11:41:23','2018-02-23 11:41:23',NULL),(47,'cooler','Empleados de cámara',1,'2018-02-23 13:08:18','2018-02-23 13:08:18',NULL),(48,'coolerBoss','Jefe de cámara',1,'2018-02-23 13:12:01','2023-03-13 08:49:43',NULL),(49,'production','Empleado de producción',1,'2018-02-26 15:28:23','2021-02-12 09:42:35',NULL),(50,'productionBoss','Jefe de producción',1,'2018-02-26 15:34:12','2018-02-26 15:34:12',NULL),(51,'marketing','Departamento de marketing',1,'2018-03-01 07:28:39','2018-03-01 07:28:39',NULL),(52,'marketingBoss','Jefe del departamento de marketing',1,'2018-03-01 07:28:57','2018-03-01 07:28:57',NULL),(53,'insurance','Gestor de seguros de cambio',0,'2018-03-05 07:44:35','2019-02-01 13:47:57',NULL),(54,'itemPicker','Sacador en cámara',1,'2018-03-05 12:08:17','2018-03-05 12:08:17',NULL),(55,'itemPickerBoss','Jefe de sacadores',1,'2018-03-05 12:08:31','2018-03-05 12:08:31',NULL),(56,'delivery','Personal de reparto',1,'2018-05-30 06:07:02','2018-05-30 06:07:02',NULL),(57,'deliveryBoss','Jefe de personal de reparto',1,'2018-05-30 06:07:19','2018-05-30 06:07:19',NULL),(58,'packager','Departamento encajadores',1,'2019-01-21 12:43:45','2019-01-21 12:43:45',NULL),(59,'packagerBoss','Jefe departamento encajadores',1,'2019-01-21 12:44:10','2019-01-21 12:44:10',NULL),(60,'productionAssi','Tareas relacionadas con producción y administración',1,'2019-01-29 13:29:01','2019-01-29 13:29:01',NULL),(61,'replenisherBos','Jefe de Complementos/Camara',1,'2019-07-01 06:44:07','2019-07-01 06:44:07',NULL),(62,'noLogin','Role without login access to MySQL',0,'2019-07-01 06:50:19','2019-07-02 13:42:05',NULL),(64,'balanceSheet','Consulta de Balance',0,'2019-07-16 12:12:08','2019-07-16 12:12:08',NULL),(65,'officeBoss','Jefe de filial',1,'2019-08-02 06:54:26','2019-08-02 06:54:26',NULL),(66,'sysadmin','Administrador de sistema',1,'2019-08-08 06:58:56','2019-08-08 06:58:56',NULL),(67,'adminOfficer','categoria profesional oficial de administración',1,'2020-01-03 08:09:23','2020-01-03 08:09:23',NULL),(69,'coolerAssist','Asistente de cámara con permiso compras',1,'2020-02-05 12:36:09','2023-03-13 08:50:07',NULL),(70,'trainee','Alumno de prácticas',1,'2020-03-04 11:00:25','2020-03-04 11:00:25',NULL),(71,'checker','Rol de revisor con privilegios de itemPicker',1,'2020-10-02 10:50:07','2020-10-02 10:50:07',NULL),(72,'claimManager','Personal de reclamaciones',1,'2020-10-13 10:01:32','2020-10-26 07:29:46',NULL),(73,'financial','Departamento de finanzas',1,'2020-11-16 09:30:27','2020-11-16 09:30:27',NULL),(74,'userPhotos','Privilegios para subir fotos de usuario',1,'2021-02-03 10:24:27','2021-02-03 10:24:27',NULL),(75,'catalogPhotos','Privilegios para subir fotos del catálogo',1,'2021-02-03 10:24:27','2021-02-03 10:24:27',NULL),(76,'chat','Rol para utilizar el rocket chat',1,'2020-11-27 13:06:50','2020-12-17 07:49:41',NULL),(100,'root','Rol con todos los privilegios',0,'2018-04-23 14:33:36','2020-11-12 06:50:07',NULL),(101,'buyerBoss','Jefe del departamento de compras',1,'2021-06-16 09:53:17','2021-06-16 09:53:17',NULL),(102,'preservedBoss','Responsable preservado',1,'2021-09-14 13:45:37','2021-09-14 13:45:37',NULL),(103,'it','Departamento de informática',1,'2021-11-11 09:48:22','2021-11-11 09:48:22',NULL),(104,'itBoss','Jefe de departamento de informática',1,'2021-11-11 09:48:49','2021-11-11 09:48:49',NULL),(105,'grant','Adjudicar roles a usuarios',1,'2021-11-11 12:41:09','2021-11-11 12:41:09',NULL),(106,'ext','Usuarios externos de la Base de datos',1,'2021-11-23 14:51:16','2021-11-23 14:51:16',NULL),(107,'productionPlus','Creado para pepe por orden de Juanvi',1,'2022-02-08 06:47:10','2022-02-08 06:47:10',NULL),(108,'system','System user',1,'2022-05-16 08:09:51','2022-05-16 08:09:51',NULL),(109,'salesTeamBoss','Jefe de equipo de comerciales',1,'2022-06-14 13:45:56','2022-06-14 13:45:56',NULL),(110,'palletizer','Paletizadores',1,'2022-12-02 12:56:22','2022-12-02 12:56:30',NULL),(111,'entryEditor','Entry editor',1,'2023-01-13 11:21:55','2023-01-13 11:21:55',NULL),(112,'maintenance','Personal de mantenimiento',1,'2023-01-19 06:23:35','2023-01-19 06:23:35',NULL),(114,'maintenanceBos','Jefe de mantenimiento',1,'2023-01-19 06:31:16','2023-05-17 11:07:21',NULL),(115,'itManagement','TI management',1,'2023-03-29 07:27:55','2023-03-29 07:28:04',NULL),(119,'palletizerBoss','Jefe de paletizadores',1,'2023-06-07 11:51:54','2023-06-07 11:51:54',NULL),(120,'developerBoss','Jefe de proyecto de desarrollo',1,'2023-06-19 07:07:21','2023-06-19 07:07:21',21709),(121,'buyerSalesAssistant','Rol para compradores que también son responsables de ventas',1,'2023-06-23 14:48:19','2023-06-23 14:48:19',NULL);
+INSERT INTO `role` VALUES (1,'employee','Empleado básico',1,'2017-05-19 07:04:58','2023-06-08 16:47:57',NULL),(2,'customer','Privilegios básicos de un cliente',1,'2017-05-19 07:04:58','2023-06-02 20:33:28',NULL),(3,'agency','Consultar tablas de predicciones de bultos',1,'2017-05-19 07:04:58','2017-05-19 07:04:58',NULL),(5,'administrative','Tareas relacionadas con la contabilidad',1,'2017-05-19 07:04:58','2017-05-19 07:04:58',NULL),(6,'guest','Privilegios para usuarios sin cuenta',1,'2017-05-19 07:04:58','2017-05-19 07:04:58',NULL),(9,'developer','Desarrolladores del sistema',1,'2017-05-19 07:04:58','2017-05-19 07:04:58',NULL),(11,'account','Privilegios relacionados con el login',0,'2017-05-19 07:04:58','2017-09-20 17:06:35',NULL),(13,'teamBoss','Jefe de equipo/departamento',1,'2017-05-19 07:04:58','2021-06-30 13:29:30',NULL),(15,'logistic','Departamento de compras, responsables de la logistica',1,'2017-05-19 07:04:58','2018-02-12 10:50:10',NULL),(16,'logisticBoss','Jefe del departamento de logística',1,'2017-05-19 07:04:58','2017-05-19 07:04:58',NULL),(17,'adminBoss','Jefe del departamento de administración',1,'2017-05-19 07:04:58','2017-05-19 07:04:58',NULL),(18,'salesPerson','Departamento de ventas',1,'2017-05-19 07:04:58','2017-05-19 07:04:58',NULL),(19,'salesBoss','Jefe del departamento de ventas',1,'2017-05-19 07:04:58','2017-08-16 12:38:27',NULL),(20,'manager','Gerencia',1,'2017-06-01 14:57:02','2022-07-29 07:36:15',NULL),(21,'salesAssistant','Jefe auxiliar de ventas',1,'2017-08-16 12:40:52','2017-08-16 12:40:52',NULL),(22,'teamManager','Jefe de departamento con privilegios de auxiliar de venta.',1,'2017-09-07 09:08:12','2017-09-07 09:08:12',NULL),(30,'financialBoss','Director finaciero',1,'2017-09-21 11:05:36','2017-09-21 11:05:36',NULL),(31,'freelancer','Trabajadores por cuenta ajena',1,'2017-10-10 12:57:26','2017-10-10 12:59:27',NULL),(32,'ett','Trabajadores de empresa temporal',1,'2017-10-10 12:58:58','2017-10-10 12:59:20',NULL),(33,'invoicing','Personal con acceso a facturación',0,'2018-01-29 16:43:34','2018-01-29 16:43:34',NULL),(34,'agencyBoss','Jefe/a del departamento de agencias',1,'2018-01-29 16:44:39','2018-02-23 07:58:53',NULL),(35,'buyer','Departamento de compras',1,'2018-02-12 10:35:42','2018-02-12 10:35:42',NULL),(36,'replenisher','Trabajadores de camara',1,'2018-02-16 14:07:10','2019-04-12 05:38:08',NULL),(37,'hr','Gestor/a de recursos humanos',1,'2018-02-22 17:34:53','2018-02-22 17:34:53',NULL),(38,'hrBoss','Jefe/a de recursos humanos',1,'2018-02-22 17:35:09','2018-02-22 17:35:09',NULL),(39,'adminAssistant','Jefe auxiliar administrativo',1,'2018-02-23 10:37:36','2018-02-23 10:38:41',NULL),(40,'handmade','Departamento de confección',1,'2018-02-23 11:14:53','2018-02-23 11:39:12',NULL),(41,'handmadeBoss','Jefe de departamento de confección',1,'2018-02-23 11:15:09','2018-02-23 11:39:26',NULL),(42,'artificial','Departamento de artificial',1,'2018-02-23 11:39:59','2018-02-23 11:39:59',NULL),(43,'artificialBoss','Jefe del departamento de artificial',1,'2018-02-23 11:40:16','2018-02-23 11:40:16',NULL),(44,'accessory','Departamento de complementos',1,'2018-02-23 11:41:12','2018-02-23 11:41:12',NULL),(45,'accessoryBoss','Jefe del departamento de complementos',1,'2018-02-23 11:41:23','2018-02-23 11:41:23',NULL),(47,'cooler','Empleados de cámara',1,'2018-02-23 13:08:18','2018-02-23 13:08:18',NULL),(48,'coolerBoss','Jefe de cámara',1,'2018-02-23 13:12:01','2023-03-13 08:49:43',NULL),(49,'production','Empleado de producción',1,'2018-02-26 15:28:23','2021-02-12 09:42:35',NULL),(50,'productionBoss','Jefe de producción',1,'2018-02-26 15:34:12','2018-02-26 15:34:12',NULL),(51,'marketing','Departamento de marketing',1,'2018-03-01 07:28:39','2018-03-01 07:28:39',NULL),(52,'marketingBoss','Jefe del departamento de marketing',1,'2018-03-01 07:28:57','2018-03-01 07:28:57',NULL),(53,'insurance','Gestor de seguros de cambio',0,'2018-03-05 07:44:35','2019-02-01 13:47:57',NULL),(54,'itemPicker','Sacador en cámara',1,'2018-03-05 12:08:17','2018-03-05 12:08:17',NULL),(55,'itemPickerBoss','Jefe de sacadores',1,'2018-03-05 12:08:31','2018-03-05 12:08:31',NULL),(56,'delivery','Personal de reparto',1,'2018-05-30 06:07:02','2018-05-30 06:07:02',NULL),(57,'deliveryBoss','Jefe de personal de reparto',1,'2018-05-30 06:07:19','2018-05-30 06:07:19',NULL),(58,'packager','Departamento encajadores',1,'2019-01-21 12:43:45','2019-01-21 12:43:45',NULL),(59,'packagerBoss','Jefe departamento encajadores',1,'2019-01-21 12:44:10','2019-01-21 12:44:10',NULL),(60,'productionAssi','Tareas relacionadas con producción y administración',1,'2019-01-29 13:29:01','2019-01-29 13:29:01',NULL),(61,'replenisherBos','Jefe de Complementos/Camara',1,'2019-07-01 06:44:07','2019-07-01 06:44:07',NULL),(62,'noLogin','Role without login access to MySQL',0,'2019-07-01 06:50:19','2019-07-02 13:42:05',NULL),(64,'balanceSheet','Consulta de Balance',0,'2019-07-16 12:12:08','2019-07-16 12:12:08',NULL),(65,'officeBoss','Jefe de filial',1,'2019-08-02 06:54:26','2019-08-02 06:54:26',NULL),(66,'sysadmin','Administrador de sistema',1,'2019-08-08 06:58:56','2019-08-08 06:58:56',NULL),(67,'adminOfficer','categoria profesional oficial de administración',1,'2020-01-03 08:09:23','2020-01-03 08:09:23',NULL),(69,'coolerAssist','Asistente de cámara con permiso compras',1,'2020-02-05 12:36:09','2023-03-13 08:50:07',NULL),(70,'trainee','Alumno de prácticas',1,'2020-03-04 11:00:25','2020-03-04 11:00:25',NULL),(71,'checker','Rol de revisor con privilegios de itemPicker',1,'2020-10-02 10:50:07','2020-10-02 10:50:07',NULL),(72,'claimManager','Personal de reclamaciones',1,'2020-10-13 10:01:32','2020-10-26 07:29:46',NULL),(73,'financial','Departamento de finanzas',1,'2020-11-16 09:30:27','2020-11-16 09:30:27',NULL),(74,'userPhotos','Privilegios para subir fotos de usuario',1,'2021-02-03 10:24:27','2021-02-03 10:24:27',NULL),(75,'catalogPhotos','Privilegios para subir fotos del catálogo',1,'2021-02-03 10:24:27','2021-02-03 10:24:27',NULL),(76,'chat','Rol para utilizar el rocket chat',1,'2020-11-27 13:06:50','2020-12-17 07:49:41',NULL),(100,'root','Rol con todos los privilegios',0,'2018-04-23 14:33:36','2020-11-12 06:50:07',NULL),(101,'buyerBoss','Jefe del departamento de compras',1,'2021-06-16 09:53:17','2021-06-16 09:53:17',NULL),(102,'preservedBoss','Responsable preservado',1,'2021-09-14 13:45:37','2021-09-14 13:45:37',NULL),(103,'it','Departamento de informática',1,'2021-11-11 09:48:22','2021-11-11 09:48:22',NULL),(104,'itBoss','Jefe de departamento de informática',1,'2021-11-11 09:48:49','2021-11-11 09:48:49',NULL),(105,'grant','Adjudicar roles a usuarios',1,'2021-11-11 12:41:09','2021-11-11 12:41:09',NULL),(106,'ext','Usuarios externos de la Base de datos',1,'2021-11-23 14:51:16','2021-11-23 14:51:16',NULL),(107,'productionPlus','Creado para pepe por orden de Juanvi',1,'2022-02-08 06:47:10','2022-02-08 06:47:10',NULL),(108,'system','System user',1,'2022-05-16 08:09:51','2022-05-16 08:09:51',NULL),(109,'salesTeamBoss','Jefe de equipo de comerciales',1,'2022-06-14 13:45:56','2022-06-14 13:45:56',NULL),(110,'palletizer','Paletizadores',1,'2022-12-02 12:56:22','2022-12-02 12:56:30',NULL),(111,'entryEditor','Entry editor',1,'2023-01-13 11:21:55','2023-01-13 11:21:55',NULL),(112,'maintenance','Personal de mantenimiento',1,'2023-01-19 06:23:35','2023-01-19 06:23:35',NULL),(114,'maintenanceBos','Jefe de mantenimiento',1,'2023-01-19 06:31:16','2023-05-17 11:07:21',NULL),(115,'itManagement','TI management',1,'2023-03-29 07:27:55','2023-03-29 07:28:04',NULL),(119,'palletizerBoss','Jefe de paletizadores',1,'2023-06-07 11:51:54','2023-06-07 11:51:54',NULL),(120,'developerBoss','Jefe de proyecto de desarrollo',1,'2023-06-19 07:07:21','2023-06-19 07:07:21',21709),(121,'buyerSalesAssistant','Rol para compradores que también son responsables de ventas',1,'2023-06-23 14:48:19','2023-06-23 14:48:19',NULL),(122,'logisticAssistant','Jefe auxiliar de logística',1,'2023-06-26 07:21:15','2023-06-26 07:21:15',NULL);
/*!40000 ALTER TABLE `role` ENABLE KEYS */;
UNLOCK TABLES;
@@ -88,7 +88,7 @@ UNLOCK TABLES;
LOCK TABLES `roleInherit` WRITE;
/*!40000 ALTER TABLE `roleInherit` DISABLE KEYS */;
-INSERT INTO `roleInherit` VALUES (1,1,2,NULL),(2,1,3,NULL),(3,1,70,NULL),(4,2,11,NULL),(5,3,11,NULL),(6,5,1,NULL),(8,5,33,NULL),(10,11,6,NULL),(11,13,1,NULL),(12,15,35,NULL),(15,16,15,NULL),(16,17,20,NULL),(17,17,37,NULL),(18,17,39,NULL),(19,17,64,NULL),(20,18,1,NULL),(21,19,21,NULL),(22,20,13,NULL),(23,20,16,NULL),(24,20,65,NULL),(25,21,13,NULL),(26,21,18,NULL),(27,21,53,NULL),(28,22,13,NULL),(29,22,21,NULL),(30,30,5,NULL),(31,30,20,NULL),(32,30,22,NULL),(33,30,53,NULL),(34,30,64,NULL),(35,31,1,NULL),(36,32,1,NULL),(37,34,1,NULL),(38,34,13,NULL),(39,34,33,NULL),(40,35,1,NULL),(41,36,44,NULL),(42,36,47,NULL),(43,37,1,NULL),(44,38,37,NULL),(45,38,64,NULL),(46,39,5,NULL),(47,39,21,NULL),(48,39,57,NULL),(49,40,1,NULL),(50,40,49,NULL),(51,41,13,NULL),(52,41,35,NULL),(53,41,40,NULL),(54,42,35,NULL),(55,42,49,NULL),(56,43,13,NULL),(57,43,42,NULL),(58,44,1,NULL),(59,45,13,NULL),(60,45,44,NULL),(61,47,1,NULL),(62,48,13,NULL),(63,48,47,NULL),(64,49,36,NULL),(65,49,58,NULL),(66,50,13,NULL),(67,50,21,NULL),(68,50,35,NULL),(69,50,49,NULL),(70,50,57,NULL),(72,51,1,NULL),(73,52,13,NULL),(74,52,19,NULL),(76,52,51,NULL),(77,53,1,NULL),(78,54,1,NULL),(79,55,13,NULL),(80,55,54,NULL),(81,56,1,NULL),(82,57,13,NULL),(83,57,56,NULL),(84,58,1,NULL),(85,59,13,NULL),(87,60,5,NULL),(91,61,13,NULL),(92,61,36,NULL),(94,65,35,NULL),(97,67,5,NULL),(98,67,37,NULL),(99,69,35,NULL),(101,70,11,NULL),(102,71,1,NULL),(103,71,58,NULL),(105,72,18,NULL),(106,73,5,NULL),(107,73,64,NULL),(108,73,19,NULL),(109,59,50,NULL),(115,39,76,NULL),(117,65,76,NULL),(118,30,76,NULL),(124,5,76,NULL),(125,37,76,NULL),(126,38,76,NULL),(128,42,76,NULL),(129,35,76,NULL),(130,60,76,NULL),(131,21,76,NULL),(132,18,76,NULL),(133,50,76,NULL),(134,20,76,NULL),(135,41,76,NULL),(136,17,76,NULL),(137,52,76,NULL),(138,57,76,NULL),(139,37,74,NULL),(140,51,74,NULL),(141,51,75,NULL),(142,35,75,NULL),(143,15,49,NULL),(145,17,67,NULL),(146,38,13,NULL),(147,101,35,NULL),(148,101,13,NULL),(150,15,56,NULL),(152,69,47,NULL),(153,48,35,NULL),(154,102,1,NULL),(167,9,103,NULL),(168,66,9,NULL),(169,104,100,NULL),(172,103,76,NULL),(173,103,1,NULL),(174,103,44,NULL),(175,103,45,NULL),(176,103,11,NULL),(177,103,39,NULL),(178,103,17,NULL),(179,103,5,NULL),(180,103,67,NULL),(181,103,3,NULL),(182,103,34,NULL),(183,103,42,NULL),(184,103,43,NULL),(185,103,64,NULL),(186,103,35,NULL),(187,103,101,NULL),(188,103,75,NULL),(189,103,71,NULL),(190,103,72,NULL),(191,103,47,NULL),(192,103,69,NULL),(193,103,48,NULL),(194,103,2,NULL),(195,103,56,NULL),(196,103,57,NULL),(197,103,32,NULL),(198,103,73,NULL),(199,103,30,NULL),(200,103,31,NULL),(201,103,6,NULL),(202,103,40,NULL),(203,103,41,NULL),(204,103,37,NULL),(205,103,38,NULL),(206,103,53,NULL),(207,103,33,NULL),(210,103,54,NULL),(211,103,55,NULL),(212,103,15,NULL),(213,103,16,NULL),(215,103,51,NULL),(216,103,52,NULL),(218,103,65,NULL),(219,103,58,NULL),(220,103,59,NULL),(221,103,102,NULL),(222,103,49,NULL),(223,103,60,NULL),(224,103,50,NULL),(225,103,36,NULL),(226,103,61,NULL),(228,103,21,NULL),(229,103,19,NULL),(230,103,18,NULL),(231,103,13,NULL),(232,103,22,NULL),(233,103,70,NULL),(234,103,74,NULL),(237,66,103,NULL),(238,103,20,NULL),(239,106,11,NULL),(240,107,60,NULL),(241,21,72,NULL),(242,20,9,NULL),(245,57,33,NULL),(246,102,35,NULL),(247,108,1,NULL),(248,102,13,NULL),(249,109,18,NULL),(250,109,13,NULL),(251,51,21,NULL),(253,48,49,NULL),(254,110,1,NULL),(255,110,76,NULL),(256,48,69,NULL),(257,47,111,NULL),(258,43,111,NULL),(259,72,111,NULL),(260,35,111,NULL),(261,5,111,NULL),(262,112,1,NULL),(263,114,112,NULL),(264,51,35,NULL),(265,72,49,NULL),(266,101,18,NULL),(268,65,57,NULL),(269,65,59,NULL),(270,65,49,NULL),(271,65,18,NULL),(272,65,13,NULL),(273,60,35,NULL),(275,50,59,NULL),(276,60,49,NULL),(280,5,53,NULL),(281,5,18,NULL),(282,50,60,NULL),(283,5,21,NULL),(284,60,57,NULL),(285,58,76,NULL),(287,69,58,NULL),(288,115,66,NULL),(290,104,115,NULL),(291,115,103,NULL),(297,21,33,NULL),(298,49,54,NULL),(299,112,49,NULL),(300,114,13,NULL),(302,5,35,NULL),(303,69,49,NULL),(306,119,110,NULL),(307,1,76,NULL),(309,120,9,NULL),(310,120,66,NULL),(311,120,13,25508),(312,115,120,NULL),(314,43,18,NULL),(315,121,35,NULL),(316,121,21,NULL);
+INSERT INTO `roleInherit` VALUES (1,1,2,NULL),(2,1,3,NULL),(3,1,70,NULL),(4,2,11,NULL),(5,3,11,NULL),(6,5,1,NULL),(8,5,33,NULL),(10,11,6,NULL),(11,13,1,NULL),(12,15,35,NULL),(16,17,20,NULL),(17,17,37,NULL),(18,17,39,NULL),(19,17,64,NULL),(20,18,1,NULL),(21,19,21,NULL),(22,20,13,NULL),(23,20,16,NULL),(24,20,65,NULL),(25,21,13,NULL),(26,21,18,NULL),(27,21,53,NULL),(28,22,13,NULL),(29,22,21,NULL),(30,30,5,NULL),(31,30,20,NULL),(32,30,22,NULL),(33,30,53,NULL),(34,30,64,NULL),(35,31,1,NULL),(36,32,1,NULL),(37,34,1,NULL),(38,34,13,NULL),(39,34,33,NULL),(40,35,1,NULL),(41,36,44,NULL),(42,36,47,NULL),(43,37,1,NULL),(44,38,37,NULL),(45,38,64,NULL),(46,39,5,NULL),(47,39,21,NULL),(48,39,57,NULL),(49,40,1,NULL),(50,40,49,NULL),(51,41,13,NULL),(52,41,35,NULL),(53,41,40,NULL),(54,42,35,NULL),(55,42,49,NULL),(56,43,13,NULL),(57,43,42,NULL),(58,44,1,NULL),(59,45,13,NULL),(60,45,44,NULL),(61,47,1,NULL),(62,48,13,NULL),(63,48,47,NULL),(64,49,36,NULL),(65,49,58,NULL),(66,50,13,NULL),(67,50,21,NULL),(68,50,35,NULL),(69,50,49,NULL),(70,50,57,NULL),(72,51,1,NULL),(73,52,13,NULL),(74,52,19,NULL),(76,52,51,NULL),(77,53,1,NULL),(78,54,1,NULL),(79,55,13,NULL),(80,55,54,NULL),(81,56,1,NULL),(82,57,13,NULL),(83,57,56,NULL),(84,58,1,NULL),(85,59,13,NULL),(87,60,5,NULL),(91,61,13,NULL),(92,61,36,NULL),(94,65,35,NULL),(97,67,5,NULL),(98,67,37,NULL),(99,69,35,NULL),(101,70,11,NULL),(102,71,1,NULL),(103,71,58,NULL),(105,72,18,NULL),(106,73,5,NULL),(107,73,64,NULL),(108,73,19,NULL),(109,59,50,NULL),(115,39,76,NULL),(117,65,76,NULL),(118,30,76,NULL),(124,5,76,NULL),(125,37,76,NULL),(126,38,76,NULL),(128,42,76,NULL),(129,35,76,NULL),(130,60,76,NULL),(131,21,76,NULL),(132,18,76,NULL),(133,50,76,NULL),(134,20,76,NULL),(135,41,76,NULL),(136,17,76,NULL),(137,52,76,NULL),(138,57,76,NULL),(139,37,74,NULL),(140,51,74,NULL),(141,51,75,NULL),(142,35,75,NULL),(143,15,49,NULL),(145,17,67,NULL),(146,38,13,NULL),(147,101,35,NULL),(148,101,13,NULL),(150,15,56,NULL),(152,69,47,NULL),(153,48,35,NULL),(154,102,1,NULL),(167,9,103,NULL),(168,66,9,NULL),(169,104,100,NULL),(172,103,76,NULL),(173,103,1,NULL),(174,103,44,NULL),(175,103,45,NULL),(176,103,11,NULL),(177,103,39,NULL),(178,103,17,NULL),(179,103,5,NULL),(180,103,67,NULL),(181,103,3,NULL),(182,103,34,NULL),(183,103,42,NULL),(184,103,43,NULL),(185,103,64,NULL),(186,103,35,NULL),(187,103,101,NULL),(188,103,75,NULL),(189,103,71,NULL),(190,103,72,NULL),(191,103,47,NULL),(192,103,69,NULL),(193,103,48,NULL),(194,103,2,NULL),(195,103,56,NULL),(196,103,57,NULL),(197,103,32,NULL),(198,103,73,NULL),(199,103,30,NULL),(200,103,31,NULL),(201,103,6,NULL),(202,103,40,NULL),(203,103,41,NULL),(204,103,37,NULL),(205,103,38,NULL),(206,103,53,NULL),(207,103,33,NULL),(210,103,54,NULL),(211,103,55,NULL),(212,103,15,NULL),(213,103,16,NULL),(215,103,51,NULL),(216,103,52,NULL),(218,103,65,NULL),(219,103,58,NULL),(220,103,59,NULL),(221,103,102,NULL),(222,103,49,NULL),(223,103,60,NULL),(224,103,50,NULL),(225,103,36,NULL),(226,103,61,NULL),(228,103,21,NULL),(229,103,19,NULL),(230,103,18,NULL),(231,103,13,NULL),(232,103,22,NULL),(233,103,70,NULL),(234,103,74,NULL),(237,66,103,NULL),(238,103,20,NULL),(239,106,11,NULL),(240,107,60,NULL),(241,21,72,NULL),(242,20,9,NULL),(245,57,33,NULL),(246,102,35,NULL),(247,108,1,NULL),(248,102,13,NULL),(249,109,18,NULL),(250,109,13,NULL),(251,51,21,NULL),(253,48,49,NULL),(254,110,1,NULL),(255,110,76,NULL),(256,48,69,NULL),(257,47,111,NULL),(258,43,111,NULL),(259,72,111,NULL),(260,35,111,NULL),(261,5,111,NULL),(262,112,1,NULL),(263,114,112,NULL),(264,51,35,NULL),(265,72,49,NULL),(266,101,18,NULL),(268,65,57,NULL),(269,65,59,NULL),(270,65,49,NULL),(271,65,18,NULL),(272,65,13,NULL),(273,60,35,NULL),(275,50,59,NULL),(276,60,49,NULL),(280,5,53,NULL),(281,5,18,NULL),(282,50,60,NULL),(283,5,21,NULL),(284,60,57,NULL),(285,58,76,NULL),(287,69,58,NULL),(288,115,66,NULL),(290,104,115,NULL),(291,115,103,NULL),(297,21,33,NULL),(298,49,54,NULL),(299,112,49,NULL),(300,114,13,NULL),(302,5,35,NULL),(303,69,49,NULL),(306,119,110,NULL),(307,1,76,NULL),(309,120,9,NULL),(310,120,66,NULL),(311,120,13,25508),(312,115,120,NULL),(314,43,18,NULL),(315,121,35,NULL),(316,121,21,NULL),(317,122,15,NULL),(318,16,122,NULL),(319,37,49,NULL),(320,37,18,NULL);
/*!40000 ALTER TABLE `roleInherit` ENABLE KEYS */;
UNLOCK TABLES;
@@ -98,7 +98,7 @@ UNLOCK TABLES;
LOCK TABLES `roleRole` WRITE;
/*!40000 ALTER TABLE `roleRole` DISABLE KEYS */;
-INSERT INTO `roleRole` VALUES (276665,1,1),(276666,1,2),(276667,1,3),(276671,1,6),(276670,1,11),(276668,1,70),(276669,1,76),(276672,2,2),(276674,2,6),(276673,2,11),(276675,3,3),(276677,3,6),(276676,3,11),(276679,5,1),(276692,5,2),(276691,5,3),(276678,5,5),(276698,5,6),(276694,5,11),(276689,5,13),(276680,5,18),(276681,5,21),(276682,5,33),(276683,5,35),(276697,5,36),(276700,5,44),(276699,5,47),(276693,5,49),(276684,5,53),(276696,5,54),(276695,5,58),(276690,5,70),(276688,5,72),(276687,5,75),(276685,5,76),(276686,5,111),(276701,6,6),(276704,9,1),(276705,9,2),(276706,9,3),(276707,9,5),(276708,9,6),(276702,9,9),(276709,9,11),(276710,9,13),(276711,9,15),(276712,9,16),(276713,9,17),(276714,9,18),(276715,9,19),(276716,9,20),(276717,9,21),(276718,9,22),(276719,9,30),(276720,9,31),(276721,9,32),(276722,9,33),(276723,9,34),(276724,9,35),(276725,9,36),(276726,9,37),(276727,9,38),(276728,9,39),(276729,9,40),(276730,9,41),(276731,9,42),(276732,9,43),(276733,9,44),(276734,9,45),(276735,9,47),(276736,9,48),(276737,9,49),(276738,9,50),(276739,9,51),(276740,9,52),(276741,9,53),(276742,9,54),(276743,9,55),(276744,9,56),(276745,9,57),(276746,9,58),(276747,9,59),(276748,9,60),(276749,9,61),(276750,9,64),(276751,9,65),(276752,9,67),(276753,9,69),(276754,9,70),(276755,9,71),(276756,9,72),(276757,9,73),(276758,9,74),(276759,9,75),(276760,9,76),(276761,9,101),(276762,9,102),(276703,9,103),(276763,9,111),(276765,11,6),(276764,11,11),(276767,13,1),(276768,13,2),(276769,13,3),(276773,13,6),(276772,13,11),(276766,13,13),(276770,13,70),(276771,13,76),(276780,15,1),(276789,15,2),(276788,15,3),(276791,15,6),(276790,15,11),(276774,15,15),(276775,15,35),(276782,15,36),(276786,15,44),(276785,15,47),(276776,15,49),(276783,15,54),(276777,15,56),(276784,15,58),(276787,15,70),(276779,15,75),(276778,15,76),(276781,15,111),(276799,16,1),(276808,16,2),(276807,16,3),(276810,16,6),(276809,16,11),(276793,16,15),(276792,16,16),(276794,16,35),(276801,16,36),(276805,16,44),(276804,16,47),(276795,16,49),(276802,16,54),(276796,16,56),(276803,16,58),(276806,16,70),(276798,16,75),(276797,16,76),(276800,16,111),(276819,17,1),(276829,17,2),(276828,17,3),(276824,17,5),(276854,17,6),(276823,17,9),(276853,17,11),(276822,17,13),(276834,17,15),(276821,17,16),(276811,17,17),(276833,17,18),(276852,17,19),(276812,17,20),(276825,17,21),(276851,17,22),(276850,17,30),(276849,17,31),(276848,17,32),(276836,17,33),(276847,17,34),(276832,17,35),(276846,17,36),(276813,17,37),(276845,17,38),(276814,17,39),(276844,17,40),(276843,17,41),(276842,17,42),(276841,17,43),(276855,17,44),(276856,17,45),(276857,17,47),(276858,17,48),(276831,17,49),(276859,17,50),(276860,17,51),(276861,17,52),(276837,17,53),(276862,17,54),(276863,17,55),(276840,17,56),(276826,17,57),(276864,17,58),(276830,17,59),(276865,17,60),(276866,17,61),(276815,17,64),(276820,17,65),(276816,17,67),(276867,17,69),(276827,17,70),(276868,17,71),(276839,17,72),(276869,17,73),(276818,17,74),(276870,17,75),(276817,17,76),(276871,17,101),(276872,17,102),(276835,17,103),(276838,17,111),(276874,18,1),(276877,18,2),(276876,18,3),(276880,18,6),(276879,18,11),(276873,18,18),(276878,18,70),(276875,18,76),(276891,19,1),(276897,19,2),(276896,19,3),(276901,19,6),(276900,19,11),(276883,19,13),(276884,19,18),(276881,19,19),(276882,19,21),(276885,19,33),(276894,19,36),(276899,19,44),(276898,19,47),(276890,19,49),(276886,19,53),(276893,19,54),(276892,19,58),(276895,19,70),(276887,19,72),(276888,19,76),(276889,19,111),(276911,20,1),(276923,20,2),(276922,20,3),(276921,20,5),(276920,20,6),(276903,20,9),(276919,20,11),(276904,20,13),(276910,20,15),(276905,20,16),(276918,20,17),(276909,20,18),(276917,20,19),(276902,20,20),(276916,20,21),(276924,20,22),(276925,20,30),(276926,20,31),(276927,20,32),(276928,20,33),(276929,20,34),(276908,20,35),(276930,20,36),(276931,20,37),(276932,20,38),(276933,20,39),(276934,20,40),(276935,20,41),(276936,20,42),(276937,20,43),(276938,20,44),(276939,20,45),(276940,20,47),(276941,20,48),(276913,20,49),(276942,20,50),(276943,20,51),(276944,20,52),(276945,20,53),(276946,20,54),(276947,20,55),(276948,20,56),(276914,20,57),(276949,20,58),(276915,20,59),(276950,20,60),(276951,20,61),(276952,20,64),(276906,20,65),(276953,20,67),(276954,20,69),(276955,20,70),(276956,20,71),(276957,20,72),(276958,20,73),(276959,20,74),(276960,20,75),(276907,20,76),(276961,20,101),(276962,20,102),(276912,20,103),(276963,20,111),(276973,21,1),(276979,21,2),(276978,21,3),(276983,21,6),(276982,21,11),(276965,21,13),(276966,21,18),(276964,21,21),(276967,21,33),(276976,21,36),(276981,21,44),(276980,21,47),(276972,21,49),(276968,21,53),(276975,21,54),(276974,21,58),(276977,21,70),(276969,21,72),(276970,21,76),(276971,21,111),(276988,22,1),(276997,22,2),(276996,22,3),(277004,22,6),(277001,22,11),(276985,22,13),(276987,22,18),(276986,22,21),(276984,22,22),(276989,22,33),(277000,22,36),(277003,22,44),(277002,22,47),(276994,22,49),(276990,22,53),(276999,22,54),(276998,22,58),(276995,22,70),(276991,22,72),(276992,22,76),(276993,22,111),(277017,30,1),(277031,30,2),(277030,30,3),(277006,30,5),(277040,30,6),(277018,30,9),(277041,30,11),(277019,30,13),(277025,30,15),(277020,30,16),(277039,30,17),(277016,30,18),(277038,30,19),(277007,30,20),(277015,30,21),(277008,30,22),(277005,30,30),(277037,30,31),(277036,30,32),(277014,30,33),(277035,30,34),(277013,30,35),(277034,30,36),(277033,30,37),(277032,30,38),(277042,30,39),(277043,30,40),(277044,30,41),(277045,30,42),(277046,30,43),(277047,30,44),(277048,30,45),(277049,30,47),(277050,30,48),(277024,30,49),(277051,30,50),(277052,30,51),(277053,30,52),(277009,30,53),(277054,30,54),(277055,30,55),(277056,30,56),(277023,30,57),(277057,30,58),(277022,30,59),(277058,30,60),(277059,30,61),(277010,30,64),(277021,30,65),(277060,30,67),(277061,30,69),(277029,30,70),(277062,30,71),(277028,30,72),(277063,30,73),(277064,30,74),(277027,30,75),(277011,30,76),(277065,30,101),(277066,30,102),(277026,30,103),(277012,30,111),(277068,31,1),(277069,31,2),(277070,31,3),(277074,31,6),(277073,31,11),(277067,31,31),(277071,31,70),(277072,31,76),(277076,32,1),(277077,32,2),(277078,32,3),(277082,32,6),(277081,32,11),(277075,32,32),(277079,32,70),(277080,32,76),(277083,33,33),(277085,34,1),(277090,34,2),(277089,34,3),(277093,34,6),(277092,34,11),(277086,34,13),(277087,34,33),(277084,34,34),(277088,34,70),(277091,34,76),(277095,35,1),(277101,35,2),(277100,35,3),(277103,35,6),(277102,35,11),(277094,35,35),(277099,35,70),(277096,35,75),(277097,35,76),(277098,35,111),(277108,36,1),(277110,36,2),(277109,36,3),(277114,36,6),(277113,36,11),(277104,36,36),(277105,36,44),(277106,36,47),(277111,36,70),(277112,36,76),(277107,36,111),(277116,37,1),(277121,37,2),(277120,37,3),(277123,37,6),(277122,37,11),(277115,37,37),(277119,37,70),(277117,37,74),(277118,37,76),(277130,38,1),(277133,38,2),(277132,38,3),(277135,38,6),(277134,38,11),(277125,38,13),(277126,38,37),(277124,38,38),(277127,38,64),(277131,38,70),(277129,38,74),(277128,38,76),(277144,39,1),(277154,39,2),(277153,39,3),(277137,39,5),(277161,39,6),(277158,39,11),(277147,39,13),(277143,39,18),(277138,39,21),(277142,39,33),(277141,39,35),(277157,39,36),(277136,39,39),(277160,39,44),(277159,39,47),(277150,39,49),(277145,39,53),(277156,39,54),(277149,39,56),(277139,39,57),(277155,39,58),(277152,39,70),(277148,39,72),(277151,39,75),(277140,39,76),(277146,39,111),(277163,40,1),(277166,40,2),(277165,40,3),(277176,40,6),(277174,40,11),(277169,40,36),(277162,40,40),(277173,40,44),(277172,40,47),(277164,40,49),(277170,40,54),(277171,40,58),(277167,40,70),(277168,40,76),(277175,40,111),(277185,41,1),(277189,41,2),(277188,41,3),(277195,41,6),(277194,41,11),(277178,41,13),(277179,41,35),(277186,41,36),(277180,41,40),(277177,41,41),(277193,41,44),(277192,41,47),(277182,41,49),(277190,41,54),(277191,41,58),(277187,41,70),(277184,41,75),(277181,41,76),(277183,41,111),(277202,42,1),(277210,42,2),(277209,42,3),(277212,42,6),(277211,42,11),(277197,42,35),(277203,42,36),(277196,42,42),(277207,42,44),(277206,42,47),(277198,42,49),(277204,42,54),(277205,42,58),(277208,42,70),(277201,42,75),(277199,42,76),(277200,42,111),(277221,43,1),(277225,43,2),(277224,43,3),(277232,43,6),(277231,43,11),(277214,43,13),(277215,43,18),(277219,43,35),(277226,43,36),(277216,43,42),(277213,43,43),(277230,43,44),(277229,43,47),(277218,43,49),(277227,43,54),(277228,43,58),(277223,43,70),(277222,43,75),(277220,43,76),(277217,43,111),(277234,44,1),(277235,44,2),(277236,44,3),(277240,44,6),(277239,44,11),(277233,44,44),(277237,44,70),(277238,44,76),(277244,45,1),(277246,45,2),(277245,45,3),(277250,45,6),(277249,45,11),(277242,45,13),(277243,45,44),(277241,45,45),(277247,45,70),(277248,45,76),(277252,47,1),(277255,47,2),(277254,47,3),(277259,47,6),(277258,47,11),(277251,47,47),(277256,47,70),(277257,47,76),(277253,47,111),(277270,48,1),(277276,48,2),(277275,48,3),(277278,48,6),(277277,48,11),(277261,48,13),(277262,48,35),(277266,48,36),(277273,48,44),(277263,48,47),(277260,48,48),(277264,48,49),(277271,48,54),(277272,48,58),(277265,48,69),(277274,48,70),(277269,48,75),(277268,48,76),(277267,48,111),(277283,49,1),(277289,49,2),(277288,49,3),(277292,49,6),(277291,49,11),(277280,49,36),(277285,49,44),(277284,49,47),(277279,49,49),(277281,49,54),(277282,49,58),(277287,49,70),(277286,49,76),(277290,49,111),(277309,50,1),(277318,50,2),(277317,50,3),(277313,50,5),(277320,50,6),(277319,50,11),(277294,50,13),(277308,50,18),(277295,50,21),(277307,50,33),(277296,50,35),(277302,50,36),(277315,50,44),(277314,50,47),(277297,50,49),(277293,50,50),(277306,50,53),(277310,50,54),(277312,50,56),(277298,50,57),(277311,50,58),(277299,50,59),(277300,50,60),(277316,50,70),(277305,50,72),(277304,50,75),(277301,50,76),(277303,50,111),(277322,51,1),(277331,51,2),(277330,51,3),(277342,51,6),(277338,51,11),(277327,51,13),(277332,51,18),(277323,51,21),(277333,51,33),(277324,51,35),(277341,51,36),(277344,51,44),(277343,51,47),(277337,51,49),(277321,51,51),(277334,51,53),(277340,51,54),(277339,51,58),(277329,51,70),(277335,51,72),(277325,51,74),(277326,51,75),(277328,51,76),(277336,51,111),(277353,52,1),(277359,52,2),(277358,52,3),(277368,52,6),(277364,52,11),(277346,52,13),(277356,52,18),(277347,52,19),(277352,52,21),(277355,52,33),(277351,52,35),(277367,52,36),(277370,52,44),(277369,52,47),(277363,52,49),(277348,52,51),(277345,52,52),(277360,52,53),(277366,52,54),(277365,52,58),(277357,52,70),(277361,52,72),(277350,52,74),(277354,52,75),(277349,52,76),(277362,52,111),(277372,53,1),(277373,53,2),(277374,53,3),(277378,53,6),(277377,53,11),(277371,53,53),(277375,53,70),(277376,53,76),(277380,54,1),(277381,54,2),(277382,54,3),(277386,54,6),(277385,54,11),(277379,54,54),(277383,54,70),(277384,54,76),(277390,55,1),(277392,55,2),(277391,55,3),(277396,55,6),(277395,55,11),(277388,55,13),(277389,55,54),(277387,55,55),(277393,55,70),(277394,55,76),(277398,56,1),(277399,56,2),(277400,56,3),(277404,56,6),(277403,56,11),(277397,56,56),(277401,56,70),(277402,56,76),(277410,57,1),(277413,57,2),(277412,57,3),(277415,57,6),(277414,57,11),(277406,57,13),(277407,57,33),(277408,57,56),(277405,57,57),(277411,57,70),(277409,57,76),(277417,58,1),(277420,58,2),(277419,58,3),(277423,58,6),(277422,58,11),(277416,58,58),(277421,58,70),(277418,58,76),(277428,59,1),(277440,59,2),(277439,59,3),(277447,59,5),(277451,59,6),(277450,59,11),(277425,59,13),(277437,59,18),(277427,59,21),(277436,59,33),(277429,59,35),(277443,59,36),(277449,59,44),(277448,59,47),(277430,59,49),(277426,59,50),(277435,59,53),(277444,59,54),(277446,59,56),(277431,59,57),(277445,59,58),(277424,59,59),(277432,59,60),(277438,59,70),(277434,59,72),(277441,59,75),(277433,59,76),(277442,59,111),(277462,60,1),(277475,60,2),(277474,60,3),(277453,60,5),(277477,60,6),(277476,60,11),(277468,60,13),(277461,60,18),(277460,60,21),(277459,60,33),(277454,60,35),(277465,60,36),(277471,60,44),(277470,60,47),(277455,60,49),(277458,60,53),(277466,60,54),(277469,60,56),(277456,60,57),(277467,60,58),(277452,60,60),(277473,60,70),(277472,60,72),(277464,60,75),(277457,60,76),(277463,60,111),(277482,61,1),(277486,61,2),(277485,61,3),(277490,61,6),(277489,61,11),(277479,61,13),(277480,61,36),(277481,61,44),(277483,61,47),(277478,61,61),(277484,61,70),(277487,61,76),(277488,61,111),(277491,62,62),(277492,64,64),(277507,65,1),(277516,65,2),(277515,65,3),(277517,65,5),(277521,65,6),(277520,65,11),(277494,65,13),(277495,65,18),(277511,65,21),(277501,65,33),(277496,65,35),(277504,65,36),(277513,65,44),(277512,65,47),(277497,65,49),(277509,65,50),(277519,65,53),(277503,65,54),(277508,65,56),(277498,65,57),(277502,65,58),(277499,65,59),(277510,65,60),(277493,65,65),(277514,65,70),(277518,65,72),(277506,65,75),(277500,65,76),(277505,65,111),(277526,66,1),(277525,66,2),(277527,66,3),(277528,66,5),(277529,66,6),(277523,66,9),(277530,66,11),(277531,66,13),(277532,66,15),(277533,66,16),(277534,66,17),(277535,66,18),(277536,66,19),(277537,66,20),(277538,66,21),(277539,66,22),(277540,66,30),(277541,66,31),(277542,66,32),(277543,66,33),(277544,66,34),(277545,66,35),(277546,66,36),(277547,66,37),(277548,66,38),(277549,66,39),(277550,66,40),(277551,66,41),(277552,66,42),(277553,66,43),(277554,66,44),(277555,66,45),(277556,66,47),(277557,66,48),(277558,66,49),(277559,66,50),(277560,66,51),(277561,66,52),(277562,66,53),(277563,66,54),(277564,66,55),(277565,66,56),(277566,66,57),(277567,66,58),(277568,66,59),(277569,66,60),(277570,66,61),(277571,66,64),(277572,66,65),(277522,66,66),(277573,66,67),(277574,66,69),(277575,66,70),(277576,66,71),(277577,66,72),(277578,66,73),(277579,66,74),(277580,66,75),(277581,66,76),(277582,66,101),(277583,66,102),(277524,66,103),(277584,66,111),(277589,67,1),(277602,67,2),(277601,67,3),(277586,67,5),(277608,67,6),(277604,67,11),(277599,67,13),(277588,67,18),(277590,67,21),(277591,67,33),(277592,67,35),(277607,67,36),(277587,67,37),(277610,67,44),(277609,67,47),(277603,67,49),(277593,67,53),(277606,67,54),(277605,67,58),(277585,67,67),(277600,67,70),(277598,67,72),(277596,67,74),(277597,67,75),(277594,67,76),(277595,67,111),(277619,69,1),(277625,69,2),(277624,69,3),(277627,69,6),(277626,69,11),(277612,69,35),(277620,69,36),(277622,69,44),(277613,69,47),(277614,69,49),(277621,69,54),(277615,69,58),(277611,69,69),(277623,69,70),(277618,69,75),(277617,69,76),(277616,69,111),(277630,70,6),(277629,70,11),(277628,70,70),(277632,71,1),(277635,71,2),(277634,71,3),(277639,71,6),(277638,71,11),(277633,71,58),(277636,71,70),(277631,71,71),(277637,71,76),(277646,72,1),(277653,72,2),(277652,72,3),(277655,72,6),(277654,72,11),(277641,72,18),(277644,72,36),(277650,72,44),(277649,72,47),(277642,72,49),(277647,72,54),(277648,72,58),(277651,72,70),(277640,72,72),(277645,72,76),(277643,72,111),(277662,73,1),(277673,73,2),(277672,73,3),(277657,73,5),(277679,73,6),(277675,73,11),(277670,73,13),(277661,73,18),(277658,73,19),(277660,73,21),(277663,73,33),(277664,73,35),(277678,73,36),(277681,73,44),(277680,73,47),(277674,73,49),(277665,73,53),(277677,73,54),(277676,73,58),(277659,73,64),(277671,73,70),(277669,73,72),(277656,73,73),(277668,73,75),(277666,73,76),(277667,73,111),(277682,74,74),(277683,75,75),(277684,76,76),(277686,100,1),(277687,100,2),(277688,100,3),(277689,100,5),(277690,100,6),(277691,100,9),(277692,100,11),(277693,100,13),(277694,100,15),(277695,100,16),(277696,100,17),(277697,100,18),(277698,100,19),(277699,100,20),(277700,100,21),(277701,100,22),(277702,100,30),(277703,100,31),(277704,100,32),(277705,100,33),(277706,100,34),(277707,100,35),(277708,100,36),(277709,100,37),(277710,100,38),(277711,100,39),(277712,100,40),(277713,100,41),(277714,100,42),(277715,100,43),(277716,100,44),(277717,100,45),(277718,100,47),(277719,100,48),(277720,100,49),(277721,100,50),(277722,100,51),(277723,100,52),(277724,100,53),(277725,100,54),(277726,100,55),(277727,100,56),(277728,100,57),(277729,100,58),(277730,100,59),(277731,100,60),(277732,100,61),(277733,100,62),(277734,100,64),(277735,100,65),(277736,100,66),(277737,100,67),(277738,100,69),(277739,100,70),(277740,100,71),(277741,100,72),(277742,100,73),(277743,100,74),(277744,100,75),(277745,100,76),(277685,100,100),(277746,100,101),(277747,100,102),(277748,100,103),(277749,100,104),(277750,100,105),(277751,100,106),(277752,100,107),(277753,100,108),(277754,100,109),(277755,100,110),(277756,100,111),(277757,100,112),(277758,100,114),(277759,100,115),(277760,100,119),(277762,100,120),(277761,100,121),(277769,101,1),(277773,101,2),(277772,101,3),(277775,101,6),(277774,101,11),(277764,101,13),(277765,101,18),(277766,101,35),(277771,101,70),(277767,101,75),(277768,101,76),(277763,101,101),(277770,101,111),(277777,102,1),(277782,102,2),(277781,102,3),(277787,102,6),(277786,102,11),(277778,102,13),(277779,102,35),(277780,102,70),(277784,102,75),(277783,102,76),(277776,102,102),(277785,102,111),(277789,103,1),(277790,103,2),(277791,103,3),(277792,103,5),(277793,103,6),(277848,103,9),(277794,103,11),(277795,103,13),(277796,103,15),(277797,103,16),(277798,103,17),(277799,103,18),(277800,103,19),(277801,103,20),(277802,103,21),(277803,103,22),(277804,103,30),(277805,103,31),(277806,103,32),(277807,103,33),(277808,103,34),(277809,103,35),(277810,103,36),(277811,103,37),(277812,103,38),(277813,103,39),(277814,103,40),(277815,103,41),(277816,103,42),(277817,103,43),(277818,103,44),(277819,103,45),(277820,103,47),(277821,103,48),(277822,103,49),(277823,103,50),(277824,103,51),(277825,103,52),(277826,103,53),(277827,103,54),(277828,103,55),(277829,103,56),(277830,103,57),(277831,103,58),(277832,103,59),(277833,103,60),(277834,103,61),(277835,103,64),(277836,103,65),(277837,103,67),(277838,103,69),(277839,103,70),(277840,103,71),(277841,103,72),(277842,103,73),(277843,103,74),(277844,103,75),(277845,103,76),(277846,103,101),(277847,103,102),(277788,103,103),(277849,103,111),(277857,104,1),(277856,104,2),(277859,104,3),(277860,104,5),(277861,104,6),(277858,104,9),(277862,104,11),(277863,104,13),(277864,104,15),(277865,104,16),(277866,104,17),(277867,104,18),(277868,104,19),(277869,104,20),(277870,104,21),(277871,104,22),(277872,104,30),(277873,104,31),(277874,104,32),(277875,104,33),(277876,104,34),(277877,104,35),(277878,104,36),(277879,104,37),(277880,104,38),(277881,104,39),(277882,104,40),(277883,104,41),(277884,104,42),(277885,104,43),(277886,104,44),(277887,104,45),(277888,104,47),(277889,104,48),(277890,104,49),(277891,104,50),(277892,104,51),(277893,104,52),(277894,104,53),(277895,104,54),(277896,104,55),(277897,104,56),(277898,104,57),(277899,104,58),(277900,104,59),(277901,104,60),(277902,104,61),(277922,104,62),(277903,104,64),(277904,104,65),(277854,104,66),(277905,104,67),(277906,104,69),(277907,104,70),(277908,104,71),(277909,104,72),(277910,104,73),(277911,104,74),(277912,104,75),(277913,104,76),(277851,104,100),(277914,104,101),(277915,104,102),(277853,104,103),(277850,104,104),(277919,104,105),(277918,104,106),(277925,104,107),(277927,104,108),(277926,104,109),(277923,104,110),(277916,104,111),(277920,104,112),(277921,104,114),(277852,104,115),(277924,104,119),(277855,104,120),(277917,104,121),(277928,105,105),(277931,106,6),(277930,106,11),(277929,106,106),(277943,107,1),(277956,107,2),(277955,107,3),(277934,107,5),(277958,107,6),(277957,107,11),(277949,107,13),(277942,107,18),(277941,107,21),(277940,107,33),(277935,107,35),(277946,107,36),(277952,107,44),(277951,107,47),(277936,107,49),(277939,107,53),(277947,107,54),(277950,107,56),(277937,107,57),(277948,107,58),(277933,107,60),(277954,107,70),(277953,107,72),(277945,107,75),(277938,107,76),(277932,107,107),(277944,107,111),(277960,108,1),(277961,108,2),(277962,108,3),(277966,108,6),(277965,108,11),(277963,108,70),(277964,108,76),(277959,108,108),(277971,109,1),(277973,109,2),(277972,109,3),(277976,109,6),(277975,109,11),(277968,109,13),(277969,109,18),(277974,109,70),(277970,109,76),(277967,109,109),(277978,110,1),(277981,110,2),(277980,110,3),(277984,110,6),(277983,110,11),(277982,110,70),(277979,110,76),(277977,110,110),(277985,111,111),(277987,112,1),(277990,112,2),(277989,112,3),(278000,112,6),(277998,112,11),(277993,112,36),(277997,112,44),(277996,112,47),(277988,112,49),(277994,112,54),(277995,112,58),(277991,112,70),(277992,112,76),(277999,112,111),(277986,112,112),(278005,114,1),(278007,114,2),(278006,114,3),(278017,114,6),(278015,114,11),(278002,114,13),(278010,114,36),(278014,114,44),(278013,114,47),(278004,114,49),(278011,114,54),(278012,114,58),(278008,114,70),(278009,114,76),(278016,114,111),(278003,114,112),(278001,114,114),(278023,115,1),(278022,115,2),(278025,115,3),(278026,115,5),(278027,115,6),(278024,115,9),(278028,115,11),(278029,115,13),(278030,115,15),(278031,115,16),(278032,115,17),(278033,115,18),(278034,115,19),(278035,115,20),(278036,115,21),(278037,115,22),(278038,115,30),(278039,115,31),(278040,115,32),(278041,115,33),(278042,115,34),(278043,115,35),(278044,115,36),(278045,115,37),(278046,115,38),(278047,115,39),(278048,115,40),(278049,115,41),(278050,115,42),(278051,115,43),(278052,115,44),(278053,115,45),(278054,115,47),(278055,115,48),(278056,115,49),(278057,115,50),(278058,115,51),(278059,115,52),(278060,115,53),(278061,115,54),(278062,115,55),(278063,115,56),(278064,115,57),(278065,115,58),(278066,115,59),(278067,115,60),(278068,115,61),(278069,115,64),(278070,115,65),(278019,115,66),(278071,115,67),(278072,115,69),(278073,115,70),(278074,115,71),(278075,115,72),(278076,115,73),(278077,115,74),(278078,115,75),(278079,115,76),(278080,115,101),(278081,115,102),(278020,115,103),(278082,115,111),(278018,115,115),(278021,115,120),(278085,119,1),(278088,119,2),(278087,119,3),(278091,119,6),(278090,119,11),(278089,119,70),(278086,119,76),(278084,119,110),(278083,119,119),(278119,120,1),(278123,120,2),(278122,120,3),(278121,120,5),(278124,120,6),(278116,120,9),(278125,120,11),(278117,120,13),(278126,120,15),(278127,120,16),(278128,120,17),(278129,120,18),(278130,120,19),(278131,120,20),(278132,120,21),(278133,120,22),(278134,120,30),(278135,120,31),(278136,120,32),(278137,120,33),(278138,120,34),(278139,120,35),(278140,120,36),(278141,120,37),(278142,120,38),(278143,120,39),(278144,120,40),(278145,120,41),(278146,120,42),(278147,120,43),(278148,120,44),(278149,120,45),(278150,120,47),(278151,120,48),(278152,120,49),(278153,120,50),(278154,120,51),(278155,120,52),(278156,120,53),(278157,120,54),(278158,120,55),(278159,120,56),(278160,120,57),(278161,120,58),(278162,120,59),(278163,120,60),(278164,120,61),(278165,120,64),(278166,120,65),(278118,120,66),(278167,120,67),(278168,120,69),(278169,120,70),(278170,120,71),(278171,120,72),(278172,120,73),(278173,120,74),(278174,120,75),(278175,120,76),(278176,120,101),(278177,120,102),(278120,120,103),(278178,120,111),(278115,120,120),(278101,121,1),(278106,121,2),(278105,121,3),(278112,121,6),(278108,121,11),(278096,121,13),(278095,121,18),(278093,121,21),(278097,121,33),(278094,121,35),(278111,121,36),(278114,121,44),(278113,121,47),(278107,121,49),(278098,121,53),(278110,121,54),(278109,121,58),(278104,121,70),(278099,121,72),(278102,121,75),(278100,121,76),(278103,121,111),(278092,121,121);
+INSERT INTO `roleRole` VALUES (285864,1,1),(285865,1,2),(285866,1,3),(285870,1,6),(285869,1,11),(285867,1,70),(285868,1,76),(285871,2,2),(285873,2,6),(285872,2,11),(285874,3,3),(285876,3,6),(285875,3,11),(285878,5,1),(285891,5,2),(285890,5,3),(285877,5,5),(285897,5,6),(285893,5,11),(285888,5,13),(285879,5,18),(285880,5,21),(285881,5,33),(285882,5,35),(285896,5,36),(285899,5,44),(285898,5,47),(285892,5,49),(285883,5,53),(285895,5,54),(285894,5,58),(285889,5,70),(285887,5,72),(285886,5,75),(285884,5,76),(285885,5,111),(285900,6,6),(285903,9,1),(285904,9,2),(285905,9,3),(285906,9,5),(285907,9,6),(285901,9,9),(285908,9,11),(285909,9,13),(285910,9,15),(285911,9,16),(285912,9,17),(285913,9,18),(285914,9,19),(285915,9,20),(285916,9,21),(285917,9,22),(285918,9,30),(285919,9,31),(285920,9,32),(285921,9,33),(285922,9,34),(285923,9,35),(285924,9,36),(285925,9,37),(285926,9,38),(285927,9,39),(285928,9,40),(285929,9,41),(285930,9,42),(285931,9,43),(285932,9,44),(285933,9,45),(285934,9,47),(285935,9,48),(285936,9,49),(285937,9,50),(285938,9,51),(285939,9,52),(285940,9,53),(285941,9,54),(285942,9,55),(285943,9,56),(285944,9,57),(285945,9,58),(285946,9,59),(285947,9,60),(285948,9,61),(285949,9,64),(285950,9,65),(285951,9,67),(285952,9,69),(285953,9,70),(285954,9,71),(285955,9,72),(285956,9,73),(285957,9,74),(285958,9,75),(285959,9,76),(285960,9,101),(285961,9,102),(285902,9,103),(285963,9,111),(285962,9,122),(285965,11,6),(285964,11,11),(285967,13,1),(285968,13,2),(285969,13,3),(285973,13,6),(285972,13,11),(285966,13,13),(285970,13,70),(285971,13,76),(285980,15,1),(285989,15,2),(285988,15,3),(285991,15,6),(285990,15,11),(285974,15,15),(285975,15,35),(285982,15,36),(285986,15,44),(285985,15,47),(285976,15,49),(285983,15,54),(285977,15,56),(285984,15,58),(285987,15,70),(285979,15,75),(285978,15,76),(285981,15,111),(286000,16,1),(286009,16,2),(286008,16,3),(286011,16,6),(286010,16,11),(285994,16,15),(285992,16,16),(285995,16,35),(286002,16,36),(286006,16,44),(286005,16,47),(285996,16,49),(286003,16,54),(285997,16,56),(286004,16,58),(286007,16,70),(285999,16,75),(285998,16,76),(286001,16,111),(285993,16,122),(286020,17,1),(286036,17,2),(286035,17,3),(286027,17,5),(286059,17,6),(286024,17,9),(286058,17,11),(286023,17,13),(286057,17,15),(286022,17,16),(286012,17,17),(286019,17,18),(286056,17,19),(286013,17,20),(286028,17,21),(286055,17,22),(286054,17,30),(286053,17,31),(286052,17,32),(286030,17,33),(286051,17,34),(286038,17,35),(286033,17,36),(286014,17,37),(286050,17,38),(286015,17,39),(286049,17,40),(286048,17,41),(286047,17,42),(286046,17,43),(286045,17,44),(286060,17,45),(286061,17,47),(286062,17,48),(286025,17,49),(286063,17,50),(286064,17,51),(286065,17,52),(286041,17,53),(286032,17,54),(286066,17,55),(286044,17,56),(286029,17,57),(286031,17,58),(286037,17,59),(286067,17,60),(286068,17,61),(286016,17,64),(286021,17,65),(286017,17,67),(286069,17,69),(286034,17,70),(286070,17,71),(286043,17,72),(286071,17,73),(286026,17,74),(286072,17,75),(286018,17,76),(286073,17,101),(286074,17,102),(286040,17,103),(286042,17,111),(286039,17,122),(286076,18,1),(286079,18,2),(286078,18,3),(286082,18,6),(286081,18,11),(286075,18,18),(286080,18,70),(286077,18,76),(286093,19,1),(286099,19,2),(286098,19,3),(286103,19,6),(286102,19,11),(286085,19,13),(286086,19,18),(286083,19,19),(286084,19,21),(286087,19,33),(286096,19,36),(286101,19,44),(286100,19,47),(286092,19,49),(286088,19,53),(286095,19,54),(286094,19,58),(286097,19,70),(286089,19,72),(286090,19,76),(286091,19,111),(286113,20,1),(286125,20,2),(286124,20,3),(286123,20,5),(286122,20,6),(286105,20,9),(286121,20,11),(286106,20,13),(286120,20,15),(286107,20,16),(286119,20,17),(286111,20,18),(286118,20,19),(286104,20,20),(286126,20,21),(286127,20,22),(286128,20,30),(286129,20,31),(286130,20,32),(286131,20,33),(286132,20,34),(286110,20,35),(286133,20,36),(286134,20,37),(286135,20,38),(286136,20,39),(286137,20,40),(286138,20,41),(286139,20,42),(286140,20,43),(286141,20,44),(286142,20,45),(286143,20,47),(286144,20,48),(286115,20,49),(286145,20,50),(286146,20,51),(286147,20,52),(286148,20,53),(286149,20,54),(286150,20,55),(286151,20,56),(286116,20,57),(286152,20,58),(286117,20,59),(286153,20,60),(286154,20,61),(286155,20,64),(286108,20,65),(286156,20,67),(286157,20,69),(286158,20,70),(286159,20,71),(286160,20,72),(286161,20,73),(286162,20,74),(286163,20,75),(286109,20,76),(286164,20,101),(286165,20,102),(286114,20,103),(286166,20,111),(286112,20,122),(286176,21,1),(286182,21,2),(286181,21,3),(286186,21,6),(286185,21,11),(286168,21,13),(286169,21,18),(286167,21,21),(286170,21,33),(286179,21,36),(286184,21,44),(286183,21,47),(286175,21,49),(286171,21,53),(286178,21,54),(286177,21,58),(286180,21,70),(286172,21,72),(286173,21,76),(286174,21,111),(286191,22,1),(286200,22,2),(286199,22,3),(286207,22,6),(286204,22,11),(286188,22,13),(286190,22,18),(286189,22,21),(286187,22,22),(286192,22,33),(286203,22,36),(286206,22,44),(286205,22,47),(286197,22,49),(286193,22,53),(286202,22,54),(286201,22,58),(286198,22,70),(286194,22,72),(286195,22,76),(286196,22,111),(286220,30,1),(286234,30,2),(286233,30,3),(286209,30,5),(286243,30,6),(286221,30,9),(286244,30,11),(286222,30,13),(286242,30,15),(286223,30,16),(286241,30,17),(286219,30,18),(286240,30,19),(286210,30,20),(286218,30,21),(286211,30,22),(286208,30,30),(286239,30,31),(286238,30,32),(286217,30,33),(286237,30,34),(286216,30,35),(286236,30,36),(286235,30,37),(286245,30,38),(286246,30,39),(286247,30,40),(286248,30,41),(286249,30,42),(286250,30,43),(286251,30,44),(286252,30,45),(286253,30,47),(286254,30,48),(286227,30,49),(286255,30,50),(286256,30,51),(286257,30,52),(286212,30,53),(286258,30,54),(286259,30,55),(286260,30,56),(286226,30,57),(286261,30,58),(286225,30,59),(286262,30,60),(286263,30,61),(286213,30,64),(286224,30,65),(286264,30,67),(286265,30,69),(286232,30,70),(286266,30,71),(286231,30,72),(286267,30,73),(286268,30,74),(286230,30,75),(286214,30,76),(286269,30,101),(286270,30,102),(286229,30,103),(286215,30,111),(286228,30,122),(286272,31,1),(286273,31,2),(286274,31,3),(286278,31,6),(286277,31,11),(286271,31,31),(286275,31,70),(286276,31,76),(286280,32,1),(286281,32,2),(286282,32,3),(286286,32,6),(286285,32,11),(286279,32,32),(286283,32,70),(286284,32,76),(286287,33,33),(286289,34,1),(286294,34,2),(286293,34,3),(286297,34,6),(286296,34,11),(286290,34,13),(286291,34,33),(286288,34,34),(286292,34,70),(286295,34,76),(286299,35,1),(286305,35,2),(286304,35,3),(286307,35,6),(286306,35,11),(286298,35,35),(286303,35,70),(286300,35,75),(286301,35,76),(286302,35,111),(286312,36,1),(286314,36,2),(286313,36,3),(286318,36,6),(286317,36,11),(286308,36,36),(286309,36,44),(286310,36,47),(286315,36,70),(286316,36,76),(286311,36,111),(286320,37,1),(286329,37,2),(286328,37,3),(286335,37,6),(286333,37,11),(286321,37,18),(286326,37,36),(286319,37,37),(286332,37,44),(286331,37,47),(286322,37,49),(286325,37,54),(286330,37,58),(286327,37,70),(286323,37,74),(286324,37,76),(286334,37,111),(286344,38,1),(286348,38,2),(286347,38,3),(286355,38,6),(286353,38,11),(286337,38,13),(286343,38,18),(286345,38,36),(286338,38,37),(286336,38,38),(286352,38,44),(286351,38,47),(286342,38,49),(286349,38,54),(286350,38,58),(286339,38,64),(286346,38,70),(286341,38,74),(286340,38,76),(286354,38,111),(286364,39,1),(286374,39,2),(286373,39,3),(286357,39,5),(286381,39,6),(286378,39,11),(286367,39,13),(286363,39,18),(286358,39,21),(286362,39,33),(286361,39,35),(286377,39,36),(286356,39,39),(286380,39,44),(286379,39,47),(286370,39,49),(286365,39,53),(286376,39,54),(286369,39,56),(286359,39,57),(286375,39,58),(286372,39,70),(286368,39,72),(286371,39,75),(286360,39,76),(286366,39,111),(286383,40,1),(286386,40,2),(286385,40,3),(286396,40,6),(286394,40,11),(286389,40,36),(286382,40,40),(286393,40,44),(286392,40,47),(286384,40,49),(286390,40,54),(286391,40,58),(286387,40,70),(286388,40,76),(286395,40,111),(286405,41,1),(286409,41,2),(286408,41,3),(286415,41,6),(286414,41,11),(286398,41,13),(286399,41,35),(286406,41,36),(286400,41,40),(286397,41,41),(286413,41,44),(286412,41,47),(286402,41,49),(286410,41,54),(286411,41,58),(286407,41,70),(286404,41,75),(286401,41,76),(286403,41,111),(286422,42,1),(286430,42,2),(286429,42,3),(286432,42,6),(286431,42,11),(286417,42,35),(286423,42,36),(286416,42,42),(286427,42,44),(286426,42,47),(286418,42,49),(286424,42,54),(286425,42,58),(286428,42,70),(286421,42,75),(286419,42,76),(286420,42,111),(286441,43,1),(286445,43,2),(286444,43,3),(286452,43,6),(286451,43,11),(286434,43,13),(286435,43,18),(286439,43,35),(286446,43,36),(286436,43,42),(286433,43,43),(286450,43,44),(286449,43,47),(286438,43,49),(286447,43,54),(286448,43,58),(286443,43,70),(286442,43,75),(286440,43,76),(286437,43,111),(286454,44,1),(286455,44,2),(286456,44,3),(286460,44,6),(286459,44,11),(286453,44,44),(286457,44,70),(286458,44,76),(286464,45,1),(286466,45,2),(286465,45,3),(286470,45,6),(286469,45,11),(286462,45,13),(286463,45,44),(286461,45,45),(286467,45,70),(286468,45,76),(286472,47,1),(286475,47,2),(286474,47,3),(286479,47,6),(286478,47,11),(286471,47,47),(286476,47,70),(286477,47,76),(286473,47,111),(286490,48,1),(286496,48,2),(286495,48,3),(286498,48,6),(286497,48,11),(286481,48,13),(286482,48,35),(286486,48,36),(286493,48,44),(286483,48,47),(286480,48,48),(286484,48,49),(286491,48,54),(286492,48,58),(286485,48,69),(286494,48,70),(286489,48,75),(286488,48,76),(286487,48,111),(286503,49,1),(286509,49,2),(286508,49,3),(286512,49,6),(286511,49,11),(286500,49,36),(286505,49,44),(286504,49,47),(286499,49,49),(286501,49,54),(286502,49,58),(286507,49,70),(286506,49,76),(286510,49,111),(286529,50,1),(286538,50,2),(286537,50,3),(286533,50,5),(286540,50,6),(286539,50,11),(286514,50,13),(286528,50,18),(286515,50,21),(286527,50,33),(286516,50,35),(286522,50,36),(286535,50,44),(286534,50,47),(286517,50,49),(286513,50,50),(286526,50,53),(286530,50,54),(286532,50,56),(286518,50,57),(286531,50,58),(286519,50,59),(286520,50,60),(286536,50,70),(286525,50,72),(286524,50,75),(286521,50,76),(286523,50,111),(286542,51,1),(286551,51,2),(286550,51,3),(286562,51,6),(286558,51,11),(286547,51,13),(286552,51,18),(286543,51,21),(286553,51,33),(286544,51,35),(286561,51,36),(286564,51,44),(286563,51,47),(286557,51,49),(286541,51,51),(286554,51,53),(286560,51,54),(286559,51,58),(286549,51,70),(286555,51,72),(286545,51,74),(286546,51,75),(286548,51,76),(286556,51,111),(286573,52,1),(286579,52,2),(286578,52,3),(286588,52,6),(286584,52,11),(286566,52,13),(286576,52,18),(286567,52,19),(286572,52,21),(286575,52,33),(286571,52,35),(286587,52,36),(286590,52,44),(286589,52,47),(286583,52,49),(286568,52,51),(286565,52,52),(286580,52,53),(286586,52,54),(286585,52,58),(286577,52,70),(286581,52,72),(286570,52,74),(286574,52,75),(286569,52,76),(286582,52,111),(286592,53,1),(286593,53,2),(286594,53,3),(286598,53,6),(286597,53,11),(286591,53,53),(286595,53,70),(286596,53,76),(286600,54,1),(286601,54,2),(286602,54,3),(286606,54,6),(286605,54,11),(286599,54,54),(286603,54,70),(286604,54,76),(286610,55,1),(286612,55,2),(286611,55,3),(286616,55,6),(286615,55,11),(286608,55,13),(286609,55,54),(286607,55,55),(286613,55,70),(286614,55,76),(286618,56,1),(286619,56,2),(286620,56,3),(286624,56,6),(286623,56,11),(286617,56,56),(286621,56,70),(286622,56,76),(286630,57,1),(286633,57,2),(286632,57,3),(286635,57,6),(286634,57,11),(286626,57,13),(286627,57,33),(286628,57,56),(286625,57,57),(286631,57,70),(286629,57,76),(286637,58,1),(286640,58,2),(286639,58,3),(286643,58,6),(286642,58,11),(286636,58,58),(286641,58,70),(286638,58,76),(286648,59,1),(286660,59,2),(286659,59,3),(286667,59,5),(286671,59,6),(286670,59,11),(286645,59,13),(286657,59,18),(286647,59,21),(286656,59,33),(286649,59,35),(286663,59,36),(286669,59,44),(286668,59,47),(286650,59,49),(286646,59,50),(286655,59,53),(286664,59,54),(286666,59,56),(286651,59,57),(286665,59,58),(286644,59,59),(286652,59,60),(286658,59,70),(286654,59,72),(286661,59,75),(286653,59,76),(286662,59,111),(286682,60,1),(286695,60,2),(286694,60,3),(286673,60,5),(286697,60,6),(286696,60,11),(286688,60,13),(286681,60,18),(286680,60,21),(286679,60,33),(286674,60,35),(286685,60,36),(286691,60,44),(286690,60,47),(286675,60,49),(286678,60,53),(286686,60,54),(286689,60,56),(286676,60,57),(286687,60,58),(286672,60,60),(286693,60,70),(286692,60,72),(286684,60,75),(286677,60,76),(286683,60,111),(286702,61,1),(286706,61,2),(286705,61,3),(286710,61,6),(286709,61,11),(286699,61,13),(286700,61,36),(286701,61,44),(286703,61,47),(286698,61,61),(286704,61,70),(286707,61,76),(286708,61,111),(286711,62,62),(286712,64,64),(286727,65,1),(286736,65,2),(286735,65,3),(286737,65,5),(286741,65,6),(286740,65,11),(286714,65,13),(286715,65,18),(286731,65,21),(286721,65,33),(286716,65,35),(286724,65,36),(286733,65,44),(286732,65,47),(286717,65,49),(286729,65,50),(286739,65,53),(286723,65,54),(286728,65,56),(286718,65,57),(286722,65,58),(286719,65,59),(286730,65,60),(286713,65,65),(286734,65,70),(286738,65,72),(286726,65,75),(286720,65,76),(286725,65,111),(286746,66,1),(286745,66,2),(286747,66,3),(286748,66,5),(286749,66,6),(286743,66,9),(286750,66,11),(286751,66,13),(286752,66,15),(286753,66,16),(286754,66,17),(286755,66,18),(286756,66,19),(286757,66,20),(286758,66,21),(286759,66,22),(286760,66,30),(286761,66,31),(286762,66,32),(286763,66,33),(286764,66,34),(286765,66,35),(286766,66,36),(286767,66,37),(286768,66,38),(286769,66,39),(286770,66,40),(286771,66,41),(286772,66,42),(286773,66,43),(286774,66,44),(286775,66,45),(286776,66,47),(286777,66,48),(286778,66,49),(286779,66,50),(286780,66,51),(286781,66,52),(286782,66,53),(286783,66,54),(286784,66,55),(286785,66,56),(286786,66,57),(286787,66,58),(286788,66,59),(286789,66,60),(286790,66,61),(286791,66,64),(286792,66,65),(286742,66,66),(286793,66,67),(286794,66,69),(286795,66,70),(286796,66,71),(286797,66,72),(286798,66,73),(286799,66,74),(286800,66,75),(286801,66,76),(286802,66,101),(286803,66,102),(286744,66,103),(286805,66,111),(286804,66,122),(286810,67,1),(286827,67,2),(286826,67,3),(286807,67,5),(286831,67,6),(286830,67,11),(286824,67,13),(286809,67,18),(286811,67,21),(286812,67,33),(286813,67,35),(286821,67,36),(286808,67,37),(286829,67,44),(286828,67,47),(286817,67,49),(286814,67,53),(286820,67,54),(286819,67,58),(286806,67,67),(286825,67,70),(286823,67,72),(286818,67,74),(286822,67,75),(286815,67,76),(286816,67,111),(286840,69,1),(286846,69,2),(286845,69,3),(286848,69,6),(286847,69,11),(286833,69,35),(286841,69,36),(286843,69,44),(286834,69,47),(286835,69,49),(286842,69,54),(286836,69,58),(286832,69,69),(286844,69,70),(286839,69,75),(286838,69,76),(286837,69,111),(286851,70,6),(286850,70,11),(286849,70,70),(286853,71,1),(286856,71,2),(286855,71,3),(286860,71,6),(286859,71,11),(286854,71,58),(286857,71,70),(286852,71,71),(286858,71,76),(286867,72,1),(286874,72,2),(286873,72,3),(286876,72,6),(286875,72,11),(286862,72,18),(286865,72,36),(286871,72,44),(286870,72,47),(286863,72,49),(286868,72,54),(286869,72,58),(286872,72,70),(286861,72,72),(286866,72,76),(286864,72,111),(286883,73,1),(286894,73,2),(286893,73,3),(286878,73,5),(286900,73,6),(286896,73,11),(286891,73,13),(286882,73,18),(286879,73,19),(286881,73,21),(286884,73,33),(286885,73,35),(286899,73,36),(286902,73,44),(286901,73,47),(286895,73,49),(286886,73,53),(286898,73,54),(286897,73,58),(286880,73,64),(286892,73,70),(286890,73,72),(286877,73,73),(286889,73,75),(286887,73,76),(286888,73,111),(286903,74,74),(286904,75,75),(286905,76,76),(286907,100,1),(286908,100,2),(286909,100,3),(286910,100,5),(286911,100,6),(286912,100,9),(286913,100,11),(286914,100,13),(286915,100,15),(286916,100,16),(286917,100,17),(286918,100,18),(286919,100,19),(286920,100,20),(286921,100,21),(286922,100,22),(286923,100,30),(286924,100,31),(286925,100,32),(286926,100,33),(286927,100,34),(286928,100,35),(286929,100,36),(286930,100,37),(286931,100,38),(286932,100,39),(286933,100,40),(286934,100,41),(286935,100,42),(286936,100,43),(286937,100,44),(286938,100,45),(286939,100,47),(286940,100,48),(286941,100,49),(286942,100,50),(286943,100,51),(286944,100,52),(286945,100,53),(286946,100,54),(286947,100,55),(286948,100,56),(286949,100,57),(286950,100,58),(286951,100,59),(286952,100,60),(286953,100,61),(286954,100,62),(286955,100,64),(286956,100,65),(286957,100,66),(286958,100,67),(286959,100,69),(286960,100,70),(286961,100,71),(286962,100,72),(286963,100,73),(286964,100,74),(286965,100,75),(286966,100,76),(286906,100,100),(286967,100,101),(286968,100,102),(286969,100,103),(286970,100,104),(286971,100,105),(286972,100,106),(286973,100,107),(286974,100,108),(286975,100,109),(286976,100,110),(286977,100,111),(286978,100,112),(286979,100,114),(286980,100,115),(286981,100,119),(286984,100,120),(286982,100,121),(286983,100,122),(286991,101,1),(286995,101,2),(286994,101,3),(286997,101,6),(286996,101,11),(286986,101,13),(286987,101,18),(286988,101,35),(286993,101,70),(286989,101,75),(286990,101,76),(286985,101,101),(286992,101,111),(286999,102,1),(287004,102,2),(287003,102,3),(287009,102,6),(287008,102,11),(287000,102,13),(287001,102,35),(287002,102,70),(287006,102,75),(287005,102,76),(286998,102,102),(287007,102,111),(287011,103,1),(287012,103,2),(287013,103,3),(287014,103,5),(287015,103,6),(287070,103,9),(287016,103,11),(287017,103,13),(287018,103,15),(287019,103,16),(287020,103,17),(287021,103,18),(287022,103,19),(287023,103,20),(287024,103,21),(287025,103,22),(287026,103,30),(287027,103,31),(287028,103,32),(287029,103,33),(287030,103,34),(287031,103,35),(287032,103,36),(287033,103,37),(287034,103,38),(287035,103,39),(287036,103,40),(287037,103,41),(287038,103,42),(287039,103,43),(287040,103,44),(287041,103,45),(287042,103,47),(287043,103,48),(287044,103,49),(287045,103,50),(287046,103,51),(287047,103,52),(287048,103,53),(287049,103,54),(287050,103,55),(287051,103,56),(287052,103,57),(287053,103,58),(287054,103,59),(287055,103,60),(287056,103,61),(287057,103,64),(287058,103,65),(287059,103,67),(287060,103,69),(287061,103,70),(287062,103,71),(287063,103,72),(287064,103,73),(287065,103,74),(287066,103,75),(287067,103,76),(287068,103,101),(287069,103,102),(287010,103,103),(287072,103,111),(287071,103,122),(287080,104,1),(287079,104,2),(287082,104,3),(287083,104,5),(287084,104,6),(287081,104,9),(287085,104,11),(287086,104,13),(287087,104,15),(287088,104,16),(287089,104,17),(287090,104,18),(287091,104,19),(287092,104,20),(287093,104,21),(287094,104,22),(287095,104,30),(287096,104,31),(287097,104,32),(287098,104,33),(287099,104,34),(287100,104,35),(287101,104,36),(287102,104,37),(287103,104,38),(287104,104,39),(287105,104,40),(287106,104,41),(287107,104,42),(287108,104,43),(287109,104,44),(287110,104,45),(287111,104,47),(287112,104,48),(287113,104,49),(287114,104,50),(287115,104,51),(287116,104,52),(287117,104,53),(287118,104,54),(287119,104,55),(287120,104,56),(287121,104,57),(287122,104,58),(287123,104,59),(287124,104,60),(287125,104,61),(287146,104,62),(287126,104,64),(287127,104,65),(287077,104,66),(287128,104,67),(287129,104,69),(287130,104,70),(287131,104,71),(287132,104,72),(287133,104,73),(287134,104,74),(287135,104,75),(287136,104,76),(287074,104,100),(287137,104,101),(287138,104,102),(287076,104,103),(287073,104,104),(287143,104,105),(287142,104,106),(287149,104,107),(287151,104,108),(287150,104,109),(287147,104,110),(287140,104,111),(287144,104,112),(287145,104,114),(287075,104,115),(287148,104,119),(287078,104,120),(287141,104,121),(287139,104,122),(287152,105,105),(287155,106,6),(287154,106,11),(287153,106,106),(287167,107,1),(287180,107,2),(287179,107,3),(287158,107,5),(287182,107,6),(287181,107,11),(287173,107,13),(287166,107,18),(287165,107,21),(287164,107,33),(287159,107,35),(287170,107,36),(287176,107,44),(287175,107,47),(287160,107,49),(287163,107,53),(287171,107,54),(287174,107,56),(287161,107,57),(287172,107,58),(287157,107,60),(287178,107,70),(287177,107,72),(287169,107,75),(287162,107,76),(287156,107,107),(287168,107,111),(287184,108,1),(287185,108,2),(287186,108,3),(287190,108,6),(287189,108,11),(287187,108,70),(287188,108,76),(287183,108,108),(287195,109,1),(287197,109,2),(287196,109,3),(287200,109,6),(287199,109,11),(287192,109,13),(287193,109,18),(287198,109,70),(287194,109,76),(287191,109,109),(287202,110,1),(287205,110,2),(287204,110,3),(287208,110,6),(287207,110,11),(287206,110,70),(287203,110,76),(287201,110,110),(287209,111,111),(287211,112,1),(287214,112,2),(287213,112,3),(287224,112,6),(287222,112,11),(287217,112,36),(287221,112,44),(287220,112,47),(287212,112,49),(287218,112,54),(287219,112,58),(287215,112,70),(287216,112,76),(287223,112,111),(287210,112,112),(287229,114,1),(287231,114,2),(287230,114,3),(287241,114,6),(287239,114,11),(287226,114,13),(287234,114,36),(287238,114,44),(287237,114,47),(287228,114,49),(287235,114,54),(287236,114,58),(287232,114,70),(287233,114,76),(287240,114,111),(287227,114,112),(287225,114,114),(287247,115,1),(287246,115,2),(287249,115,3),(287250,115,5),(287251,115,6),(287248,115,9),(287252,115,11),(287253,115,13),(287254,115,15),(287255,115,16),(287256,115,17),(287257,115,18),(287258,115,19),(287259,115,20),(287260,115,21),(287261,115,22),(287262,115,30),(287263,115,31),(287264,115,32),(287265,115,33),(287266,115,34),(287267,115,35),(287268,115,36),(287269,115,37),(287270,115,38),(287271,115,39),(287272,115,40),(287273,115,41),(287274,115,42),(287275,115,43),(287276,115,44),(287277,115,45),(287278,115,47),(287279,115,48),(287280,115,49),(287281,115,50),(287282,115,51),(287283,115,52),(287284,115,53),(287285,115,54),(287286,115,55),(287287,115,56),(287288,115,57),(287289,115,58),(287290,115,59),(287291,115,60),(287292,115,61),(287293,115,64),(287294,115,65),(287243,115,66),(287295,115,67),(287296,115,69),(287297,115,70),(287298,115,71),(287299,115,72),(287300,115,73),(287301,115,74),(287302,115,75),(287303,115,76),(287304,115,101),(287305,115,102),(287244,115,103),(287307,115,111),(287242,115,115),(287245,115,120),(287306,115,122),(287310,119,1),(287313,119,2),(287312,119,3),(287316,119,6),(287315,119,11),(287314,119,70),(287311,119,76),(287309,119,110),(287308,119,119),(287363,120,1),(287367,120,2),(287366,120,3),(287365,120,5),(287368,120,6),(287360,120,9),(287369,120,11),(287361,120,13),(287370,120,15),(287371,120,16),(287372,120,17),(287373,120,18),(287374,120,19),(287375,120,20),(287376,120,21),(287377,120,22),(287378,120,30),(287379,120,31),(287380,120,32),(287381,120,33),(287382,120,34),(287383,120,35),(287384,120,36),(287385,120,37),(287386,120,38),(287387,120,39),(287388,120,40),(287389,120,41),(287390,120,42),(287391,120,43),(287392,120,44),(287393,120,45),(287394,120,47),(287395,120,48),(287396,120,49),(287397,120,50),(287398,120,51),(287399,120,52),(287400,120,53),(287401,120,54),(287402,120,55),(287403,120,56),(287404,120,57),(287405,120,58),(287406,120,59),(287407,120,60),(287408,120,61),(287409,120,64),(287410,120,65),(287362,120,66),(287411,120,67),(287412,120,69),(287413,120,70),(287414,120,71),(287415,120,72),(287416,120,73),(287417,120,74),(287418,120,75),(287419,120,76),(287420,120,101),(287421,120,102),(287364,120,103),(287423,120,111),(287359,120,120),(287422,120,122),(287326,121,1),(287331,121,2),(287330,121,3),(287337,121,6),(287333,121,11),(287321,121,13),(287320,121,18),(287318,121,21),(287322,121,33),(287319,121,35),(287336,121,36),(287339,121,44),(287338,121,47),(287332,121,49),(287323,121,53),(287335,121,54),(287334,121,58),(287329,121,70),(287324,121,72),(287327,121,75),(287325,121,76),(287328,121,111),(287317,121,121),(287347,122,1),(287356,122,2),(287355,122,3),(287358,122,6),(287357,122,11),(287341,122,15),(287342,122,35),(287349,122,36),(287353,122,44),(287352,122,47),(287343,122,49),(287350,122,54),(287344,122,56),(287351,122,58),(287354,122,70),(287346,122,75),(287345,122,76),(287348,122,111),(287340,122,122);
/*!40000 ALTER TABLE `roleRole` ENABLE KEYS */;
UNLOCK TABLES;
@@ -140,11 +140,11 @@ UNLOCK TABLES;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
--- Dump completed on 2023-06-26 8:40:02
+-- Dump completed on 2023-08-30 15:53:15
USE `salix`;
--- MariaDB dump 10.19 Distrib 10.5.15-MariaDB, for debian-linux-gnu (x86_64)
+-- MariaDB dump 10.19 Distrib 10.5.19-MariaDB, for debian-linux-gnu (x86_64)
--
--- Host: db1.static.verdnatura.es Database: salix
+-- Host: db2.static.verdnatura.es Database: salix
-- ------------------------------------------------------
-- Server version 10.7.7-MariaDB-1:10.7.7+maria~deb11-log
@@ -164,7 +164,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'),(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'),(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'),(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'),(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'),(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','claimManager'),(98,'ClaimBeginning','*','*','ALLOW','ROLE','employee'),(99,'ClaimDevelopment','*','READ','ALLOW','ROLE','employee'),(100,'ClaimDevelopment','*','WRITE','ALLOW','ROLE','claimManager'),(102,'Claim','createFromSales','*','ALLOW','ROLE','employee'),(104,'Item','*','WRITE','ALLOW','ROLE','marketingBoss'),(105,'ItemBarcode','*','WRITE','ALLOW','ROLE','marketingBoss'),(106,'ItemBotanical','*','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'),(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','logisticBoss'),(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'),(165,'TicketDms','*','*','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'),(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'),(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','deliveryBoss'),(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','claimManager'),(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'),(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','find','READ','ALLOW','ROLE','hr'),(235,'CustomsAgent','*','*','ALLOW','ROLE','employee'),(236,'Buy','*','*','ALLOW','ROLE','buyer'),(237,'WorkerDms','filter','*','ALLOW','ROLE','employee'),(238,'Town','*','WRITE','ALLOW','ROLE','deliveryBoss'),(239,'Province','*','WRITE','ALLOW','ROLE','deliveryBoss'),(240,'supplier','*','WRITE','ALLOW','ROLE','administrative'),(241,'SupplierContact','*','WRITE','ALLOW','ROLE','administrative'),(242,'supplier','*','WRITE','ALLOW','ROLE','administrative'),(244,'supplier','*','WRITE','ALLOW','ROLE','administrative'),(248,'RoleMapping','*','READ','ALLOW','ROLE','account'),(249,'UserPassword','*','READ','ALLOW','ROLE','account'),(250,'Town','*','WRITE','ALLOW','ROLE','deliveryBoss'),(251,'Province','*','WRITE','ALLOW','ROLE','deliveryBoss'),(252,'Supplier','*','READ','ALLOW','ROLE','employee'),(253,'Supplier','*','WRITE','ALLOW','ROLE','administrative'),(254,'SupplierLog','*','READ','ALLOW','ROLE','employee'),(256,'Image','*','WRITE','ALLOW','ROLE','employee'),(257,'FixedPrice','*','*','ALLOW','ROLE','buyer'),(258,'PayDem','*','READ','ALLOW','ROLE','employee'),(259,'Client','createReceipt','*','ALLOW','ROLE','salesAssistant'),(260,'PrintServerQueue','*','WRITE','ALLOW','ROLE','employee'),(261,'SupplierAccount','*','*','ALLOW','ROLE','administrative'),(262,'Entry','*','*','ALLOW','ROLE','administrative'),(263,'InvoiceIn','*','*','ALLOW','ROLE','administrative'),(264,'StarredModule','*','*','ALLOW','ROLE','employee'),(265,'ItemBotanical','*','WRITE','ALLOW','ROLE','logisticBoss'),(266,'ZoneLog','*','READ','ALLOW','ROLE','employee'),(267,'Genus','*','WRITE','ALLOW','ROLE','logisticBoss'),(268,'Specie','*','WRITE','ALLOW','ROLE','logisticBoss'),(269,'InvoiceOut','createPdf','WRITE','ALLOW','ROLE','employee'),(270,'SupplierAddress','*','*','ALLOW','ROLE','employee'),(271,'SalesMonitor','*','*','ALLOW','ROLE','employee'),(272,'InvoiceInLog','*','READ','ALLOW','ROLE','employee'),(273,'InvoiceInTax','*','*','ALLOW','ROLE','administrative'),(274,'InvoiceInLog','*','READ','ALLOW','ROLE','administrative'),(275,'InvoiceOut','createManualInvoice','WRITE','ALLOW','ROLE','invoicing'),(276,'InvoiceOut','globalInvoicing','WRITE','ALLOW','ROLE','invoicing'),(277,'Role','*','*','ALLOW','ROLE','it'),(278,'RoleInherit','*','WRITE','ALLOW','ROLE','grant'),(279,'MailAlias','*','*','ALLOW','ROLE','marketing'),(283,'EntryObservation','*','*','ALLOW','ROLE','buyer'),(284,'LdapConfig','*','*','ALLOW','ROLE','sysadmin'),(285,'SambaConfig','*','*','ALLOW','ROLE','sysadmin'),(286,'ACL','*','*','ALLOW','ROLE','developer'),(287,'AccessToken','*','*','ALLOW','ROLE','developer'),(288,'MailAliasAccount','*','*','ALLOW','ROLE','marketing'),(289,'MailAliasAccount','*','*','ALLOW','ROLE','hr'),(291,'MailForward','*','*','ALLOW','ROLE','marketing'),(292,'MailForward','*','*','ALLOW','ROLE','hr'),(293,'RoleInherit','*','*','ALLOW','ROLE','it'),(294,'RoleRole','*','*','ALLOW','ROLE','it'),(295,'AccountConfig','*','*','ALLOW','ROLE','sysadmin'),(296,'Collection','*','READ','ALLOW','ROLE','employee'),(297,'Sale','refund','WRITE','ALLOW','ROLE','invoicing'),(298,'InvoiceInDueDay','*','*','ALLOW','ROLE','administrative'),(299,'Collection','setSaleQuantity','*','ALLOW','ROLE','employee'),(302,'AgencyTerm','*','*','ALLOW','ROLE','administrative'),(303,'ClaimLog','*','READ','ALLOW','ROLE','claimManager'),(304,'Edi','updateData','WRITE','ALLOW','ROLE','employee'),(305,'EducationLevel','*','*','ALLOW','ROLE','employee'),(306,'InvoiceInIntrastat','*','*','ALLOW','ROLE','employee'),(307,'SupplierAgencyTerm','*','*','ALLOW','ROLE','administrative'),(308,'InvoiceInIntrastat','*','*','ALLOW','ROLE','employee'),(309,'Zone','getZoneClosing','*','ALLOW','ROLE','employee'),(310,'ExpeditionState','*','READ','ALLOW','ROLE','employee'),(311,'Expense','*','READ','ALLOW','ROLE','employee'),(312,'Expense','*','WRITE','ALLOW','ROLE','administrative'),(314,'SupplierActivity','*','READ','ALLOW','ROLE','employee'),(315,'SupplierActivity','*','WRITE','ALLOW','ROLE','administrative'),(316,'Dms','deleteTrashFiles','WRITE','ALLOW','ROLE','employee'),(317,'ClientUnpaid','*','*','ALLOW','ROLE','administrative'),(318,'MdbVersion','*','*','ALLOW','ROLE','developer'),(319,'ItemType','*','READ','ALLOW','ROLE','employee'),(320,'ItemType','*','WRITE','ALLOW','ROLE','buyer'),(321,'InvoiceOut','refund','WRITE','ALLOW','ROLE','invoicing'),(322,'InvoiceOut','refund','WRITE','ALLOW','ROLE','salesAssistant'),(323,'InvoiceOut','refund','WRITE','ALLOW','ROLE','claimManager'),(324,'Ticket','refund','WRITE','ALLOW','ROLE','invoicing'),(325,'Ticket','refund','WRITE','ALLOW','ROLE','salesAssistant'),(326,'Ticket','refund','WRITE','ALLOW','ROLE','claimManager'),(327,'Sale','refund','WRITE','ALLOW','ROLE','salesAssistant'),(328,'Sale','refund','WRITE','ALLOW','ROLE','claimManager'),(329,'TicketRefund','*','WRITE','ALLOW','ROLE','invoicing'),(330,'ClaimObservation','*','WRITE','ALLOW','ROLE','salesPerson'),(331,'ClaimObservation','*','READ','ALLOW','ROLE','salesPerson'),(332,'Client','setPassword','WRITE','ALLOW','ROLE','salesPerson'),(333,'Client','updateUser','WRITE','ALLOW','ROLE','salesPerson'),(334,'ShelvingLog','*','READ','ALLOW','ROLE','employee'),(335,'ZoneExclusionGeo','*','READ','ALLOW','ROLE','employee'),(336,'ZoneExclusionGeo','*','WRITE','ALLOW','ROLE','deliveryBoss'),(337,'Parking','*','*','ALLOW','ROLE','employee'),(338,'Shelving','*','*','ALLOW','ROLE','employee'),(339,'OsTicket','*','*','ALLOW','ROLE','employee'),(340,'OsTicketConfig','*','*','ALLOW','ROLE','it'),(341,'ClientConsumptionQueue','*','WRITE','ALLOW','ROLE','employee'),(342,'Ticket','deliveryNotePdf','READ','ALLOW','ROLE','employee'),(343,'Ticket','deliveryNoteEmail','WRITE','ALLOW','ROLE','employee'),(344,'Ticket','deliveryNoteCsvPdf','READ','ALLOW','ROLE','employee'),(345,'Ticket','deliveryNoteCsvEmail','READ','ALLOW','ROLE','employee'),(346,'Client','campaignMetricsPdf','READ','ALLOW','ROLE','employee'),(347,'Client','campaignMetricsEmail','WRITE','ALLOW','ROLE','employee'),(348,'Client','clientWelcomeHtml','READ','ALLOW','ROLE','employee'),(349,'Client','clientWelcomeEmail','WRITE','ALLOW','ROLE','employee'),(350,'Client','creditRequestPdf','READ','ALLOW','ROLE','employee'),(351,'Client','creditRequestHtml','READ','ALLOW','ROLE','employee'),(352,'Client','creditRequestEmail','WRITE','ALLOW','ROLE','employee'),(353,'Client','printerSetupHtml','READ','ALLOW','ROLE','employee'),(354,'Client','printerSetupEmail','WRITE','ALLOW','ROLE','employee'),(355,'Client','sepaCoreEmail','WRITE','ALLOW','ROLE','employee'),(356,'Client','letterDebtorPdf','READ','ALLOW','ROLE','employee'),(357,'Client','letterDebtorStHtml','READ','ALLOW','ROLE','employee'),(358,'Client','letterDebtorStEmail','WRITE','ALLOW','ROLE','employee'),(359,'Client','letterDebtorNdHtml','READ','ALLOW','ROLE','employee'),(360,'Client','letterDebtorNdEmail','WRITE','ALLOW','ROLE','employee'),(361,'Client','clientDebtStatementPdf','READ','ALLOW','ROLE','employee'),(362,'Client','clientDebtStatementHtml','READ','ALLOW','ROLE','employee'),(363,'Client','clientDebtStatementEmail','WRITE','ALLOW','ROLE','employee'),(364,'Client','incotermsAuthorizationPdf','READ','ALLOW','ROLE','employee'),(365,'Client','incotermsAuthorizationHtml','READ','ALLOW','ROLE','employee'),(366,'Client','incotermsAuthorizationEmail','WRITE','ALLOW','ROLE','employee'),(367,'Client','consumptionSendQueued','WRITE','ALLOW','ROLE','system'),(368,'InvoiceOut','invoiceEmail','WRITE','ALLOW','ROLE','employee'),(369,'InvoiceOut','exportationPdf','READ','ALLOW','ROLE','employee'),(370,'InvoiceOut','sendQueued','WRITE','ALLOW','ROLE','system'),(371,'Ticket','invoiceCsvPdf','READ','ALLOW','ROLE','employee'),(372,'Ticket','invoiceCsvEmail','WRITE','ALLOW','ROLE','employee'),(373,'Supplier','campaignMetricsPdf','READ','ALLOW','ROLE','employee'),(374,'Supplier','campaignMetricsEmail','WRITE','ALLOW','ROLE','employee'),(375,'Travel','extraCommunityPdf','READ','ALLOW','ROLE','employee'),(376,'Travel','extraCommunityEmail','WRITE','ALLOW','ROLE','employee'),(377,'Entry','entryOrderPdf','READ','ALLOW','ROLE','employee'),(378,'OsTicket','osTicketReportEmail','WRITE','ALLOW','ROLE','system'),(379,'Item','buyerWasteEmail','WRITE','ALLOW','ROLE','system'),(380,'Claim','claimPickupPdf','READ','ALLOW','ROLE','employee'),(381,'Claim','claimPickupEmail','WRITE','ALLOW','ROLE','claimManager'),(382,'Item','labelPdf','READ','ALLOW','ROLE','employee'),(383,'Sector','*','READ','ALLOW','ROLE','employee'),(384,'Sector','*','WRITE','ALLOW','ROLE','employee'),(385,'Route','driverRoutePdf','READ','ALLOW','ROLE','employee'),(386,'Route','driverRouteEmail','WRITE','ALLOW','ROLE','employee'),(387,'Ticket','deliveryNotePdf','READ','ALLOW','ROLE','customer'),(388,'Supplier','newSupplier','WRITE','ALLOW','ROLE','administrative'),(389,'ClaimRma','*','READ','ALLOW','ROLE','claimManager'),(390,'ClaimRma','*','WRITE','ALLOW','ROLE','claimManager'),(391,'Notification','*','WRITE','ALLOW','ROLE','system'),(392,'Boxing','*','*','ALLOW','ROLE','employee'),(393,'Url','*','READ','ALLOW','ROLE','employee'),(394,'Url','*','WRITE','ALLOW','ROLE','it'),(395,'ItemShelving','*','READ','ALLOW','ROLE','employee'),(396,'ItemShelving','*','WRITE','ALLOW','ROLE','production'),(397,'ItemShelvingPlacementSupplyStock','*','READ','ALLOW','ROLE','employee'),(398,'NotificationQueue','*','*','ALLOW','ROLE','employee'),(399,'InvoiceOut','clientsToInvoice','WRITE','ALLOW','ROLE','invoicing'),(400,'InvoiceOut','invoiceClient','WRITE','ALLOW','ROLE','invoicing'),(401,'Sale','editTracked','WRITE','ALLOW','ROLE','production'),(402,'Sale','editFloramondo','WRITE','ALLOW','ROLE','salesAssistant'),(403,'Receipt','balanceCompensationEmail','WRITE','ALLOW','ROLE','employee'),(404,'Receipt','balanceCompensationPdf','READ','ALLOW','ROLE','employee'),(405,'Ticket','getTicketsFuture','READ','ALLOW','ROLE','employee'),(406,'Ticket','merge','WRITE','ALLOW','ROLE','employee'),(407,'Sale','editFloramondo','WRITE','ALLOW','ROLE','logistic'),(408,'ZipConfig','*','*','ALLOW','ROLE','employee'),(409,'Item','*','WRITE','ALLOW','ROLE','administrative'),(410,'Sale','editCloned','WRITE','ALLOW','ROLE','buyer'),(411,'Sale','editCloned','WRITE','ALLOW','ROLE','salesAssistant'),(414,'MdbVersion','*','READ','ALLOW','ROLE','$everyone'),(416,'TicketLog','getChanges','READ','ALLOW','ROLE','employee'),(417,'Ticket','getTicketsAdvance','READ','ALLOW','ROLE','employee'),(418,'EntryLog','*','READ','ALLOW','ROLE','administrative'),(419,'Sale','editTracked','WRITE','ALLOW','ROLE','buyer'),(420,'MdbBranch','*','READ','ALLOW','ROLE','$everyone'),(421,'ItemShelvingSale','*','*','ALLOW','ROLE','employee'),(422,'Docuware','checkFile','READ','ALLOW','ROLE','employee'),(423,'Docuware','download','READ','ALLOW','ROLE','salesPerson'),(424,'Docuware','upload','WRITE','ALLOW','ROLE','productionAssi'),(425,'Docuware','deliveryNoteEmail','WRITE','ALLOW','ROLE','salesPerson'),(426,'TpvTransaction','confirm','WRITE','ALLOW','ROLE','$everyone'),(427,'TpvTransaction','start','WRITE','ALLOW','ROLE','$authenticated'),(428,'TpvTransaction','end','WRITE','ALLOW','ROLE','$authenticated'),(429,'ItemConfig','*','READ','ALLOW','ROLE','employee'),(431,'Tag','onSubmit','WRITE','ALLOW','ROLE','employee'),(432,'Worker','updateAttributes','WRITE','ALLOW','ROLE','hr'),(433,'Worker','createAbsence','*','ALLOW','ROLE','employee'),(434,'Worker','updateAbsence','WRITE','ALLOW','ROLE','employee'),(435,'Worker','deleteAbsence','*','ALLOW','ROLE','employee'),(436,'Worker','new','WRITE','ALLOW','ROLE','hr'),(437,'Role','*','READ','ALLOW','ROLE','hr'),(438,'Client','getClientOrSupplierReference','READ','ALLOW','ROLE','employee'),(439,'NotificationSubscription','*','*','ALLOW','ROLE','employee'),(440,'NotificationAcl','*','READ','ALLOW','ROLE','employee'),(441,'MdbApp','*','READ','ALLOW','ROLE','$everyone'),(442,'MdbApp','*','*','ALLOW','ROLE','developer'),(443,'ItemConfig','*','*','ALLOW','ROLE','employee'),(444,'DeviceProduction','*','*','ALLOW','ROLE','hr'),(445,'DeviceProductionModels','*','*','ALLOW','ROLE','hr'),(446,'DeviceProductionState','*','*','ALLOW','ROLE','hr'),(447,'DeviceProductionUser','*','*','ALLOW','ROLE','hr'),(448,'DeviceProduction','*','*','ALLOW','ROLE','productionAssi'),(449,'DeviceProductionModels','*','*','ALLOW','ROLE','productionAssi'),(450,'DeviceProductionState','*','*','ALLOW','ROLE','productionAssi'),(451,'DeviceProductionUser','*','*','ALLOW','ROLE','productionAssi'),(452,'Worker','deallocatePDA','*','ALLOW','ROLE','hr'),(453,'Worker','allocatePDA','*','ALLOW','ROLE','hr'),(454,'Worker','deallocatePDA','*','ALLOW','ROLE','productionAssi'),(455,'Worker','allocatePDA','*','ALLOW','ROLE','productionAssi'),(456,'Zone','*','*','ALLOW','ROLE','deliveryBoss'),(457,'Account','setPassword','WRITE','ALLOW','ROLE','itManagement'),(458,'Operator','*','READ','ALLOW','ROLE','employee'),(459,'Operator','*','WRITE','ALLOW','ROLE','employee'),(460,'InvoiceIn','getSerial','READ','ALLOW','ROLE','administrative'),(461,'Ticket','saveSign','WRITE','ALLOW','ROLE','employee'),(462,'InvoiceOut','negativeBases','READ','ALLOW','ROLE','administrative'),(463,'InvoiceOut','negativeBasesCsv','READ','ALLOW','ROLE','administrative'),(464,'WorkerObservation','*','*','ALLOW','ROLE','hr'),(465,'ClientInforma','*','READ','ALLOW','ROLE','employee'),(466,'ClientInforma','*','WRITE','ALLOW','ROLE','financial'),(467,'Receipt','receiptEmail','*','ALLOW','ROLE','salesAssistant'),(468,'Client','setRating','WRITE','ALLOW','ROLE','financial'),(469,'Client','*','READ','ALLOW','ROLE','employee'),(470,'Client','addressesPropagateRe','*','ALLOW','ROLE','employee'),(471,'Client','canBeInvoiced','*','ALLOW','ROLE','employee'),(472,'Client','canCreateTicket','*','ALLOW','ROLE','employee'),(473,'Client','consumption','*','ALLOW','ROLE','employee'),(474,'Client','createAddress','*','ALLOW','ROLE','employee'),(475,'Client','createWithUser','*','ALLOW','ROLE','employee'),(476,'Client','extendedListFilter','*','ALLOW','ROLE','employee'),(477,'Client','getAverageInvoiced','*','ALLOW','ROLE','employee'),(478,'Client','getCard','*','ALLOW','ROLE','employee'),(479,'Client','getDebt','*','ALLOW','ROLE','employee'),(480,'Client','getMana','*','ALLOW','ROLE','employee'),(481,'Client','transactions','*','ALLOW','ROLE','employee'),(482,'Client','hasCustomerRole','*','ALLOW','ROLE','employee'),(483,'Client','isValidClient','*','ALLOW','ROLE','employee'),(484,'Client','lastActiveTickets','*','ALLOW','ROLE','employee'),(485,'Client','sendSms','*','ALLOW','ROLE','employee'),(486,'Client','setPassword','*','ALLOW','ROLE','employee'),(487,'Client','summary','*','ALLOW','ROLE','employee'),(488,'Client','updateAddress','*','ALLOW','ROLE','employee'),(489,'Client','updateFiscalData','*','ALLOW','ROLE','employee'),(491,'Client','uploadFile','*','ALLOW','ROLE','employee'),(492,'Client','campaignMetricsPdf','*','ALLOW','ROLE','employee'),(493,'Client','campaignMetricsEmail','*','ALLOW','ROLE','employee'),(494,'Client','clientWelcomeHtml','*','ALLOW','ROLE','employee'),(495,'Client','clientWelcomeEmail','*','ALLOW','ROLE','employee'),(496,'Client','printerSetupHtml','*','ALLOW','ROLE','employee'),(497,'Client','printerSetupEmail','*','ALLOW','ROLE','employee'),(498,'Client','sepaCoreEmail','*','ALLOW','ROLE','employee'),(499,'Client','letterDebtorPdf','*','ALLOW','ROLE','employee'),(500,'Client','letterDebtorStHtml','*','ALLOW','ROLE','employee'),(501,'Client','letterDebtorStEmail','*','ALLOW','ROLE','employee'),(502,'Client','letterDebtorNdHtml','*','ALLOW','ROLE','employee'),(503,'Client','letterDebtorNdEmail','*','ALLOW','ROLE','employee'),(504,'Client','clientDebtStatementPdf','*','ALLOW','ROLE','employee'),(505,'Client','clientDebtStatementHtml','*','ALLOW','ROLE','employee'),(506,'Client','clientDebtStatementEmail','*','ALLOW','ROLE','employee'),(507,'Client','creditRequestPdf','*','ALLOW','ROLE','employee'),(508,'Client','creditRequestHtml','*','ALLOW','ROLE','employee'),(509,'Client','creditRequestEmail','*','ALLOW','ROLE','employee'),(510,'Client','incotermsAuthorizationPdf','*','ALLOW','ROLE','employee'),(511,'Client','incotermsAuthorizationHtml','*','ALLOW','ROLE','employee'),(512,'Client','incotermsAuthorizationEmail','*','ALLOW','ROLE','employee'),(513,'Client','consumptionSendQueued','*','ALLOW','ROLE','employee'),(514,'Client','filter','*','ALLOW','ROLE','employee'),(515,'Client','getClientOrSupplierReference','*','ALLOW','ROLE','employee'),(516,'Client','upsert','*','ALLOW','ROLE','employee'),(517,'Client','create','*','ALLOW','ROLE','employee'),(518,'Client','replaceById','*','ALLOW','ROLE','employee'),(519,'Client','updateAttributes','*','ALLOW','ROLE','employee'),(520,'Client','updateAttributes','*','ALLOW','ROLE','employee'),(521,'Client','deleteById','*','ALLOW','ROLE','employee'),(522,'Client','replaceOrCreate','*','ALLOW','ROLE','employee'),(523,'Client','updateAll','*','ALLOW','ROLE','employee'),(524,'Client','upsertWithWhere','*','ALLOW','ROLE','employee'),(525,'Defaulter','observationEmail','WRITE','ALLOW','ROLE','employee'),(526,'VnUser','*','*','ALLOW','ROLE','employee'),(527,'VnUser','acl','READ','ALLOW','ROLE','account'),(528,'VnUser','getCurrentUserData','READ','ALLOW','ROLE','account'),(529,'VnUser','changePassword','WRITE','ALLOW','ROLE','account'),(530,'Account','exists','READ','ALLOW','ROLE','account'),(531,'Account','exists','READ','ALLOW','ROLE','account'),(532,'UserLog','*','READ','ALLOW','ROLE','employee'),(533,'RoleLog','*','READ','ALLOW','ROLE','employee'),(534,'WagonType','*','*','ALLOW','ROLE','productionAssi'),(535,'WagonTypeColor','*','*','ALLOW','ROLE','productionAssi'),(536,'WagonTypeTray','*','*','ALLOW','ROLE','productionAssi'),(537,'WagonConfig','*','*','ALLOW','ROLE','productionAssi'),(538,'CollectionWagon','*','*','ALLOW','ROLE','productionAssi'),(539,'CollectionWagonTicket','*','*','ALLOW','ROLE','productionAssi'),(540,'Wagon','*','*','ALLOW','ROLE','productionAssi'),(541,'WagonType','createWagonType','*','ALLOW','ROLE','productionAssi'),(542,'WagonType','deleteWagonType','*','ALLOW','ROLE','productionAssi'),(543,'WagonType','editWagonType','*','ALLOW','ROLE','productionAssi'),(544,'Docuware','deliveryNoteEmail','WRITE','ALLOW','ROLE','employee'),(545,'Agency','find','READ','ALLOW','ROLE','employee'),(546,'Agency','seeExpired','READ','ALLOW','ROLE','coolerAssist'),(547,'WorkerLog','models','READ','ALLOW','ROLE','hr'),(548,'Ticket','editDiscount','WRITE','ALLOW','ROLE','claimManager'),(549,'Ticket','editDiscount','WRITE','ALLOW','ROLE','salesPerson'),(550,'Ticket','isRoleAdvanced','*','ALLOW','ROLE','salesAssistant'),(551,'Ticket','isRoleAdvanced','*','ALLOW','ROLE','deliveryBoss'),(552,'Ticket','isRoleAdvanced','*','ALLOW','ROLE','buyer'),(553,'Ticket','isRoleAdvanced','*','ALLOW','ROLE','claimManager'),(554,'Ticket','deleteTicketWithPartPrepared','WRITE','ALLOW','ROLE','salesAssistant'),(555,'Ticket','editZone','WRITE','ALLOW','ROLE','deliveryBoss'),(556,'State','editableStates','READ','ALLOW','ROLE','employee'),(557,'State','seeEditableStates','READ','ALLOW','ROLE','administrative'),(558,'State','seeEditableStates','READ','ALLOW','ROLE','production'),(559,'State','isSomeEditable','READ','ALLOW','ROLE','salesPerson'),(560,'State','isAllEditable','READ','ALLOW','ROLE','production'),(561,'State','isAllEditable','READ','ALLOW','ROLE','administrative'),(562,'Agency','seeExpired','READ','ALLOW','ROLE','administrative'),(563,'Agency','seeExpired','READ','ALLOW','ROLE','productionBoss'),(564,'Claim','createAfterDeadline','WRITE','ALLOW','ROLE','claimManager'),(565,'Client','editAddressLogifloraAllowed','WRITE','ALLOW','ROLE','salesAssistant'),(566,'Client','editFiscalDataWithoutTaxDataCheck','WRITE','ALLOW','ROLE','salesAssistant'),(567,'Client','editVerifiedDataWithoutTaxDataCheck','WRITE','ALLOW','ROLE','salesAssistant'),(568,'Client','editCredit','WRITE','ALLOW','ROLE','employee'),(569,'Client','isNotEditableCredit','WRITE','ALLOW','ROLE','financialBoss'),(570,'InvoiceOut','canCreatePdf','WRITE','ALLOW','ROLE','invoicing'),(571,'Supplier','editPayMethodCheck','WRITE','ALLOW','ROLE','financial'),(572,'Worker','isTeamBoss','WRITE','ALLOW','ROLE','teamBoss'),(573,'Worker','forceIsSubordinate','READ','ALLOW','ROLE','hr'),(574,'Claim','editState','WRITE','ALLOW','ROLE','claimManager'),(575,'Claim','find','READ','ALLOW','ROLE','salesPerson'),(576,'Claim','findById','READ','ALLOW','ROLE','salesPerson'),(577,'Claim','findOne','READ','ALLOW','ROLE','salesPerson'),(578,'Claim','getSummary','READ','ALLOW','ROLE','salesPerson'),(579,'Claim','updateClaim','WRITE','ALLOW','ROLE','salesPerson'),(580,'Claim','regularizeClaim','WRITE','ALLOW','ROLE','claimManager'),(581,'Claim','updateClaimDestination','WRITE','ALLOW','ROLE','claimManager'),(582,'Claim','downloadFile','READ','ALLOW','ROLE','claimManager'),(583,'Claim','deleteById','WRITE','ALLOW','ROLE','claimManager'),(584,'Claim','filter','READ','ALLOW','ROLE','salesPerson'),(585,'Claim','logs','READ','ALLOW','ROLE','claimManager'),(586,'Ticket','find','READ','ALLOW','ROLE','employee'),(587,'Ticket','findById','READ','ALLOW','ROLE','employee'),(588,'Ticket','findOne','READ','ALLOW','ROLE','employee'),(589,'Ticket','getVolume','READ','ALLOW','ROLE','employee'),(590,'Ticket','getTotalVolume','READ','ALLOW','ROLE','employee'),(591,'Ticket','summary','READ','ALLOW','ROLE','employee'),(592,'Ticket','priceDifference','READ','ALLOW','ROLE','employee'),(593,'Ticket','componentUpdate','WRITE','ALLOW','ROLE','employee'),(594,'Ticket','new','WRITE','ALLOW','ROLE','employee'),(595,'Ticket','isEditable','READ','ALLOW','ROLE','employee'),(596,'Ticket','setDeleted','WRITE','ALLOW','ROLE','employee'),(597,'Ticket','restore','WRITE','ALLOW','ROLE','employee'),(598,'Ticket','getSales','READ','ALLOW','ROLE','employee'),(599,'Ticket','getSalesPersonMana','READ','ALLOW','ROLE','employee'),(600,'Ticket','filter','READ','ALLOW','ROLE','employee'),(601,'Ticket','makeInvoice','WRITE','ALLOW','ROLE','employee'),(602,'Ticket','updateEditableTicket','WRITE','ALLOW','ROLE','employee'),(603,'Ticket','updateDiscount','WRITE','ALLOW','ROLE','employee'),(604,'Ticket','transferSales','WRITE','ALLOW','ROLE','employee'),(605,'Ticket','sendSms','WRITE','ALLOW','ROLE','employee'),(606,'Ticket','isLocked','READ','ALLOW','ROLE','employee'),(607,'Ticket','freightCost','READ','ALLOW','ROLE','employee'),(608,'Ticket','getComponentsSum','READ','ALLOW','ROLE','employee'),(609,'Ticket','updateAttributes','WRITE','ALLOW','ROLE','delivery'),(610,'Ticket','deliveryNoteCsv','READ','ALLOW','ROLE','employee'),(611,'State','find','READ','ALLOW','ROLE','employee'),(612,'State','findById','READ','ALLOW','ROLE','employee'),(613,'State','findOne','READ','ALLOW','ROLE','employee'),(614,'Worker','find','READ','ALLOW','ROLE','employee'),(615,'Worker','findById','READ','ALLOW','ROLE','employee'),(616,'Worker','findOne','READ','ALLOW','ROLE','employee'),(617,'Worker','filter','READ','ALLOW','ROLE','employee'),(618,'Worker','getWorkedHours','READ','ALLOW','ROLE','employee'),(619,'Worker','active','READ','ALLOW','ROLE','employee'),(620,'Worker','activeWithRole','READ','ALLOW','ROLE','employee'),(621,'Worker','uploadFile','WRITE','ALLOW','ROLE','hr'),(622,'Worker','contracts','READ','ALLOW','ROLE','employee'),(623,'Worker','holidays','READ','ALLOW','ROLE','employee'),(624,'Worker','activeContract','READ','ALLOW','ROLE','employee'),(625,'Worker','activeWithInheritedRole','READ','ALLOW','ROLE','employee'),(626,'Ticket','collectionLabel','READ','ALLOW','ROLE','employee'),(628,'Ticket','expeditionPalletLabel','READ','ALLOW','ROLE','employee'),(629,'Ticket','editDiscount','WRITE','ALLOW','ROLE','artificialBoss'),(630,'Claim','claimPickupEmail','WRITE','ALLOW','ROLE','salesTeamBoss'),(635,'Ticket','updateAttributes','WRITE','ALLOW','ROLE','administrative'),(636,'Claim','claimPickupEmail','WRITE','ALLOW','ROLE','salesPerson'),(637,'Claim','downloadFile','READ','ALLOW','ROLE','salesPerson'),(638,'Agency','seeExpired','READ','ALLOW','ROLE','artificialBoss'),(639,'Agency','seeExpired','READ','ALLOW','ROLE','logistic'),(640,'Claim','filter','READ','ALLOW','ROLE','buyer'),(641,'Claim','find','READ','ALLOW','ROLE','buyer'),(642,'Claim','findById','READ','ALLOW','ROLE','buyer'),(643,'Claim','getSummary','READ','ALLOW','ROLE','buyer'),(644,'Claim','filter','READ','ALLOW','ROLE','handmadeBoss'),(645,'Claim','find','READ','ALLOW','ROLE','handmadeBoss'),(646,'Claim','findById','READ','ALLOW','ROLE','handmadeBoss'),(647,'Claim','getSummary','READ','ALLOW','ROLE','handmadeBoss'),(648,'Claim','__get__lines','READ','ALLOW','ROLE','claimManager'),(649,'Claim','__get__lines','READ','ALLOW','ROLE','salesPerson'),(650,'Claim','getSummary','READ','ALLOW','ROLE','deliveryBoss'),(651,'Claim','findById','READ','ALLOW','ROLE','deliveryBoss'),(652,'Claim','find','READ','ALLOW','ROLE','deliveryBoss'),(653,'Claim','filter','READ','ALLOW','ROLE','deliveryBoss'),(654,'Ticket','editZone','WRITE','ALLOW','ROLE','logistic');
+INSERT INTO `ACL` VALUES (3,'Address','*','*','ALLOW','ROLE','employee'),(5,'AgencyService','*','READ','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'),(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'),(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'),(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'),(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','claimManager'),(98,'ClaimBeginning','*','*','ALLOW','ROLE','employee'),(99,'ClaimDevelopment','*','READ','ALLOW','ROLE','employee'),(100,'ClaimDevelopment','*','WRITE','ALLOW','ROLE','claimManager'),(102,'Claim','createFromSales','*','ALLOW','ROLE','employee'),(104,'Item','*','WRITE','ALLOW','ROLE','marketingBoss'),(105,'ItemBarcode','*','WRITE','ALLOW','ROLE','marketingBoss'),(106,'ItemBotanical','*','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'),(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','logisticBoss'),(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'),(165,'TicketDms','*','*','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'),(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'),(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','deliveryBoss'),(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','claimManager'),(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'),(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','find','READ','ALLOW','ROLE','hr'),(235,'CustomsAgent','*','*','ALLOW','ROLE','employee'),(236,'Buy','*','*','ALLOW','ROLE','buyer'),(237,'WorkerDms','filter','*','ALLOW','ROLE','employee'),(238,'Town','*','WRITE','ALLOW','ROLE','deliveryBoss'),(239,'Province','*','WRITE','ALLOW','ROLE','deliveryBoss'),(240,'supplier','*','WRITE','ALLOW','ROLE','administrative'),(241,'SupplierContact','*','WRITE','ALLOW','ROLE','administrative'),(242,'supplier','*','WRITE','ALLOW','ROLE','administrative'),(244,'supplier','*','WRITE','ALLOW','ROLE','administrative'),(248,'RoleMapping','*','READ','ALLOW','ROLE','account'),(249,'UserPassword','*','READ','ALLOW','ROLE','account'),(250,'Town','*','WRITE','ALLOW','ROLE','deliveryBoss'),(251,'Province','*','WRITE','ALLOW','ROLE','deliveryBoss'),(252,'Supplier','*','READ','ALLOW','ROLE','employee'),(253,'Supplier','*','WRITE','ALLOW','ROLE','administrative'),(254,'SupplierLog','*','READ','ALLOW','ROLE','employee'),(256,'Image','*','WRITE','ALLOW','ROLE','employee'),(257,'FixedPrice','*','*','ALLOW','ROLE','buyer'),(258,'PayDem','*','READ','ALLOW','ROLE','employee'),(259,'Client','createReceipt','*','ALLOW','ROLE','salesAssistant'),(260,'PrintServerQueue','*','WRITE','ALLOW','ROLE','employee'),(261,'SupplierAccount','*','*','ALLOW','ROLE','administrative'),(262,'Entry','*','*','ALLOW','ROLE','administrative'),(263,'InvoiceIn','*','*','ALLOW','ROLE','administrative'),(264,'StarredModule','*','*','ALLOW','ROLE','employee'),(265,'ItemBotanical','*','WRITE','ALLOW','ROLE','logisticBoss'),(266,'ZoneLog','*','READ','ALLOW','ROLE','employee'),(267,'Genus','*','WRITE','ALLOW','ROLE','logisticBoss'),(268,'Specie','*','WRITE','ALLOW','ROLE','logisticBoss'),(269,'InvoiceOut','createPdf','WRITE','ALLOW','ROLE','employee'),(270,'SupplierAddress','*','*','ALLOW','ROLE','employee'),(271,'SalesMonitor','*','*','ALLOW','ROLE','employee'),(272,'InvoiceInLog','*','READ','ALLOW','ROLE','employee'),(273,'InvoiceInTax','*','*','ALLOW','ROLE','administrative'),(274,'InvoiceInLog','*','READ','ALLOW','ROLE','administrative'),(275,'InvoiceOut','createManualInvoice','WRITE','ALLOW','ROLE','invoicing'),(276,'InvoiceOut','globalInvoicing','WRITE','ALLOW','ROLE','invoicing'),(278,'RoleInherit','*','WRITE','ALLOW','ROLE','grant'),(279,'MailAlias','*','*','ALLOW','ROLE','marketing'),(283,'EntryObservation','*','*','ALLOW','ROLE','buyer'),(284,'LdapConfig','*','*','ALLOW','ROLE','sysadmin'),(285,'SambaConfig','*','*','ALLOW','ROLE','sysadmin'),(286,'ACL','*','*','ALLOW','ROLE','developer'),(287,'AccessToken','*','*','ALLOW','ROLE','developer'),(293,'RoleInherit','*','*','ALLOW','ROLE','it'),(294,'RoleRole','*','*','ALLOW','ROLE','it'),(295,'AccountConfig','*','*','ALLOW','ROLE','sysadmin'),(296,'Collection','*','READ','ALLOW','ROLE','employee'),(297,'Sale','refund','WRITE','ALLOW','ROLE','invoicing'),(298,'InvoiceInDueDay','*','*','ALLOW','ROLE','administrative'),(299,'Collection','setSaleQuantity','*','ALLOW','ROLE','employee'),(302,'AgencyTerm','*','*','ALLOW','ROLE','administrative'),(303,'ClaimLog','*','READ','ALLOW','ROLE','claimManager'),(304,'Edi','updateData','WRITE','ALLOW','ROLE','employee'),(305,'EducationLevel','*','*','ALLOW','ROLE','employee'),(306,'InvoiceInIntrastat','*','*','ALLOW','ROLE','employee'),(307,'SupplierAgencyTerm','*','*','ALLOW','ROLE','administrative'),(308,'InvoiceInIntrastat','*','*','ALLOW','ROLE','employee'),(309,'Zone','getZoneClosing','*','ALLOW','ROLE','employee'),(310,'ExpeditionState','*','READ','ALLOW','ROLE','employee'),(311,'Expense','*','READ','ALLOW','ROLE','employee'),(312,'Expense','*','WRITE','ALLOW','ROLE','administrative'),(314,'SupplierActivity','*','READ','ALLOW','ROLE','employee'),(315,'SupplierActivity','*','WRITE','ALLOW','ROLE','administrative'),(316,'Dms','deleteTrashFiles','WRITE','ALLOW','ROLE','employee'),(317,'ClientUnpaid','*','*','ALLOW','ROLE','administrative'),(318,'MdbVersion','*','*','ALLOW','ROLE','developer'),(319,'ItemType','*','READ','ALLOW','ROLE','employee'),(320,'ItemType','*','WRITE','ALLOW','ROLE','buyer'),(321,'InvoiceOut','refund','WRITE','ALLOW','ROLE','invoicing'),(322,'InvoiceOut','refund','WRITE','ALLOW','ROLE','salesAssistant'),(323,'InvoiceOut','refund','WRITE','ALLOW','ROLE','claimManager'),(324,'Ticket','refund','WRITE','ALLOW','ROLE','invoicing'),(325,'Ticket','refund','WRITE','ALLOW','ROLE','salesAssistant'),(326,'Ticket','refund','WRITE','ALLOW','ROLE','claimManager'),(327,'Sale','refund','WRITE','ALLOW','ROLE','salesAssistant'),(328,'Sale','refund','WRITE','ALLOW','ROLE','claimManager'),(329,'TicketRefund','*','WRITE','ALLOW','ROLE','invoicing'),(330,'ClaimObservation','*','WRITE','ALLOW','ROLE','salesPerson'),(331,'ClaimObservation','*','READ','ALLOW','ROLE','salesPerson'),(332,'Client','setPassword','WRITE','ALLOW','ROLE','salesPerson'),(333,'Client','updateUser','WRITE','ALLOW','ROLE','salesPerson'),(334,'ShelvingLog','*','READ','ALLOW','ROLE','employee'),(335,'ZoneExclusionGeo','*','READ','ALLOW','ROLE','employee'),(336,'ZoneExclusionGeo','*','WRITE','ALLOW','ROLE','deliveryBoss'),(337,'Parking','*','*','ALLOW','ROLE','employee'),(338,'Shelving','*','*','ALLOW','ROLE','employee'),(339,'OsTicket','*','*','ALLOW','ROLE','employee'),(340,'OsTicketConfig','*','*','ALLOW','ROLE','it'),(341,'ClientConsumptionQueue','*','WRITE','ALLOW','ROLE','employee'),(342,'Ticket','deliveryNotePdf','READ','ALLOW','ROLE','employee'),(343,'Ticket','deliveryNoteEmail','WRITE','ALLOW','ROLE','employee'),(344,'Ticket','deliveryNoteCsvPdf','READ','ALLOW','ROLE','employee'),(345,'Ticket','deliveryNoteCsvEmail','READ','ALLOW','ROLE','employee'),(346,'Client','campaignMetricsPdf','READ','ALLOW','ROLE','employee'),(347,'Client','campaignMetricsEmail','WRITE','ALLOW','ROLE','employee'),(348,'Client','clientWelcomeHtml','READ','ALLOW','ROLE','employee'),(349,'Client','clientWelcomeEmail','WRITE','ALLOW','ROLE','employee'),(350,'Client','creditRequestPdf','READ','ALLOW','ROLE','employee'),(351,'Client','creditRequestHtml','READ','ALLOW','ROLE','employee'),(352,'Client','creditRequestEmail','WRITE','ALLOW','ROLE','employee'),(353,'Client','printerSetupHtml','READ','ALLOW','ROLE','employee'),(354,'Client','printerSetupEmail','WRITE','ALLOW','ROLE','employee'),(355,'Client','sepaCoreEmail','WRITE','ALLOW','ROLE','employee'),(356,'Client','letterDebtorPdf','READ','ALLOW','ROLE','employee'),(357,'Client','letterDebtorStHtml','READ','ALLOW','ROLE','employee'),(358,'Client','letterDebtorStEmail','WRITE','ALLOW','ROLE','employee'),(359,'Client','letterDebtorNdHtml','READ','ALLOW','ROLE','employee'),(360,'Client','letterDebtorNdEmail','WRITE','ALLOW','ROLE','employee'),(361,'Client','clientDebtStatementPdf','READ','ALLOW','ROLE','employee'),(362,'Client','clientDebtStatementHtml','READ','ALLOW','ROLE','employee'),(363,'Client','clientDebtStatementEmail','WRITE','ALLOW','ROLE','employee'),(364,'Client','incotermsAuthorizationPdf','READ','ALLOW','ROLE','employee'),(365,'Client','incotermsAuthorizationHtml','READ','ALLOW','ROLE','employee'),(366,'Client','incotermsAuthorizationEmail','WRITE','ALLOW','ROLE','employee'),(367,'Client','consumptionSendQueued','WRITE','ALLOW','ROLE','system'),(368,'InvoiceOut','invoiceEmail','WRITE','ALLOW','ROLE','employee'),(369,'InvoiceOut','exportationPdf','READ','ALLOW','ROLE','employee'),(370,'InvoiceOut','sendQueued','WRITE','ALLOW','ROLE','system'),(371,'Ticket','invoiceCsvPdf','READ','ALLOW','ROLE','employee'),(372,'Ticket','invoiceCsvEmail','WRITE','ALLOW','ROLE','employee'),(373,'Supplier','campaignMetricsPdf','READ','ALLOW','ROLE','employee'),(374,'Supplier','campaignMetricsEmail','WRITE','ALLOW','ROLE','employee'),(375,'Travel','extraCommunityPdf','READ','ALLOW','ROLE','employee'),(376,'Travel','extraCommunityEmail','WRITE','ALLOW','ROLE','employee'),(377,'Entry','entryOrderPdf','READ','ALLOW','ROLE','employee'),(378,'OsTicket','osTicketReportEmail','WRITE','ALLOW','ROLE','system'),(379,'Item','buyerWasteEmail','WRITE','ALLOW','ROLE','system'),(380,'Claim','claimPickupPdf','READ','ALLOW','ROLE','employee'),(381,'Claim','claimPickupEmail','WRITE','ALLOW','ROLE','claimManager'),(382,'Item','labelPdf','READ','ALLOW','ROLE','employee'),(383,'Sector','*','READ','ALLOW','ROLE','employee'),(384,'Sector','*','WRITE','ALLOW','ROLE','employee'),(385,'Route','driverRoutePdf','READ','ALLOW','ROLE','employee'),(386,'Route','driverRouteEmail','WRITE','ALLOW','ROLE','employee'),(387,'Ticket','deliveryNotePdf','READ','ALLOW','ROLE','customer'),(388,'Supplier','newSupplier','WRITE','ALLOW','ROLE','administrative'),(389,'ClaimRma','*','READ','ALLOW','ROLE','claimManager'),(390,'ClaimRma','*','WRITE','ALLOW','ROLE','claimManager'),(391,'Notification','*','WRITE','ALLOW','ROLE','system'),(392,'Boxing','*','*','ALLOW','ROLE','employee'),(393,'Url','*','READ','ALLOW','ROLE','employee'),(394,'Url','*','WRITE','ALLOW','ROLE','it'),(395,'ItemShelving','*','READ','ALLOW','ROLE','employee'),(396,'ItemShelving','*','WRITE','ALLOW','ROLE','production'),(397,'ItemShelvingPlacementSupplyStock','*','READ','ALLOW','ROLE','employee'),(398,'NotificationQueue','*','*','ALLOW','ROLE','employee'),(399,'InvoiceOut','clientsToInvoice','WRITE','ALLOW','ROLE','invoicing'),(400,'InvoiceOut','invoiceClient','WRITE','ALLOW','ROLE','invoicing'),(401,'Sale','editTracked','WRITE','ALLOW','ROLE','production'),(402,'Sale','editFloramondo','WRITE','ALLOW','ROLE','salesAssistant'),(403,'Receipt','balanceCompensationEmail','WRITE','ALLOW','ROLE','employee'),(404,'Receipt','balanceCompensationPdf','READ','ALLOW','ROLE','employee'),(405,'Ticket','getTicketsFuture','READ','ALLOW','ROLE','employee'),(406,'Ticket','merge','WRITE','ALLOW','ROLE','employee'),(407,'Sale','editFloramondo','WRITE','ALLOW','ROLE','logistic'),(408,'ZipConfig','*','*','ALLOW','ROLE','employee'),(409,'Item','*','WRITE','ALLOW','ROLE','administrative'),(410,'Sale','editCloned','WRITE','ALLOW','ROLE','buyer'),(411,'Sale','editCloned','WRITE','ALLOW','ROLE','salesAssistant'),(414,'MdbVersion','*','READ','ALLOW','ROLE','$everyone'),(416,'TicketLog','getChanges','READ','ALLOW','ROLE','employee'),(417,'Ticket','getTicketsAdvance','READ','ALLOW','ROLE','employee'),(418,'EntryLog','*','READ','ALLOW','ROLE','administrative'),(419,'Sale','editTracked','WRITE','ALLOW','ROLE','buyer'),(420,'MdbBranch','*','READ','ALLOW','ROLE','$everyone'),(421,'ItemShelvingSale','*','*','ALLOW','ROLE','employee'),(422,'Docuware','checkFile','READ','ALLOW','ROLE','employee'),(423,'Docuware','download','READ','ALLOW','ROLE','salesPerson'),(424,'Docuware','upload','WRITE','ALLOW','ROLE','productionAssi'),(425,'Docuware','deliveryNoteEmail','WRITE','ALLOW','ROLE','salesPerson'),(426,'TpvTransaction','confirm','WRITE','ALLOW','ROLE','$everyone'),(427,'TpvTransaction','start','WRITE','ALLOW','ROLE','$authenticated'),(428,'TpvTransaction','end','WRITE','ALLOW','ROLE','$authenticated'),(429,'ItemConfig','*','READ','ALLOW','ROLE','employee'),(431,'Tag','onSubmit','WRITE','ALLOW','ROLE','employee'),(432,'Worker','updateAttributes','WRITE','ALLOW','ROLE','hr'),(433,'Worker','createAbsence','*','ALLOW','ROLE','employee'),(434,'Worker','updateAbsence','WRITE','ALLOW','ROLE','employee'),(435,'Worker','deleteAbsence','*','ALLOW','ROLE','employee'),(436,'Worker','new','WRITE','ALLOW','ROLE','hr'),(438,'Client','getClientOrSupplierReference','READ','ALLOW','ROLE','employee'),(439,'NotificationSubscription','*','*','ALLOW','ROLE','employee'),(440,'NotificationAcl','*','READ','ALLOW','ROLE','employee'),(441,'MdbApp','*','READ','ALLOW','ROLE','$everyone'),(442,'MdbApp','*','*','ALLOW','ROLE','developer'),(443,'ItemConfig','*','*','ALLOW','ROLE','employee'),(444,'DeviceProduction','*','*','ALLOW','ROLE','hr'),(445,'DeviceProductionModels','*','*','ALLOW','ROLE','hr'),(446,'DeviceProductionState','*','*','ALLOW','ROLE','hr'),(447,'DeviceProductionUser','*','*','ALLOW','ROLE','hr'),(448,'DeviceProduction','*','*','ALLOW','ROLE','productionAssi'),(449,'DeviceProductionModels','*','*','ALLOW','ROLE','productionAssi'),(450,'DeviceProductionState','*','*','ALLOW','ROLE','productionAssi'),(451,'DeviceProductionUser','*','*','ALLOW','ROLE','productionAssi'),(452,'Worker','deallocatePDA','*','ALLOW','ROLE','hr'),(453,'Worker','allocatePDA','*','ALLOW','ROLE','hr'),(454,'Worker','deallocatePDA','*','ALLOW','ROLE','productionAssi'),(455,'Worker','allocatePDA','*','ALLOW','ROLE','productionAssi'),(456,'Zone','*','*','ALLOW','ROLE','deliveryBoss'),(457,'Account','setPassword','WRITE','ALLOW','ROLE','itManagement'),(458,'Operator','*','READ','ALLOW','ROLE','employee'),(459,'Operator','*','WRITE','ALLOW','ROLE','employee'),(460,'InvoiceIn','getSerial','READ','ALLOW','ROLE','administrative'),(461,'Ticket','saveSign','WRITE','ALLOW','ROLE','employee'),(462,'InvoiceOut','negativeBases','READ','ALLOW','ROLE','administrative'),(463,'InvoiceOut','negativeBasesCsv','READ','ALLOW','ROLE','administrative'),(464,'WorkerObservation','*','*','ALLOW','ROLE','hr'),(465,'ClientInforma','*','READ','ALLOW','ROLE','employee'),(466,'ClientInforma','*','WRITE','ALLOW','ROLE','financial'),(467,'Receipt','receiptEmail','*','ALLOW','ROLE','salesAssistant'),(468,'Client','setRating','WRITE','ALLOW','ROLE','financial'),(469,'Client','*','READ','ALLOW','ROLE','employee'),(470,'Client','addressesPropagateRe','*','ALLOW','ROLE','employee'),(471,'Client','canBeInvoiced','*','ALLOW','ROLE','employee'),(472,'Client','canCreateTicket','*','ALLOW','ROLE','employee'),(473,'Client','consumption','*','ALLOW','ROLE','employee'),(474,'Client','createAddress','*','ALLOW','ROLE','employee'),(475,'Client','createWithUser','*','ALLOW','ROLE','employee'),(476,'Client','extendedListFilter','*','ALLOW','ROLE','employee'),(477,'Client','getAverageInvoiced','*','ALLOW','ROLE','employee'),(478,'Client','getCard','*','ALLOW','ROLE','employee'),(479,'Client','getDebt','*','ALLOW','ROLE','employee'),(480,'Client','getMana','*','ALLOW','ROLE','employee'),(481,'Client','transactions','*','ALLOW','ROLE','employee'),(482,'Client','hasCustomerRole','*','ALLOW','ROLE','employee'),(483,'Client','isValidClient','*','ALLOW','ROLE','employee'),(484,'Client','lastActiveTickets','*','ALLOW','ROLE','employee'),(485,'Client','sendSms','*','ALLOW','ROLE','employee'),(486,'Client','setPassword','*','ALLOW','ROLE','employee'),(487,'Client','summary','*','ALLOW','ROLE','employee'),(488,'Client','updateAddress','*','ALLOW','ROLE','employee'),(489,'Client','updateFiscalData','*','ALLOW','ROLE','employee'),(491,'Client','uploadFile','*','ALLOW','ROLE','employee'),(492,'Client','campaignMetricsPdf','*','ALLOW','ROLE','employee'),(493,'Client','campaignMetricsEmail','*','ALLOW','ROLE','employee'),(494,'Client','clientWelcomeHtml','*','ALLOW','ROLE','employee'),(495,'Client','clientWelcomeEmail','*','ALLOW','ROLE','employee'),(496,'Client','printerSetupHtml','*','ALLOW','ROLE','employee'),(497,'Client','printerSetupEmail','*','ALLOW','ROLE','employee'),(498,'Client','sepaCoreEmail','*','ALLOW','ROLE','employee'),(499,'Client','letterDebtorPdf','*','ALLOW','ROLE','employee'),(500,'Client','letterDebtorStHtml','*','ALLOW','ROLE','employee'),(501,'Client','letterDebtorStEmail','*','ALLOW','ROLE','employee'),(502,'Client','letterDebtorNdHtml','*','ALLOW','ROLE','employee'),(503,'Client','letterDebtorNdEmail','*','ALLOW','ROLE','employee'),(504,'Client','clientDebtStatementPdf','*','ALLOW','ROLE','employee'),(505,'Client','clientDebtStatementHtml','*','ALLOW','ROLE','employee'),(506,'Client','clientDebtStatementEmail','*','ALLOW','ROLE','employee'),(507,'Client','creditRequestPdf','*','ALLOW','ROLE','employee'),(508,'Client','creditRequestHtml','*','ALLOW','ROLE','employee'),(509,'Client','creditRequestEmail','*','ALLOW','ROLE','employee'),(510,'Client','incotermsAuthorizationPdf','*','ALLOW','ROLE','employee'),(511,'Client','incotermsAuthorizationHtml','*','ALLOW','ROLE','employee'),(512,'Client','incotermsAuthorizationEmail','*','ALLOW','ROLE','employee'),(513,'Client','consumptionSendQueued','*','ALLOW','ROLE','employee'),(514,'Client','filter','*','ALLOW','ROLE','employee'),(515,'Client','getClientOrSupplierReference','*','ALLOW','ROLE','employee'),(516,'Client','upsert','*','ALLOW','ROLE','employee'),(517,'Client','create','*','ALLOW','ROLE','employee'),(518,'Client','replaceById','*','ALLOW','ROLE','employee'),(519,'Client','updateAttributes','*','ALLOW','ROLE','employee'),(520,'Client','updateAttributes','*','ALLOW','ROLE','employee'),(521,'Client','deleteById','*','ALLOW','ROLE','employee'),(522,'Client','replaceOrCreate','*','ALLOW','ROLE','employee'),(523,'Client','updateAll','*','ALLOW','ROLE','employee'),(524,'Client','upsertWithWhere','*','ALLOW','ROLE','employee'),(525,'Defaulter','observationEmail','WRITE','ALLOW','ROLE','employee'),(527,'VnUser','acl','READ','ALLOW','ROLE','account'),(528,'VnUser','getCurrentUserData','READ','ALLOW','ROLE','account'),(530,'Account','exists','READ','ALLOW','ROLE','account'),(531,'Account','exists','READ','ALLOW','ROLE','account'),(532,'UserLog','*','READ','ALLOW','ROLE','employee'),(533,'RoleLog','*','READ','ALLOW','ROLE','employee'),(534,'WagonType','*','*','ALLOW','ROLE','productionAssi'),(535,'WagonTypeColor','*','*','ALLOW','ROLE','productionAssi'),(536,'WagonTypeTray','*','*','ALLOW','ROLE','productionAssi'),(537,'WagonConfig','*','*','ALLOW','ROLE','productionAssi'),(538,'CollectionWagon','*','*','ALLOW','ROLE','productionAssi'),(539,'CollectionWagonTicket','*','*','ALLOW','ROLE','productionAssi'),(540,'Wagon','*','*','ALLOW','ROLE','productionAssi'),(541,'WagonType','createWagonType','*','ALLOW','ROLE','productionAssi'),(542,'WagonType','deleteWagonType','*','ALLOW','ROLE','productionAssi'),(543,'WagonType','editWagonType','*','ALLOW','ROLE','productionAssi'),(544,'Docuware','deliveryNoteEmail','WRITE','ALLOW','ROLE','employee'),(545,'Agency','find','READ','ALLOW','ROLE','employee'),(546,'Agency','seeExpired','READ','ALLOW','ROLE','coolerAssist'),(547,'WorkerLog','models','READ','ALLOW','ROLE','hr'),(548,'Ticket','editDiscount','WRITE','ALLOW','ROLE','claimManager'),(549,'Ticket','editDiscount','WRITE','ALLOW','ROLE','salesPerson'),(550,'Ticket','isRoleAdvanced','*','ALLOW','ROLE','salesAssistant'),(551,'Ticket','isRoleAdvanced','*','ALLOW','ROLE','deliveryBoss'),(552,'Ticket','isRoleAdvanced','*','ALLOW','ROLE','buyer'),(553,'Ticket','isRoleAdvanced','*','ALLOW','ROLE','claimManager'),(554,'Ticket','deleteTicketWithPartPrepared','WRITE','ALLOW','ROLE','salesAssistant'),(555,'Ticket','editZone','WRITE','ALLOW','ROLE','deliveryBoss'),(556,'State','editableStates','READ','ALLOW','ROLE','employee'),(557,'State','seeEditableStates','READ','ALLOW','ROLE','administrative'),(558,'State','seeEditableStates','READ','ALLOW','ROLE','production'),(559,'State','isSomeEditable','READ','ALLOW','ROLE','salesPerson'),(560,'State','isAllEditable','READ','ALLOW','ROLE','production'),(561,'State','isAllEditable','READ','ALLOW','ROLE','administrative'),(562,'Agency','seeExpired','READ','ALLOW','ROLE','administrative'),(563,'Agency','seeExpired','READ','ALLOW','ROLE','productionBoss'),(564,'Claim','createAfterDeadline','WRITE','ALLOW','ROLE','claimManager'),(565,'Client','editAddressLogifloraAllowed','WRITE','ALLOW','ROLE','salesAssistant'),(566,'Client','editFiscalDataWithoutTaxDataCheck','WRITE','ALLOW','ROLE','salesAssistant'),(567,'Client','editVerifiedDataWithoutTaxDataCheck','WRITE','ALLOW','ROLE','salesAssistant'),(568,'Client','editCredit','WRITE','ALLOW','ROLE','financialBoss'),(569,'Client','zeroCreditEditor','WRITE','ALLOW','ROLE','financialBoss'),(570,'InvoiceOut','canCreatePdf','WRITE','ALLOW','ROLE','invoicing'),(571,'Supplier','editPayMethodCheck','WRITE','ALLOW','ROLE','financial'),(572,'Worker','isTeamBoss','WRITE','ALLOW','ROLE','teamBoss'),(573,'Worker','forceIsSubordinate','READ','ALLOW','ROLE','hr'),(574,'Claim','editState','WRITE','ALLOW','ROLE','claimManager'),(575,'Claim','find','READ','ALLOW','ROLE','salesPerson'),(576,'Claim','findById','READ','ALLOW','ROLE','salesPerson'),(577,'Claim','findOne','READ','ALLOW','ROLE','salesPerson'),(578,'Claim','getSummary','READ','ALLOW','ROLE','salesPerson'),(579,'Claim','updateClaim','WRITE','ALLOW','ROLE','salesPerson'),(580,'Claim','regularizeClaim','WRITE','ALLOW','ROLE','claimManager'),(581,'Claim','updateClaimDestination','WRITE','ALLOW','ROLE','claimManager'),(582,'Claim','downloadFile','READ','ALLOW','ROLE','claimManager'),(583,'Claim','deleteById','WRITE','ALLOW','ROLE','claimManager'),(584,'Claim','filter','READ','ALLOW','ROLE','salesPerson'),(585,'Claim','logs','READ','ALLOW','ROLE','claimManager'),(586,'Ticket','find','READ','ALLOW','ROLE','employee'),(587,'Ticket','findById','READ','ALLOW','ROLE','employee'),(588,'Ticket','findOne','READ','ALLOW','ROLE','employee'),(589,'Ticket','getVolume','READ','ALLOW','ROLE','employee'),(590,'Ticket','getTotalVolume','READ','ALLOW','ROLE','employee'),(591,'Ticket','summary','READ','ALLOW','ROLE','employee'),(592,'Ticket','priceDifference','READ','ALLOW','ROLE','employee'),(593,'Ticket','componentUpdate','WRITE','ALLOW','ROLE','employee'),(594,'Ticket','new','WRITE','ALLOW','ROLE','employee'),(595,'Ticket','isEditable','READ','ALLOW','ROLE','employee'),(596,'Ticket','setDeleted','WRITE','ALLOW','ROLE','salesPerson'),(597,'Ticket','restore','WRITE','ALLOW','ROLE','employee'),(598,'Ticket','getSales','READ','ALLOW','ROLE','employee'),(599,'Ticket','getSalesPersonMana','READ','ALLOW','ROLE','employee'),(600,'Ticket','filter','READ','ALLOW','ROLE','employee'),(601,'Ticket','makeInvoice','WRITE','ALLOW','ROLE','employee'),(602,'Ticket','updateEditableTicket','WRITE','ALLOW','ROLE','employee'),(603,'Ticket','updateDiscount','WRITE','ALLOW','ROLE','employee'),(604,'Ticket','transferSales','WRITE','ALLOW','ROLE','employee'),(605,'Ticket','sendSms','WRITE','ALLOW','ROLE','employee'),(606,'Ticket','isLocked','READ','ALLOW','ROLE','employee'),(607,'Ticket','freightCost','READ','ALLOW','ROLE','employee'),(608,'Ticket','getComponentsSum','READ','ALLOW','ROLE','employee'),(609,'Ticket','updateAttributes','WRITE','ALLOW','ROLE','delivery'),(610,'Ticket','deliveryNoteCsv','READ','ALLOW','ROLE','employee'),(611,'State','find','READ','ALLOW','ROLE','employee'),(612,'State','findById','READ','ALLOW','ROLE','employee'),(613,'State','findOne','READ','ALLOW','ROLE','employee'),(614,'Worker','find','READ','ALLOW','ROLE','employee'),(615,'Worker','findById','READ','ALLOW','ROLE','employee'),(616,'Worker','findOne','READ','ALLOW','ROLE','employee'),(617,'Worker','filter','READ','ALLOW','ROLE','employee'),(618,'Worker','getWorkedHours','READ','ALLOW','ROLE','employee'),(619,'Worker','active','READ','ALLOW','ROLE','employee'),(620,'Worker','activeWithRole','READ','ALLOW','ROLE','employee'),(621,'Worker','uploadFile','WRITE','ALLOW','ROLE','hr'),(622,'Worker','contracts','READ','ALLOW','ROLE','employee'),(623,'Worker','holidays','READ','ALLOW','ROLE','employee'),(624,'Worker','activeContract','READ','ALLOW','ROLE','employee'),(625,'Worker','activeWithInheritedRole','READ','ALLOW','ROLE','employee'),(626,'Ticket','collectionLabel','READ','ALLOW','ROLE','employee'),(628,'Ticket','expeditionPalletLabel','READ','ALLOW','ROLE','employee'),(629,'Ticket','editDiscount','WRITE','ALLOW','ROLE','artificialBoss'),(630,'Claim','claimPickupEmail','WRITE','ALLOW','ROLE','salesTeamBoss'),(635,'Ticket','updateAttributes','WRITE','ALLOW','ROLE','administrative'),(636,'Claim','claimPickupEmail','WRITE','ALLOW','ROLE','salesPerson'),(637,'Claim','downloadFile','READ','ALLOW','ROLE','salesPerson'),(638,'Agency','seeExpired','READ','ALLOW','ROLE','artificialBoss'),(639,'Agency','seeExpired','READ','ALLOW','ROLE','logisticAssistant'),(640,'Claim','filter','READ','ALLOW','ROLE','buyer'),(641,'Claim','find','READ','ALLOW','ROLE','buyer'),(642,'Claim','findById','READ','ALLOW','ROLE','buyer'),(643,'Claim','getSummary','READ','ALLOW','ROLE','buyer'),(644,'Claim','filter','READ','ALLOW','ROLE','handmadeBoss'),(645,'Claim','find','READ','ALLOW','ROLE','handmadeBoss'),(646,'Claim','findById','READ','ALLOW','ROLE','handmadeBoss'),(647,'Claim','getSummary','READ','ALLOW','ROLE','handmadeBoss'),(648,'Claim','__get__lines','READ','ALLOW','ROLE','claimManager'),(649,'Claim','__get__lines','READ','ALLOW','ROLE','salesPerson'),(650,'Claim','getSummary','READ','ALLOW','ROLE','deliveryBoss'),(651,'Claim','findById','READ','ALLOW','ROLE','deliveryBoss'),(652,'Claim','find','READ','ALLOW','ROLE','deliveryBoss'),(653,'Claim','filter','READ','ALLOW','ROLE','deliveryBoss'),(654,'Ticket','editZone','WRITE','ALLOW','ROLE','logisticAssistant'),(655,'Entry','addFromPackaging','WRITE','ALLOW','ROLE','production'),(656,'Entry','addFromBuy','WRITE','ALLOW','ROLE','production'),(657,'Supplier','getItemsPackaging','READ','ALLOW','ROLE','production'),(658,'Ticket','closeAll','WRITE','ALLOW','ROLE','system'),(659,'Account','*','*','ALLOW','ROLE','itManagement'),(660,'Account','*','READ','ALLOW','ROLE','employee'),(664,'MailForward','*','*','ALLOW','ROLE','itManagement'),(665,'Role','*','READ','ALLOW','ROLE','employee'),(666,'Role','*','WRITE','ALLOW','ROLE','it'),(667,'VnUser','*','*','ALLOW','ROLE','itManagement'),(668,'VnUser','__get__preview','READ','ALLOW','ROLE','employee'),(669,'VnUser','preview','*','ALLOW','ROLE','employee'),(670,'VnUser','create','*','ALLOW','ROLE','itManagement'),(671,'VnUser','renewToken','WRITE','ALLOW','ROLE','employee'),(672,'PackingSiteAdvanced','*','*','ALLOW','ROLE','production'),(673,'InvoiceOut','makePdfAndNotify','WRITE','ALLOW','ROLE','invoicing'),(674,'InvoiceOutConfig','*','READ','ALLOW','ROLE','invoicing'),(676,'Ticket','invoiceTickets','WRITE','ALLOW','ROLE','employee'),(680,'MailAliasAccount','*','READ','ALLOW','ROLE','employee'),(681,'MailAliasAccount','create','WRITE','ALLOW','ROLE','employee'),(682,'MailAliasAccount','deleteById','WRITE','ALLOW','ROLE','employee'),(683,'MailAliasAccount','canEditAlias','WRITE','ALLOW','ROLE','itManagement'),(684,'WorkerDisableExcluded','*','READ','ALLOW','ROLE','itManagement'),(685,'WorkerDisableExcluded','*','WRITE','ALLOW','ROLE','itManagement'),(686,'MailForward','*','*','ALLOW','ROLE','hr'),(687,'ClientSms','find','READ','ALLOW','ROLE','employee'),(688,'ClientSms','create','WRITE','ALLOW','ROLE','employee'),(689,'Vehicle','sorted','WRITE','ALLOW','ROLE','employee'),(690,'Roadmap','*','*','ALLOW','ROLE','palletizerBoss'),(691,'Roadmap','*','*','ALLOW','ROLE','productionBoss'),(692,'ExpeditionTruck','*','*','ALLOW','ROLE','palletizerBoss'),(693,'ExpeditionTruck','*','*','ALLOW','ROLE','productionBoss'),(694,'MailAliasAccount','canEditAlias','WRITE','ALLOW','ROLE','marketingBoss'),(695,'ViaexpressConfig','internationalExpedition','WRITE','ALLOW','ROLE','employee'),(696,'ViaexpressConfig','renderer','READ','ALLOW','ROLE','employee'),(697,'Ticket','transferClient','WRITE','ALLOW','ROLE','administrative'),(698,'Ticket','canEditWeekly','WRITE','ALLOW','ROLE','buyer'),(699,'TicketSms','find','READ','ALLOW','ROLE','salesPerson'),(701,'Docuware','upload','WRITE','ALLOW','ROLE','deliveryBoss'),(702,'Ticket','docuwareDownload','READ','ALLOW','ROLE','salesPerson');
/*!40000 ALTER TABLE `ACL` ENABLE KEYS */;
UNLOCK TABLES;
@@ -184,7 +184,7 @@ UNLOCK TABLES;
LOCK TABLES `module` WRITE;
/*!40000 ALTER TABLE `module` DISABLE KEYS */;
-INSERT INTO `module` VALUES ('account'),('claim'),('customer'),('entry'),('invoiceIn'),('invoiceOut'),('item'),('monitor'),('order'),('route'),('shelving'),('supplier'),('ticket'),('travel'),('worker'),('zone');
+INSERT INTO `module` VALUES ('account'),('claim'),('customer'),('entry'),('invoiceIn'),('invoiceOut'),('item'),('monitor'),('order'),('route'),('shelving'),('supplier'),('ticket'),('travel'),('wagon'),('worker'),('zone');
/*!40000 ALTER TABLE `module` ENABLE KEYS */;
UNLOCK TABLES;
@@ -206,11 +206,11 @@ UNLOCK TABLES;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
--- Dump completed on 2023-06-26 8:40:03
+-- Dump completed on 2023-08-30 15:53:15
USE `vn`;
--- MariaDB dump 10.19 Distrib 10.5.15-MariaDB, for debian-linux-gnu (x86_64)
+-- MariaDB dump 10.19 Distrib 10.5.19-MariaDB, for debian-linux-gnu (x86_64)
--
--- Host: db1.static.verdnatura.es Database: vn
+-- Host: db2.static.verdnatura.es Database: vn
-- ------------------------------------------------------
-- Server version 10.7.7-MariaDB-1:10.7.7+maria~deb11-log
@@ -400,7 +400,7 @@ UNLOCK TABLES;
LOCK TABLES `department` WRITE;
/*!40000 ALTER TABLE `department` DISABLE KEYS */;
-INSERT INTO `department` VALUES (1,NULL,'VERDNATURA',1,104,763,0,0,0,0,30,NULL,'/',NULL,0,NULL,0,0,0,0,NULL),(22,'shopping','COMPRAS',2,3,NULL,72,0,0,1,0,1,'/1/',NULL,1,NULL,1,0,0,0,NULL),(23,'CMA','CAMARA',13,14,NULL,72,1,1,2,0,37,'/1/37/',NULL,0,NULL,0,1,1,1,NULL),(31,'it','INFORMATICA',4,5,NULL,72,0,0,1,0,1,'/1/','informatica-cau',1,NULL,1,0,0,0,NULL),(34,NULL,'CONTABILIDAD',6,7,NULL,0,0,0,1,0,1,'/1/',NULL,1,NULL,1,0,0,0,NULL),(35,NULL,'FINANZAS',8,9,NULL,0,0,0,1,0,1,'/1/',NULL,1,'begonya@verdnatura.es',1,0,0,0,NULL),(36,NULL,'LABORAL',10,11,NULL,0,0,0,1,0,1,'/1/',NULL,1,NULL,1,0,0,0,NULL),(37,'PROD','PRODUCCION',12,27,NULL,72,1,1,1,7,1,'/1/',NULL,0,NULL,0,1,1,1,NULL),(38,NULL,'SACADO',15,16,NULL,72,1,0,2,0,37,'/1/37/',NULL,0,NULL,0,0,0,0,NULL),(39,NULL,'ENCAJADO',17,18,NULL,72,1,0,2,0,37,'/1/37/',NULL,0,NULL,0,0,0,0,NULL),(41,NULL,'ADMINISTRACION',28,29,NULL,72,0,0,1,0,1,'/1/',NULL,1,NULL,1,0,0,0,NULL),(43,'VT','VENTAS',30,53,NULL,0,0,0,1,11,1,'/1/',NULL,1,'',1,0,0,0,NULL),(44,'management','GERENCIA',54,55,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL),(45,NULL,'LOGISTICA',56,57,NULL,72,0,0,1,0,1,'/1/',NULL,1,NULL,1,0,0,0,NULL),(46,'delivery','REPARTO',58,59,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,0,1,0,0,NULL),(48,NULL,'ALMACENAJE',60,61,NULL,0,1,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL),(49,NULL,'PROPIEDAD',62,63,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL),(52,NULL,'CARGA AEREA',64,65,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL),(53,NULL,'MARKETING Y COMUNICACIÓN',66,67,NULL,72,0,0,1,0,1,'/1/',NULL,1,NULL,1,0,0,0,NULL),(54,NULL,'ORNAMENTALES',68,69,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL),(55,NULL,'TALLER NATURAL',70,73,14548,72,0,0,1,1,1,'/1/',NULL,0,NULL,0,1,1,0,1118),(56,NULL,'TALLER ARTIFICIAL',71,72,8470,72,0,0,2,0,55,'/1/55/',NULL,0,NULL,0,1,1,0,1927),(58,'CMP','CAMPOS',74,77,NULL,72,0,0,1,1,1,'/1/',NULL,0,NULL,0,0,0,0,NULL),(59,NULL,'MANTENIMIENTO',78,79,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,0,1,0,0,NULL),(60,NULL,'RECLAMACIONES',80,81,NULL,72,0,0,1,0,1,'/1/',NULL,1,NULL,1,1,0,0,NULL),(61,NULL,'VNH',82,85,NULL,73,0,0,1,1,1,'/1/',NULL,0,NULL,0,0,0,0,NULL),(66,NULL,'VERDNAMADRID',86,87,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL),(68,NULL,'COMPLEMENTOS',19,20,NULL,72,1,0,2,0,37,'/1/37/',NULL,0,NULL,0,1,0,0,NULL),(69,NULL,'VERDNABARNA',88,89,NULL,74,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL),(80,NULL,'EQUIPO J VALLES',31,32,4250,72,0,0,2,0,43,'/1/43/','jvp_equipo',1,'gestioncomercial@verdnatura.es',1,0,0,0,NULL),(86,NULL,'LIMPIEZA',90,91,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL),(89,NULL,'COORDINACION',92,93,NULL,0,1,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL),(90,NULL,'TRAILER',83,84,NULL,0,0,0,2,0,61,'/1/61/',NULL,0,NULL,0,0,0,0,NULL),(91,NULL,'ARTIFICIAL',21,22,NULL,0,1,0,2,0,37,'/1/37/',NULL,0,NULL,0,0,0,0,NULL),(92,NULL,'EQUIPO SILVERIO',33,34,1203,0,0,0,2,0,43,'/1/43/','sdc_equipo',1,'gestioncomercial@verdnatura.es',1,0,0,0,NULL),(93,NULL,'CONFECCION',94,95,NULL,0,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,1,0,NULL),(94,NULL,'EQUIPO J BROCAL',35,36,3797,0,0,0,2,0,43,'/1/43/','jes_equipo',1,'gestioncomercial@verdnatura.es',1,0,0,0,NULL),(95,NULL,'EQUIPO C ZAMBRANO',37,38,4667,0,0,0,2,0,43,'/1/43/','czg_equipo',1,'gestioncomercial@verdnatura.es',1,0,0,0,NULL),(96,NULL,'EQUIPO C LOPEZ',39,40,4661,0,0,0,2,0,43,'/1/43/','cla_equipo',1,'gestioncomercial@verdnatura.es',1,0,0,0,NULL),(115,NULL,'EQUIPO CLAUDI',41,42,3810,0,0,0,2,0,43,'/1/43/','csr_equipo',1,'gestioncomercial@verdnatura.es',1,0,0,0,NULL),(123,NULL,'EQUIPO ELENA BASCUÑANA',43,44,7102,0,0,0,2,0,43,'/1/43/','ebt_equipo',1,'gestioncomercial@verdnatura.es',1,0,0,0,NULL),(124,NULL,'CONTROL INTERNO',96,97,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,1,0,0,0,NULL),(125,NULL,'EQUIPO MIRIAM MAR',45,46,1118,0,0,0,2,0,43,'/1/43/','mir_equipo',1,'gestioncomercial@verdnatura.es',1,0,0,0,NULL),(126,NULL,'PRESERVADO',98,99,NULL,0,0,0,1,0,1,'/1/',NULL,0,NULL,0,1,1,0,NULL),(128,NULL,'PALETIZADO',23,24,NULL,0,0,0,2,0,37,'/1/37/',NULL,0,NULL,0,0,0,0,NULL),(130,NULL,'REVISION',25,26,NULL,0,0,0,2,0,37,'/1/37/',NULL,0,NULL,0,0,0,0,NULL),(131,NULL,'INVERNADERO',75,76,NULL,0,0,0,2,0,58,'/1/58/',NULL,0,NULL,0,1,0,0,NULL),(132,NULL,'EQUIPO DC',47,48,1731,0,0,0,2,0,43,'/1/43/','dc_equipo',1,'gestioncomercial@verdnatura.es',1,0,0,0,NULL),(133,'franceTeam','EQUIPO FRANCIA',49,50,1731,72,0,0,2,0,43,'/1/43/','fra_equipo',1,'gestioncomercial@verdnatura.es',1,0,0,0,NULL),(134,NULL,'EQUIPO RODRI',51,52,6264,0,0,0,2,0,43,'/1/43/','rhr_equipo',1,'gestioncomercial@verdnatura.es',1,0,0,0,NULL),(135,'routers','ENRUTADORES',100,101,NULL,0,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL),(136,'heavyVehicles','VEHICULOS PESADOS',102,103,NULL,0,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL);
+INSERT INTO `department` VALUES (1,NULL,'VERDNATURA',1,104,763,0,0,0,0,30,NULL,'/',NULL,0,NULL,0,0,0,0,NULL,NULL),(22,'shopping','COMPRAS',2,3,NULL,72,0,0,1,0,1,'/1/',NULL,1,NULL,1,0,0,0,NULL,NULL),(23,'CMA','CAMARA',13,14,NULL,72,1,1,2,0,37,'/1/37/',NULL,0,NULL,0,1,1,1,NULL,NULL),(31,'it','INFORMATICA',4,5,NULL,72,0,0,1,0,1,'/1/','informatica-cau',1,NULL,1,0,0,0,NULL,NULL),(34,NULL,'CONTABILIDAD',6,7,NULL,0,0,0,1,0,1,'/1/',NULL,1,NULL,1,0,0,0,NULL,NULL),(35,NULL,'FINANZAS',8,9,NULL,0,0,0,1,0,1,'/1/',NULL,1,'begonya@verdnatura.es',1,0,0,0,NULL,NULL),(36,NULL,'LABORAL',10,11,NULL,0,0,0,1,0,1,'/1/',NULL,1,NULL,1,0,0,0,NULL,NULL),(37,'PROD','PRODUCCION',12,27,NULL,72,1,1,1,7,1,'/1/',NULL,0,NULL,0,1,1,1,NULL,NULL),(38,NULL,'SACADO',15,16,NULL,72,1,0,2,0,37,'/1/37/',NULL,0,NULL,0,0,0,0,NULL,NULL),(39,NULL,'ENCAJADO',17,18,NULL,72,1,0,2,0,37,'/1/37/',NULL,0,NULL,0,0,0,0,NULL,NULL),(41,NULL,'ADMINISTRACION',28,29,NULL,72,0,0,1,0,1,'/1/',NULL,1,NULL,1,0,0,0,NULL,NULL),(43,'VT','VENTAS',30,53,NULL,0,0,0,1,11,1,'/1/',NULL,1,'',1,0,0,0,NULL,NULL),(44,'management','GERENCIA',54,55,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL),(45,NULL,'LOGISTICA',56,57,NULL,72,0,0,1,0,1,'/1/',NULL,1,NULL,1,0,0,0,NULL,NULL),(46,'delivery','REPARTO',58,59,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,0,1,0,0,NULL,NULL),(48,NULL,'ALMACENAJE',60,61,NULL,0,1,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL),(49,NULL,'PROPIEDAD',62,63,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL),(52,NULL,'CARGA AEREA',64,65,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL),(53,NULL,'MARKETING Y COMUNICACIÓN',66,67,NULL,72,0,0,1,0,1,'/1/',NULL,1,NULL,1,0,0,0,NULL,NULL),(54,NULL,'ORNAMENTALES',68,69,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL),(55,NULL,'TALLER NATURAL',70,73,14548,72,0,0,1,1,1,'/1/',NULL,0,NULL,0,1,1,0,1118,NULL),(56,NULL,'TALLER ARTIFICIAL',71,72,8470,72,0,0,2,0,55,'/1/55/',NULL,0,NULL,0,1,1,0,1927,NULL),(58,'CMP','CAMPOS',74,77,NULL,72,0,0,1,1,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL),(59,NULL,'MANTENIMIENTO',78,79,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,0,1,0,0,NULL,NULL),(60,NULL,'RECLAMACIONES',80,81,NULL,72,0,0,1,0,1,'/1/',NULL,1,NULL,1,1,0,0,NULL,NULL),(61,NULL,'VNH',82,85,NULL,73,0,0,1,1,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL),(66,NULL,'VERDNAMADRID',86,87,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL),(68,NULL,'COMPLEMENTOS',19,20,NULL,72,1,0,2,0,37,'/1/37/',NULL,0,NULL,0,1,0,0,NULL,NULL),(69,NULL,'VERDNABARNA',88,89,NULL,74,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL),(80,NULL,'EQUIPO J VALLES',31,32,4250,72,0,0,2,0,43,'/1/43/','jvp_equipo',1,'gestioncomercial@verdnatura.es',1,0,0,0,NULL,NULL),(86,NULL,'LIMPIEZA',90,91,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL),(89,NULL,'COORDINACION',92,93,NULL,0,1,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL),(90,NULL,'TRAILER',83,84,NULL,0,0,0,2,0,61,'/1/61/',NULL,0,NULL,0,0,0,0,NULL,NULL),(91,NULL,'ARTIFICIAL',21,22,NULL,0,1,0,2,0,37,'/1/37/',NULL,0,NULL,0,0,0,0,NULL,NULL),(92,NULL,'EQUIPO SILVERIO',33,34,1203,0,0,0,2,0,43,'/1/43/','sdc_equipo',1,'gestioncomercial@verdnatura.es',1,0,0,0,NULL,NULL),(93,NULL,'CONFECCION',94,95,NULL,0,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,1,0,NULL,NULL),(94,NULL,'EQUIPO J BROCAL',35,36,3797,0,0,0,2,0,43,'/1/43/','jes_equipo',1,'gestioncomercial@verdnatura.es',1,0,0,0,NULL,NULL),(95,NULL,'EQUIPO C ZAMBRANO',37,38,4667,0,0,0,2,0,43,'/1/43/','czg_equipo',1,'gestioncomercial@verdnatura.es',1,0,0,0,NULL,NULL),(96,NULL,'EQUIPO C LOPEZ',39,40,4661,0,0,0,2,0,43,'/1/43/','cla_equipo',1,'gestioncomercial@verdnatura.es',1,0,0,0,NULL,NULL),(115,NULL,'EQUIPO CLAUDI',41,42,3810,0,0,0,2,0,43,'/1/43/','csr_equipo',1,'gestioncomercial@verdnatura.es',1,0,0,0,NULL,NULL),(123,NULL,'EQUIPO ELENA BASCUÑANA',43,44,7102,0,0,0,2,0,43,'/1/43/','ebt_equipo',1,'gestioncomercial@verdnatura.es',1,0,0,0,NULL,NULL),(124,NULL,'CONTROL INTERNO',96,97,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,1,0,0,0,NULL,NULL),(125,NULL,'EQUIPO MIRIAM MAR',45,46,1118,0,0,0,2,0,43,'/1/43/','mir_equipo',1,'gestioncomercial@verdnatura.es',1,0,0,0,NULL,NULL),(126,NULL,'PRESERVADO',98,99,NULL,0,0,0,1,0,1,'/1/',NULL,0,NULL,0,1,1,0,NULL,NULL),(128,NULL,'PALETIZADO',23,24,NULL,0,0,0,2,0,37,'/1/37/',NULL,0,NULL,0,0,0,0,NULL,NULL),(130,NULL,'REVISION',25,26,NULL,0,0,0,2,0,37,'/1/37/',NULL,0,NULL,0,0,0,0,NULL,NULL),(131,NULL,'INVERNADERO',75,76,NULL,0,0,0,2,0,58,'/1/58/',NULL,0,NULL,0,1,0,0,NULL,NULL),(132,NULL,'EQUIPO DC',47,48,1731,0,0,0,2,0,43,'/1/43/','dc_equipo',1,'gestioncomercial@verdnatura.es',1,0,0,0,NULL,NULL),(133,'franceTeam','EQUIPO FRANCIA',49,50,1731,72,0,0,2,0,43,'/1/43/','fra_equipo',1,'gestioncomercial@verdnatura.es',1,0,0,0,NULL,NULL),(134,NULL,'EQUIPO RODRI',51,52,6264,0,0,0,2,0,43,'/1/43/','rhr_equipo',1,'gestioncomercial@verdnatura.es',1,0,0,0,NULL,NULL),(135,'routers','ENRUTADORES',100,101,NULL,0,0,0,1,0,1,'/1/',NULL,1,NULL,0,0,0,0,NULL,NULL),(136,'heavyVehicles','VEHICULOS PESADOS',102,103,NULL,0,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL);
/*!40000 ALTER TABLE `department` ENABLE KEYS */;
UNLOCK TABLES;
@@ -410,7 +410,7 @@ UNLOCK TABLES;
LOCK TABLES `docuware` WRITE;
/*!40000 ALTER TABLE `docuware` DISABLE KEYS */;
-INSERT INTO `docuware` VALUES (1,'deliveryNote','Albaranes cliente','find','find','N__ALBAR_N'),(2,'deliveryNote','Albaranes cliente','store','Archivar','N__ALBAR_N');
+INSERT INTO `docuware` VALUES (1,'deliveryNote','Albaranes cliente','find','find','N__ALBAR_N',NULL),(2,'deliveryNote','Albaranes cliente','store','Archivar','N__ALBAR_N',NULL),(3,'hr','RRHH','find','Búsqueda','N__DOCUMENTO',3);
/*!40000 ALTER TABLE `docuware` ENABLE KEYS */;
UNLOCK TABLES;
@@ -502,11 +502,11 @@ UNLOCK TABLES;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
--- Dump completed on 2023-06-26 8:40:09
+-- Dump completed on 2023-08-30 15:53:19
USE `cache`;
--- MariaDB dump 10.19 Distrib 10.5.15-MariaDB, for debian-linux-gnu (x86_64)
+-- MariaDB dump 10.19 Distrib 10.5.19-MariaDB, for debian-linux-gnu (x86_64)
--
--- Host: db1.static.verdnatura.es Database: cache
+-- Host: db2.static.verdnatura.es Database: cache
-- ------------------------------------------------------
-- Server version 10.7.7-MariaDB-1:10.7.7+maria~deb11-log
@@ -538,11 +538,11 @@ UNLOCK TABLES;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
--- Dump completed on 2023-06-26 8:40:10
+-- Dump completed on 2023-08-30 15:53:20
USE `hedera`;
--- MariaDB dump 10.19 Distrib 10.5.15-MariaDB, for debian-linux-gnu (x86_64)
+-- MariaDB dump 10.19 Distrib 10.5.19-MariaDB, for debian-linux-gnu (x86_64)
--
--- Host: db1.static.verdnatura.es Database: hedera
+-- Host: db2.static.verdnatura.es Database: hedera
-- ------------------------------------------------------
-- Server version 10.7.7-MariaDB-1:10.7.7+maria~deb11-log
@@ -662,7 +662,7 @@ UNLOCK TABLES;
LOCK TABLES `restPriv` WRITE;
/*!40000 ALTER TABLE `restPriv` DISABLE KEYS */;
-INSERT INTO `restPriv` VALUES (1,'tpv/transaction',2),(3,'image/upload',1),(5,'user/supplant',104),(10,'misc/captcha',NULL),(11,'core/log',NULL),(14,'core/query',NULL),(15,'user/recover-password',NULL),(16,'user/restore-password',NULL),(17,'dms/invoice',2),(18,'image/thumb',NULL),(19,'misc/contact',NULL),(20,'misc/production',NULL),(21,'tpv/confirm-post',NULL),(22,'tpv/confirm-soap',NULL),(23,'client/supplant',18),(24,'client/supplant',35);
+INSERT INTO `restPriv` VALUES (1,'tpv/transaction',2),(3,'image/upload',1),(5,'user/supplant',104),(10,'misc/captcha',NULL),(11,'core/log',NULL),(14,'core/query',NULL),(15,'user/recover-password',NULL),(16,'user/restore-password',NULL),(17,'dms/invoice',2),(18,'image/thumb',NULL),(19,'misc/contact',NULL),(20,'misc/production',NULL),(21,'tpv/confirm-post',NULL),(22,'tpv/confirm-soap',NULL),(23,'client/supplant',18),(24,'client/supplant',35),(25,'user/logout',NULL);
/*!40000 ALTER TABLE `restPriv` ENABLE KEYS */;
UNLOCK TABLES;
@@ -704,57 +704,11 @@ UNLOCK TABLES;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
--- Dump completed on 2023-06-26 8:40:14
-USE `postgresql`;
--- MariaDB dump 10.19 Distrib 10.5.15-MariaDB, for debian-linux-gnu (x86_64)
---
--- Host: db1.static.verdnatura.es Database: postgresql
--- ------------------------------------------------------
--- Server version 10.7.7-MariaDB-1:10.7.7+maria~deb11-log
-
-/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
-/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
-/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
-/*!40101 SET NAMES utf8 */;
-/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
-/*!40103 SET TIME_ZONE='+00:00' */;
-/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
-/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
-/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
-
---
--- Dumping data for table `labour_agreement`
---
-
-LOCK TABLES `labour_agreement` WRITE;
-/*!40000 ALTER TABLE `labour_agreement` DISABLE KEYS */;
-INSERT INTO `labour_agreement` VALUES (1,2.5,1830,'Flores y Plantas','2012-01-01',NULL);
-/*!40000 ALTER TABLE `labour_agreement` ENABLE KEYS */;
-UNLOCK TABLES;
-
---
--- Dumping data for table `media_type`
---
-
-LOCK TABLES `media_type` WRITE;
-/*!40000 ALTER TABLE `media_type` DISABLE KEYS */;
-INSERT INTO `media_type` VALUES (3,'email'),(12,'extension movil'),(6,'facebook'),(2,'fijo'),(11,'material'),(10,'movil empresa'),(1,'movil personal'),(5,'msn'),(9,'seg social'),(4,'skype'),(7,'web');
-/*!40000 ALTER TABLE `media_type` ENABLE KEYS */;
-UNLOCK TABLES;
-/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
-
-/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
-/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
-/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
-/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
-/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
-/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-
--- Dump completed on 2023-06-26 8:40:15
+-- Dump completed on 2023-08-30 15:53:22
USE `sage`;
--- MariaDB dump 10.19 Distrib 10.5.15-MariaDB, for debian-linux-gnu (x86_64)
+-- MariaDB dump 10.19 Distrib 10.5.19-MariaDB, for debian-linux-gnu (x86_64)
--
--- Host: db1.static.verdnatura.es Database: sage
+-- Host: db2.static.verdnatura.es Database: sage
-- ------------------------------------------------------
-- Server version 10.7.7-MariaDB-1:10.7.7+maria~deb11-log
@@ -804,7 +758,7 @@ UNLOCK TABLES;
LOCK TABLES `taxType` WRITE;
/*!40000 ALTER TABLE `taxType` DISABLE KEYS */;
-INSERT INTO `taxType` VALUES (2,NULL,0),(4,'national4',0),(5,NULL,0),(6,NULL,1),(7,NULL,1),(8,NULL,1),(10,'national10',0),(11,NULL,0),(16,'CEEServices21',1),(18,NULL,0),(20,'national0',0),(21,'national21',0),(22,'import10',0),(26,NULL,0),(90,'import21',0),(91,NULL,0),(92,NULL,0),(93,NULL,0),(94,NULL,0),(100,NULL,0),(108,NULL,0),(109,NULL,0),(110,NULL,1),(111,NULL,0),(112,NULL,0),(113,'ISP21',0),(114,NULL,0),(115,'import4',0);
+INSERT INTO `taxType` VALUES (2,'nonTaxable',0),(4,'national4',0),(5,NULL,0),(6,NULL,1),(7,NULL,1),(8,NULL,1),(10,'national10',0),(11,NULL,0),(16,'CEEServices21',1),(18,NULL,0),(20,'national0',0),(21,'national21',0),(22,'import10',0),(26,NULL,0),(90,'import21',0),(91,NULL,0),(92,NULL,0),(93,NULL,0),(94,NULL,0),(100,NULL,0),(108,NULL,0),(109,NULL,0),(110,NULL,1),(111,NULL,0),(112,NULL,0),(113,'ISP21',0),(114,NULL,0),(115,'import4',0);
/*!40000 ALTER TABLE `taxType` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
@@ -816,4 +770,4 @@ UNLOCK TABLES;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
--- Dump completed on 2023-06-26 8:40:15
+-- Dump completed on 2023-08-30 15:53:22
diff --git a/db/dump/fixtures.sql b/db/dump/fixtures.sql
index e6e10b8ff..9fac5e83b 100644
--- a/db/dump/fixtures.sql
+++ b/db/dump/fixtures.sql
@@ -871,7 +871,9 @@ INSERT INTO `vn`.`ink`(`id`, `name`, `picture`, `showOrder`, `hex`)
('SLV', 'Silver', 1, 4, 'CACFD2'),
('BRW', 'Brown', 1, 5, 'DC7633'),
('BLK', 'Black', 1, 6, '000000'),
- ('BAS', 'Blue/Silver', 1, 7, '5DADE2');
+ ('BAS', 'Blue/Silver', 1, 7, '5DADE2'),
+ ('GRN', 'Green', 1, 8, '28A745'),
+ ('WHT', 'White', 1, 9, 'FFFFFF');
INSERT INTO `vn`.`origin`(`id`,`code`, `name`)
VALUES
@@ -918,26 +920,26 @@ INSERT INTO `vn`.`itemFamily`(`code`, `description`)
('SER', 'Services'),
('VT', 'Sales');
-INSERT INTO `vn`.`item`(`id`, `typeFk`, `size`, `inkFk`, `stems`, `originFk`, `description`, `producerFk`, `intrastatFk`, `expenceFk`,
+INSERT INTO `vn`.`item`(`id`, `typeFk`, `stems`, `originFk`, `description`, `producerFk`, `intrastatFk`, `expenceFk`,
`comment`, `relevancy`, `image`, `subName`, `minPrice`, `stars`, `family`, `isFloramondo`, `genericFk`, `itemPackingTypeFk`, `hasMinPrice`, `packingShelve`, `weightByPiece`)
VALUES
- (1, 2, 70, 'YEL', 1, 1, NULL, 1, 06021010, 2000000000, NULL, 0, '1', NULL, 0, 1, 'EMB', 0, NULL, 'V', 0, 15,3),
- (2, 2, 70, 'BLU', 1, 2, NULL, 1, 06021010, 2000000000, NULL, 0, '2', NULL, 0, 2, 'VT', 0, NULL, 'H', 0, 10,2),
- (3, 1, 60, 'YEL', 1, 3, NULL, 1, 05080000, 4751000000, NULL, 0, '3', NULL, 0, 5, 'VT', 0, NULL, NULL, 0, 5,5),
- (4, 1, 60, 'YEL', 1, 1, 'Increases block', 1, 05080000, 4751000000, NULL, 0, '4', NULL, 0, 3, 'VT', 0, NULL, NULL, 0, NULL,NULL),
- (5, 3, 30, 'RED', 1, 2, NULL, 2, 06021010, 4751000000, NULL, 0, '5', NULL, 0, 3, 'VT', 0, NULL, NULL, 0, NULL,NULL),
- (6, 5, 30, 'RED', 1, 2, NULL, NULL, 06021010, 4751000000, NULL, 0, '6', NULL, 0, 4, 'VT', 0, NULL, NULL, 0, NULL,NULL),
- (7, 5, 90, 'BLU', 1, 2, NULL, NULL, 06021010, 4751000000, NULL, 0, '7', NULL, 0, 4, 'VT', 0, NULL, NULL, 0, NULL,NULL),
- (8, 2, 70, 'YEL', 1, 1, NULL, 1, 06021010, 2000000000, NULL, 0, '8', NULL, 0, 5, 'VT', 0, NULL, NULL, 0, NULL,NULL),
- (9, 2, 70, 'BLU', 1, 2, NULL, 1, 06021010, 2000000000, NULL, 0, '9', NULL, 0, 4, 'VT', 1, NULL, NULL, 0, NULL,NULL),
- (10, 1, 60, 'YEL', 1, 3, NULL, 1, 05080000, 4751000000, NULL, 0, '10', NULL, 0, 4, 'VT', 0, NULL, NULL, 0, NULL,NULL),
- (11, 1, 60, 'YEL', 1, 1, NULL, 1, 05080000, 4751000000, NULL, 0, '11', NULL, 0, 4, 'VT', 0, NULL, NULL, 0, NULL,NULL),
- (12, 3, 30, 'RED', 1, 2, NULL, 2, 06021010, 4751000000, NULL, 0, '12', NULL, 0, 3, 'VT', 0, NULL, NULL, 0, NULL,NULL),
- (13, 5, 30, 'RED', 1, 2, NULL, NULL, 06021010, 4751000000, NULL, 0, '13', NULL, 1, 2, 'VT', 1, NULL, NULL, 1, NULL,NULL),
- (14, 5, 90, 'BLU', 1, 2, NULL, NULL, 06021010, 4751000000, NULL, 0, '', NULL, 0, 4, 'VT', 1, NULL, NULL, 0, NULL,NULL),
- (15, 4, NULL, NULL, NULL, 1, NULL, NULL, 06021010, 4751000000, NULL, 0, '', NULL, 0, 0, 'EMB', 0, NULL, NULL, 0, NULL,NULL),
- (16, 6, NULL, NULL, NULL, 1, NULL, NULL, 06021010, 4751000000, NULL, 0, '', NULL, 0, 0, 'EMB', 0, NULL, NULL, 0, NULL,NULL),
- (71, 6, NULL, NULL, NULL, 1, NULL, NULL, 06021010, 4751000000, NULL, 0, '', NULL, 0, 0, 'VT', 0, NULL, NULL, 0, NULL,NULL);
+ (1, 2, 1, 1, NULL, 1, 06021010, 2000000000, NULL, 0, '1', NULL, 0, 1, 'EMB', 0, NULL, 'V', 0, 15,3),
+ (2, 2, 1, 2, NULL, 1, 06021010, 2000000000, NULL, 0, '2', NULL, 0, 2, 'VT', 0, NULL, 'H', 0, 10,2),
+ (3, 1, 1, 3, NULL, 1, 05080000, 4751000000, NULL, 0, '3', NULL, 0, 5, 'VT', 0, NULL, NULL, 0, 5,5),
+ (4, 1, 1, 1, 'Increases block', 1, 05080000, 4751000000, NULL, 0, '4', NULL, 0, 3, 'VT', 0, NULL, NULL, 0, NULL,NULL),
+ (5, 3, 1, 2, NULL, 2, 06021010, 4751000000, NULL, 0, '5', NULL, 0, 3, 'VT', 0, NULL, NULL, 0, NULL,NULL),
+ (6, 5, 1, 2, NULL, NULL, 06021010, 4751000000, NULL, 0, '6', NULL, 0, 4, 'VT', 0, NULL, NULL, 0, NULL,NULL),
+ (7, 5, 1, 2, NULL, NULL, 06021010, 4751000000, NULL, 0, '7', NULL, 0, 4, 'VT', 0, NULL, NULL, 0, NULL,NULL),
+ (8, 2, 1, 1, NULL, 1, 06021010, 2000000000, NULL, 0, '8', NULL, 0, 5, 'VT', 0, NULL, NULL, 0, NULL,NULL),
+ (9, 2, 1, 2, NULL, 1, 06021010, 2000000000, NULL, 0, '9', NULL, 0, 4, 'VT', 1, NULL, NULL, 0, NULL,NULL),
+ (10, 1, 1, 3, NULL, 1, 05080000, 4751000000, NULL, 0, '10', NULL, 0, 4, 'VT', 0, NULL, NULL, 0, NULL,NULL),
+ (11, 1, 1, 1, NULL, 1, 05080000, 4751000000, NULL, 0, '11', NULL, 0, 4, 'VT', 0, NULL, NULL, 0, NULL,NULL),
+ (12, 3, 1, 2, NULL, 2, 06021010, 4751000000, NULL, 0, '12', NULL, 0, 3, 'VT', 0, NULL, NULL, 0, NULL,NULL),
+ (13, 5, 1, 2, NULL, NULL, 06021010, 4751000000, NULL, 0, '13', NULL, 1, 2, 'VT', 1, NULL, NULL, 1, NULL,NULL),
+ (14, 5, 1, 2, NULL, NULL, 06021010, 4751000000, NULL, 0, '', NULL, 0, 4, 'VT', 1, NULL, NULL, 0, NULL,NULL),
+ (15, 4, NULL, 1, NULL, NULL, 06021010, 4751000000, NULL, 0, '', NULL, 0, 0, 'EMB', 0, NULL, NULL, 0, NULL,NULL),
+ (16, 6, NULL, 1, NULL, NULL, 06021010, 4751000000, NULL, 0, '', NULL, 0, 0, 'EMB', 0, NULL, NULL, 0, NULL,NULL),
+ (71, 6, NULL, 1, NULL, NULL, 06021010, 4751000000, NULL, 0, '', NULL, 0, 0, 'VT', 0, NULL, NULL, 0, NULL,NULL);
-- Update the taxClass after insert of the items
UPDATE `vn`.`itemTaxCountry` SET `taxClassFk` = 2
@@ -1005,45 +1007,45 @@ INSERT INTO `vn`.`ticketPackaging`(`id`, `ticketFk`, `packagingFk`, `quantity`,
INSERT INTO `vn`.`sale`(`id`, `itemFk`, `ticketFk`, `concept`, `quantity`, `price`, `discount`, `reserved`, `isPicked`, `created`)
VALUES
- (1, 1, 1, 'Ranged weapon longbow 2m', 5, 100.39, 0, 0, 0, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH)),
+ (1, 1, 1, 'Ranged weapon longbow 200cm', 5, 100.39, 0, 0, 0, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH)),
(2, 2, 1, 'Melee weapon combat fist 15cm', 10, 7.07, 0, 0, 0, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH)),
- (3, 1, 1, 'Ranged weapon longbow 2m', 2, 100.39, 0, 0, 0, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH)),
- (4, 4, 1, 'Melee weapon heavy shield 1x0.5m', 20, 1.69, 0, 0, 0, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH)),
- (5, 1, 2, 'Ranged weapon longbow 2m', 1, 110.33, 0, 0, 0, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH)),
- (6, 1, 3, 'Ranged weapon longbow 2m', 1, 110.33, 0, 0, 0, DATE_ADD(util.VN_CURDATE(), INTERVAL -2 MONTH)),
+ (3, 1, 1, 'Ranged weapon longbow 200cm', 2, 100.39, 0, 0, 0, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH)),
+ (4, 4, 1, 'Melee weapon heavy shield 100cm', 20, 1.69, 0, 0, 0, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH)),
+ (5, 1, 2, 'Ranged weapon longbow 200cm', 1, 110.33, 0, 0, 0, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH)),
+ (6, 1, 3, 'Ranged weapon longbow 200cm', 1, 110.33, 0, 0, 0, DATE_ADD(util.VN_CURDATE(), INTERVAL -2 MONTH)),
(7, 2, 11, 'Melee weapon combat fist 15cm', 15, 7.44, 0, 0, 0, util.VN_CURDATE()),
- (8, 4, 11, 'Melee weapon heavy shield 1x0.5m', 10, 1.79, 0, 0, 0, util.VN_CURDATE()),
- (9, 1, 16, 'Ranged weapon longbow 2m', 1, 103.49, 0, 0, 0, util.VN_CURDATE()),
+ (8, 4, 11, 'Melee weapon heavy shield 100cm', 10, 1.79, 0, 0, 0, util.VN_CURDATE()),
+ (9, 1, 16, 'Ranged weapon longbow 200cm', 1, 103.49, 0, 0, 0, util.VN_CURDATE()),
(10, 2, 16, 'Melee weapon combat fist 15cm', 10, 7.09, 0, 0, 0, util.VN_CURDATE()),
- (11, 1, 16, 'Ranged weapon longbow 2m', 1, 103.49, 0, 0, 0, util.VN_CURDATE()),
- (12, 4, 16, 'Melee weapon heavy shield 1x0.5m', 20, 1.71, 0, 0, 0, util.VN_CURDATE()),
+ (11, 1, 16, 'Ranged weapon longbow 200cm', 1, 103.49, 0, 0, 0, util.VN_CURDATE()),
+ (12, 4, 16, 'Melee weapon heavy shield 100cm', 20, 1.71, 0, 0, 0, util.VN_CURDATE()),
(13, 2, 8, 'Melee weapon combat fist 15cm', 10, 7.08, 0, 0, 0, util.VN_CURDATE()),
- (14, 1, 8, 'Ranged weapon longbow 2m', 2, 103.49, 0, 0, 0, util.VN_CURDATE()),
- (15, 1, 19, 'Ranged weapon longbow 2m', 1, 103.49, 0, 0, 0, util.VN_CURDATE()),
+ (14, 1, 8, 'Ranged weapon longbow 200cm', 2, 103.49, 0, 0, 0, util.VN_CURDATE()),
+ (15, 1, 19, 'Ranged weapon longbow 200cm', 1, 103.49, 0, 0, 0, util.VN_CURDATE()),
(16, 2, 20, 'Melee weapon combat fist 15cm', 20, 7.07, 0, 0, 0, util.VN_CURDATE()),
(17, 2, 22, 'Melee weapon combat fist 15cm', 30, 7.07, 0, 0, 0, DATE_ADD(util.VN_CURDATE(), INTERVAL +1 MONTH)),
- (18, 4, 22, 'Melee weapon heavy shield 1x0.5m', 20, 1.69, 0, 0, 0, DATE_ADD(util.VN_CURDATE(), INTERVAL +1 MONTH)),
- (19, 1, 4, 'Ranged weapon longbow 2m', 1, 8.07, 0, 0, 0, DATE_ADD(util.VN_CURDATE(), INTERVAL -3 MONTH)),
- (20, 1, 5, 'Ranged weapon longbow 2m', 1, 8.07, 0, 0, 0, DATE_ADD(util.VN_CURDATE(), INTERVAL -4 MONTH)),
- (21, 1, 6, 'Ranged weapon longbow 2m', 1, 8.07, 0, 0, 0, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH)),
- (22, 1, 7, 'Ranged weapon longbow 2m', 1, 8.07, 0, 0, 0, util.VN_CURDATE()),
- (23, 1, 9, 'Ranged weapon longbow 2m', 1, 8.07, 0, 0, 0, util.VN_CURDATE()),
- (24, 1, 10, 'Ranged weapon longbow 2m', 1, 8.07, 0, 0, 0, util.VN_CURDATE()),
- (25, 4, 12, 'Melee weapon heavy shield 1x0.5m', 20, 1.72, 0, 0, 0, util.VN_CURDATE()),
- (26, 4, 13, 'Melee weapon heavy shield 1x0.5m', 20, 1.72, 0, 0, 0, util.VN_CURDATE()),
- (27, 4, 14, 'Melee weapon heavy shield 1x0.5m', 20, 1.72, 0, 0, 0, util.VN_CURDATE()),
- (28, 4, 15, 'Melee weapon heavy shield 1x0.5m', 20, 1.72, 0, 0, 0, util.VN_CURDATE()),
- (29, 4, 17, 'Melee weapon heavy shield 1x0.5m', 20, 1.72, 0, 0, 0, util.VN_CURDATE()),
- (30, 4, 18, 'Melee weapon heavy shield 1x0.5m', 20, 1.72, 0, 0, 0, util.VN_CURDATE()),
+ (18, 4, 22, 'Melee weapon heavy shield 100cm', 20, 1.69, 0, 0, 0, DATE_ADD(util.VN_CURDATE(), INTERVAL +1 MONTH)),
+ (19, 1, 4, 'Ranged weapon longbow 200cm', 1, 8.07, 0, 0, 0, DATE_ADD(util.VN_CURDATE(), INTERVAL -3 MONTH)),
+ (20, 1, 5, 'Ranged weapon longbow 200cm', 1, 8.07, 0, 0, 0, DATE_ADD(util.VN_CURDATE(), INTERVAL -4 MONTH)),
+ (21, 1, 6, 'Ranged weapon longbow 200cm', 1, 8.07, 0, 0, 0, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH)),
+ (22, 1, 7, 'Ranged weapon longbow 200cm', 1, 8.07, 0, 0, 0, util.VN_CURDATE()),
+ (23, 1, 9, 'Ranged weapon longbow 200cm', 1, 8.07, 0, 0, 0, util.VN_CURDATE()),
+ (24, 1, 10, 'Ranged weapon longbow 200cm', 1, 8.07, 0, 0, 0, util.VN_CURDATE()),
+ (25, 4, 12, 'Melee weapon heavy shield 100cm', 20, 1.72, 0, 0, 0, util.VN_CURDATE()),
+ (26, 4, 13, 'Melee weapon heavy shield 100cm', 20, 1.72, 0, 0, 0, util.VN_CURDATE()),
+ (27, 4, 14, 'Melee weapon heavy shield 100cm', 20, 1.72, 0, 0, 0, util.VN_CURDATE()),
+ (28, 4, 15, 'Melee weapon heavy shield 100cm', 20, 1.72, 0, 0, 0, util.VN_CURDATE()),
+ (29, 4, 17, 'Melee weapon heavy shield 100cm', 20, 1.72, 0, 0, 0, util.VN_CURDATE()),
+ (30, 4, 18, 'Melee weapon heavy shield 100cm', 20, 1.72, 0, 0, 0, util.VN_CURDATE()),
(31, 2, 23, 'Melee weapon combat fist 15cm', -5, 7.08, 0, 0, 0, util.VN_CURDATE()),
- (32, 1, 24, 'Ranged weapon longbow 2m', -1, 8.07, 0, 0, 0, util.VN_CURDATE()),
+ (32, 1, 24, 'Ranged weapon longbow 200cm', -1, 8.07, 0, 0, 0, util.VN_CURDATE()),
(33, 5, 14, 'Ranged weapon pistol 9mm', 50, 1.79, 0, 0, 0, util.VN_CURDATE()),
- (34, 4, 28, 'Melee weapon heavy shield 1x0.5m', 20, 1.72, 0, 0, 0, util.VN_CURDATE()),
- (35, 4, 29, 'Melee weapon heavy shield 1x0.5m', 20, 1.72, 0, 0, 0, util.VN_CURDATE()),
- (37, 4, 31, 'Melee weapon heavy shield 1x0.5m', 20, 1.72, 0, 0, 0, util.VN_CURDATE()),
- (36, 4, 30, 'Melee weapon heavy shield 1x0.5m', 20, 1.72, 0, 0, 0, util.VN_CURDATE()),
+ (34, 4, 28, 'Melee weapon heavy shield 100cm', 20, 1.72, 0, 0, 0, util.VN_CURDATE()),
+ (35, 4, 29, 'Melee weapon heavy shield 100cm', 20, 1.72, 0, 0, 0, util.VN_CURDATE()),
+ (37, 4, 31, 'Melee weapon heavy shield 100cm', 20, 1.72, 0, 0, 0, util.VN_CURDATE()),
+ (36, 4, 30, 'Melee weapon heavy shield 100cm', 20, 1.72, 0, 0, 0, util.VN_CURDATE()),
(38, 2, 32, 'Melee weapon combat fist 15cm', 30, 7.07, 0, 0, 0, DATE_ADD(util.VN_CURDATE(), INTERVAL +1 MONTH)),
- (39, 1, 32, 'Ranged weapon longbow 2m', 2, 103.49, 0, 0, 0, util.VN_CURDATE());
+ (39, 1, 32, 'Ranged weapon longbow 200cm', 2, 103.49, 0, 0, 0, util.VN_CURDATE());
INSERT INTO `vn`.`saleComponent`(`saleFk`, `componentFk`, `value`)
VALUES
@@ -1259,7 +1261,7 @@ INSERT INTO `vn`.`tag`(`id`, `code`, `name`, `isFree`, `isQuantitatif`, `sourceT
(5, NULL, 'Diámetro', 1, 1, NULL, 'mm',NULL, 'diameter'),
(7, NULL, 'Ancho de la base', 1, 1, NULL, 'mm',NULL, NULL),
(23, 'stems', 'Tallos', 1, 1, NULL, NULL, NULL, 'stems'),
- (27, NULL, 'Longitud(cm)', 1, 1, NULL, 'cm', NULL, NULL),
+ (27, NULL, 'Longitud(cm)', 1, 1, NULL, 'cm', NULL, 'size'),
(36, 'producer', 'Proveedor', 1, 0, NULL, NULL, NULL, 'producer'),
(56, NULL, 'Genero', 1, 0, NULL, NULL, NULL, NULL),
(58, NULL, 'Variedad', 1, 0, NULL, NULL, NULL, NULL),
@@ -1270,7 +1272,7 @@ INSERT INTO `vn`.`itemTag`(`id`,`itemFk`,`tagFk`,`value`,`priority`)
VALUES
(1, 1, 56, 'Ranged weapon', 1),
(2, 1, 58, 'longbow', 2),
- (3, 1, 27, '2m', 3),
+ (3, 1, 27, '200cm', 3),
(4, 1, 36, 'Stark Industries', 4),
(5, 1, 1, 'Brown', 5),
(6, 1, 67, '+1 precission', 6),
@@ -1284,42 +1286,42 @@ INSERT INTO `vn`.`itemTag`(`id`,`itemFk`,`tagFk`,`value`,`priority`)
(14, 2, 23, '2', 7),
(15, 3, 56, 'Ranged weapon', 1),
(16, 3, 58, 'sniper rifle', 2),
- (17, 3, 4, '300mm', 3),
+ (17, 3, 4, '113cm', 3),
(18, 3, 36, 'Stark Industries', 4),
(19, 3, 1, 'Green', 5),
(20, 3, 67, 'precission', 6),
(21, 3, 23, '3', 7),
(22, 4, 56, 'Melee weapon', 1),
(23, 4, 58, 'heavy shield', 2),
- (24, 4, 4, '1x0.5m', 3),
+ (24, 4, 4, '100cm', 3),
(25, 4, 36, 'Stark Industries', 4),
(26, 4, 1, 'Black', 5),
(27, 4, 67, 'containtment', 6),
(28, 4, 23, '4', 7),
(29, 5, 56, 'Ranged weapon', 1),
(30, 5, 58, 'pistol', 2),
- (31, 5, 27, '9mm', 3),
+ (31, 5, 67, '9mm', 3),
(32, 5, 36, 'Stark Industries', 4),
(33, 5, 1, 'Silver', 5),
- (34, 5, 67, 'rapid fire', 6),
+ (34, 5, 27, '15cm', 6),
(35, 5, 23, '5', 7),
(36, 6, 56, 'Container', 1),
(37, 6, 58, 'ammo box', 2),
- (38, 6, 27, '1m', 3),
+ (38, 6, 27, '100cm', 3),
(39, 6, 36, 'Stark Industries', 4),
(40, 6, 1, 'Green', 5),
(41, 6, 67, 'supply', 6),
(42, 6, 23, '6', 7),
(43, 7, 56, 'Container', 1),
(44, 7, 58, 'medical box', 2),
- (45, 7, 27, '1m', 3),
+ (45, 7, 27, '100cm', 3),
(46, 7, 36, 'Stark Industries', 4),
(47, 7, 1, 'White', 5),
(48, 7, 67, 'supply', 6),
(49, 7, 23, '7', 7),
(50, 8, 56, 'Ranged Reinforced weapon', 1),
(51, 8, 58, '+1 longbow', 2),
- (52, 8, 27, '2m', 3),
+ (52, 8, 27, '200cm', 3),
(53, 8, 36, 'Stark Industries', 4),
(54, 8, 1, 'Brown', 5),
(55, 8, 67, 'precission', 6),
@@ -1333,14 +1335,14 @@ INSERT INTO `vn`.`itemTag`(`id`,`itemFk`,`tagFk`,`value`,`priority`)
(63, 9, 23, '9', 7),
(64, 10, 56, 'Ranged Reinforced weapon', 1),
(65, 10, 58, 'sniper rifle', 2),
- (66, 10, 4, '300mm', 3),
+ (66, 10, 67, '700mm', 3),
(67, 10, 36, 'Stark Industries', 4),
(68, 10, 1, 'Green', 5),
- (69, 10, 67, 'precission', 6),
+ (69, 10, 27, '130cm', 6),
(70, 10, 23, '10', 7),
(71, 11, 56, 'Melee Reinforced weapon', 1),
(72, 11, 58, 'heavy shield', 2),
- (73, 11, 4, '1x0.5m', 3),
+ (73, 11, 4, '120cm', 3),
(74, 11, 36, 'Stark Industries', 4),
(75, 11, 1, 'Black', 5),
(76, 11, 67, 'containtment', 6),
@@ -1350,18 +1352,18 @@ INSERT INTO `vn`.`itemTag`(`id`,`itemFk`,`tagFk`,`value`,`priority`)
(80, 12, 27, '9mm', 3),
(81, 12, 36, 'Stark Industries', 4),
(82, 12, 1, 'Silver', 5),
- (83, 12, 67, 'rapid fire', 6),
+ (83, 12, 67, '23cm', 6),
(84, 12, 23, '12', 7),
(85, 13, 56, 'Chest', 1),
(86, 13, 58, 'ammo box', 2),
- (87, 13, 27, '1m', 3),
+ (87, 13, 27, '100cm', 3),
(88, 13, 36, 'Stark Industries', 4),
(89, 13, 1, 'Green', 5),
(90, 13, 67, 'supply', 6),
(91, 13, 23, '13', 7),
(92, 14, 56, 'Chest', 1),
(93, 14, 58, 'medical box', 2),
- (94, 14, 27, '1m', 3),
+ (94, 14, 27, '100cm', 3),
(95, 14, 36, 'Stark Industries', 4),
(96, 14, 1, 'White', 5),
(97, 14, 67, 'supply', 6),
@@ -1927,9 +1929,9 @@ INSERT INTO `vn`.`workerTeam`(`id`, `team`, `workerFk`)
INSERT INTO `vn`.`ticketRequest`(`id`, `description`, `requesterFk`, `attenderFk`, `quantity`, `itemFk`, `price`, `isOk`, `saleFk`, `ticketFk`, `created`)
VALUES
- (1, 'Ranged weapon longbow 2m', 18, 35, 5, 1, 9.10, 1, 1, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL -15 DAY)),
+ (1, 'Ranged weapon longbow 200cm', 18, 35, 5, 1, 9.10, 1, 1, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL -15 DAY)),
(2, 'Melee weapon combat first 15cm', 18, 35, 10, 2, 1.07, 0, NULL, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL -15 DAY)),
- (3, 'Melee weapon heavy shield 1x0.5m', 18, 35, 20, NULL, 3.06, NULL, NULL, 23, util.VN_CURDATE()),
+ (3, 'Melee weapon heavy shield 100cm', 18, 35, 20, NULL, 3.06, NULL, NULL, 23, util.VN_CURDATE()),
(4, 'Melee weapon combat first 15cm', 18, 35, 15, NULL, 1.30, NULL, NULL, 11, util.VN_CURDATE()),
(5, 'Melee weapon combat first 15cm', 18, 35, 15, 4, 1.30, 0, NULL, 18, util.VN_CURDATE());
@@ -1965,6 +1967,8 @@ INSERT INTO `vn`.`calendarType` (`id`, `description`, `hoursWeek`, `isPartial`)
VALUES
(1, 'General schedule', 40, 0);
+INSERT INTO `vn`.`workerBusinessAgreement` (`id`, `name`, `monthHolidays`, `yearHours`, `started`, `ended`)
+ VALUES(1, 'flowers', 2.5, 1830, '2001-01-01', NULL);
DROP TEMPORARY TABLE IF EXISTS tmp.worker;
CREATE TEMPORARY TABLE tmp.worker
@@ -2830,7 +2834,7 @@ INSERT INTO `vn`.`ticketLog` (`originFk`, userFk, `action`, changedModel, oldIns
(7, 18, 'update', 'Sale', '{"quantity":1}', '{"quantity":10}', 1, NULL),
(7, 18, 'update', 'Ticket', '{"quantity":1,"concept":"Chest ammo box"}', '{"quantity":10,"concept":"Chest ammo box"}', 1, NULL),
(7, 18, 'update', 'Sale', '{"price":3}', '{"price":5}', 1, NULL),
- (7, 18, 'update', NULL, NULL, NULL, NULL, "Cambio cantidad Melee weapon heavy shield 1x0.5m de '5' a '10'"),
+ (7, 18, 'update', NULL, NULL, NULL, NULL, "Cambio cantidad Melee weapon heavy shield 100cm de '5' a '10'"),
(16, 9, 'update', 'Sale', '{"quantity":10,"concept":"Shield", "price": 10.5, "itemFk": 1}', '{"quantity":8,"concept":"Shield", "price": 10.5, "itemFk": 1}' , 5689, 'Shield');
@@ -2896,11 +2900,11 @@ INSERT INTO `vn`.`deviceProductionState` (`code`, `description`)
('retired', 'retirada');
INSERT INTO `vn`.`deviceProduction` (`imei`, `modelFk`, `macWifi`, `serialNumber`, `android_id`, `purchased`, `stateFk`, `isInScalefusion`, `description`)
- VALUES
- ('ime1', 'BLACKVIEW', 'macWifi1', 'serialNumber1', 'android_id1', util.VN_NOW(), 'active', 0, NULL),
- ('ime2', 'DODGEE', 'macWifi2', 'serialNumber2', 'android_id2', util.VN_NOW(), 'idle', 0, NULL),
- ('ime3', 'ZEBRA', 'macWifi3', 'serialNumber3', 'android_id3', util.VN_NOW(), 'active', 0, NULL),
- ('ime4', 'BLACKVIEW', 'macWifi4', 'serialNumber4', 'android_id4', util.VN_NOW(), 'idle', 0, NULL);
+VALUES
+ ('ime1', 'BLACKVIEW', 'macWifi1', 'serialNumber1', 'androidid11234567890', util.VN_NOW(), 'active', 0, NULL),
+ ('ime2', 'DODGEE', 'macWifi2', 'serialNumber2', 'androidid21234567890', util.VN_NOW(), 'idle', 0, NULL),
+ ('ime3', 'ZEBRA', 'macWifi3', 'serialNumber3', 'androidid31234567890', util.VN_NOW(), 'active', 0, NULL),
+ ('ime4', 'BLACKVIEW', 'macWifi4', 'serialNumber4', 'androidid41234567890', util.VN_NOW(), 'idle', 0, NULL);
INSERT INTO `vn`.`deviceProductionUser` (`deviceProductionFk`, `userFk`, `created`)
VALUES
diff --git a/db/dump/structure.sql b/db/dump/structure.sql
index c47d0debc..b5a50bad1 100644
--- a/db/dump/structure.sql
+++ b/db/dump/structure.sql
@@ -1,7 +1,6 @@
--- MariaDB dump 10.19 Distrib 10.5.15-MariaDB, for debian-linux-gnu (x86_64)
+-- MariaDB dump 10.19 Distrib 10.5.19-MariaDB, for debian-linux-gnu (x86_64)
--
-
--- Host: db1.static.verdnatura.es Database: account
+-- Host: db2.static.verdnatura.es Database: account
-- ------------------------------------------------------
-- Server version 10.7.7-MariaDB-1:10.7.7+maria~deb11-log
@@ -157,10 +156,9 @@ DROP TABLE IF EXISTS `accountDovecot`;
/*!50001 DROP VIEW IF EXISTS `accountDovecot`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `accountDovecot` (
- `name` tinyint NOT NULL,
- `password` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `accountDovecot` AS SELECT
+ 1 AS `name`,
+ 1 AS `password` */;
SET character_set_client = @saved_cs_client;
--
@@ -190,10 +188,9 @@ DROP TABLE IF EXISTS `emailUser`;
/*!50001 DROP VIEW IF EXISTS `emailUser`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `emailUser` (
- `userFk` tinyint NOT NULL,
- `email` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `emailUser` AS SELECT
+ 1 AS `userFk`,
+ 1 AS `email` */;
SET character_set_client = @saved_cs_client;
--
@@ -455,9 +452,8 @@ DROP TABLE IF EXISTS `myRole`;
/*!50001 DROP VIEW IF EXISTS `myRole`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `myRole` (
- `id` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `myRole` AS SELECT
+ 1 AS `id` */;
SET character_set_client = @saved_cs_client;
--
@@ -468,16 +464,15 @@ DROP TABLE IF EXISTS `myUser`;
/*!50001 DROP VIEW IF EXISTS `myUser`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `myUser` (
- `id` tinyint NOT NULL,
- `name` tinyint NOT NULL,
- `active` tinyint NOT NULL,
- `email` tinyint NOT NULL,
- `nickname` tinyint NOT NULL,
- `lang` tinyint NOT NULL,
- `role` tinyint NOT NULL,
- `recoverPass` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `myUser` AS SELECT
+ 1 AS `id`,
+ 1 AS `name`,
+ 1 AS `active`,
+ 1 AS `email`,
+ 1 AS `nickname`,
+ 1 AS `lang`,
+ 1 AS `role`,
+ 1 AS `recoverPass` */;
SET character_set_client = @saved_cs_client;
--
@@ -765,6 +760,7 @@ CREATE TABLE `user` (
`hasGrant` tinyint(1) NOT NULL,
`editorFk` int(10) unsigned DEFAULT NULL,
`passExpired` date DEFAULT NULL,
+ `twoFactor` enum('email') DEFAULT NULL COMMENT 'Two-factor auth type',
PRIMARY KEY (`id`),
UNIQUE KEY `name` (`name`),
UNIQUE KEY `mail` (`email`),
@@ -992,6 +988,8 @@ CREATE TABLE `userSync` (
--
-- Dumping routines for database 'account'
--
+/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `myUser_checkLogin` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -999,8 +997,6 @@ CREATE TABLE `userSync` (
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `myUser_checkLogin`() RETURNS tinyint(1)
READS SQL DATA
@@ -1031,6 +1027,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `myUser_getId` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -1038,8 +1036,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `myUser_getId`() RETURNS int(11)
READS SQL DATA
@@ -1067,6 +1063,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `myUser_getName` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -1074,8 +1072,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `myUser_getName`() RETURNS varchar(30) CHARSET utf8mb3 COLLATE utf8mb3_general_ci
NO SQL
@@ -1102,6 +1098,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `myUser_hasRole` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -1109,8 +1107,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `myUser_hasRole`(vRoleName VARCHAR(255)) RETURNS tinyint(1)
DETERMINISTIC
@@ -1128,6 +1124,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `myUser_hasRoleId` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -1135,8 +1133,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `myUser_hasRoleId`(vRoleId INT) RETURNS tinyint(1)
DETERMINISTIC
@@ -1154,6 +1150,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `passwordGenerate` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -1161,8 +1159,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `passwordGenerate`() RETURNS text CHARSET utf8mb3 COLLATE utf8mb3_unicode_ci
READS SQL DATA
@@ -1218,6 +1214,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `toUnixDays` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -1225,8 +1223,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `toUnixDays`(vDate DATE) RETURNS int(11)
DETERMINISTIC
@@ -1244,6 +1240,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `user_getMysqlRole` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -1251,8 +1249,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `user_getMysqlRole`(vUserName VARCHAR(255)) RETURNS varchar(255) CHARSET utf8mb3 COLLATE utf8mb3_unicode_ci
DETERMINISTIC
@@ -1279,6 +1275,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `user_getNameFromId` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -1286,8 +1284,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `user_getNameFromId`(vSelf INT) RETURNS varchar(30) CHARSET utf8mb3 COLLATE utf8mb3_unicode_ci
DETERMINISTIC
@@ -1311,6 +1307,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `user_hasRole` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -1318,8 +1316,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `user_hasRole`(vUserName VARCHAR(255), vRoleName VARCHAR(255)) RETURNS tinyint(1)
DETERMINISTIC
@@ -1347,6 +1343,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `user_hasRoleId` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -1354,8 +1352,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `user_hasRoleId`(vUser VARCHAR(255), vRoleId INT) RETURNS tinyint(1)
DETERMINISTIC
@@ -1383,6 +1379,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `myUser_login` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -1390,8 +1388,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `myUser_login`(vUserName VARCHAR(255), vPassword VARCHAR(255))
READS SQL DATA
@@ -1421,6 +1417,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `myUser_loginWithKey` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -1428,8 +1426,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `myUser_loginWithKey`(vUserName VARCHAR(255), vKey VARCHAR(255))
READS SQL DATA
@@ -1455,6 +1451,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `myUser_loginWithName` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -1462,8 +1460,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `myUser_loginWithName`(vUserName VARCHAR(255))
READS SQL DATA
@@ -1492,6 +1488,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `myUser_logout` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -1499,8 +1497,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `myUser_logout`()
BEGIN
@@ -1516,6 +1512,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `role_checkName` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -1523,8 +1521,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `role_checkName`(vRoleName VARCHAR(255))
BEGIN
@@ -1545,6 +1541,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `role_getDescendents` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -1552,8 +1550,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `role_getDescendents`(vSelf INT)
BEGIN
@@ -1622,6 +1618,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `role_sync` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -1629,8 +1627,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `role_sync`()
BEGIN
@@ -1686,6 +1682,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `role_syncPrivileges` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -1693,8 +1691,6 @@ DELIMITER ;
/*!50003 SET character_set_client = utf8mb3 */ ;
/*!50003 SET character_set_results = utf8mb3 */ ;
/*!50003 SET collation_connection = utf8mb3_general_ci */ ;
-/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
-/*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `role_syncPrivileges`()
BEGIN
@@ -2264,6 +2260,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `user_checkName` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -2271,8 +2269,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `user_checkName`(vUserName VARCHAR(255))
BEGIN
@@ -2292,6 +2288,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `user_checkPassword` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -2299,8 +2297,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `user_checkPassword`(vPassword VARCHAR(255))
BEGIN
@@ -2377,16 +2373,15 @@ DROP TABLE IF EXISTS `bajasLaborales`;
/*!50001 DROP VIEW IF EXISTS `bajasLaborales`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `bajasLaborales` (
- `firstname` tinyint NOT NULL,
- `name` tinyint NOT NULL,
- `businessFk` tinyint NOT NULL,
- `lastDate` tinyint NOT NULL,
- `endContract` tinyint NOT NULL,
- `type` tinyint NOT NULL,
- `dias` tinyint NOT NULL,
- `userFk` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `bajasLaborales` AS SELECT
+ 1 AS `firstname`,
+ 1 AS `name`,
+ 1 AS `businessFk`,
+ 1 AS `lastDate`,
+ 1 AS `endContract`,
+ 1 AS `type`,
+ 1 AS `dias`,
+ 1 AS `userFk` */;
SET character_set_client = @saved_cs_client;
--
@@ -2460,6 +2455,23 @@ CREATE TABLE `clientDied` (
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci COMMENT='Clientes que no han comprado en los ultimos 3 meses, se actualiza con proceso nocturno el 3 de cada mes';
/*!40101 SET character_set_client = @saved_cs_client */;
+--
+-- Table structure for table `clientDiedPeriod`
+--
+
+DROP TABLE IF EXISTS `clientDiedPeriod`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `clientDiedPeriod` (
+ `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `countryFk` mediumint(8) unsigned NOT NULL,
+ `days` int(11) NOT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `clientDiedPeriod_UN` (`countryFk`),
+ CONSTRAINT `clientDiedPeriod_FK` FOREIGN KEY (`countryFk`) REFERENCES `vn`.`country` (`id`) ON UPDATE CASCADE
+) ENGINE=InnoDBDEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci COMMENT='Define lo que es un periodo para los clientes de los diferentes países';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
--
-- Table structure for table `clientNewBorn`
--
@@ -2649,6 +2661,43 @@ CREATE TABLE `inspeccionSS_2021` (
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci COMMENT='bs.inspeccionSS_2021_add()';
/*!40101 SET character_set_client = @saved_cs_client */;
+--
+-- Table structure for table `inventoryDiscrepancy`
+--
+
+DROP TABLE IF EXISTS `inventoryDiscrepancy`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `inventoryDiscrepancy` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `warehouseFk` int(11) NOT NULL,
+ `timed` timestamp NOT NULL DEFAULT current_timestamp(),
+ `alert` int(11) NOT NULL DEFAULT 0,
+ `quantity` int(11) NOT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDBDEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci COMMENT='This table collects the discrepancies between theorical inventory and located items';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `inventoryDiscrepancyDetail`
+--
+
+DROP TABLE IF EXISTS `inventoryDiscrepancyDetail`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `inventoryDiscrepancyDetail` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `warehouseFk` int(11) NOT NULL,
+ `itemFk` int(11) NOT NULL,
+ `theorical` int(11) DEFAULT NULL COMMENT 'theorical stock: purchases vs. sales',
+ `visible` int(11) DEFAULT NULL COMMENT 'located stock',
+ `notPicked` int(11) DEFAULT NULL COMMENT 'sales not picked yet',
+ `alert` int(11) DEFAULT NULL COMMENT 'alert level for this discrepancy',
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `inventoryDiscrepancyDetail_UN` (`warehouseFk`,`itemFk`)
+) ENGINE=InnoDBDEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci COMMENT='Last discrepancies';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
--
-- Temporary table structure for view `lastIndicators`
--
@@ -2657,31 +2706,30 @@ DROP TABLE IF EXISTS `lastIndicators`;
/*!50001 DROP VIEW IF EXISTS `lastIndicators`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `lastIndicators` (
- `updated` tinyint NOT NULL,
- `lastYearSales` tinyint NOT NULL,
- `incLastYearSales` tinyint NOT NULL,
- `totalGreuge` tinyint NOT NULL,
- `incTotalGreuge` tinyint NOT NULL,
- `latePaymentRate` tinyint NOT NULL,
- `incLatePaymentRate` tinyint NOT NULL,
- `countEmployee` tinyint NOT NULL,
- `incCountEmployee` tinyint NOT NULL,
- `averageMana` tinyint NOT NULL,
- `incAverageMana` tinyint NOT NULL,
- `bankingPool` tinyint NOT NULL,
- `incbankingPool` tinyint NOT NULL,
- `lastMonthActiveClients` tinyint NOT NULL,
- `incLastMonthActiveClients` tinyint NOT NULL,
- `lastMonthLostClients` tinyint NOT NULL,
- `incLastMonthLostClients` tinyint NOT NULL,
- `lastMonthNewClients` tinyint NOT NULL,
- `incLastMonthNewClients` tinyint NOT NULL,
- `lastMonthWebBuyingRate` tinyint NOT NULL,
- `incLastMonthWebBuyingRate` tinyint NOT NULL,
- `thisWeekSales` tinyint NOT NULL,
- `lastYearWeekSales` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `lastIndicators` AS SELECT
+ 1 AS `updated`,
+ 1 AS `lastYearSales`,
+ 1 AS `incLastYearSales`,
+ 1 AS `totalGreuge`,
+ 1 AS `incTotalGreuge`,
+ 1 AS `latePaymentRate`,
+ 1 AS `incLatePaymentRate`,
+ 1 AS `countEmployee`,
+ 1 AS `incCountEmployee`,
+ 1 AS `averageMana`,
+ 1 AS `incAverageMana`,
+ 1 AS `bankingPool`,
+ 1 AS `incbankingPool`,
+ 1 AS `lastMonthActiveClients`,
+ 1 AS `incLastMonthActiveClients`,
+ 1 AS `lastMonthLostClients`,
+ 1 AS `incLastMonthLostClients`,
+ 1 AS `lastMonthNewClients`,
+ 1 AS `incLastMonthNewClients`,
+ 1 AS `lastMonthWebBuyingRate`,
+ 1 AS `incLastMonthWebBuyingRate`,
+ 1 AS `thisWeekSales`,
+ 1 AS `lastYearWeekSales` */;
SET character_set_client = @saved_cs_client;
--
@@ -2802,13 +2850,12 @@ DROP TABLE IF EXISTS `packingSpeed`;
/*!50001 DROP VIEW IF EXISTS `packingSpeed`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `packingSpeed` (
- `hora` tinyint NOT NULL,
- `minuto` tinyint NOT NULL,
- `cm3` tinyint NOT NULL,
- `warehouse_id` tinyint NOT NULL,
- `odbc_date` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `packingSpeed` AS SELECT
+ 1 AS `hora`,
+ 1 AS `minuto`,
+ 1 AS `cm3`,
+ 1 AS `warehouse_id`,
+ 1 AS `odbc_date` */;
SET character_set_client = @saved_cs_client;
--
@@ -2858,13 +2905,12 @@ DROP TABLE IF EXISTS `s1_ticketDetail`;
/*!50001 DROP VIEW IF EXISTS `s1_ticketDetail`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `s1_ticketDetail` (
- `ticketFk` tinyint NOT NULL,
- `ticketAmount` tinyint NOT NULL,
- `ticketLines` tinyint NOT NULL,
- `ticketM3` tinyint NOT NULL,
- `shipped` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `s1_ticketDetail` AS SELECT
+ 1 AS `ticketFk`,
+ 1 AS `ticketAmount`,
+ 1 AS `ticketLines`,
+ 1 AS `ticketM3`,
+ 1 AS `shipped` */;
SET character_set_client = @saved_cs_client;
--
@@ -2875,20 +2921,19 @@ DROP TABLE IF EXISTS `s21_saleDetail`;
/*!50001 DROP VIEW IF EXISTS `s21_saleDetail`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `s21_saleDetail` (
- `dia` tinyint NOT NULL,
- `año` tinyint NOT NULL,
- `mes` tinyint NOT NULL,
- `concepto` tinyint NOT NULL,
- `unidades` tinyint NOT NULL,
- `precio` tinyint NOT NULL,
- `venta` tinyint NOT NULL,
- `familia` tinyint NOT NULL,
- `comprador` tinyint NOT NULL,
- `itemFk` tinyint NOT NULL,
- `ticketFk` tinyint NOT NULL,
- `volume` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `s21_saleDetail` AS SELECT
+ 1 AS `dia`,
+ 1 AS `año`,
+ 1 AS `mes`,
+ 1 AS `concepto`,
+ 1 AS `unidades`,
+ 1 AS `precio`,
+ 1 AS `venta`,
+ 1 AS `familia`,
+ 1 AS `comprador`,
+ 1 AS `itemFk`,
+ 1 AS `ticketFk`,
+ 1 AS `volume` */;
SET character_set_client = @saved_cs_client;
--
@@ -2928,7 +2973,6 @@ DROP TABLE IF EXISTS `salesByItemTypeDay`;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `salesByItemTypeDay` (
`itemTypeFk` smallint(5) unsigned NOT NULL,
- `itemCategoryFk` int(10) unsigned NOT NULL,
`dated` date NOT NULL,
`netSale` int(11) NOT NULL DEFAULT 0,
`stems` int(11) NOT NULL DEFAULT 0,
@@ -2939,13 +2983,10 @@ CREATE TABLE `salesByItemTypeDay` (
`accepted` decimal(10,2) NOT NULL DEFAULT 0.00,
`sale` decimal(10,2) NOT NULL DEFAULT 0.00,
`buy` decimal(10,2) NOT NULL DEFAULT 0.00,
- `saleComponent` decimal(10,2) NOT NULL DEFAULT 0.00,
`costComponent` decimal(10,2) NOT NULL DEFAULT 0.00,
`marginComponent` decimal(10,2) NOT NULL DEFAULT 0.00,
PRIMARY KEY (`itemTypeFk`,`dated`),
- KEY `itemTypeSalesByweek_itemCategoryFk_idx` (`itemCategoryFk`),
KEY `itemTypeSalesByweek_period_idx` (`dated`),
- CONSTRAINT `itemTypeSalesByweek_itemCategoryFk` FOREIGN KEY (`itemCategoryFk`) REFERENCES `vn`.`itemCategory` (`id`) ON UPDATE CASCADE,
CONSTRAINT `itemTypeSalesByweek_itemTypeFk` FOREIGN KEY (`itemTypeFk`) REFERENCES `vn`.`itemType` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci COMMENT='Ventas diarias agrupadas por reino y familia';
/*!40101 SET character_set_client = @saved_cs_client */;
@@ -3083,16 +3124,15 @@ DROP TABLE IF EXISTS `ventas`;
/*!50001 DROP VIEW IF EXISTS `ventas`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `ventas` (
- `Id_Movimiento` tinyint NOT NULL,
- `importe` tinyint NOT NULL,
- `recargo` tinyint NOT NULL,
- `fecha` tinyint NOT NULL,
- `tipo_id` tinyint NOT NULL,
- `Id_Cliente` tinyint NOT NULL,
- `empresa_id` tinyint NOT NULL,
- `margen` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `ventas` AS SELECT
+ 1 AS `Id_Movimiento`,
+ 1 AS `importe`,
+ 1 AS `recargo`,
+ 1 AS `fecha`,
+ 1 AS `tipo_id`,
+ 1 AS `Id_Cliente`,
+ 1 AS `empresa_id`,
+ 1 AS `margen` */;
SET character_set_client = @saved_cs_client;
--
@@ -3205,7 +3245,63 @@ CREATE TABLE `workerProductivityConfig` (
-- Dumping events for database 'bs'
--
/*!50106 SET @save_time_zone= @@TIME_ZONE */ ;
-/*!50106 DROP EVENT IF EXISTS `nightTask_launchAll` */;
+/*!50106 DROP EVENT IF EXISTS `clientDied_recalc` */;
+DELIMITER ;;
+/*!50003 SET @saved_cs_client = @@character_set_client */ ;;
+/*!50003 SET @saved_cs_results = @@character_set_results */ ;;
+/*!50003 SET @saved_col_connection = @@collation_connection */ ;;
+/*!50003 SET character_set_client = utf8mb4 */ ;;
+/*!50003 SET character_set_results = utf8mb4 */ ;;
+/*!50003 SET collation_connection = utf8mb4_unicode_ci */ ;;
+/*!50003 SET @saved_sql_mode = @@sql_mode */ ;;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;;
+/*!50003 SET @saved_time_zone = @@time_zone */ ;;
+/*!50003 SET time_zone = 'SYSTEM' */ ;;
+/*!50106 CREATE*/ /*!50117 DEFINER=`root`@`localhost`*/ /*!50106 EVENT `clientDied_recalc` ON SCHEDULE EVERY 1 DAY STARTS '2023-06-01 03:00:00' ON COMPLETION PRESERVE DISABLE ON SLAVE DO BEGIN
+ DECLARE vDone INT DEFAULT FALSE;
+ DECLARE vCountryFk INT;
+ DECLARE vDays INT;
+
+ DECLARE cur CURSOR FOR
+ SELECT countryFk, days
+ FROM clientDiedPeriod;
+ DECLARE CONTINUE HANDLER FOR NOT FOUND SET vDone = TRUE;
+
+ OPEN cur;
+ read_loop: LOOP
+ SET vDone = FALSE;
+ FETCH cur INTO vCountryFk, vDays;
+ IF vDone THEN
+ LEAVE read_loop;
+ END IF;
+ CALL clientDied_recalc(vDays, (SELECT code FROM vn.country WHERE id = vCountryFk));
+ END LOOP;
+ CLOSE cur;
+END */ ;;
+/*!50003 SET time_zone = @saved_time_zone */ ;;
+/*!50003 SET sql_mode = @saved_sql_mode */ ;;
+/*!50003 SET character_set_client = @saved_cs_client */ ;;
+/*!50003 SET character_set_results = @saved_cs_results */ ;;
+/*!50003 SET collation_connection = @saved_col_connection */ ;;
+/*!50106 DROP EVENT IF EXISTS `inventoryDiscrepancy_launch` */;;
+DELIMITER ;;
+/*!50003 SET @saved_cs_client = @@character_set_client */ ;;
+/*!50003 SET @saved_cs_results = @@character_set_results */ ;;
+/*!50003 SET @saved_col_connection = @@collation_connection */ ;;
+/*!50003 SET character_set_client = utf8mb3 */ ;;
+/*!50003 SET character_set_results = utf8mb3 */ ;;
+/*!50003 SET collation_connection = utf8mb3_general_ci */ ;;
+/*!50003 SET @saved_sql_mode = @@sql_mode */ ;;
+/*!50003 SET sql_mode = '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 `inventoryDiscrepancy_launch` ON SCHEDULE EVERY 15 MINUTE STARTS '2023-07-18 00:00:00' ON COMPLETION PRESERVE DISABLE ON SLAVE DO CALL bs.inventoryDiscrepancyDetail_replace() */ ;;
+/*!50003 SET time_zone = @saved_time_zone */ ;;
+/*!50003 SET sql_mode = @saved_sql_mode */ ;;
+/*!50003 SET character_set_client = @saved_cs_client */ ;;
+/*!50003 SET character_set_results = @saved_cs_results */ ;;
+/*!50003 SET collation_connection = @saved_col_connection */ ;;
+/*!50106 DROP EVENT IF EXISTS `nightTask_launchAll` */;;
DELIMITER ;;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;;
@@ -3229,6 +3325,8 @@ DELIMITER ;
--
-- Dumping routines for database 'bs'
--
+/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `tramo` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -3236,8 +3334,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `tramo`(vDateTime DATETIME) RETURNS varchar(20) CHARSET utf8mb3 COLLATE utf8mb3_unicode_ci
NO SQL
@@ -3261,6 +3357,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `bancos_evolution_add` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -3268,8 +3366,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `bancos_evolution_add`(vStartingDate DATE)
BEGIN
@@ -3386,6 +3482,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `campaignComparative` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -3393,8 +3491,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `campaignComparative`(vDateFrom DATE, vDateTo DATE)
BEGIN
@@ -3441,6 +3537,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `carteras_add` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -3448,8 +3546,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `carteras_add`()
BEGIN
@@ -3473,6 +3569,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `clean` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -3480,8 +3578,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `clean`()
BEGIN
@@ -3522,6 +3618,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `clientDied_recalc` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -3529,46 +3627,77 @@ DELIMITER ;
/*!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 ;;
-CREATE DEFINER=`root`@`localhost` PROCEDURE `clientDied_recalc`()
+CREATE DEFINER=`root`@`localhost` PROCEDURE `clientDied_recalc`(
+ vDays INT,
+ vCountryCode VARCHAR(2)
+)
BEGIN
- SET @primerAviso := TIMESTAMPADD(MONTH,-1,util.VN_CURDATE());
- SET @segundoAviso := TIMESTAMPADD(MONTH,-2,util.VN_CURDATE());
- SET @tercerAviso := TIMESTAMPADD(MONTH,-3,util.VN_CURDATE());
+/**
+ * Recalcula los clientes inactivos y hace insert en la tabla clientDied
+ * estableciendo hasta 3 avisos en función del periodo y el código de país.
+ *
+ * @param vDays El número de días a considerar para la inactividad del cliente
+ * @param vCountryCode El código del país para filtrar los clientes
+ */
+ DECLARE vFirstPeriod , vSecondPeriod, vThridPeriod DATE;
+ SET vFirstPeriod = util.VN_CURDATE() - INTERVAL vDays DAY;
+ SET vSecondPeriod = util.VN_CURDATE() - INTERVAL vDays * 2 DAY;
+ SET vThridPeriod = util.VN_CURDATE() - INTERVAL vDays * 3 DAY;
- TRUNCATE TABLE bs.clientDied;
+ DELETE cd.* FROM clientDied cd
+ JOIN (
+ SELECT c.id FROM vn.client c
+ JOIN vn.country co ON co.id = c.countryFk
+ WHERE co.code = vCountryCode
+ ) sub ON sub.id = cd.id;
- INSERT INTO bs.clientDied
- SELECT c.id,
- c.name clientName,
- maxIssued lastInvoiced,
- w.code workerCode,
- b.code Boss,
+ INSERT INTO clientDied (id, clientName, lastInvoiced, workerCode, Boss, Aviso)
+ SELECT c.id,
+ c.name,
+ sub.lastShipped,
+ w.code,
+ b.code,
CASE
- WHEN IFNULL(maxIssued,'2000-01-01') < @tercerAviso THEN 'Tercer Aviso'
- WHEN maxIssued < @segundoAviso THEN 'Segundo Aviso'
- WHEN maxIssued < @primerAviso THEN 'Primer Aviso'
- END as Aviso
+ WHEN lastShipped < vThridPeriod OR lastShipped IS NULL THEN 'Tercer Aviso'
+ WHEN lastShipped < vSecondPeriod THEN 'Segundo Aviso'
+ WHEN lastShipped < vFirstPeriod THEN 'Primer Aviso'
+ END
FROM vn.client c
+ JOIN vn.country co ON co .id = c.countryFk
JOIN vn.worker w ON w.id = c.salesPersonFk
JOIN vn.worker b ON b.id = w.bossFk
JOIN vn.workerMana wm ON wm.workerFk = c.salesPersonFk
- LEFT JOIN (SELECT clientFk, max(issued) as maxIssued FROM vn.invoiceOut GROUP BY clientFk) io ON io.clientFk = c.id
- WHERE (maxIssued IS NULL OR maxIssued < @primerAviso)
- AND c.created < @tercerAviso;
-
- DELETE cd.* FROM bs.clientDied cd
- JOIN vn.ticket t ON t.clientFk = cd.id
- WHERE t.refFk IS NULL
- AND t.shipped >=TIMESTAMPADD(MONTH,-1,util.VN_CURDATE());
+ LEFT JOIN (
+ SELECT c.id, DATE(MAX(t.shipped)) lastShipped
+ FROM vn.client c
+ LEFT JOIN vn.ticket t ON t.clientFk = c.id
+ LEFT JOIN vn.country co ON co.id = c.countryFk
+ WHERE co.code = vCountryCode
+ AND (t.shipped <= util.VN_CURDATE() OR t.shipped IS NULL)
+ GROUP BY c.id
+ ) sub ON sub.id = c.id
+ LEFT JOIN vn.clientObservation cob ON cob.clientFk = c.id
+ AND cob.created > vThridPeriod
+ WHERE (sub.lastShipped < vFirstPeriod OR sub.lastShipped IS NULL)
+ AND c.created < vThridPeriod
+ AND co.code = vCountryCode
+ AND cob.`text` IS NULL
+ AND c.id NOT IN (
+ SELECT DISTINCT clientFk
+ FROM vn.ticket
+ WHERE refFk IS NULL
+ AND shipped >= vFirstPeriod
+ )
+ GROUP BY c.id;
END ;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
/*!50003 SET character_set_client = @saved_cs_client */ ;
/*!50003 SET character_set_results = @saved_cs_results */ ;
/*!50003 SET collation_connection = @saved_col_connection */ ;
+/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `clientNewBorn_recalc` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -3576,8 +3705,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `clientNewBorn_recalc`()
BLOCK1: BEGIN
@@ -3669,6 +3796,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `comercialesCompleto` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -3676,8 +3805,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `comercialesCompleto`(IN vWorker INT, vDate DATE)
BEGIN
@@ -3694,7 +3821,6 @@ BEGIN
-- 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,
@@ -3794,6 +3920,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `compradores_add` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -3801,8 +3929,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `compradores_add`(IN vYear INT, IN vWeekFrom INT, IN vWeekTo INT)
BEGIN
@@ -3828,6 +3954,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `compradores_add_launcher` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -3835,8 +3963,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `compradores_add_launcher`()
BEGIN
@@ -3883,6 +4009,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `compradores_evolution_add` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -3890,8 +4018,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `compradores_evolution_add`()
BEGIN
@@ -3962,6 +4088,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `fondo_evolution_add` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -3969,8 +4097,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `fondo_evolution_add`()
BEGIN
@@ -4040,6 +4166,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `fruitsEvolution` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -4047,8 +4175,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `fruitsEvolution`()
BEGIN
@@ -4070,6 +4196,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `indicatorsUpdate` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -4077,8 +4205,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `indicatorsUpdate`(vDated DATE)
BEGIN
@@ -4233,6 +4359,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `indicatorsUpdateLauncher` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -4240,8 +4368,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `indicatorsUpdateLauncher`()
BEGIN
@@ -4268,6 +4394,113 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
+/*!50003 DROP PROCEDURE IF EXISTS `inventoryDiscrepancyDetail_replace` */;
+/*!50003 SET @saved_cs_client = @@character_set_client */ ;
+/*!50003 SET @saved_cs_results = @@character_set_results */ ;
+/*!50003 SET @saved_col_connection = @@collation_connection */ ;
+/*!50003 SET character_set_client = utf8mb4 */ ;
+/*!50003 SET character_set_results = utf8mb4 */ ;
+/*!50003 SET collation_connection = utf8mb4_unicode_ci */ ;
+DELIMITER ;;
+CREATE DEFINER=`root`@`localhost` PROCEDURE `inventoryDiscrepancyDetail_replace`()
+BEGIN
+/**
+ * Replace all records in table inventoryDiscrepancyDetail and insert new
+ * records into inventoryDiscrepancy for all inventory warehouses.
+ */
+ DECLARE vDone INT DEFAULT FALSE;
+ DECLARE vCalc INT;
+ DECLARE vWarehouseFk INT;
+
+ DECLARE cWarehouses CURSOR FOR
+ SELECT id
+ FROM vn.warehouse
+ WHERE isInventory;
+
+ DECLARE CONTINUE HANDLER FOR NOT FOUND SET vDone = TRUE;
+
+ TRUNCATE TABLE inventoryDiscrepancyDetail;
+
+ OPEN cWarehouses;
+ read_loop: LOOP
+ SET vDone = FALSE;
+ FETCH cWarehouses INTO vWarehouseFk;
+
+ IF vDone THEN
+ LEAVE read_loop;
+ END IF;
+
+ CALL cache.visible_refresh(vCalc, FALSE, vWarehouseFk);
+
+ CREATE OR REPLACE TEMPORARY TABLE tVisible
+ SELECT itemFk, SUM(visible) totalVisible
+ FROM vn.itemShelving ish
+ JOIN vn.shelving sh ON sh.code = ish.shelvingFk
+ JOIN vn.parking p ON p.id = sh.parkingFk
+ JOIN vn.sector sc ON sc.id = p.sectorFk
+ WHERE sc.warehouseFk = vWarehouseFk
+ GROUP BY itemFk;
+
+ INSERT INTO inventoryDiscrepancyDetail(
+ warehouseFk,
+ itemFk,
+ theorical,
+ visible,
+ notPicked,
+ alert)
+ SELECT vWarehouseFk warehouseFk,
+ v.item_id itemFk,
+ v.visible,
+ tv.totalVisible,
+ s.notPicked,
+ CASE
+ WHEN s.notPicked > IFNULL(tv.totalVisible, 0) THEN 0
+ WHEN v.visible > IFNULL((tv.totalVisible * 2), 0) THEN 1
+ WHEN v.visible > tv.totalVisible THEN 2
+ ELSE 3
+ END alert
+ FROM cache.visible v
+ LEFT JOIN tVisible tv ON tv.itemFk = v.item_id
+ JOIN (
+ SELECT s.itemFk, SUM(s.quantity) notPicked
+ FROM vn.sale s
+ JOIN vn.ticket t ON t.id = s.ticketFk
+ JOIN vn.ticketState ts ON ts.ticketFk = t.id
+ JOIN vn.alertLevel al ON al.id = ts.alertLevel
+ WHERE t.shipped BETWEEN util.VN_CURDATE() AND util.dayend(util.VN_CURDATE())
+ AND s.isPicked = FALSE
+ AND al.code = 'FREE'
+ AND t.warehouseFk = vWarehouseFk
+ GROUP BY s.itemFk
+ HAVING notPicked
+ ) s ON s.itemFk = v.item_id
+ WHERE v.calc_id = vCalc
+ AND NOT v.visible <=> tv.totalVisible;
+
+ END LOOP;
+ CLOSE cWarehouses;
+
+ INSERT INTO inventoryDiscrepancy(
+ warehouseFk,
+ alert,
+ quantity)
+ SELECT warehouseFk,
+ alert,
+ COUNT(*)
+ FROM inventoryDiscrepancyDetail
+ GROUP BY warehouseFk, alert;
+
+ DROP TEMPORARY TABLE IF EXISTS tVisible;
+END ;;
+DELIMITER ;
+/*!50003 SET sql_mode = @saved_sql_mode */ ;
+/*!50003 SET character_set_client = @saved_cs_client */ ;
+/*!50003 SET character_set_results = @saved_cs_results */ ;
+/*!50003 SET collation_connection = @saved_col_connection */ ;
+/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `m3Add` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -4275,8 +4508,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `m3Add`()
BEGIN
@@ -4313,6 +4544,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `manaCustomerUpdate` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -4320,8 +4553,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `manaCustomerUpdate`()
BEGIN
@@ -4419,6 +4650,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `manaSpellers_actualize` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -4426,8 +4659,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `manaSpellers_actualize`()
BEGIN
@@ -4454,6 +4685,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `nightTask_launchAll` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -4461,8 +4694,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `nightTask_launchAll`()
BEGIN
@@ -4551,6 +4782,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `nightTask_launchTask` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -4558,8 +4791,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `nightTask_launchTask`(
vSchema VARCHAR(255),
@@ -4590,6 +4821,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `payMethodClientAdd` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -4597,8 +4830,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `payMethodClientAdd`()
BEGIN
@@ -4624,6 +4855,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `saleGraphic` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -4631,8 +4864,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `saleGraphic`(IN vItemFk INT, IN vTypeFk INT, IN vCategoryFk INT, IN vFromDate DATE,
IN vToDate DATE, IN vProducerFk INT)
@@ -4676,6 +4907,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `salePersonEvolutionAdd` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -4683,8 +4916,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `salePersonEvolutionAdd`(IN vDateStart DATETIME)
BEGIN
@@ -4709,6 +4940,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `salesByclientSalesPerson_add` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -4716,8 +4949,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `salesByclientSalesPerson_add`(vDatedFrom DATE)
BEGIN
@@ -4768,6 +4999,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `salesByItemTypeDay_add` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -4775,181 +5008,124 @@ DELIMITER ;
/*!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 ;;
-CREATE DEFINER=`root`@`localhost` PROCEDURE `salesByItemTypeDay_add`(vDateStart DATE, vDateEnd DATE)
+CREATE DEFINER=`root`@`localhost` PROCEDURE `salesByItemTypeDay_add`(
+ vDateStart DATE,
+ vDateEnd DATE
+)
BEGIN
/**
- * Almacena datos relativos a las ventas de artículos agrupados por reino, familia y dia
+ * Almacena datos relativos a las ventas de artículos
+ * agrupados por reino, familia y día
*
* @param vDateStart
* @param vDateEnd
*/
-
- DELETE FROM bs.salesByItemTypeDay
+ DELETE FROM salesByItemTypeDay
WHERE dated BETWEEN vDateStart AND vDateEnd;
- INSERT INTO bs.salesByItemTypeDay (itemTypeFk, itemCategoryFk, dated)
- SELECT id, categoryFk, dated
- FROM vn.itemType
- JOIN vn.`time`
- WHERE dated BETWEEN vDateStart AND vDateEnd;
+ INSERT INTO salesByItemTypeDay (itemTypeFk, dated, `references`, netSale, stems)
+ SELECT it.id itemTypeFk,
+ bs.dated,
+ COUNT(DISTINCT(i.id)) `references`,
+ SUM(bs.amount) netSale,
+ SUM(i.stems * s.quantity) stems
+ FROM sale bs
+ JOIN vn.itemType it ON it.id = bs.typeFk
+ JOIN vn.itemCategory ic ON ic.id = it.categoryFk
+ JOIN vn.sale s ON s.id = bs.saleFk
+ JOIN vn.item i ON i.id = s.itemFk
+ JOIN vn.ticket t ON t.id = s.ticketFk
+ WHERE ic.merchandise
+ AND t.shipped BETWEEN vDateStart AND util.dayEnd(vDateEnd)
+ GROUP BY it.id, bs.dated;
- UPDATE bs.salesByItemTypeDay it
- JOIN (SELECT ic.id itemCategoryFk,
- it.id itemTypeFk,
- bs.dated,
- SUM(bs.amount) netSale
- FROM bs.sale bs
- JOIN vn.itemType it ON it.id = bs.typeFk
- JOIN vn .itemCategory ic ON ic.id = it.categoryFk
- JOIN vn.client c on c.id = bs.clientFk
- JOIN vn.sale s ON s.id = bs.saleFk
- JOIN vn.item i ON i.id = s.itemFk
- JOIN vn.ticket t ON t.id = s.ticketFk
- JOIN vn.`time` ti ON ti.dated = bs.dated
- WHERE ic.merchandise
- AND bs.dated BETWEEN vDateStart AND vDateEnd
- GROUP BY ic.id, it.id, bs.dated) sub ON sub.dated = it.dated AND sub.itemCategoryFk = it.itemCategoryFk AND sub.itemTypeFk = it.itemTypeFk
- SET it.netSale = sub.netSale;
+ INSERT INTO salesByItemTypeDay (itemTypeFk, dated, trash, faults)
+ SELECT it.id itemTypeFk,
+ DATE(t.shipped) dated,
+ SUM(IF(c.name = 'FALTAS', i.stems * s.quantity, 0)) trash,
+ SUM(IF(c.name = 'BASURA', IFNULL(i.stems, 1) * s.quantity, 0)) faults
+ FROM vn.sale s
+ JOIN vn.ticket t ON t.id = s.ticketFk
+ JOIN vn.item i ON i.id = s.itemFk
+ JOIN vn.itemType it ON it.id = i.typeFk
+ JOIN vn.itemCategory ic ON ic.id = it.categoryFk
+ JOIN vn.client c ON c.id = t.clientFk
+ WHERE c.name IN ('BASURA', 'FALTAS')
+ AND t.shipped BETWEEN vDateStart AND util.dayEnd(vDateEnd)
+ GROUP BY it.id, dated
+ ON DUPLICATE KEY UPDATE
+ trash = VALUES(trash),
+ faults = VALUES(faults);
- UPDATE bs.salesByItemTypeDay it
- JOIN (SELECT ic.id AS itemCategoryFk,
- it.id AS itemTypeFk,
+ INSERT INTO salesByItemTypeDay (itemTypeFk, dated, accepted, claimed)
+ SELECT it.id itemTypeFk,
+ DATE(t.shipped) dated,
+ SUM(
+ (cb.quantity * s.price * (100 - s.discount) / 100) *
+ ((cc.maxResponsibility - c.responsibility ) / 4 )
+ ) accepted,
+ SUM(cb.quantity * s.price * (100 - s.discount) / 100) claimed
+ FROM vn.claim c
+ JOIN vn.claimBeginning cb ON cb.claimFk = c.id
+ JOIN vn.sale s ON s.id = cb.saleFk
+ JOIN vn.ticket t ON t.id = s.ticketFk
+ JOIN vn.item i ON i.id = s.itemFk
+ JOIN vn.itemType it ON it.id = i.typeFk
+ JOIN vn.itemCategory ic ON ic.id = it.categoryFk
+ JOIN vn.claimConfig cc
+ WHERE ic.merchandise
+ AND t.shipped BETWEEN vDateStart AND util.dayEnd(vDateEnd)
+ GROUP BY it.id, dated
+ ON DUPLICATE KEY UPDATE
+ accepted = VALUES(accepted),
+ claimed = VALUES(claimed);
+
+ INSERT INTO salesByItemTypeDay (itemTypeFk, dated, sale, buy)
+ SELECT itemTypeFk,
+ dated,
+ CAST(SUM(sale) AS DECIMAL(10,2)) sale,
+ CAST(SUM(buy) AS DECIMAL(10,2)) buy
+ FROM (
+ SELECT it.id itemTypeFk,
bs.dated,
- SUM(i.stems * s.quantity) stems
- FROM bs.sale bs
+ SUM(amount) sale,
+ 0 buy
+ FROM sale bs
JOIN vn.itemType it ON it.id = bs.typeFk
JOIN vn.itemCategory ic ON ic.id = it.categoryFk
+ JOIN vn.client c ON c.id = bs.clientFk
JOIN vn.sale s ON s.id = bs.saleFk
JOIN vn.ticket t ON t.id = s.ticketFk
JOIN vn.item i ON i.id = s.itemFk
- JOIN vn.`time` tm ON tm.dated = bs.dated
WHERE ic.merchandise
- AND bs.dated BETWEEN vDateStart AND vDateEnd
- GROUP BY ic.id, it.id, bs.dated) sub ON sub.dated = it.dated AND sub.itemCategoryFk = it.itemCategoryFk AND sub.itemTypeFk = it.itemTypeFk
- SET it.stems = sub.stems;
-
-
- UPDATE bs.salesByItemTypeDay it
- JOIN (SELECT ic.id AS itemCategoryFk,
- it.id AS itemTypeFk,
- DATE(t.shipped) dated,
- COUNT(DISTINCT(i.id)) `references`
- FROM vn.ticket t
- JOIN vn.sale s ON s.ticketFk = t.id
- JOIN vn.item i ON i.id = s.itemFk
+ AND t.shipped BETWEEN vDateStart AND vDateEnd
+ GROUP BY it.id, bs.dated
+ UNION ALL
+ SELECT it.id,
+ t.landed,
+ 0,
+ SUM(b.buyingValue * b.quantity)
+ FROM vn.entry e
+ JOIN vn.travel t ON t.id = e.travelFk
+ JOIN vn.buy b ON b.entryFk = e.id
+ 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
WHERE ic.merchandise
- AND t.shipped BETWEEN vDateStart AND util.dayEnd(vDateEnd)
- GROUP BY ic.id, it.id, dated) sub ON sub.dated = it.dated AND sub.itemCategoryFk = it.itemCategoryFk AND sub.itemTypeFk = it.itemTypeFk
- SET it.`references` = sub.`references`;
+ AND t.landed BETWEEN vDateStart AND vDateEnd
+ GROUP BY it.id, t.landed
+ ) sub
+ GROUP BY itemTypeFk, dated
+ ON DUPLICATE KEY UPDATE
+ sale = VALUES(sale),
+ buy = VALUES(buy);
- UPDATE bs.salesByItemTypeDay it
- JOIN (SELECT ic.id AS itemCategoryFk,
- it.id AS itemTypeFk,
- DATE(t.shipped) dated,
- SUM(i.stems*s.quantity) AS trash
- FROM vn.sale s
- JOIN vn.ticket t ON t.id = s.ticketFk
- JOIN vn.item i ON i.id = s.itemFk
- JOIN vn.itemType it ON it.id = i.typeFk
- JOIN vn.itemCategory ic ON ic.id = it.categoryFk
- JOIN vn.client c ON c.id = t.clientFk
- WHERE c.name = 'BASURA'
- AND t.shipped BETWEEN vDateStart AND util.dayEnd(vDateEnd)
- GROUP BY ic.id, it.id, dated) sub ON sub.dated = it.dated AND sub.itemCategoryFk = it.itemCategoryFk AND sub.itemTypeFk = it.itemTypeFk
- SET it.trash = sub.trash;
-
- UPDATE bs.salesByItemTypeDay it
- JOIN (SELECT ic.id AS itemCategoryFk,
- it.id AS itemTypeFk,
- DATE(t.shipped) dated,
- SUM(IFNULL(i.stems, 1) * s.quantity) AS faults
- FROM vn.sale s
- JOIN vn.ticket t ON t.id = s.ticketFk
- JOIN vn.item i ON i.id = s.itemFk
- JOIN vn.itemType it ON it.id = i.typeFk
- JOIN vn.itemCategory ic ON ic.id = it.categoryFk
- JOIN vn.client c ON c.id = t.clientFk
- WHERE c.name = 'FALTAS'
- AND t.shipped BETWEEN vDateStart AND util.dayEnd(vDateEnd)
- GROUP BY ic.id, it.id, dated) sub ON sub.dated = it.dated AND sub.itemCategoryFk = it.itemCategoryFk AND sub.itemTypeFk = it.itemTypeFk
- SET it.`faults` = sub.`faults`;
-
- UPDATE bs.salesByItemTypeDay it
- JOIN (SELECT ic.id AS itemCategoryFk,
- it.id AS itemTypeFk,
- DATE(t.shipped) dated,
- SUM((cb.quantity * s.price * (100 - s.discount) / 100) * ((cc.maxResponsibility - c.responsibility )/4 )) accepted,
- SUM(cb.quantity * s.price * (100 - s.discount) / 100) claimed
- FROM vn.claim c
- JOIN vn.claimBeginning cb ON cb.claimFk = c.id
- JOIN vn.sale s ON s.id = cb.saleFk
- JOIN vn.ticket t ON t.id = s.ticketFk
- JOIN vn.item i ON i.id = s.itemFk
- JOIN vn.itemType it ON it.id = i.typeFk
- JOIN vn.itemCategory ic ON ic.id = it.categoryFk
- JOIN vn.claimConfig cc
- WHERE ic.merchandise
- AND t.shipped BETWEEN vDateStart AND util.dayEnd(vDateEnd)
- GROUP BY ic.id, it.id, dated) sub ON sub.dated = it.dated AND sub.itemCategoryFk = it.itemCategoryFk AND sub.itemTypeFk = it.itemTypeFk
- SET it.accepted = sub.accepted,
- it.claimed = sub.claimed;
-
- UPDATE bs.salesByItemTypeDay it
- JOIN(SELECT itemCategoryFk,
- itemTypeFk,
- dated,
- CAST(SUM(sale) AS DECIMAL(10,2)) sale,
- CAST(SUM(buy) AS DECIMAL(10,2))buy
- FROM(SELECT ic.id itemCategoryFk,
- it.id itemTypeFk,
- bs.dated,
- SUM(bs.amount) sale,
- 0 buy
- FROM bs.sale bs
- JOIN vn.itemType it ON it.id = bs.typeFk
- JOIN vn.itemCategory ic ON ic.id = it.categoryFk
- JOIN vn.client c on c.id = bs.clientFk
- JOIN vn.`time` tm ON tm.dated = bs.dated
- JOIN vn.sale s ON s.id = bs.saleFk
- JOIN vn.item i ON i.id = s.itemFk
- WHERE ic.merchandise
- AND bs.dated BETWEEN vDateStart AND vDateEnd
- GROUP BY ic.id, it.id, bs.dated
- UNION ALL
- SELECT ic.id,
- it.id,
- t.landed,
- 0 ,
- SUM(b.buyingValue * b.quantity)
- FROM vn.entry e
- JOIN vn.travel t ON t.id = e.travelFk
- JOIN vn.buy b ON b.entryFk = e.id
- 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
- WHERE ic.merchandise
- AND t.landed BETWEEN vDateStart AND vDateEnd
- GROUP BY ic.id, it.id, t.landed) sub
- GROUP BY itemCategoryFk, itemTypeFk, dated) sub2 ON sub2.dated = it.dated AND sub2.itemCategoryFk = it.itemCategoryFk AND sub2.itemTypeFk = it.itemTypeFk
- SET it.sale = sub2.sale,
- it.buy = sub2.buy;
-
- DROP TEMPORARY TABLE IF EXISTS tmp.`component`;
- CREATE TEMPORARY TABLE tmp.`component`
- (PRIMARY KEY (`itemTypeFk`,`dated`),
- KEY `salesByItemTypeDay_itemCategoryFk_idx` (`itemCategoryFk`),
- KEY `salesByItemTypeDay_dated_idx` (`dated`))
- ENGINE = MEMORY
- SELECT DATE(t.shipped) dated,
- ic.id itemCategoryFk,
- it.id itemTypeFk,
- SUM(s.quantity * IF(c.code = 'purchaseValue', sc.value,0)) costComponent,
- SUM(s.quantity * IF(ct.isMargin, sc.value,0)) marginComponent
+ INSERT INTO salesByItemTypeDay (itemTypeFk, dated, costComponent, marginComponent)
+ SELECT it.id itemTypeFk,
+ DATE(t.shipped) dated,
+ SUM(s.quantity * IF(c.code = 'purchaseValue', sc.value, 0)) costComponent,
+ SUM(s.quantity * IF(ct.isMargin, sc.value, 0)) marginComponent
FROM vn.ticket t
JOIN vn.sale s ON t.id = s.ticketFk
JOIN vn.item i ON i.id = s.itemFk
@@ -4959,21 +5135,18 @@ BEGIN
STRAIGHT_JOIN vn.component c ON c.id = sc.componentFk
JOIN vn.componentType ct ON ct.id = c.typeFk
WHERE t.shipped BETWEEN vDateStart AND util.dayEnd(vDateEnd)
- GROUP BY ic.id, it.id, dated;
-
- UPDATE bs.salesByItemTypeDay it
- JOIN tmp.`component` c ON c.dated = it.dated AND c.itemCategoryFk = it.itemCategoryFk AND c.itemTypeFk = it.itemTypeFk
- SET it.costComponent = c.costComponent,
- it.marginComponent = c.marginComponent,
- it.saleComponent = c.costComponent + c.marginComponent;
-
- DROP TEMPORARY TABLE tmp.`component`;
+ GROUP BY it.id, dated
+ ON DUPLICATE KEY UPDATE
+ costComponent = VALUES(costComponent),
+ marginComponent = VALUES(marginComponent);
END ;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
/*!50003 SET character_set_client = @saved_cs_client */ ;
/*!50003 SET character_set_results = @saved_cs_results */ ;
/*!50003 SET collation_connection = @saved_col_connection */ ;
+/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `salesByItemTypeDay_addLauncher` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -4981,21 +5154,18 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `salesByItemTypeDay_addLauncher`()
BEGIN
- DECLARE vDateStart,vDateEnd INT;
-
- SELECT DATE_SUB(util.VN_CURDATE(), INTERVAL 30 DAY), util.VN_CURDATE() INTO vDateStart,vDateEnd;
- CALL bs.salesByItemTypeDay_add(vDateStart, vDateEnd);
+ CALL bs.salesByItemTypeDay_add(util.VN_CURDATE() - INTERVAL 30 DAY, util.VN_CURDATE());
END ;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
/*!50003 SET character_set_client = @saved_cs_client */ ;
/*!50003 SET character_set_results = @saved_cs_results */ ;
/*!50003 SET collation_connection = @saved_col_connection */ ;
+/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `salesPersonEvolution_add` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -5003,8 +5173,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `salesPersonEvolution_add`()
BEGIN
@@ -5074,6 +5242,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `vendedores_add_launcher` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -5081,8 +5251,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `vendedores_add_launcher`()
BEGIN
@@ -5095,6 +5263,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `ventas_add` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -5102,8 +5272,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `ventas_add`(
IN vStarted DATETIME,
@@ -5186,6 +5354,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `ventas_add_launcher` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -5193,8 +5363,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `ventas_add_launcher`()
BEGIN
@@ -5212,6 +5380,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `ventas_contables_add` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -5219,8 +5389,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `ventas_contables_add`(IN vYear INT, IN vMonth INT)
BEGIN
@@ -5327,6 +5495,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `ventas_contables_add_launcher` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -5334,8 +5504,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `ventas_contables_add_launcher`()
BEGIN
@@ -5354,6 +5522,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `ventas_contables_por_cliente` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -5361,8 +5531,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `ventas_contables_por_cliente`(IN vYear INT, IN vMonth INT)
BEGIN
@@ -5414,6 +5582,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `vivosMuertos` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -5421,8 +5591,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `vivosMuertos`()
BEGIN
@@ -5490,6 +5658,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `waste_addSales` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -5497,8 +5667,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `waste_addSales`()
BEGIN
@@ -5534,6 +5702,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `workerLabour_getData` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -5541,8 +5711,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `workerLabour_getData`()
BEGIN
@@ -5653,6 +5821,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `workerProductivity_add` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -5660,8 +5830,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `workerProductivity_add`()
BEGIN
@@ -6029,6 +6197,8 @@ DELIMITER ;
--
-- Dumping routines for database 'cache'
--
+/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `addressFriendship_Update` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -6036,8 +6206,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `addressFriendship_Update`()
BEGIN
@@ -6069,6 +6237,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `availableNoRaids_refresh` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -6076,8 +6246,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `availableNoRaids_refresh`(OUT `vCalc` INT, IN `vRefresh` INT, IN `vWarehouse` INT, IN `vDated` DATE)
proc: BEGIN
@@ -6098,7 +6266,7 @@ proc: BEGIN
END IF;
SET vParams = CONCAT_WS('/', vWarehouse, vDated);
- CALL vn.itemStock (vWarehouse, vDated, NULL);
+ CALL vn.item_getStock (vWarehouse, vDated, NULL);
CALL cache_calc_start (vCalc, vRefresh, 'availableNoRaids', vParams);
IF !vRefresh THEN
@@ -6205,6 +6373,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `available_clean` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -6212,8 +6382,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `available_clean`()
BEGIN
@@ -6240,6 +6408,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `available_refresh` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -6247,8 +6417,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `available_refresh`(OUT `vCalc` INT, IN `vRefresh` INT, IN `vWarehouse` INT, IN `vDated` DATE)
proc: BEGIN
@@ -6268,7 +6436,7 @@ proc: BEGIN
LEAVE proc;
END IF;
- CALL vn.itemStock(vWarehouse, vDated, NULL);
+ CALL vn.item_getStock(vWarehouse, vDated, NULL);
SET vParams = CONCAT_WS('/', vWarehouse, vDated);
CALL cache_calc_start (vCalc, vRefresh, 'available', vParams);
@@ -6380,6 +6548,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `cacheCalc_clean` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -6387,8 +6557,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `cacheCalc_clean`()
BEGIN
@@ -6400,6 +6568,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `cache_calc_end` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -6407,8 +6577,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `cache_calc_end`(IN `v_calc` INT)
BEGIN
@@ -6438,6 +6606,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `cache_calc_start` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -6445,8 +6615,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` 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
@@ -6538,6 +6706,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `cache_calc_unlock` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -6545,8 +6715,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `cache_calc_unlock`(IN `v_calc` INT)
proc: BEGIN
@@ -6573,6 +6741,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `cache_clean` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -6580,8 +6750,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `cache_clean`()
NO SQL
@@ -6594,6 +6762,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `clean` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -6601,8 +6771,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `clean`()
BEGIN
@@ -6617,6 +6785,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `departure_timing` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -6624,8 +6794,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `departure_timing`(vWarehouseId INT)
BEGIN
@@ -6704,6 +6872,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `last_buy_refresh` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -6711,8 +6881,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `last_buy_refresh`(vRefresh BOOL)
proc: BEGIN
@@ -6762,6 +6930,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `prod_graphic_refresh` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -6769,8 +6939,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `prod_graphic_refresh`(v_refresh BOOL, wh_id INT)
proc: BEGIN
@@ -6811,6 +6979,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `stock_refresh` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -6818,8 +6988,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `stock_refresh`(v_refresh BOOL)
proc: BEGIN
@@ -6877,6 +7045,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `visible_clean` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -6884,8 +7054,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `visible_clean`()
BEGIN
@@ -6907,6 +7075,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `visible_refresh` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -6914,8 +7084,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `visible_refresh`(OUT v_calc INT, v_refresh BOOL, v_warehouse INT)
proc: BEGIN
@@ -7226,56 +7394,55 @@ DROP TABLE IF EXISTS `ektRecent`;
/*!50001 DROP VIEW IF EXISTS `ektRecent`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `ektRecent` (
- `id` tinyint NOT NULL,
- `barcode` tinyint NOT NULL,
- `entryYear` tinyint NOT NULL,
- `batchNumber` tinyint NOT NULL,
- `deliveryNumber` tinyint NOT NULL,
- `vendorOrderNumber` tinyint NOT NULL,
- `fec` tinyint NOT NULL,
- `hor` tinyint NOT NULL,
- `now` tinyint NOT NULL,
- `ptj` tinyint NOT NULL,
- `ref` tinyint NOT NULL,
- `item` tinyint NOT NULL,
- `pac` tinyint NOT NULL,
- `qty` tinyint NOT NULL,
- `ori` tinyint NOT NULL,
- `cat` tinyint NOT NULL,
- `agj` tinyint NOT NULL,
- `kop` tinyint NOT NULL,
- `ptd` tinyint NOT NULL,
- `sub` tinyint NOT NULL,
- `pro` tinyint NOT NULL,
- `pri` tinyint NOT NULL,
- `package` tinyint NOT NULL,
- `auction` tinyint NOT NULL,
- `klo` tinyint NOT NULL,
- `k1` tinyint NOT NULL,
- `k2` tinyint NOT NULL,
- `k3` tinyint NOT NULL,
- `k4` tinyint NOT NULL,
- `s1` tinyint NOT NULL,
- `s2` tinyint NOT NULL,
- `s3` tinyint NOT NULL,
- `s4` tinyint NOT NULL,
- `s5` tinyint NOT NULL,
- `s6` tinyint NOT NULL,
- `ok` tinyint NOT NULL,
- `trolleyFk` tinyint NOT NULL,
- `putOrderFk` tinyint NOT NULL,
- `scanned` tinyint NOT NULL,
- `cps` tinyint NOT NULL,
- `dp` tinyint NOT NULL,
- `sender` tinyint NOT NULL,
- `usefulAuctionLeftSegmentLength` tinyint NOT NULL,
- `standardBarcodeLength` tinyint NOT NULL,
- `floridayBarcodeLength` tinyint NOT NULL,
- `floramondoBarcodeLength` tinyint NOT NULL,
- `defaultKlo` tinyint NOT NULL,
- `ektRecentScopeDays` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `ektRecent` AS SELECT
+ 1 AS `id`,
+ 1 AS `barcode`,
+ 1 AS `entryYear`,
+ 1 AS `batchNumber`,
+ 1 AS `deliveryNumber`,
+ 1 AS `vendorOrderNumber`,
+ 1 AS `fec`,
+ 1 AS `hor`,
+ 1 AS `now`,
+ 1 AS `ptj`,
+ 1 AS `ref`,
+ 1 AS `item`,
+ 1 AS `pac`,
+ 1 AS `qty`,
+ 1 AS `ori`,
+ 1 AS `cat`,
+ 1 AS `agj`,
+ 1 AS `kop`,
+ 1 AS `ptd`,
+ 1 AS `sub`,
+ 1 AS `pro`,
+ 1 AS `pri`,
+ 1 AS `package`,
+ 1 AS `auction`,
+ 1 AS `klo`,
+ 1 AS `k1`,
+ 1 AS `k2`,
+ 1 AS `k3`,
+ 1 AS `k4`,
+ 1 AS `s1`,
+ 1 AS `s2`,
+ 1 AS `s3`,
+ 1 AS `s4`,
+ 1 AS `s5`,
+ 1 AS `s6`,
+ 1 AS `ok`,
+ 1 AS `trolleyFk`,
+ 1 AS `putOrderFk`,
+ 1 AS `scanned`,
+ 1 AS `cps`,
+ 1 AS `dp`,
+ 1 AS `sender`,
+ 1 AS `usefulAuctionLeftSegmentLength`,
+ 1 AS `standardBarcodeLength`,
+ 1 AS `floridayBarcodeLength`,
+ 1 AS `floramondoBarcodeLength`,
+ 1 AS `defaultKlo`,
+ 1 AS `ektRecentScopeDays` */;
SET character_set_client = @saved_cs_client;
--
@@ -7286,18 +7453,17 @@ DROP TABLE IF EXISTS `errorList`;
/*!50001 DROP VIEW IF EXISTS `errorList`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `errorList` (
- `id` tinyint NOT NULL,
- `name` tinyint NOT NULL,
- `longName` tinyint NOT NULL,
- `quantity` tinyint NOT NULL,
- `stock` tinyint NOT NULL,
- `error` tinyint NOT NULL,
- `deliveryInformationID` tinyint NOT NULL,
- `supplyResponseID` tinyint NOT NULL,
- `OrderTradeLineDateTime` tinyint NOT NULL,
- `EndUserPartyGLN` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `errorList` AS SELECT
+ 1 AS `id`,
+ 1 AS `name`,
+ 1 AS `longName`,
+ 1 AS `quantity`,
+ 1 AS `stock`,
+ 1 AS `error`,
+ 1 AS `deliveryInformationID`,
+ 1 AS `supplyResponseID`,
+ 1 AS `OrderTradeLineDateTime`,
+ 1 AS `EndUserPartyGLN` */;
SET character_set_client = @saved_cs_client;
--
@@ -8022,51 +8188,50 @@ 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 TABLE `supplyOffer` (
- `vmpID` tinyint NOT NULL,
- `diId` tinyint NOT NULL,
- `srId` tinyint NOT NULL,
- `Item_ArticleCode` tinyint NOT NULL,
- `product_name` tinyint NOT NULL,
- `company_name` tinyint NOT NULL,
- `Price` tinyint NOT NULL,
- `Quality` tinyint NOT NULL,
- `s1` tinyint NOT NULL,
- `s2` tinyint NOT NULL,
- `s3` tinyint NOT NULL,
- `s4` tinyint NOT NULL,
- `s5` tinyint NOT NULL,
- `s6` tinyint NOT NULL,
- `NumberOfUnits` tinyint NOT NULL,
- `EmbalageCode` tinyint NOT NULL,
- `LatestDeliveryDateTime` tinyint NOT NULL,
- `EarliestDespatchDateTime` tinyint NOT NULL,
- `FirstOrderDateTime` tinyint NOT NULL,
- `LatestOrderDateTime` tinyint NOT NULL,
- `NumberOfItemsPerCask` tinyint NOT NULL,
- `NumberOfLayersPerTrolley` tinyint NOT NULL,
- `MinimumNumberToOrder` tinyint NOT NULL,
- `MaximumNumberToOrder` tinyint NOT NULL,
- `IncrementalOrderableQuantity` tinyint NOT NULL,
- `PackingPrice` tinyint NOT NULL,
- `MarketPlaceID` tinyint NOT NULL,
- `PictureReference` tinyint NOT NULL,
- `supplyResponseUpdated` tinyint NOT NULL,
- `group_id` tinyint NOT NULL,
- `marketPlace` tinyint NOT NULL,
- `DeliveryPrice` tinyint NOT NULL,
- `ChargeAmount` tinyint NOT NULL,
- `MinimumQuantity` tinyint NOT NULL,
- `MaximumQuantity` tinyint NOT NULL,
- `OrderUnit` tinyint NOT NULL,
- `IncrementalOrderUnit` tinyint NOT NULL,
- `isEarlyBird` tinyint NOT NULL,
- `isVNHSupplier` tinyint NOT NULL,
- `expenseFk` tinyint NOT NULL,
- `intrastatFk` tinyint NOT NULL,
- `originFk` tinyint NOT NULL,
- `itemTypeFk` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `supplyOffer` AS SELECT
+ 1 AS `vmpID`,
+ 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 `supplyResponseUpdated`,
+ 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`,
+ 1 AS `isEarlyBird`,
+ 1 AS `isVNHSupplier`,
+ 1 AS `expenseFk`,
+ 1 AS `intrastatFk`,
+ 1 AS `originFk`,
+ 1 AS `itemTypeFk` */;
SET character_set_client = @saved_cs_client;
--
@@ -8300,6 +8465,8 @@ DELIMITER ;
--
-- Dumping routines for database 'edi'
--
+/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `imageName` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -8307,8 +8474,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `imageName`(vPictureReference VARCHAR(255)) RETURNS varchar(255) CHARSET utf8mb3 COLLATE utf8mb3_unicode_ci
DETERMINISTIC
@@ -8334,6 +8499,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `clean` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -8341,31 +8508,34 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `clean`()
BEGIN
+ DECLARE CONTINUE HANDLER FOR SQLEXCEPTION
+ BEGIN
+ ROLLBACK;
+ RESIGNAL;
+ END;
- DECLARE vFourYearsAgo DATE DEFAULT TIMESTAMPADD(YEAR,-4,util.VN_CURDATE());
- DECLARE vOneWeekAgo DATE DEFAULT TIMESTAMPADD(WEEK,-1,util.VN_CURDATE());
-
- DELETE FROM ekt WHERE fec < vFourYearsAgo;
+ DELETE FROM ekt
+ WHERE fec < (util.VN_CURDATE() - INTERVAL 4 YEAR);
DELETE IGNORE sr.*
FROM supplyResponse sr
- LEFT JOIN edi.deliveryInformation di ON sr.ID = di.supplyResponseID
- WHERE di.LatestOrderDateTime < vOneWeekAgo OR di.ID IS NULL;
+ LEFT JOIN deliveryInformation di ON sr.ID = di.supplyResponseID
+ WHERE di.LatestOrderDateTime < (util.VN_CURDATE() - INTERVAL 1 WEEK)
+ OR di.ID IS NULL;
DELETE FROM putOrder
- WHERE created < TIMESTAMPADD(MONTH,-1,util.VN_CURDATE());
-
+ WHERE created < (util.VN_CURDATE() - INTERVAL 1 MONTH);
END ;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
/*!50003 SET character_set_client = @saved_cs_client */ ;
/*!50003 SET character_set_results = @saved_cs_results */ ;
/*!50003 SET collation_connection = @saved_col_connection */ ;
+/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `deliveryInformation_Delete` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -8373,8 +8543,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `deliveryInformation_Delete`()
BEGIN
@@ -8405,6 +8573,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `ekt_add` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -8412,8 +8582,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `ekt_add`(vPutOrderFk INT)
BEGIN
@@ -8482,6 +8650,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `ekt_load` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -8489,8 +8659,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `ekt_load`(IN `vSelf` INT)
proc:BEGIN
@@ -8772,6 +8940,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `ekt_loadNotBuy` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -8779,8 +8949,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `ekt_loadNotBuy`()
BEGIN
@@ -8818,6 +8986,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `ekt_refresh` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -8825,8 +8995,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `ekt_refresh`(
`vSelf` INT, vMailFk INT)
@@ -8886,6 +9054,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `ekt_scan` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -8893,8 +9063,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `ekt_scan`(vBarcode VARCHAR(512))
BEGIN
@@ -9030,6 +9198,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `floramondo_offerRefresh` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -9037,8 +9207,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `floramondo_offerRefresh`()
proc: BEGIN
@@ -9565,6 +9733,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `item_freeAdd` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -9572,8 +9742,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `item_freeAdd`()
BEGIN
@@ -9610,6 +9778,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `item_getNewByEkt` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -9617,8 +9787,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `item_getNewByEkt`(vEktFk INT, OUT vItemFk INT)
BEGIN
@@ -9809,6 +9977,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `mail_new` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -9816,8 +9986,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `mail_new`(
vMessageId VARCHAR(100)
@@ -10182,10 +10350,9 @@ DROP TABLE IF EXISTS `mainAccountBank`;
/*!50001 DROP VIEW IF EXISTS `mainAccountBank`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `mainAccountBank` (
- `name` tinyint NOT NULL,
- `iban` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `mainAccountBank` AS SELECT
+ 1 AS `name`,
+ 1 AS `iban` */;
SET character_set_client = @saved_cs_client;
--
@@ -10249,10 +10416,9 @@ DROP TABLE IF EXISTS `messageL10n`;
/*!50001 DROP VIEW IF EXISTS `messageL10n`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `messageL10n` (
- `code` tinyint NOT NULL,
- `description` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `messageL10n` AS SELECT
+ 1 AS `code`,
+ 1 AS `description` */;
SET character_set_client = @saved_cs_client;
--
@@ -10279,20 +10445,19 @@ DROP TABLE IF EXISTS `myAddress`;
/*!50001 DROP VIEW IF EXISTS `myAddress`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `myAddress` (
- `id` tinyint NOT NULL,
- `clientFk` tinyint NOT NULL,
- `street` tinyint NOT NULL,
- `city` tinyint NOT NULL,
- `postalCode` tinyint NOT NULL,
- `provinceFk` tinyint NOT NULL,
- `nickname` tinyint NOT NULL,
- `isDefaultAddress` tinyint NOT NULL,
- `isActive` tinyint NOT NULL,
- `longitude` tinyint NOT NULL,
- `latitude` tinyint NOT NULL,
- `agencyModeFk` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `myAddress` AS SELECT
+ 1 AS `id`,
+ 1 AS `clientFk`,
+ 1 AS `street`,
+ 1 AS `city`,
+ 1 AS `postalCode`,
+ 1 AS `provinceFk`,
+ 1 AS `nickname`,
+ 1 AS `isDefaultAddress`,
+ 1 AS `isActive`,
+ 1 AS `longitude`,
+ 1 AS `latitude`,
+ 1 AS `agencyModeFk` */;
SET character_set_client = @saved_cs_client;
--
@@ -10303,12 +10468,11 @@ DROP TABLE IF EXISTS `myBasketDefaults`;
/*!50001 DROP VIEW IF EXISTS `myBasketDefaults`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `myBasketDefaults` (
- `deliveryMethod` tinyint NOT NULL,
- `agencyModeFk` tinyint NOT NULL,
- `addressFk` tinyint NOT NULL,
- `defaultAgencyFk` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `myBasketDefaults` AS SELECT
+ 1 AS `deliveryMethod`,
+ 1 AS `agencyModeFk`,
+ 1 AS `addressFk`,
+ 1 AS `defaultAgencyFk` */;
SET character_set_client = @saved_cs_client;
--
@@ -10319,12 +10483,11 @@ DROP TABLE IF EXISTS `myClient`;
/*!50001 DROP VIEW IF EXISTS `myClient`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `myClient` (
- `id` tinyint NOT NULL,
- `isToBeMailed` tinyint NOT NULL,
- `defaultAddressFk` tinyint NOT NULL,
- `credit` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `myClient` AS SELECT
+ 1 AS `id`,
+ 1 AS `isToBeMailed`,
+ 1 AS `defaultAddressFk`,
+ 1 AS `credit` */;
SET character_set_client = @saved_cs_client;
--
@@ -10335,13 +10498,12 @@ DROP TABLE IF EXISTS `myInvoice`;
/*!50001 DROP VIEW IF EXISTS `myInvoice`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `myInvoice` (
- `id` tinyint NOT NULL,
- `ref` tinyint NOT NULL,
- `issued` tinyint NOT NULL,
- `amount` tinyint NOT NULL,
- `hasPdf` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `myInvoice` AS SELECT
+ 1 AS `id`,
+ 1 AS `ref`,
+ 1 AS `issued`,
+ 1 AS `amount`,
+ 1 AS `hasPdf` */;
SET character_set_client = @saved_cs_client;
--
@@ -10352,12 +10514,11 @@ DROP TABLE IF EXISTS `myMenu`;
/*!50001 DROP VIEW IF EXISTS `myMenu`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `myMenu` (
- `id` tinyint NOT NULL,
- `path` tinyint NOT NULL,
- `description` tinyint NOT NULL,
- `parentFk` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `myMenu` AS SELECT
+ 1 AS `id`,
+ 1 AS `path`,
+ 1 AS `description`,
+ 1 AS `parentFk` */;
SET character_set_client = @saved_cs_client;
--
@@ -10368,24 +10529,23 @@ DROP TABLE IF EXISTS `myOrder`;
/*!50001 DROP VIEW IF EXISTS `myOrder`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `myOrder` (
- `id` tinyint NOT NULL,
- `sent` tinyint NOT NULL,
- `clientFk` tinyint NOT NULL,
- `deliveryMethodFk` tinyint NOT NULL,
- `agencyModeFk` tinyint NOT NULL,
- `addressFk` tinyint NOT NULL,
- `companyFk` tinyint NOT NULL,
- `notes` tinyint NOT NULL,
- `sourceApp` tinyint NOT NULL,
- `isConfirmed` tinyint NOT NULL,
- `created` tinyint NOT NULL,
- `firstRowStamp` tinyint NOT NULL,
- `confirmed` tinyint NOT NULL,
- `taxableBase` tinyint NOT NULL,
- `tax` tinyint NOT NULL,
- `total` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `myOrder` AS SELECT
+ 1 AS `id`,
+ 1 AS `sent`,
+ 1 AS `clientFk`,
+ 1 AS `deliveryMethodFk`,
+ 1 AS `agencyModeFk`,
+ 1 AS `addressFk`,
+ 1 AS `companyFk`,
+ 1 AS `notes`,
+ 1 AS `sourceApp`,
+ 1 AS `isConfirmed`,
+ 1 AS `created`,
+ 1 AS `firstRowStamp`,
+ 1 AS `confirmed`,
+ 1 AS `taxableBase`,
+ 1 AS `tax`,
+ 1 AS `total` */;
SET character_set_client = @saved_cs_client;
--
@@ -10396,18 +10556,17 @@ DROP TABLE IF EXISTS `myOrderRow`;
/*!50001 DROP VIEW IF EXISTS `myOrderRow`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `myOrderRow` (
- `id` tinyint NOT NULL,
- `orderFk` tinyint NOT NULL,
- `itemFk` tinyint NOT NULL,
- `warehouseFk` tinyint NOT NULL,
- `shipped` tinyint NOT NULL,
- `amount` tinyint NOT NULL,
- `price` tinyint NOT NULL,
- `rate` tinyint NOT NULL,
- `created` tinyint NOT NULL,
- `saleFk` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `myOrderRow` AS SELECT
+ 1 AS `id`,
+ 1 AS `orderFk`,
+ 1 AS `itemFk`,
+ 1 AS `warehouseFk`,
+ 1 AS `shipped`,
+ 1 AS `amount`,
+ 1 AS `price`,
+ 1 AS `rate`,
+ 1 AS `created`,
+ 1 AS `saleFk` */;
SET character_set_client = @saved_cs_client;
--
@@ -10418,10 +10577,9 @@ DROP TABLE IF EXISTS `myOrderTicket`;
/*!50001 DROP VIEW IF EXISTS `myOrderTicket`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `myOrderTicket` (
- `orderFk` tinyint NOT NULL,
- `ticketFk` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `myOrderTicket` AS SELECT
+ 1 AS `orderFk`,
+ 1 AS `ticketFk` */;
SET character_set_client = @saved_cs_client;
--
@@ -10432,19 +10590,18 @@ DROP TABLE IF EXISTS `myTicket`;
/*!50001 DROP VIEW IF EXISTS `myTicket`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `myTicket` (
- `id` tinyint NOT NULL,
- `clientFk` tinyint NOT NULL,
- `warehouseFk` tinyint NOT NULL,
- `shipped` tinyint NOT NULL,
- `landed` tinyint NOT NULL,
- `nickname` tinyint NOT NULL,
- `agencyModeFk` tinyint NOT NULL,
- `refFk` tinyint NOT NULL,
- `addressFk` tinyint NOT NULL,
- `location` tinyint NOT NULL,
- `companyFk` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `myTicket` AS SELECT
+ 1 AS `id`,
+ 1 AS `clientFk`,
+ 1 AS `warehouseFk`,
+ 1 AS `shipped`,
+ 1 AS `landed`,
+ 1 AS `nickname`,
+ 1 AS `agencyModeFk`,
+ 1 AS `refFk`,
+ 1 AS `addressFk`,
+ 1 AS `location`,
+ 1 AS `companyFk` */;
SET character_set_client = @saved_cs_client;
--
@@ -10455,17 +10612,16 @@ DROP TABLE IF EXISTS `myTicketRow`;
/*!50001 DROP VIEW IF EXISTS `myTicketRow`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `myTicketRow` (
- `id` tinyint NOT NULL,
- `itemFk` tinyint NOT NULL,
- `ticketFk` tinyint NOT NULL,
- `concept` tinyint NOT NULL,
- `quantity` tinyint NOT NULL,
- `price` tinyint NOT NULL,
- `discount` tinyint NOT NULL,
- `reserved` tinyint NOT NULL,
- `isPicked` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `myTicketRow` AS SELECT
+ 1 AS `id`,
+ 1 AS `itemFk`,
+ 1 AS `ticketFk`,
+ 1 AS `concept`,
+ 1 AS `quantity`,
+ 1 AS `price`,
+ 1 AS `discount`,
+ 1 AS `reserved`,
+ 1 AS `isPicked` */;
SET character_set_client = @saved_cs_client;
--
@@ -10476,15 +10632,14 @@ DROP TABLE IF EXISTS `myTicketService`;
/*!50001 DROP VIEW IF EXISTS `myTicketService`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `myTicketService` (
- `id` tinyint NOT NULL,
- `description` tinyint NOT NULL,
- `quantity` tinyint NOT NULL,
- `price` tinyint NOT NULL,
- `taxClassFk` tinyint NOT NULL,
- `ticketFk` tinyint NOT NULL,
- `ticketServiceTypeFk` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `myTicketService` AS SELECT
+ 1 AS `id`,
+ 1 AS `description`,
+ 1 AS `quantity`,
+ 1 AS `price`,
+ 1 AS `taxClassFk`,
+ 1 AS `ticketFk`,
+ 1 AS `ticketServiceTypeFk` */;
SET character_set_client = @saved_cs_client;
--
@@ -10495,21 +10650,20 @@ DROP TABLE IF EXISTS `myTicketState`;
/*!50001 DROP VIEW IF EXISTS `myTicketState`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `myTicketState` (
- `id` tinyint NOT NULL,
- `clientFk` tinyint NOT NULL,
- `warehouseFk` tinyint NOT NULL,
- `shipped` tinyint NOT NULL,
- `landed` tinyint NOT NULL,
- `nickname` tinyint NOT NULL,
- `agencyModeFk` tinyint NOT NULL,
- `refFk` tinyint NOT NULL,
- `addressFk` tinyint NOT NULL,
- `location` tinyint NOT NULL,
- `companyFk` tinyint NOT NULL,
- `alertLevel` tinyint NOT NULL,
- `code` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `myTicketState` AS SELECT
+ 1 AS `id`,
+ 1 AS `clientFk`,
+ 1 AS `warehouseFk`,
+ 1 AS `shipped`,
+ 1 AS `landed`,
+ 1 AS `nickname`,
+ 1 AS `agencyModeFk`,
+ 1 AS `refFk`,
+ 1 AS `addressFk`,
+ 1 AS `location`,
+ 1 AS `companyFk`,
+ 1 AS `alertLevel`,
+ 1 AS `code` */;
SET character_set_client = @saved_cs_client;
--
@@ -10520,16 +10674,15 @@ DROP TABLE IF EXISTS `myTpvTransaction`;
/*!50001 DROP VIEW IF EXISTS `myTpvTransaction`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `myTpvTransaction` (
- `id` tinyint NOT NULL,
- `merchantFk` tinyint NOT NULL,
- `clientFk` tinyint NOT NULL,
- `receiptFk` tinyint NOT NULL,
- `amount` tinyint NOT NULL,
- `response` tinyint NOT NULL,
- `status` tinyint NOT NULL,
- `created` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `myTpvTransaction` AS SELECT
+ 1 AS `id`,
+ 1 AS `merchantFk`,
+ 1 AS `clientFk`,
+ 1 AS `receiptFk`,
+ 1 AS `amount`,
+ 1 AS `response`,
+ 1 AS `status`,
+ 1 AS `created` */;
SET character_set_client = @saved_cs_client;
--
@@ -10950,10 +11103,9 @@ DROP TABLE IF EXISTS `orderTicket`;
/*!50001 DROP VIEW IF EXISTS `orderTicket`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `orderTicket` (
- `orderFk` tinyint NOT NULL,
- `ticketFk` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `orderTicket` AS SELECT
+ 1 AS `orderFk`,
+ 1 AS `ticketFk` */;
SET character_set_client = @saved_cs_client;
--
@@ -10964,11 +11116,10 @@ DROP TABLE IF EXISTS `order_component`;
/*!50001 DROP VIEW IF EXISTS `order_component`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `order_component` (
- `order_row_id` tinyint NOT NULL,
- `component_id` tinyint NOT NULL,
- `price` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `order_component` AS SELECT
+ 1 AS `order_row_id`,
+ 1 AS `component_id`,
+ 1 AS `price` */;
SET character_set_client = @saved_cs_client;
--
@@ -10979,18 +11130,17 @@ DROP TABLE IF EXISTS `order_row`;
/*!50001 DROP VIEW IF EXISTS `order_row`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `order_row` (
- `id` tinyint NOT NULL,
- `order_id` tinyint NOT NULL,
- `item_id` tinyint NOT NULL,
- `warehouse_id` tinyint NOT NULL,
- `shipment` tinyint NOT NULL,
- `amount` tinyint NOT NULL,
- `price` tinyint NOT NULL,
- `rate` tinyint NOT NULL,
- `created` tinyint NOT NULL,
- `Id_Movimiento` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `order_row` AS SELECT
+ 1 AS `id`,
+ 1 AS `order_id`,
+ 1 AS `item_id`,
+ 1 AS `warehouse_id`,
+ 1 AS `shipment`,
+ 1 AS `amount`,
+ 1 AS `price`,
+ 1 AS `rate`,
+ 1 AS `created`,
+ 1 AS `Id_Movimiento` */;
SET character_set_client = @saved_cs_client;
--
@@ -11391,6 +11541,8 @@ DELIMITER ;
--
-- Dumping routines for database 'hedera'
--
+/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `myClient_getDebt` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -11398,8 +11550,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `myClient_getDebt`(vDate DATE) RETURNS decimal(10,2)
DETERMINISTIC
@@ -11416,6 +11566,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `myUser_checkRestPriv` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -11423,8 +11575,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `myUser_checkRestPriv`(vMethodPath VARCHAR(255)) RETURNS tinyint(1)
DETERMINISTIC
@@ -11459,6 +11609,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `order_getTotal` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -11466,8 +11618,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `order_getTotal`(vSelf INT) RETURNS decimal(10,2)
READS SQL DATA
@@ -11502,6 +11652,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `catalog_calcFromMyAddress` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -11509,8 +11661,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `catalog_calcFromMyAddress`(vDelivery DATE, vAddress INT)
BEGIN
@@ -11554,6 +11704,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `image_ref` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -11561,8 +11713,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `image_ref`(
vCollection VARCHAR(255),
@@ -11592,6 +11742,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `image_unref` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -11599,8 +11751,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `image_unref`(
vCollection VARCHAR(255),
@@ -11622,6 +11772,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `item_calcCatalog` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -11629,8 +11781,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `item_calcCatalog`(
vSelf INT,
@@ -11670,6 +11820,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `item_getVisible` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -11677,8 +11829,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `item_getVisible`(
vWarehouse TINYINT,
@@ -11807,6 +11957,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `item_listAllocation` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -11814,8 +11966,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `item_listAllocation`(IN `vWh` TINYINT, IN `vDate` DATE, IN `vType` INT, IN `vPrefix` VARCHAR(255), IN `vUseIds` BOOLEAN)
BEGIN
@@ -11848,6 +11998,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `myOrder_addItem` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -11855,8 +12007,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `myOrder_addItem`(
vSelf INT,
@@ -11872,6 +12022,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `myOrder_calcCatalogFromItem` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -11879,8 +12031,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `myOrder_calcCatalogFromItem`(vSelf INT, vItem INT)
BEGIN
@@ -11903,6 +12053,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `myOrder_calcCatalogFull` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -11910,8 +12062,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `myOrder_calcCatalogFull`(vSelf INT)
BEGIN
@@ -11934,6 +12084,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `myOrder_checkConfig` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -11941,8 +12093,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `myOrder_checkConfig`(vSelf INT)
proc: BEGIN
@@ -11961,6 +12111,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `myOrder_checkMine` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -11968,8 +12120,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `myOrder_checkMine`(vSelf INT)
proc: BEGIN
@@ -11994,6 +12144,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `myOrder_configure` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -12001,8 +12153,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `myOrder_configure`(
vSelf INT,
@@ -12041,6 +12191,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `myOrder_configureForGuest` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -12048,8 +12200,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `myOrder_configureForGuest`(OUT vSelf INT)
BEGIN
@@ -12099,6 +12249,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `myOrder_confirm` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -12106,8 +12258,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `myOrder_confirm`(vSelf INT)
BEGIN
@@ -12120,6 +12270,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `myOrder_create` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -12127,8 +12279,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `myOrder_create`(
OUT vSelf INT,
@@ -12170,6 +12320,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `myOrder_getAvailable` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -12177,8 +12329,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `myOrder_getAvailable`(vSelf INT)
BEGIN
@@ -12196,6 +12346,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `myOrder_getTax` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -12203,8 +12355,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `myOrder_getTax`(vSelf INT)
READS SQL DATA
@@ -12230,6 +12380,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `myOrder_newWithAddress` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -12237,8 +12389,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `myOrder_newWithAddress`(
OUT vSelf INT,
@@ -12302,6 +12452,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `myOrder_newWithDate` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -12309,8 +12461,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `myOrder_newWithDate`(
OUT vSelf INT,
@@ -12374,6 +12524,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `myTicket_get` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -12381,8 +12533,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `myTicket_get`(vSelf INT)
BEGIN
@@ -12428,6 +12578,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `myTicket_getPackages` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -12435,8 +12587,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `myTicket_getPackages`(vSelf INT)
BEGIN
@@ -12461,6 +12611,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `myTicket_getRows` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -12468,8 +12620,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `myTicket_getRows`(vSelf INT)
BEGIN
@@ -12490,6 +12640,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `myTicket_getServices` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -12497,8 +12649,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `myTicket_getServices`(vSelf INT)
BEGIN
@@ -12517,6 +12667,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `myTicket_list` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -12524,8 +12676,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `myTicket_list`(vFrom DATE, vTo DATE)
BEGIN
@@ -12569,6 +12719,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `myTicket_logAccess` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -12576,8 +12728,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `myTicket_logAccess`(vSelf INT)
BEGIN
@@ -12597,6 +12747,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `myTpvTransaction_end` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -12604,8 +12756,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `myTpvTransaction_end`(
vSelf INT,
@@ -12633,6 +12783,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `myTpvTransaction_start` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -12640,8 +12792,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `myTpvTransaction_start`(
vAmount INT,
@@ -12660,6 +12810,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `order_addItem` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -12667,8 +12819,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `order_addItem`(
vSelf INT,
@@ -12778,6 +12928,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `order_calcCatalog` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -12785,8 +12937,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `order_calcCatalog`(vSelf INT)
BEGIN
@@ -12825,6 +12975,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `order_calcCatalogFromItem` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -12832,8 +12984,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `order_calcCatalogFromItem`(vSelf INT, vItem INT)
BEGIN
@@ -12865,6 +13015,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `order_calcCatalogFull` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -12872,8 +13024,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `order_calcCatalogFull`(vSelf INT)
BEGIN
@@ -12914,6 +13064,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `order_checkConfig` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -12921,8 +13073,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `order_checkConfig`(vSelf INT)
BEGIN
@@ -12991,6 +13141,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `order_checkEditable` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -12998,8 +13150,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `order_checkEditable`(vSelf INT)
BEGIN
@@ -13022,6 +13172,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `order_configure` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -13029,8 +13181,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `order_configure`(
vSelf INT,
@@ -13091,6 +13241,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `order_confirm` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -13098,8 +13250,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `order_confirm`(vSelf INT)
BEGIN
@@ -13117,6 +13267,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `order_confirmWithUser` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -13124,8 +13276,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `order_confirmWithUser`(vSelf INT, vUserId INT)
BEGIN
@@ -13149,6 +13299,7 @@ BEGIN
DECLARE vSale INT;
DECLARE vRate INT;
DECLARE vRowId INT;
+ DECLARE vPriceFixed DECIMAL(10,2);
DECLARE vDelivery DATE;
DECLARE vAddress INT;
DECLARE vIsConfirmed BOOL;
@@ -13301,11 +13452,8 @@ BEGIN
OPEN cRows;
- lRows:
- LOOP
-
+ lRows: LOOP
SET vDone = FALSE;
-
FETCH cRows INTO vRowId, vItem, vConcept, vAmount, vPrice, vRate, vIsLogifloraItem;
IF vDone THEN
@@ -13330,34 +13478,39 @@ BEGIN
SELECT s.quantity INTO vNewQuantity
FROM vn.sale s
WHERE id = vSale;
-
ELSE
+ -- Obtiene el coste
+ SELECT SUM(rc.`price`) valueSum INTO vPriceFixed
+ FROM orderRowComponent rc
+ JOIN vn.component c ON c.id = rc.componentFk
+ JOIN vn.componentType ct ON ct.id = c.typeFk AND ct.isBase
+ WHERE rc.rowFk = vRowId;
+
INSERT INTO vn.sale
- SET
- itemFk = vItem,
- ticketFk = vTicket,
- concept = vConcept,
- quantity = vAmount,
- price = vPrice,
- priceFixed = FALSE,
- isPriceFixed = TRUE;
+ SET itemFk = vItem,
+ ticketFk = vTicket,
+ concept = vConcept,
+ quantity = vAmount,
+ price = vPrice,
+ priceFixed = vPriceFixed,
+ 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;
+ SELECT vSale, rc.componentFk, rc.price
+ FROM orderRowComponent rc
+ JOIN vn.component c ON c.id = rc.componentFk
+ WHERE rc.rowFk = vRowId
+ GROUP BY vSale, rc.componentFk;
END IF;
+
UPDATE order_row SET Id_Movimiento = vSale
WHERE id = vRowId;
-- Inserta en putOrder si la compra es de Floramondo
IF vIsLogifloraItem THEN
-
CALL cache.availableNoRaids_refresh(vCalc,FALSE,vWarehouse,vShipment);
SET @available := 0;
@@ -13372,13 +13525,15 @@ BEGIN
WHERE item_id = vItem
AND calc_id = vCalc;
- INSERT INTO edi.putOrder (deliveryInformationID,
+ INSERT INTO edi.putOrder (
+ deliveryInformationID,
supplyResponseId,
quantity ,
EndUserPartyId,
EndUserPartyGLN,
FHAdminNumber,
- saleFk)
+ saleFk
+ )
SELECT di.ID,
i.supplyResponseFk,
CEIL((vAmount - @available)/ sr.NumberOfItemsPerCask),
@@ -13396,31 +13551,10 @@ BEGIN
AND di.LatestOrderDateTime > util.VN_NOW()
AND vAmount > @available
LIMIT 1;
-
END IF;
-
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;
@@ -13435,6 +13569,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `order_doRecalc` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -13442,8 +13578,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `order_doRecalc`()
proc: BEGIN
@@ -13501,6 +13635,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `order_getAvailable` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -13508,8 +13644,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `order_getAvailable`(vSelf INT)
BEGIN
@@ -13546,6 +13680,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `order_getTax` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -13553,8 +13689,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `order_getTax`()
READS SQL DATA
@@ -13621,6 +13755,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `order_getTotal` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -13628,8 +13764,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `order_getTotal`()
BEGIN
@@ -13659,6 +13793,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `order_recalc` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -13666,8 +13802,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `order_recalc`(vSelf INT)
BEGIN
@@ -13705,6 +13839,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `order_requestRecalc` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -13712,8 +13848,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `order_requestRecalc`(vSelf INT)
proc: BEGIN
@@ -13733,6 +13867,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `order_update` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -13740,8 +13876,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `order_update`(vSelf INT)
proc: BEGIN
@@ -13813,6 +13947,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `survey_vote` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -13820,8 +13956,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `survey_vote`(vAnswer INT)
BEGIN
@@ -13845,6 +13979,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `tpvTransaction_confirm` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -13852,8 +13988,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `tpvTransaction_confirm`(
vAmount INT
@@ -13970,6 +14104,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `tpvTransaction_confirmAll` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -13977,8 +14113,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `tpvTransaction_confirmAll`(vDate DATE)
BEGIN
@@ -14021,6 +14155,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `tpvTransaction_confirmById` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -14028,8 +14164,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `tpvTransaction_confirmById`(vOrder INT)
BEGIN
@@ -14063,6 +14197,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `tpvTransaction_confirmFromExport` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -14070,8 +14206,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `tpvTransaction_confirmFromExport`()
BEGIN
@@ -14129,6 +14263,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `tpvTransaction_end` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -14136,8 +14272,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `tpvTransaction_end`(
vSelf INT,
@@ -14163,6 +14297,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `tpvTransaction_start` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -14170,8 +14306,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `tpvTransaction_start`(
vAmount INT,
@@ -14247,6 +14381,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `tpvTransaction_undo` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -14254,8 +14390,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `tpvTransaction_undo`(vSelf INT)
p: BEGIN
@@ -14341,6 +14475,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `visitUser_new` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -14348,8 +14484,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `visitUser_new`(
vAccess INT
@@ -14375,6 +14509,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `visit_listByBrowser` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -14382,8 +14518,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `visit_listByBrowser`(vFrom DATE, vTo DATE)
BEGIN
@@ -14412,6 +14546,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `visit_register` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -14419,8 +14555,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `visit_register`(
vVisit INT
@@ -14605,24 +14739,23 @@ DROP TABLE IF EXISTS `cdrConf`;
/*!50001 DROP VIEW IF EXISTS `cdrConf`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `cdrConf` (
- `calldate` tinyint NOT NULL,
- `clid` tinyint NOT NULL,
- `src` tinyint NOT NULL,
- `dst` tinyint NOT NULL,
- `dcontext` tinyint NOT NULL,
- `channel` tinyint NOT NULL,
- `dstchannel` tinyint NOT NULL,
- `lastapp` tinyint NOT NULL,
- `lastdata` tinyint NOT NULL,
- `duration` tinyint NOT NULL,
- `billsec` tinyint NOT NULL,
- `disposition` tinyint NOT NULL,
- `amaflags` tinyint NOT NULL,
- `accountcode` tinyint NOT NULL,
- `uniqueid` tinyint NOT NULL,
- `userfield` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `cdrConf` AS SELECT
+ 1 AS `calldate`,
+ 1 AS `clid`,
+ 1 AS `src`,
+ 1 AS `dst`,
+ 1 AS `dcontext`,
+ 1 AS `channel`,
+ 1 AS `dstchannel`,
+ 1 AS `lastapp`,
+ 1 AS `lastdata`,
+ 1 AS `duration`,
+ 1 AS `billsec`,
+ 1 AS `disposition`,
+ 1 AS `amaflags`,
+ 1 AS `accountcode`,
+ 1 AS `uniqueid`,
+ 1 AS `userfield` */;
SET character_set_client = @saved_cs_client;
--
@@ -14703,13 +14836,12 @@ DROP TABLE IF EXISTS `followmeConf`;
/*!50001 DROP VIEW IF EXISTS `followmeConf`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `followmeConf` (
- `name` tinyint NOT NULL,
- `music` tinyint NOT NULL,
- `context` tinyint NOT NULL,
- `takecall` tinyint NOT NULL,
- `declinecall` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `followmeConf` AS SELECT
+ 1 AS `name`,
+ 1 AS `music`,
+ 1 AS `context`,
+ 1 AS `takecall`,
+ 1 AS `declinecall` */;
SET character_set_client = @saved_cs_client;
--
@@ -14738,12 +14870,11 @@ DROP TABLE IF EXISTS `followmeNumberConf`;
/*!50001 DROP VIEW IF EXISTS `followmeNumberConf`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `followmeNumberConf` (
- `name` tinyint NOT NULL,
- `ordinal` tinyint NOT NULL,
- `phonenumber` tinyint NOT NULL,
- `timeout` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `followmeNumberConf` AS SELECT
+ 1 AS `name`,
+ 1 AS `ordinal`,
+ 1 AS `phonenumber`,
+ 1 AS `timeout` */;
SET character_set_client = @saved_cs_client;
--
@@ -14814,15 +14945,14 @@ DROP TABLE IF EXISTS `queueConf`;
/*!50001 DROP VIEW IF EXISTS `queueConf`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `queueConf` (
- `name` tinyint NOT NULL,
- `strategy` tinyint NOT NULL,
- `timeout` tinyint NOT NULL,
- `retry` tinyint NOT NULL,
- `weight` tinyint NOT NULL,
- `maxlen` tinyint NOT NULL,
- `ringinuse` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `queueConf` AS SELECT
+ 1 AS `name`,
+ 1 AS `strategy`,
+ 1 AS `timeout`,
+ 1 AS `retry`,
+ 1 AS `weight`,
+ 1 AS `maxlen`,
+ 1 AS `ringinuse` */;
SET character_set_client = @saved_cs_client;
--
@@ -14871,12 +15001,11 @@ DROP TABLE IF EXISTS `queueMemberConf`;
/*!50001 DROP VIEW IF EXISTS `queueMemberConf`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `queueMemberConf` (
- `uniqueid` tinyint NOT NULL,
- `queue_name` tinyint NOT NULL,
- `interface` tinyint NOT NULL,
- `paused` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `queueMemberConf` AS SELECT
+ 1 AS `uniqueid`,
+ 1 AS `queue_name`,
+ 1 AS `interface`,
+ 1 AS `paused` */;
SET character_set_client = @saved_cs_client;
--
@@ -15072,32 +15201,31 @@ DROP TABLE IF EXISTS `sipConf`;
/*!50001 DROP VIEW IF EXISTS `sipConf`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `sipConf` (
- `id` tinyint NOT NULL,
- `name` tinyint NOT NULL,
- `callbackextension` tinyint NOT NULL,
- `md5secret` tinyint NOT NULL,
- `callerid` tinyint NOT NULL,
- `host` tinyint NOT NULL,
- `deny` tinyint NOT NULL,
- `permit` tinyint NOT NULL,
- `type` tinyint NOT NULL,
- `context` tinyint NOT NULL,
- `incominglimit` tinyint NOT NULL,
- `pickupgroup` tinyint NOT NULL,
- `careinvite` tinyint NOT NULL,
- `insecure` tinyint NOT NULL,
- `transport` tinyint NOT NULL,
- `nat` tinyint NOT NULL,
- `ipaddr` tinyint NOT NULL,
- `regseconds` tinyint NOT NULL,
- `port` tinyint NOT NULL,
- `defaultuser` tinyint NOT NULL,
- `useragent` tinyint NOT NULL,
- `lastms` tinyint NOT NULL,
- `fullcontact` tinyint NOT NULL,
- `regserver` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `sipConf` AS SELECT
+ 1 AS `id`,
+ 1 AS `name`,
+ 1 AS `callbackextension`,
+ 1 AS `md5secret`,
+ 1 AS `callerid`,
+ 1 AS `host`,
+ 1 AS `deny`,
+ 1 AS `permit`,
+ 1 AS `type`,
+ 1 AS `context`,
+ 1 AS `incominglimit`,
+ 1 AS `pickupgroup`,
+ 1 AS `careinvite`,
+ 1 AS `insecure`,
+ 1 AS `transport`,
+ 1 AS `nat`,
+ 1 AS `ipaddr`,
+ 1 AS `regseconds`,
+ 1 AS `port`,
+ 1 AS `defaultuser`,
+ 1 AS `useragent`,
+ 1 AS `lastms`,
+ 1 AS `fullcontact`,
+ 1 AS `regserver` */;
SET character_set_client = @saved_cs_client;
--
@@ -15161,6 +15289,8 @@ CREATE TABLE `sipReg` (
--
-- Dumping routines for database 'pbx'
--
+/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `clientFromPhone` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -15168,8 +15298,6 @@ CREATE TABLE `sipReg` (
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `clientFromPhone`(vPhone VARCHAR(255)) RETURNS int(11)
DETERMINISTIC
@@ -15184,6 +15312,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `phone_format` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -15191,8 +15321,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `phone_format`(vPhone VARCHAR(255)) RETURNS varchar(255) CHARSET utf8mb3 COLLATE utf8mb3_general_ci
DETERMINISTIC
@@ -15232,6 +15360,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `phone_isValid` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -15239,8 +15369,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `phone_isValid`(vPhone VARCHAR(255))
BEGIN
@@ -15267,6 +15395,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `queue_isValid` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -15274,8 +15404,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `queue_isValid`(vQueue VARCHAR(255))
BEGIN
@@ -15300,6 +15428,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `sip_getExtension` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -15307,8 +15437,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `sip_getExtension`(vUserId INT(10))
BEGIN
@@ -15330,6 +15458,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `sip_isValid` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -15337,8 +15467,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `sip_isValid`(vExtension VARCHAR(255))
BEGIN
@@ -15364,6 +15492,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `sip_setPassword` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -15371,8 +15501,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `sip_setPassword`(
vUser VARCHAR(255),
@@ -15389,141 +15517,6 @@ DELIMITER ;
/*!50003 SET character_set_results = @saved_cs_results */ ;
/*!50003 SET collation_connection = @saved_col_connection */ ;
---
--- Current Database: `postgresql`
---
-
-CREATE DATABASE /*!32312 IF NOT EXISTS*/ `postgresql` /*!40100 DEFAULT CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci */;
-
-USE `postgresql`;
-
---
--- Table structure for table `incometype_employee__`
---
-
-DROP TABLE IF EXISTS `incometype_employee__`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-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=utf8mb3 COLLATE=utf8mb3_general_ci COMMENT='@deprecated 2023-03-15';
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `labour_agreement`
---
-
-DROP TABLE IF EXISTS `labour_agreement`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `labour_agreement` (
- `labour_agreement_id` int(11) NOT NULL AUTO_INCREMENT,
- `month_hollidays` double DEFAULT NULL,
- `year_hours` int(11) DEFAULT NULL,
- `name` char(50) DEFAULT NULL,
- `date_START` date DEFAULT NULL,
- `date_END` date DEFAULT NULL,
- PRIMARY KEY (`labour_agreement_id`)
-) ENGINE=InnoDBDEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `media__`
---
-
-DROP TABLE IF EXISTS `media__`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `media__` (
- `media_id` int(11) NOT NULL AUTO_INCREMENT,
- `media_type_id` int(11) NOT NULL,
- `value` varchar(55) NOT NULL,
- `sort` int(11) DEFAULT NULL,
- PRIMARY KEY (`media_id`),
- KEY `media_media_type_id_idx` (`media_type_id`),
- CONSTRAINT `media___ibfk_1` FOREIGN KEY (`media_type_id`) REFERENCES `media_type` (`media_type_id`) ON DELETE NO ACTION ON UPDATE CASCADE
-) ENGINE=InnoDBDEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci COMMENT='@deprecated 2023-03-31';
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `media_type`
---
-
-DROP TABLE IF EXISTS `media_type`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `media_type` (
- `media_type_id` int(11) NOT NULL AUTO_INCREMENT,
- `name` varchar(15) NOT NULL,
- PRIMARY KEY (`media_type_id`),
- UNIQUE KEY `media_type_name_key` (`name`)
-) ENGINE=InnoDBDEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `professional_category__`
---
-
-DROP TABLE IF EXISTS `professional_category__`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `professional_category__` (
- `professional_category_id` int(11) NOT NULL AUTO_INCREMENT,
- `category_name` varchar(50) NOT NULL,
- `professional_levels_id` int(11) DEFAULT NULL,
- `fichajes` tinyint(4) NOT NULL DEFAULT 1,
- `holiday_days` decimal(3,1) DEFAULT NULL,
- `dayBreak` int(11) DEFAULT NULL,
- PRIMARY KEY (`professional_category_id`),
- UNIQUE KEY `professional_category_name_category_key` (`category_name`)
-) ENGINE=InnoDBDEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci COMMENT='@deprecated 2023-03-24';
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `profile_address`
---
-
-DROP TABLE IF EXISTS `profile_address`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `profile_address` (
- `profile_address_id` int(11) NOT NULL AUTO_INCREMENT,
- `profile_id` int(11) NOT NULL,
- `address_id` int(11) NOT NULL,
- PRIMARY KEY (`profile_address_id`),
- KEY `profile_address_address_id_idx` (`address_id`),
- KEY `profile_address_profile_id_idx` (`profile_id`)
-) ENGINE=InnoDBDEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `province__`
---
-
-DROP TABLE IF EXISTS `province__`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `province__` (
- `province_id` int(11) NOT NULL AUTO_INCREMENT,
- `name` varchar(15) NOT NULL,
- `nation_id` int(11) NOT NULL,
- PRIMARY KEY (`province_id`),
- UNIQUE KEY `province_name_key` (`name`)
-) ENGINE=InnoDBDEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci COMMENT='@deprecated 2023-03-21';
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Dumping events for database 'postgresql'
---
-
---
--- Dumping routines for database 'postgresql'
---
-
--
-- Current Database: `sage`
--
@@ -15692,10 +15685,9 @@ DROP TABLE IF EXISTS `clientLastTwoMonths`;
/*!50001 DROP VIEW IF EXISTS `clientLastTwoMonths`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `clientLastTwoMonths` (
- `clientFk` tinyint NOT NULL,
- `companyFk` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `clientLastTwoMonths` AS SELECT
+ 1 AS `clientFk`,
+ 1 AS `companyFk` */;
SET character_set_client = @saved_cs_client;
--
@@ -15840,6 +15832,10 @@ DROP TABLE IF EXISTS `config`;
CREATE TABLE `config` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`pendingTaxAccount` varchar(100) DEFAULT NULL COMMENT 'Cuenta contable IVA pendiente',
+ `nontaxableTransactionTypeFk` tinyint(4) DEFAULT NULL COMMENT 'Transacción Operaciones exentas',
+ `pendingServiceTransactionTypeFk` tinyint(4) DEFAULT NULL COMMENT 'Transacción Import. bienes y serv. corrientes pdte. liquidar',
+ `definitiveExportTransactionTypeFk` tinyint(4) DEFAULT NULL COMMENT 'Transacción Exportaciones definitivas',
+ `shipmentTransactionTypeFk` tinyint(4) DEFAULT NULL COMMENT 'Transacción Envíos definitivos a Canarias, Ceuta y Melilla',
PRIMARY KEY (`id`)
) ENGINE=InnoDBDEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
@@ -16201,10 +16197,9 @@ DROP TABLE IF EXISTS `supplierLastThreeMonths`;
/*!50001 DROP VIEW IF EXISTS `supplierLastThreeMonths`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `supplierLastThreeMonths` (
- `supplierFk` tinyint NOT NULL,
- `companyFk` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `supplierLastThreeMonths` AS SELECT
+ 1 AS `supplierFk`,
+ 1 AS `companyFk` */;
SET character_set_client = @saved_cs_client;
--
@@ -16230,6 +16225,8 @@ CREATE TABLE `taxType` (
--
-- Dumping routines for database 'sage'
--
+/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `company_getCode` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -16237,8 +16234,6 @@ CREATE TABLE `taxType` (
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `company_getCode`(vCompanyFk INT) RETURNS int(2)
READS SQL DATA
@@ -16267,6 +16262,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `accountingMovements_add` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -16274,8 +16271,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `accountingMovements_add`(
vYear INT,
@@ -16310,9 +16305,8 @@ BEGIN
FROM Naciones
WHERE Nacion ='CEUTA Y MELILLA';
- SELECT CodigoTransaccion INTO vDuaTransactionFk
- FROM TiposTransacciones
- WHERE Transaccion = 'Import. bienes y serv. corrientes pdte. liquidar';
+ SELECT pendingServiceTransactionTypeFk INTO vDuaTransactionFk
+ FROM config;
SELECT id INTO vTaxImportFk
FROM taxType
@@ -16326,13 +16320,11 @@ BEGIN
FROM taxType
WHERE code = 'import4';
- SELECT CodigoTransaccion INTO vTransactionExportFk
- FROM TiposTransacciones
- WHERE Transaccion = 'Exportaciones definitivas';
+ SELECT definitiveExportTransactionTypeFk INTO vTransactionExportFk
+ FROM config;
- SELECT CodigoTransaccion INTO vTransactionExportTaxFreeFk
- FROM TiposTransacciones
- WHERE Transaccion = 'Envíos definitivos a Canarias, Ceuta y Melilla';
+ SELECT shipmentTransactionTypeFk INTO vTransactionExportTaxFreeFk
+ FROM config;
SELECT codeSage INTO vInvoiceTypeInformativeCode
FROM invoiceType WHERE code ='informative';
@@ -16734,6 +16726,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `clientSupplier_add` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -16741,8 +16735,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `clientSupplier_add`(vCompanyFk INT)
BEGIN
@@ -16871,6 +16863,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `invoiceIn_add` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -16878,8 +16872,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `invoiceIn_add`(vInvoiceInFk INT, vXDiarioFk INT)
BEGIN
@@ -17086,6 +17078,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `invoiceIn_manager` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -17093,8 +17087,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `invoiceIn_manager`(vYear INT, vCompanyFk INT)
BEGIN
@@ -17370,6 +17362,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `invoiceOut_add` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -17377,8 +17371,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `invoiceOut_add`(IN vInvoiceOutFk INT, IN vXDiarioFk INT)
BEGIN
@@ -17577,6 +17569,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `invoiceOut_manager` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -17584,8 +17578,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `invoiceOut_manager`(vYear INT, vCompanyFk INT)
BEGIN
@@ -17644,6 +17636,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `pgc_add` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -17651,8 +17645,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `pgc_add`(vCompanyFk INT)
BEGIN
@@ -17752,16 +17744,15 @@ DROP TABLE IF EXISTS `Account`;
/*!50001 DROP VIEW IF EXISTS `Account`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `Account` (
- `id` tinyint NOT NULL,
- `name` tinyint NOT NULL,
- `password` tinyint NOT NULL,
- `roleFk` tinyint NOT NULL,
- `active` tinyint NOT NULL,
- `email` tinyint NOT NULL,
- `created` tinyint NOT NULL,
- `updated` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `Account` AS SELECT
+ 1 AS `id`,
+ 1 AS `name`,
+ 1 AS `password`,
+ 1 AS `roleFk`,
+ 1 AS `active`,
+ 1 AS `email`,
+ 1 AS `created`,
+ 1 AS `updated` */;
SET character_set_client = @saved_cs_client;
--
@@ -17772,13 +17763,12 @@ DROP TABLE IF EXISTS `Role`;
/*!50001 DROP VIEW IF EXISTS `Role`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `Role` (
- `id` tinyint NOT NULL,
- `name` tinyint NOT NULL,
- `description` tinyint NOT NULL,
- `created` tinyint NOT NULL,
- `modified` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `Role` AS SELECT
+ 1 AS `id`,
+ 1 AS `name`,
+ 1 AS `description`,
+ 1 AS `created`,
+ 1 AS `modified` */;
SET character_set_client = @saved_cs_client;
--
@@ -17789,12 +17779,11 @@ DROP TABLE IF EXISTS `RoleMapping`;
/*!50001 DROP VIEW IF EXISTS `RoleMapping`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `RoleMapping` (
- `id` tinyint NOT NULL,
- `principalType` tinyint NOT NULL,
- `principalId` tinyint NOT NULL,
- `roleId` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `RoleMapping` AS SELECT
+ 1 AS `id`,
+ 1 AS `principalType`,
+ 1 AS `principalId`,
+ 1 AS `roleId` */;
SET character_set_client = @saved_cs_client;
--
@@ -17805,17 +17794,49 @@ DROP TABLE IF EXISTS `User`;
/*!50001 DROP VIEW IF EXISTS `User`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `User` (
- `id` tinyint NOT NULL,
- `realm` tinyint NOT NULL,
- `username` tinyint NOT NULL,
- `password` tinyint NOT NULL,
- `email` tinyint NOT NULL,
- `emailVerified` tinyint NOT NULL,
- `verificationToken` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `User` AS SELECT
+ 1 AS `id`,
+ 1 AS `realm`,
+ 1 AS `username`,
+ 1 AS `password`,
+ 1 AS `email`,
+ 1 AS `emailVerified`,
+ 1 AS `verificationToken` */;
SET character_set_client = @saved_cs_client;
+--
+-- Table structure for table `accessTokenConfig`
+--
+
+DROP TABLE IF EXISTS `accessTokenConfig`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `accessTokenConfig` (
+ `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `renewPeriod` int(10) unsigned DEFAULT NULL,
+ `courtesyTime` int(10) unsigned DEFAULT NULL,
+ `renewInterval` int(10) unsigned DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDBDEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `authCode`
+--
+
+DROP TABLE IF EXISTS `authCode`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `authCode` (
+ `userFk` int(10) unsigned NOT NULL,
+ `code` int(11) NOT NULL,
+ `expires` bigint(20) NOT NULL,
+ PRIMARY KEY (`userFk`),
+ UNIQUE KEY `authCode_unique` (`code`),
+ CONSTRAINT `authCode_user_id_fk` FOREIGN KEY (`userFk`) REFERENCES `account`.`user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
--
-- Table structure for table `defaultViewConfig`
--
@@ -17915,9 +17936,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_unicode_ci */ ;;
+/*!50003 SET character_set_client = utf8mb3 */ ;;
+/*!50003 SET character_set_results = utf8mb3 */ ;;
+/*!50003 SET collation_connection = utf8mb3_general_ci */ ;;
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;;
/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;;
/*!50003 SET @saved_time_zone = @@time_zone */ ;;
@@ -17934,6 +17955,8 @@ DELIMITER ;
--
-- Dumping routines for database 'salix'
--
+/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `accessToken_prune` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -17941,8 +17964,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `accessToken_prune`()
BEGIN
@@ -18238,6 +18259,8 @@ DELIMITER ;
--
-- Dumping routines for database 'stock'
--
+/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `inbound_addPick` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -18245,8 +18268,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `inbound_addPick`(
vSelf INT,
@@ -18267,6 +18288,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `inbound_removePick` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -18274,8 +18297,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `inbound_removePick`(
vSelf INT,
@@ -18300,6 +18321,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `inbound_requestQuantity` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -18307,8 +18330,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `inbound_requestQuantity`(
vSelf INT,
@@ -18374,6 +18395,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `inbound_sync` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -18381,8 +18404,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `inbound_sync`(vSelf INT)
BEGIN
@@ -18471,6 +18492,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `log_add` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -18478,8 +18501,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `log_add`(IN `vTableName` VARCHAR(255), IN `vNewId` VARCHAR(255), IN `vOldId` VARCHAR(255))
proc: BEGIN
@@ -18505,6 +18526,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `log_clean` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -18512,8 +18535,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `log_clean`()
BEGIN
@@ -18525,6 +18546,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `log_delete` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -18532,8 +18555,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `log_delete`(vTableName VARCHAR(255), vTableId INT)
proc: BEGIN
@@ -18557,6 +18578,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `log_refreshAll` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -18564,8 +18587,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `log_refreshAll`()
BEGIN
@@ -18603,6 +18624,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `log_refreshBuy` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -18610,8 +18633,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `log_refreshBuy`(
`vTableName` VARCHAR(255),
@@ -18690,6 +18711,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `log_refreshOrder` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -18697,8 +18720,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `log_refreshOrder`(
`vTableName` VARCHAR(255),
@@ -18750,6 +18771,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `log_refreshSale` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -18757,8 +18780,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `log_refreshSale`(
`vTableName` VARCHAR(255),
@@ -18828,6 +18849,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `log_sync` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -18835,8 +18858,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `log_sync`(vSync BOOL)
proc: BEGIN
@@ -18964,6 +18985,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `log_syncNoWait` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -18971,8 +18994,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `log_syncNoWait`()
BEGIN
@@ -18993,6 +19014,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `outbound_requestQuantity` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -19000,8 +19023,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `outbound_requestQuantity`(
vSelf INT,
@@ -19067,6 +19088,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `outbound_sync` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -19074,8 +19097,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `outbound_sync`(vSelf INT)
BEGIN
@@ -19158,6 +19179,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `visible_log` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -19165,8 +19188,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `visible_log`(
vIsPicked BOOL,
@@ -19280,12 +19301,11 @@ DROP TABLE IF EXISTS `eventLogGrouped`;
/*!50001 DROP VIEW IF EXISTS `eventLogGrouped`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `eventLogGrouped` (
- `lastHappened` tinyint NOT NULL,
- `nErrors` tinyint NOT NULL,
- `event` tinyint NOT NULL,
- `error` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `eventLogGrouped` AS SELECT
+ 1 AS `lastHappened`,
+ 1 AS `nErrors`,
+ 1 AS `event`,
+ 1 AS `error` */;
SET character_set_client = @saved_cs_client;
--
@@ -19442,6 +19462,8 @@ DELIMITER ;
--
-- Dumping routines for database 'util'
--
+/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `accountShortToStandard` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -19449,8 +19471,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `accountShortToStandard`(vAccount VARCHAR(10)) RETURNS varchar(10) CHARSET utf8mb3 COLLATE utf8mb3_unicode_ci
DETERMINISTIC
@@ -19462,6 +19482,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `capitalizeFirst` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -19469,8 +19491,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `capitalizeFirst`(vString VARCHAR(255)) RETURNS varchar(255) CHARSET utf8mb3 COLLATE utf8mb3_general_ci
NO SQL
@@ -19516,6 +19536,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `crypt` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -19523,8 +19545,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `crypt`(vText VARCHAR(255), vKey VARCHAR(255)) RETURNS varchar(255) CHARSET utf8mb3 COLLATE utf8mb3_general_ci
READS SQL DATA
@@ -19542,6 +19562,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `cryptOff` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -19549,8 +19571,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `cryptOff`(vText VARCHAR(255), vKey VARCHAR(255)) RETURNS varchar(255) CHARSET utf8mb3 COLLATE utf8mb3_general_ci
READS SQL DATA
@@ -19568,6 +19588,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `dayEnd` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -19575,8 +19597,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `dayEnd`(vDated DATE) RETURNS datetime
NO SQL
@@ -19595,6 +19615,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `firstDayOfMonth` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -19602,8 +19624,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `firstDayOfMonth`(vDate DATE) RETURNS date
NO SQL
@@ -19622,6 +19642,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `firstDayOfYear` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -19629,8 +19651,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `firstDayOfYear`(vDate DATE) RETURNS date
NO SQL
@@ -19649,6 +19669,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `formatRow` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -19656,8 +19678,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `formatRow`(vType CHAR(3), vValues VARCHAR(512)) RETURNS varchar(512) CHARSET utf8mb3 COLLATE utf8mb3_unicode_ci
DETERMINISTIC
@@ -19682,6 +19702,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `formatTable` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -19689,8 +19711,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `formatTable`(vFields VARCHAR(512), vOldValues VARCHAR(512), vNewValues VARCHAR(512)) RETURNS text CHARSET utf8mb3 COLLATE utf8mb3_unicode_ci
DETERMINISTIC
@@ -19717,6 +19737,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `hasDateOverlapped` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -19724,8 +19746,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `hasDateOverlapped`(vSarted1 DATE, vEnded1 DATE, vSarted2 DATE, vEnded2 DATE) RETURNS tinyint(1)
DETERMINISTIC
@@ -19739,6 +19759,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `hmacSha2` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -19746,8 +19768,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `hmacSha2`(`vAlg` SMALLINT, `vMsg` MEDIUMBLOB, `vKey` MEDIUMBLOB) RETURNS varchar(128) CHARSET utf8mb3 COLLATE utf8mb3_general_ci
NO SQL
@@ -19783,6 +19803,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `isLeapYear` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -19790,8 +19812,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `isLeapYear`(vYear INT) RETURNS tinyint(1)
DETERMINISTIC
@@ -19805,6 +19825,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `json_removeNulls` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -19812,8 +19834,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `json_removeNulls`(vObject JSON) RETURNS longtext CHARSET utf8mb4 COLLATE utf8mb4_bin
DETERMINISTIC
@@ -19849,6 +19869,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `lang` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -19856,8 +19878,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `lang`() RETURNS char(2) CHARSET utf8mb3 COLLATE utf8mb3_general_ci
NO SQL
@@ -19875,6 +19895,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `lastDayOfYear` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -19882,8 +19904,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `lastDayOfYear`(vDate DATE) RETURNS date
NO SQL
@@ -19902,6 +19922,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `log_formatDate` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -19909,8 +19931,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `log_formatDate`(vInstance JSON) RETURNS longtext CHARSET utf8mb4 COLLATE utf8mb4_bin
DETERMINISTIC
@@ -19944,6 +19964,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `midnight` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -19951,8 +19973,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `midnight`() RETURNS datetime
READS SQL DATA
@@ -19966,6 +19986,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `mockTime` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -19973,30 +19995,15 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `mockTime`() RETURNS datetime
DETERMINISTIC
BEGIN
/**
- * Returns the mockTime with predefined timezone or current dateTime
- * depending of config.mockEnabled
- *
- * @return formatted datetime
+ * Returns current dateTime
+ *
+ * @return current datetime
*/
--- FIXME: #5041 Commented because there is slowness when querying a table
-/*
- DECLARE vMockEnabled BOOL;
-
- SELECT mockEnabled INTO vMockEnabled FROM config LIMIT 1;
-
- IF vMockEnabled THEN
- RETURN mockTimeBase(FALSE);
- ELSE
- RETURN NOW();
- END IF;
-*/
RETURN NOW();
END ;;
DELIMITER ;
@@ -20004,6 +20011,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `mockTimeBase` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -20011,8 +20020,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `mockTimeBase`(vIsUtc BOOL) RETURNS datetime
DETERMINISTIC
@@ -20042,6 +20049,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `mockUtcTime` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -20049,8 +20058,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `mockUtcTime`() RETURNS datetime
DETERMINISTIC
@@ -20079,6 +20086,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `nextWeek` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -20086,8 +20095,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `nextWeek`(vYearWeek INT) RETURNS int(11)
DETERMINISTIC
@@ -20110,6 +20117,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `notification_send` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -20117,8 +20126,6 @@ DELIMITER ;
/*!50003 SET character_set_client = utf8mb3 */ ;
/*!50003 SET character_set_results = utf8mb3 */ ;
/*!50003 SET collation_connection = utf8mb3_general_ci */ ;
-/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
-/*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `notification_send`(vNotificationName VARCHAR(255), vParams TEXT, vAuthorFk INT) RETURNS int(11)
MODIFIES SQL DATA
@@ -20144,6 +20151,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `quarterFirstDay` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -20151,8 +20160,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `quarterFirstDay`(vYear INT, vQuarter INT) RETURNS date
DETERMINISTIC
@@ -20164,6 +20171,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `quoteIdentifier` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -20171,8 +20180,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `quoteIdentifier`(vString TEXT) RETURNS text CHARSET utf8mb3 COLLATE utf8mb3_general_ci
NO SQL
@@ -20185,6 +20192,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `stringXor` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -20192,8 +20201,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `stringXor`(vString MEDIUMBLOB, vConst TINYINT UNSIGNED) RETURNS mediumblob
NO SQL
@@ -20221,6 +20228,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `today` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -20228,8 +20237,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `today`() RETURNS date
DETERMINISTIC
@@ -20248,6 +20255,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `tomorrow` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -20255,8 +20264,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `tomorrow`() RETURNS date
DETERMINISTIC
@@ -20273,6 +20280,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `twoDaysAgo` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -20280,8 +20289,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `twoDaysAgo`() RETURNS date
DETERMINISTIC
@@ -20298,6 +20305,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `VN_CURDATE` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -20305,8 +20314,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `VN_CURDATE`() RETURNS date
DETERMINISTIC
@@ -20321,6 +20328,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `VN_CURTIME` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -20328,8 +20337,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `VN_CURTIME`() RETURNS time
DETERMINISTIC
@@ -20344,6 +20351,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `VN_NOW` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -20351,8 +20360,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `VN_NOW`() RETURNS datetime
DETERMINISTIC
@@ -20367,6 +20374,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `VN_UNIX_TIMESTAMP` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -20374,8 +20383,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `VN_UNIX_TIMESTAMP`() RETURNS int(11)
DETERMINISTIC
@@ -20390,6 +20397,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `VN_UTC_DATE` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -20397,8 +20406,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `VN_UTC_DATE`() RETURNS date
DETERMINISTIC
@@ -20413,6 +20420,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `VN_UTC_TIME` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -20420,8 +20429,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `VN_UTC_TIME`() RETURNS time
DETERMINISTIC
@@ -20436,6 +20443,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `VN_UTC_TIMESTAMP` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -20443,8 +20452,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `VN_UTC_TIMESTAMP`() RETURNS datetime
DETERMINISTIC
@@ -20459,6 +20466,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `yearRelativePosition` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -20466,8 +20475,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `yearRelativePosition`(vYear INT) RETURNS varchar(20) CHARSET utf8mb3 COLLATE utf8mb3_general_ci
DETERMINISTIC
@@ -20500,6 +20507,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `yesterday` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -20507,8 +20516,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `yesterday`() RETURNS date
DETERMINISTIC
@@ -20525,6 +20532,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `checkHex` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -20532,8 +20541,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `checkHex`(vParam VARCHAR(255))
BEGIN
@@ -20551,122 +20558,8 @@ 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 `compareObjects` */;
-/*!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 ;;
-CREATE DEFINER=`root`@`localhost` PROCEDURE `compareObjects`(vChain VARCHAR(45),vCompare VARCHAR(45))
- READS SQL DATA
-BEGIN
-/**
- * Devuelve un listado de todos los procedimientos, funciones
- * eventos, disparadores y vistas que estan incluidos en las dos cadenadas dadas.
- *
- * Es util para buscar una columna de una tabla en concreto
- * @param vChain Cadena a buscar
- * @param vCompare Cadena a buscar y comparar los resultados con la primera cadena
- * @select Listado de objetos
- */
- SET vChain = CONCAT('%', vChain, '%');
- SET vCompare = CONCAT('%', vCompare, '%');
- SELECT * FROM
- (
- SELECT t1.* FROM
- (
- SELECT
- `db`,
- `name`,
- `type`,
- `body`,
- `created`,
- `modified`
- FROM `mysql`.`proc`
- WHERE `body` LIKE vChain COLLATE utf8_general_ci
- UNION ALL
- SELECT
- `db`,
- `name`,
- 'EVENT',
- `body_utf8`,
- `created`,
- `modified`
- FROM `mysql`.`event`
- WHERE `body_utf8` LIKE vChain COLLATE utf8_general_ci
- UNION ALL
- SELECT
- `EVENT_OBJECT_SCHEMA`,
- `TRIGGER_NAME`,
- 'TRIGGER',
- `ACTION_STATEMENT`,
- NULL,
- NULL
- FROM `information_schema`.`TRIGGERS`
- WHERE `ACTION_STATEMENT` LIKE vChain COLLATE utf8_general_ci
- UNION ALL
- SELECT
- `TABLE_SCHEMA`,
- `TABLE_NAME`,
- 'VIEW',
- `VIEW_DEFINITION`,
- NULL,
- NULL
- FROM `information_schema`.`VIEWS`
- WHERE `VIEW_DEFINITION` LIKE vChain COLLATE utf8_general_ci
- ) t1
- JOIN (
- SELECT
- `db`,
- `name`,
- `type`,
- `body`,
- `created`,
- `modified`
- FROM `mysql`.`proc`
- WHERE `body` LIKE vCompare COLLATE utf8_general_ci
- UNION ALL
- SELECT
- `db`,
- `name`,
- 'EVENT',
- `body_utf8`,
- `created`,
- `modified`
- FROM `mysql`.`event`
- WHERE `body_utf8` LIKE vCompare COLLATE utf8_general_ci
- UNION ALL
- SELECT
- `EVENT_OBJECT_SCHEMA`,
- `TRIGGER_NAME`,
- 'TRIGGER',
- `ACTION_STATEMENT`,
- NULL,
- NULL
- FROM `information_schema`.`TRIGGERS`
- WHERE `ACTION_STATEMENT` LIKE vCompare COLLATE utf8_general_ci
- UNION ALL
- SELECT
- `TABLE_SCHEMA`,
- `TABLE_NAME`,
- 'VIEW',
- `VIEW_DEFINITION`,
- NULL,
- NULL
- FROM `information_schema`.`VIEWS`
- WHERE `VIEW_DEFINITION` LIKE vCompare COLLATE utf8_general_ci) t2 ON t2.name = t1.name
- ORDER BY t1.`db`, t1.`name`
- ) t;
-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 `debugAdd` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -20674,8 +20567,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `debugAdd`(vVariable VARCHAR(255), vValue VARCHAR(255))
MODIFIES SQL DATA
@@ -20700,6 +20591,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `exec` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -20707,8 +20600,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `exec`(vSqlQuery TEXT)
SQL SECURITY INVOKER
@@ -20731,77 +20622,8 @@ 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 `findObject` */;
-/*!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 ;;
-CREATE DEFINER=`root`@`localhost` PROCEDURE `findObject`(vChain VARCHAR(45))
- READS SQL DATA
-BEGIN
-/**
- * Devuelve un listado de todos los procedimientos, funciones
- * eventos, disparadores y vistas que inluyen una cadena dada.
- *
- * @param vChain Cadena a buscar
- * @select Listado de objetos
- */
- SET vChain = CONCAT('%', vChain, '%');
-
- SELECT * FROM
- (
- SELECT
- `routine_schema` `schema`,
- `routine_name` `name`,
- `routine_type` `type`,
- `routine_definition` `definition`,
- `created`,
- `last_altered`
- FROM `information_schema`.`routines`
- WHERE `routine_definition` LIKE vChain COLLATE utf8_general_ci
- UNION ALL
- SELECT
- `event_schema`,
- `event_name`,
- 'EVENT',
- `event_definition`,
- `created`,
- `last_altered`
- FROM `information_schema`.`events`
- WHERE `event_definition` LIKE vChain COLLATE utf8_general_ci
- UNION ALL
- SELECT
- `EVENT_OBJECT_SCHEMA`,
- `TRIGGER_NAME`,
- 'TRIGGER',
- `ACTION_STATEMENT`,
- NULL,
- NULL
- FROM `information_schema`.`TRIGGERS`
- WHERE `ACTION_STATEMENT` LIKE vChain COLLATE utf8_general_ci
- UNION ALL
- SELECT
- `TABLE_SCHEMA`,
- `TABLE_NAME`,
- 'VIEW',
- `VIEW_DEFINITION`,
- NULL,
- NULL
- FROM `information_schema`.`VIEWS`
- WHERE `VIEW_DEFINITION` LIKE vChain COLLATE utf8_general_ci
- ) t
- ORDER BY `schema`, `name`;
-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 `log_add` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -20809,8 +20631,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `log_add`(
vSchema VARCHAR(45),
@@ -20840,6 +20660,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `log_addWithUser` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -20847,8 +20669,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `log_addWithUser`(
vSchema VARCHAR(45),
@@ -20890,6 +20710,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `log_cleanInstances` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -20897,8 +20719,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `log_cleanInstances`(
vActionCode VARCHAR(45),
@@ -20958,6 +20778,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `procNoOverlap` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -20965,8 +20787,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `procNoOverlap`(procName VARCHAR(255))
SQL SECURITY INVOKER
@@ -20995,6 +20815,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `proc_changedPrivs` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -21002,8 +20824,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `proc_changedPrivs`()
BEGIN
@@ -21023,6 +20843,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `proc_restorePrivs` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -21030,8 +20852,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `proc_restorePrivs`()
BEGIN
@@ -21051,6 +20871,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `proc_savePrivs` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -21058,8 +20880,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `proc_savePrivs`()
BEGIN
@@ -21079,6 +20899,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `slowLog_prune` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -21086,8 +20908,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `slowLog_prune`()
BEGIN
@@ -21115,6 +20935,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `throw` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -21122,8 +20944,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `throw`(vMessage CHAR(55))
BEGIN
@@ -21140,6 +20960,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `time_createTable` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -21147,8 +20969,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `time_createTable`(vStarted DATE, vEnded DATE)
BEGIN
@@ -21168,6 +20988,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `warn` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -21175,8 +20997,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `warn`(vCode CHAR(35))
BEGIN
@@ -21205,11 +21025,10 @@ DROP TABLE IF EXISTS `NewView`;
/*!50001 DROP VIEW IF EXISTS `NewView`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `NewView` (
- `clientFk` tinyint NOT NULL,
- `lastShipped` tinyint NOT NULL,
- `notBuyingMonths` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `NewView` AS SELECT
+ 1 AS `clientFk`,
+ 1 AS `lastShipped`,
+ 1 AS `notBuyingMonths` */;
SET character_set_client = @saved_cs_client;
--
@@ -21376,11 +21195,10 @@ DROP TABLE IF EXISTS `__coolerPathDetail`;
/*!50001 DROP VIEW IF EXISTS `__coolerPathDetail`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `__coolerPathDetail` (
- `id` tinyint NOT NULL,
- `coolerPathFk` tinyint NOT NULL,
- `hallway` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `__coolerPathDetail` AS SELECT
+ 1 AS `id`,
+ 1 AS `coolerPathFk`,
+ 1 AS `hallway` */;
SET character_set_client = @saved_cs_client;
--
@@ -21860,16 +21678,15 @@ DROP TABLE IF EXISTS `agencyTerm`;
/*!50001 DROP VIEW IF EXISTS `agencyTerm`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `agencyTerm` (
- `agencyFk` tinyint NOT NULL,
- `minimumPackages` tinyint NOT NULL,
- `kmPrice` tinyint NOT NULL,
- `packagePrice` tinyint NOT NULL,
- `routePrice` tinyint NOT NULL,
- `minimumKm` tinyint NOT NULL,
- `minimumM3` tinyint NOT NULL,
- `m3Price` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `agencyTerm` AS SELECT
+ 1 AS `agencyFk`,
+ 1 AS `minimumPackages`,
+ 1 AS `kmPrice`,
+ 1 AS `packagePrice`,
+ 1 AS `routePrice`,
+ 1 AS `minimumKm`,
+ 1 AS `minimumM3`,
+ 1 AS `m3Price` */;
SET character_set_client = @saved_cs_client;
--
@@ -21924,10 +21741,9 @@ DROP TABLE IF EXISTS `annualAverageInvoiced`;
/*!50001 DROP VIEW IF EXISTS `annualAverageInvoiced`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `annualAverageInvoiced` (
- `clientFk` tinyint NOT NULL,
- `invoiced` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `annualAverageInvoiced` AS SELECT
+ 1 AS `clientFk`,
+ 1 AS `invoiced` */;
SET character_set_client = @saved_cs_client;
--
@@ -22199,11 +22015,10 @@ DROP TABLE IF EXISTS `awbVolume`;
/*!50001 DROP VIEW IF EXISTS `awbVolume`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `awbVolume` (
- `awbFk` tinyint NOT NULL,
- `volume` tinyint NOT NULL,
- `buyFk` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `awbVolume` AS SELECT
+ 1 AS `awbFk`,
+ 1 AS `volume`,
+ 1 AS `buyFk` */;
SET character_set_client = @saved_cs_client;
--
@@ -22214,16 +22029,15 @@ DROP TABLE IF EXISTS `bank`;
/*!50001 DROP VIEW IF EXISTS `bank`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `bank` (
- `id` tinyint NOT NULL,
- `bank` tinyint NOT NULL,
- `account` tinyint NOT NULL,
- `cash` tinyint NOT NULL,
- `entityFk` tinyint NOT NULL,
- `isActive` tinyint NOT NULL,
- `currencyFk` tinyint NOT NULL,
- `code` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `bank` AS SELECT
+ 1 AS `id`,
+ 1 AS `bank`,
+ 1 AS `account`,
+ 1 AS `cash`,
+ 1 AS `entityFk`,
+ 1 AS `isActive`,
+ 1 AS `currencyFk`,
+ 1 AS `code` */;
SET character_set_client = @saved_cs_client;
--
@@ -22301,6 +22115,20 @@ CREATE TABLE `bankEntityConfig` (
) ENGINE=InnoDBDEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
+--
+-- Table structure for table `bankErrorCode`
+--
+
+DROP TABLE IF EXISTS `bankErrorCode`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `bankErrorCode` (
+ `code` char(5) NOT NULL,
+ `description` varchar(255) NOT NULL,
+ PRIMARY KEY (`code`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci COMMENT='Tabla de códigos de error bancario';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
--
-- Temporary table structure for view `bankPolicy`
--
@@ -22309,27 +22137,26 @@ DROP TABLE IF EXISTS `bankPolicy`;
/*!50001 DROP VIEW IF EXISTS `bankPolicy`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `bankPolicy` (
- `id` tinyint NOT NULL,
- `ref` tinyint NOT NULL,
- `amount` tinyint NOT NULL,
- `balanceInterestDrawn` tinyint NOT NULL,
- `commissionAvailableBalances` tinyint NOT NULL,
- `openingCommission` tinyint NOT NULL,
- `started` tinyint NOT NULL,
- `ended` tinyint NOT NULL,
- `bankFk` tinyint NOT NULL,
- `companyFk` tinyint NOT NULL,
- `supplierFk` tinyint NOT NULL,
- `description` tinyint NOT NULL,
- `hasGuarantee` tinyint NOT NULL,
- `dmsFk` tinyint NOT NULL,
- `notaryFk` tinyint NOT NULL,
- `currencyFk` tinyint NOT NULL,
- `amortizationTypeFk` tinyint NOT NULL,
- `periodicityTypeFk` tinyint NOT NULL,
- `insuranceExpired` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `bankPolicy` AS SELECT
+ 1 AS `id`,
+ 1 AS `ref`,
+ 1 AS `amount`,
+ 1 AS `balanceInterestDrawn`,
+ 1 AS `commissionAvailableBalances`,
+ 1 AS `openingCommission`,
+ 1 AS `started`,
+ 1 AS `ended`,
+ 1 AS `bankFk`,
+ 1 AS `companyFk`,
+ 1 AS `supplierFk`,
+ 1 AS `description`,
+ 1 AS `hasGuarantee`,
+ 1 AS `dmsFk`,
+ 1 AS `notaryFk`,
+ 1 AS `currencyFk`,
+ 1 AS `amortizationTypeFk`,
+ 1 AS `periodicityTypeFk`,
+ 1 AS `insuranceExpired` */;
SET character_set_client = @saved_cs_client;
--
@@ -22455,11 +22282,14 @@ CREATE TABLE `budget` (
`photo` blob DEFAULT NULL,
`amount` decimal(10,2) DEFAULT NULL,
`projectFk` int(11) NOT NULL,
+ `budgetStateFk` varchar(45) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `budget_FK` (`projectFk`),
KEY `budget_FK_1` (`userFk`),
KEY `budget_FK_2` (`departmentFk`),
KEY `budget_supplierFk` (`supplierFk`),
+ KEY `budgetStateFk` (`budgetStateFk`),
+ CONSTRAINT `budgetStateFk` FOREIGN KEY (`budgetStateFk`) REFERENCES `budgetState` (`code`) ON UPDATE CASCADE,
CONSTRAINT `budget_FK` FOREIGN KEY (`projectFk`) REFERENCES `project` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `budget_FK_1` FOREIGN KEY (`userFk`) REFERENCES `account`.`user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `budget_FK_2` FOREIGN KEY (`departmentFk`) REFERENCES `department` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
@@ -22554,6 +22384,22 @@ DELIMITER ;
/*!50003 SET character_set_results = @saved_cs_results */ ;
/*!50003 SET collation_connection = @saved_col_connection */ ;
+--
+-- Table structure for table `budgetState`
+--
+
+DROP TABLE IF EXISTS `budgetState`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `budgetState` (
+ `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `code` varchar(45) NOT NULL,
+ `description` varchar(45) DEFAULT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `budgetState_UN` (`code`)
+) ENGINE=InnoDBDEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
--
-- Table structure for table `business`
--
@@ -22602,7 +22448,7 @@ CREATE TABLE `business` (
CONSTRAINT `business_fk_editor` FOREIGN KEY (`editorFk`) REFERENCES `account`.`user` (`id`),
CONSTRAINT `business_occupationCodeFk` FOREIGN KEY (`occupationCodeFk`) REFERENCES `occupationCode` (`code`) ON UPDATE CASCADE,
CONSTRAINT `business_workcenterFk` FOREIGN KEY (`workcenterFk`) REFERENCES `workCenter` (`id`) ON UPDATE CASCADE,
- CONSTRAINT `business_workerBusinessAgreementFk` FOREIGN KEY (`workerBusinessAgreementFk`) REFERENCES `postgresql`.`labour_agreement` (`labour_agreement_id`) ON UPDATE CASCADE,
+ CONSTRAINT `business_workerBusinessAgreementFk` FOREIGN KEY (`workerBusinessAgreementFk`) REFERENCES `workerBusinessAgreement` (`id`) ON UPDATE CASCADE,
CONSTRAINT `business_workerBusinessCategoryFk` FOREIGN KEY (`workerBusinessCategoryFk`) REFERENCES `payrollCategories` (`id`) ON UPDATE CASCADE,
CONSTRAINT `business_workerBusinessTypeFk` FOREIGN KEY (`workerBusinessTypeFk`) REFERENCES `workerBusinessType` (`id`) ON UPDATE CASCADE,
CONSTRAINT `business_workerFk` FOREIGN KEY (`workerFk`) REFERENCES `worker` (`id`) ON UPDATE CASCADE
@@ -22757,12 +22603,11 @@ DROP TABLE IF EXISTS `businessCalendar`;
/*!50001 DROP VIEW IF EXISTS `businessCalendar`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `businessCalendar` (
- `id` tinyint NOT NULL,
- `businessFk` tinyint NOT NULL,
- `absenceTypeFk` tinyint NOT NULL,
- `dated` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `businessCalendar` AS SELECT
+ 1 AS `id`,
+ 1 AS `businessFk`,
+ 1 AS `absenceTypeFk`,
+ 1 AS `dated` */;
SET character_set_client = @saved_cs_client;
--
@@ -22842,7 +22687,7 @@ CREATE TABLE `buy` (
`price2` decimal(10,2) DEFAULT 0.00,
`price3` decimal(10,2) DEFAULT 0.00,
`minPrice` decimal(10,2) DEFAULT 0.00,
- `printedStickers` int(11) NOT NULL DEFAULT 0,
+ `printedStickers` int(10) unsigned NOT NULL DEFAULT 0,
`workerFk` int(11) DEFAULT 0,
`isChecked` tinyint(1) NOT NULL DEFAULT 0,
`isPickedOff` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'Esta mercancia no va a la zona de picking.',
@@ -22899,13 +22744,19 @@ trig: BEGIN
LEAVE trig;
END IF;
+ IF NEW.printedStickers <> 0 THEN
+ CALL util.throw('it is not possible to create buy lines with printedstickers other than 0');
+ END IF;
+
SET NEW.editorFk = account.myUser_getId();
CALL buy_checkGrouping(NEW.`grouping`);
+
SELECT t.warehouseInFk, t.landed INTO vWarehouse, vLanding
FROM entry e
JOIN travel t ON t.id = e.travelFk
WHERE e.id = NEW.entryFk;
+
SELECT b.`grouping`, b.groupingMode INTO vGrouping, vGroupingMode
FROM buy b
JOIN entry e ON e.id = b.entryFk
@@ -22915,23 +22766,24 @@ trig: BEGIN
AND !b.isIgnored
ORDER BY t.warehouseInFk = vWarehouse DESC, t.landed DESC, b.id DESC
LIMIT 1;
+
IF NEW.`grouping` IS NULL THEN
SET NEW.`grouping` = vGrouping;
END IF;
+
IF NEW.groupingMode IS NULL THEN
SET NEW.groupingMode = vGroupingMode;
END IF;
-- Generics
SELECT i.genericFk INTO vGenericFk
- FROM vn.item i
+ FROM item i
WHERE i.id = NEW.itemFk;
IF vGenericFk THEN
-
SELECT COUNT(*) INTO vGenericInDate
- FROM vn.genericAllocation ga
- JOIN vn.entry e ON e.id = NEW.entryFk
- JOIN vn.travel tr on tr.id = e.travelFk
+ FROM genericAllocation ga
+ JOIN entry e ON e.id = NEW.entryFk
+ JOIN travel tr on tr.id = e.travelFk
WHERE ga.itemFk = vGenericFk
AND tr.landed BETWEEN ga.startDated AND ga.endDated;
IF vGenericInDate THEN
@@ -22991,25 +22843,41 @@ trig:BEGIN
DECLARE vGenericFk INT;
DECLARE vGenericInDate BOOL;
DECLARE vIsInventory BOOL;
+ DECLARE vDefaultEntry INT;
+
IF @isTriggerDisabled THEN
LEAVE trig;
END IF;
SET NEW.editorFk = account.myUser_getId();
- IF !(NEW.`grouping` <=> OLD.`grouping`) THEN
+ SELECT defaultEntry INTO vDefaultEntry
+ FROM entryConfig;
+
+ IF (NOT OLD.entryFk <=> NEW.entryFk OR NOT OLD.printedStickers <=> NEW.printedStickers)
+ AND NEW.printedStickers <> 0 THEN
+ SELECT defaultEntry INTO vDefaultEntry
+ FROM entryConfig;
+
+ IF NEW.entryFk = vDefaultEntry THEN
+ CALL util.throw('There can be no lines with printed labels on the default entry');
+ END IF;
+ END IF;
+
+ IF NOT NEW.`grouping` <=> OLD.`grouping` THEN
CALL buy_checkGrouping(NEW.`grouping`);
END IF;
+
-- Generics
SELECT i.genericFk INTO vGenericFk
- FROM vn.item i
+ FROM item i
WHERE i.id = NEW.itemFk;
IF vGenericFk THEN
SELECT COUNT(*) INTO vGenericInDate
- FROM vn.genericAllocation ga
- JOIN vn.entry e ON e.id = NEW.entryFk
- JOIN vn.travel tr on tr.id = e.travelFk
+ FROM genericAllocation ga
+ JOIN entry e ON e.id = NEW.entryFk
+ JOIN travel tr on tr.id = e.travelFk
WHERE ga.itemFk = vGenericFk
AND tr.landed BETWEEN ga.startDated AND ga.endDated;
IF vGenericInDate THEN
@@ -23017,10 +22885,11 @@ trig:BEGIN
SET NEW.itemFk = vGenericFk;
END IF;
END IF;
+
SELECT COUNT(*) INTO vIsInventory
- FROM vn.entry e
- JOIN vn.supplier s ON s.id = e.supplierFk
- JOIN vn.entryConfig ec ON ec.inventorySupplierFk = e.supplierFk
+ FROM entry e
+ JOIN supplier s ON s.id = e.supplierFk
+ JOIN entryConfig ec ON ec.inventorySupplierFk = e.supplierFk
WHERE e.id = NEW.entryFk;
IF vIsInventory THEN
@@ -23202,10 +23071,9 @@ DROP TABLE IF EXISTS `buyer`;
/*!50001 DROP VIEW IF EXISTS `buyer`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `buyer` (
- `userFk` tinyint NOT NULL,
- `nickname` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `buyer` AS SELECT
+ 1 AS `userFk`,
+ 1 AS `nickname` */;
SET character_set_client = @saved_cs_client;
--
@@ -23216,12 +23084,11 @@ DROP TABLE IF EXISTS `buyerSales`;
/*!50001 DROP VIEW IF EXISTS `buyerSales`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `buyerSales` (
- `importe` tinyint NOT NULL,
- `comprador` tinyint NOT NULL,
- `año` tinyint NOT NULL,
- `semana` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `buyerSales` AS SELECT
+ 1 AS `importe`,
+ 1 AS `comprador`,
+ 1 AS `año`,
+ 1 AS `semana` */;
SET character_set_client = @saved_cs_client;
--
@@ -23407,83 +23274,6 @@ CREATE TABLE `chatConfig` (
) ENGINE=InnoDBDEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
---
--- Table structure for table `chronopostConfig`
---
-
-DROP TABLE IF EXISTS `chronopostConfig`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `chronopostConfig` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `accountNumber` int(11) NOT NULL,
- `password` varchar(20) NOT NULL,
- `idEmit` varchar(20) NOT NULL DEFAULT 'CHRFR' COMMENT 'Valor fijo de chronopost',
- `urlShipping` varchar(100) NOT NULL DEFAULT 'https://ws.chronopost.fr/shipping-cxf/ShippingServiceWS/',
- `urlTracking` varchar(100) NOT NULL DEFAULT 'https://ws.chronopost.fr/tracking-cxf/TrackingServiceWS/',
- `cxfShipping` varchar(100) NOT NULL DEFAULT 'http://cxf.shipping.soap.chronopost.fr/',
- `cxfTracking` varchar(100) NOT NULL DEFAULT 'http://cxf.tracking.soap.chronopost.fr/',
- `evtCode` varchar(2) NOT NULL DEFAULT 'DC' COMMENT 'Valor fijo de chronopost',
- `objectType` varchar(3) NOT NULL DEFAULT 'MAR' COMMENT 'MAR: mercancia, DOC: documentación',
- `productCode` varchar(2) NOT NULL DEFAULT '1S',
- `weightUnit` varchar(3) NOT NULL DEFAULT 'KGM',
- `stickerMode` varchar(6) NOT NULL DEFAULT 'THE' COMMENT 'THE: vertical, THEPSG: horizontal, PDF, ...',
- `defaultWeight` int(11) NOT NULL DEFAULT 10,
- `defaultSevice` int(11) NOT NULL DEFAULT 0,
- `numberOfParcel` int(11) NOT NULL DEFAULT 1,
- `civility` varchar(1) NOT NULL DEFAULT 'M',
- `modeRetour` varchar(1) NOT NULL DEFAULT '2',
- PRIMARY KEY (`id`)
-) ENGINE=InnoDBDEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `chronopostExpedition`
---
-
-DROP TABLE IF EXISTS `chronopostExpedition`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `chronopostExpedition` (
- `expeditionFk` int(11) NOT NULL,
- `skybillNumber` varchar(20) NOT NULL COMMENT 'Código devuelto por chronopost',
- PRIMARY KEY (`expeditionFk`),
- CONSTRAINT `chronopostExpedition_FK` FOREIGN KEY (`expeditionFk`) REFERENCES `expedition` (`id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `chronopostSenderAddress`
---
-
-DROP TABLE IF EXISTS `chronopostSenderAddress`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `chronopostSenderAddress` (
- `warehouseFk` smallint(6) unsigned NOT NULL,
- `addressFk` int(11) NOT NULL,
- PRIMARY KEY (`warehouseFk`),
- KEY `chronopostSenderAddress_FK_1` (`addressFk`),
- CONSTRAINT `chronopostSenderAddress_FK` FOREIGN KEY (`warehouseFk`) REFERENCES `warehouse` (`id`) ON UPDATE CASCADE,
- CONSTRAINT `chronopostSenderAddress_FK_1` FOREIGN KEY (`addressFk`) REFERENCES `address` (`id`) ON UPDATE CASCADE
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `chronopostServiceWeekday`
---
-
-DROP TABLE IF EXISTS `chronopostServiceWeekday`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `chronopostServiceWeekday` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `weekdays` set('mon','tue','wed','thu','fri','sat','sun') NOT NULL,
- `serviceType` int(11) unsigned NOT NULL,
- PRIMARY KEY (`id`)
-) ENGINE=InnoDBDEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
--
-- Table structure for table `claim`
--
@@ -24465,6 +24255,7 @@ BEGIN
CONCAT('Cliente ', NEW.id),
CONCAT('Recibida la documentación: ', vText)
FROM worker w
+ LEFT JOIN account.user u ON w.id = u.id AND u.active
LEFT JOIN account.user u ON w.id = u.id AND u.active
LEFT JOIN account.account ac ON ac.id = u.id
WHERE w.id = NEW.salesPersonFk;
@@ -24589,7 +24380,17 @@ CREATE TABLE `clientConfig` (
`maxCreditRows` int(11) DEFAULT NULL COMMENT 'Máximo número de registros a mantener en la tabla clientCredit',
`maxPriceIncreasingRatio` decimal(2,2) NOT NULL DEFAULT 0.25 COMMENT 'máximo recobro permitido',
`riskScope` int(11) NOT NULL DEFAULT 2 COMMENT 'Time range in months to calculating a customer''s risk',
- PRIMARY KEY (`id`)
+ `defaultPayMethodFk` tinyint(3) unsigned DEFAULT NULL,
+ `defaultDueDay` int(10) unsigned DEFAULT NULL,
+ `defaultCredit` decimal(10,2) DEFAULT NULL,
+ `defaultIsTaxDataChecked` tinyint(1) DEFAULT NULL,
+ `defaultHasCoreVnl` tinyint(1) DEFAULT NULL,
+ `defaultMandateTypeFk` smallint(5) DEFAULT NULL,
+ PRIMARY KEY (`id`),
+ KEY `clientNewConfigPayMethod_FK` (`defaultPayMethodFk`),
+ KEY `clientNewConfigMandateType_FK` (`defaultMandateTypeFk`),
+ CONSTRAINT `clientNewConfigMandateType_FK` FOREIGN KEY (`defaultMandateTypeFk`) REFERENCES `mandateType` (`id`),
+ CONSTRAINT `clientNewConfigPayMethod_FK` FOREIGN KEY (`defaultPayMethodFk`) REFERENCES `payMethod` (`id`)
) ENGINE=InnoDBDEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
@@ -24909,11 +24710,10 @@ DROP TABLE IF EXISTS `clientLost`;
/*!50001 DROP VIEW IF EXISTS `clientLost`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `clientLost` (
- `clientFk` tinyint NOT NULL,
- `lastShipped` tinyint NOT NULL,
- `notBuyingMonths` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `clientLost` AS SELECT
+ 1 AS `clientFk`,
+ 1 AS `lastShipped`,
+ 1 AS `notBuyingMonths` */;
SET character_set_client = @saved_cs_client;
--
@@ -25048,10 +24848,9 @@ DROP TABLE IF EXISTS `clientPhoneBook`;
/*!50001 DROP VIEW IF EXISTS `clientPhoneBook`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `clientPhoneBook` (
- `clientFk` tinyint NOT NULL,
- `phone` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `clientPhoneBook` AS SELECT
+ 1 AS `clientFk`,
+ 1 AS `phone` */;
SET character_set_client = @saved_cs_client;
--
@@ -25178,6 +24977,25 @@ DELIMITER ;
/*!50003 SET character_set_results = @saved_cs_results */ ;
/*!50003 SET collation_connection = @saved_col_connection */ ;
+--
+-- Table structure for table `clientSms`
+--
+
+DROP TABLE IF EXISTS `clientSms`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `clientSms` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `clientFk` int(11) NOT NULL,
+ `smsFk` mediumint(8) unsigned NOT NULL,
+ PRIMARY KEY (`id`),
+ KEY `clientSms_FK` (`clientFk`),
+ KEY `clientSms_FK_1` (`smsFk`),
+ CONSTRAINT `clientSms_FK` FOREIGN KEY (`clientFk`) REFERENCES `client` (`id`) ON UPDATE CASCADE,
+ CONSTRAINT `clientSms_FK_1` FOREIGN KEY (`smsFk`) REFERENCES `sms` (`id`) ON UPDATE CASCADE
+) ENGINE=InnoDBDEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
--
-- Table structure for table `clientType`
--
@@ -25237,11 +25055,11 @@ DROP TABLE IF EXISTS `cmr`;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `cmr` (
`id` int(11) NOT NULL AUTO_INCREMENT,
- `ticketFk` int(11) DEFAULT NULL,
+ `ticketFk` int(11) DEFAULT NULL COMMENT 'refs #6092 @toDeprecate 2023-08-02',
`truckPlate` varchar(30) DEFAULT NULL,
`observations` varchar(255) DEFAULT NULL,
- `senderInstruccions` varchar(255) DEFAULT 'Flowers 4º C. Plants 14º C',
- `paymentInstruccions` varchar(255) DEFAULT 'Carriage paid',
+ `senderInstruccions` varchar(255) DEFAULT NULL,
+ `paymentInstruccions` varchar(255) DEFAULT NULL,
`specialAgreements` varchar(255) DEFAULT NULL,
`created` timestamp NULL DEFAULT current_timestamp(),
`companyFk` int(10) unsigned DEFAULT NULL,
@@ -25261,7 +25079,7 @@ CREATE TABLE `cmr` (
KEY `cmr_FK` (`addressFromFk`),
CONSTRAINT `cmrCompany_Fk` FOREIGN KEY (`companyFk`) REFERENCES `company` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
CONSTRAINT `cmr_FK` FOREIGN KEY (`addressFromFk`) REFERENCES `address` (`id`) ON UPDATE CASCADE,
- CONSTRAINT `cmr_fk1` FOREIGN KEY (`ticketFk`) REFERENCES `ticket` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
+ CONSTRAINT `cmr_fk1` FOREIGN KEY (`ticketFk`) REFERENCES `ticket` (`id`),
CONSTRAINT `cmr_fk3` FOREIGN KEY (`addressToFk`) REFERENCES `address` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
CONSTRAINT `cmr_supplierFk` FOREIGN KEY (`supplierFk`) REFERENCES `supplier` (`id`) ON UPDATE CASCADE
) ENGINE=InnoDBDEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;
@@ -25275,48 +25093,6 @@ CREATE TABLE `cmr` (
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
-/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `vn`.`cmr_BEFORE_INSERT`
- BEFORE INSERT ON `cmr`
- FOR EACH ROW
-BEGIN
-
- DECLARE vLastSenderInstructions VARCHAR(255);
- DECLARE vLastId INT;
- DECLARE vCurrentAgency INT;
-
- SELECT am.agencyFk INTO vCurrentAgency
- FROM vn.agencyMode am
- JOIN vn.ticket t ON t.agencyModeFk = am.id
- WHERE t.id = NEW.ticketFk;
-
- SELECT MAX(cmr.id) INTO vLastId
- FROM cmr
- JOIN vn.ticket t ON t.id = cmr.ticketFk
- JOIN vn.agencyMode am ON am.id = t.agencyModeFk
- WHERE am.agencyFk = vCurrentAgency
- ;
-
- SELECT senderInstruccions INTO vLastSenderInstructions
- FROM cmr
- WHERE id = vLastId;
-
- SET NEW.senderInstruccions = vLastSenderInstructions;
-
-END */;;
-DELIMITER ;
-/*!50003 SET sql_mode = @saved_sql_mode */ ;
-/*!50003 SET character_set_client = @saved_cs_client */ ;
-/*!50003 SET character_set_results = @saved_cs_results */ ;
-/*!50003 SET collation_connection = @saved_col_connection */ ;
-/*!50003 SET @saved_cs_client = @@character_set_client */ ;
-/*!50003 SET @saved_cs_results = @@character_set_results */ ;
-/*!50003 SET @saved_col_connection = @@collation_connection */ ;
-/*!50003 SET character_set_client = utf8mb4 */ ;
-/*!50003 SET character_set_results = utf8mb4 */ ;
-/*!50003 SET collation_connection = utf8mb4_unicode_ci */ ;
-/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
-/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
-DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `vn`.`cmr_beforeDelete`
BEFORE DELETE ON `cmr`
FOR EACH ROW
@@ -25372,42 +25148,41 @@ DROP TABLE IF EXISTS `cmr_list`;
/*!50001 DROP VIEW IF EXISTS `cmr_list`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `cmr_list` (
- `cmrFk` tinyint NOT NULL,
- `ticketFk` tinyint NOT NULL,
- `truckPlate` tinyint NOT NULL,
- `observations` tinyint NOT NULL,
- `senderInstruccions` tinyint NOT NULL,
- `paymentInstruccions` tinyint NOT NULL,
- `specialAgreements` tinyint NOT NULL,
- `created` tinyint NOT NULL,
- `packagesList` tinyint NOT NULL,
- `clientName` tinyint NOT NULL,
- `clientPostalCode` tinyint NOT NULL,
- `clientStreet` tinyint NOT NULL,
- `clientCity` tinyint NOT NULL,
- `clientProvince` tinyint NOT NULL,
- `clientCountry` tinyint NOT NULL,
- `companyName` tinyint NOT NULL,
- `companyStreet` tinyint NOT NULL,
- `companyPostCode` tinyint NOT NULL,
- `companyCity` tinyint NOT NULL,
- `companyCountry` tinyint NOT NULL,
- `warehouseAddress` tinyint NOT NULL,
- `shipped` tinyint NOT NULL,
- `clientOficialName` tinyint NOT NULL,
- `supplierFk` tinyint NOT NULL,
- `carrierName` tinyint NOT NULL,
- `carrierStreet` tinyint NOT NULL,
- `carrierPostCode` tinyint NOT NULL,
- `carrierCity` tinyint NOT NULL,
- `carrierCountry` tinyint NOT NULL,
- `phone` tinyint NOT NULL,
- `mobile` tinyint NOT NULL,
- `addressFk` tinyint NOT NULL,
- `stamp` tinyint NOT NULL,
- `merchandiseDetail` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `cmr_list` AS SELECT
+ 1 AS `cmrFk`,
+ 1 AS `ticketFk`,
+ 1 AS `truckPlate`,
+ 1 AS `observations`,
+ 1 AS `senderInstruccions`,
+ 1 AS `paymentInstruccions`,
+ 1 AS `specialAgreements`,
+ 1 AS `created`,
+ 1 AS `packagesList`,
+ 1 AS `clientName`,
+ 1 AS `clientPostalCode`,
+ 1 AS `clientStreet`,
+ 1 AS `clientCity`,
+ 1 AS `clientProvince`,
+ 1 AS `clientCountry`,
+ 1 AS `companyName`,
+ 1 AS `companyStreet`,
+ 1 AS `companyPostCode`,
+ 1 AS `companyCity`,
+ 1 AS `companyCountry`,
+ 1 AS `warehouseAddress`,
+ 1 AS `shipped`,
+ 1 AS `clientOficialName`,
+ 1 AS `supplierFk`,
+ 1 AS `carrierName`,
+ 1 AS `carrierStreet`,
+ 1 AS `carrierPostCode`,
+ 1 AS `carrierCity`,
+ 1 AS `carrierCountry`,
+ 1 AS `phone`,
+ 1 AS `mobile`,
+ 1 AS `addressFk`,
+ 1 AS `stamp`,
+ 1 AS `merchandiseDetail` */;
SET character_set_client = @saved_cs_client;
--
@@ -25680,7 +25455,7 @@ CREATE TABLE `company` (
`hasCyc` tinyint(1) unsigned zerofill NOT NULL DEFAULT 0,
`rgb` varchar(6) NOT NULL,
`email` varchar(30) NOT NULL,
- `stamp` blob DEFAULT NULL,
+ `stamp` longblob DEFAULT NULL,
`created` timestamp NOT NULL ON UPDATE current_timestamp(),
`clientFk` int(11) DEFAULT NULL,
`sage200Company` int(2) DEFAULT NULL,
@@ -25746,10 +25521,9 @@ DROP TABLE IF EXISTS `companyL10n`;
/*!50001 DROP VIEW IF EXISTS `companyL10n`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `companyL10n` (
- `id` tinyint NOT NULL,
- `footnotes` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `companyL10n` AS SELECT
+ 1 AS `id`,
+ 1 AS `footnotes` */;
SET character_set_client = @saved_cs_client;
--
@@ -26061,6 +25835,7 @@ CREATE TABLE `country` (
`ibanLength` tinyint(4) DEFAULT NULL,
`continentFk` tinyint(4) DEFAULT NULL,
`a3Code` int(11) DEFAULT NULL COMMENT 'Código país para a3',
+ `isSocialNameUnique` tinyint(1) NOT NULL DEFAULT 1,
PRIMARY KEY (`id`),
KEY `Id_Paisreal` (`politicalCountryFk__`),
KEY `currency_id_fk_idx` (`currencyFk`),
@@ -26489,15 +26264,14 @@ DROP TABLE IF EXISTS `defaulter`;
/*!50001 DROP VIEW IF EXISTS `defaulter`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `defaulter` (
- `clientFk` tinyint NOT NULL,
- `created` tinyint NOT NULL,
- `amount` tinyint NOT NULL,
- `defaulterSinced` tinyint NOT NULL,
- `hasChanged` tinyint NOT NULL,
- `country` tinyint NOT NULL,
- `payMethod` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `defaulter` AS SELECT
+ 1 AS `clientFk`,
+ 1 AS `created`,
+ 1 AS `amount`,
+ 1 AS `defaulterSinced`,
+ 1 AS `hasChanged`,
+ 1 AS `country`,
+ 1 AS `payMethod` */;
SET character_set_client = @saved_cs_client;
--
@@ -26516,7 +26290,7 @@ CREATE TABLE `delivery` (
`ticketFk` int(11) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `delivery_ticketFk_FK` (`ticketFk`),
- CONSTRAINT `delivery_ticketFk_FK` FOREIGN KEY (`ticketFk`) REFERENCES `ticket` (`id`)
+ CONSTRAINT `delivery_ticketFk_FK` FOREIGN KEY (`ticketFk`) REFERENCES `ticket` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDBDEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci COMMENT='Informa de los datos geográficos y temporales de las entregas de los repartidores';
/*!40101 SET character_set_client = @saved_cs_client */;
@@ -26610,6 +26384,7 @@ CREATE TABLE `department` (
`hasToCheckLogin` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'Para comprobar en el login de la app',
`hasToMistake` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'Indica si al departamento pueden serles puestos errores',
`clientFk` int(11) DEFAULT NULL COMMENT 'Cuenta de cliente que se utiliza para los compras de consumo departamental',
+ `twoFactor` enum('email') DEFAULT NULL COMMENT 'Default user two-factor auth type',
PRIMARY KEY (`id`),
UNIQUE KEY `name_UNIQUE` (`name`),
KEY `fk_department_Trabajadores1_idx` (`workerFk`),
@@ -26658,6 +26433,13 @@ BEGIN
IF !(OLD.parentFk <=> NEW.parentFk) THEN
UPDATE vn.department_recalc SET isChanged = TRUE;
END IF;
+
+ IF !(OLD.twoFactor <=> NEW.twoFactor) THEN
+ UPDATE account.user u
+ JOIN vn.workerDepartment wd ON wd.workerFk = u.id
+ SET u.twoFactor = NEW.twoFactor
+ WHERE wd.departmentFk = NEW.id;
+ END IF;
END */;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
@@ -26724,10 +26506,9 @@ DROP TABLE IF EXISTS `departmentTree`;
/*!50001 DROP VIEW IF EXISTS `departmentTree`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `departmentTree` (
- `id` tinyint NOT NULL,
- `dep` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `departmentTree` AS SELECT
+ 1 AS `id`,
+ 1 AS `dep` */;
SET character_set_client = @saved_cs_client;
--
@@ -26771,41 +26552,16 @@ DROP TABLE IF EXISTS `deviceLog`;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `deviceLog` (
`id` int(11) NOT NULL AUTO_INCREMENT,
- `android_id` varchar(100) NOT NULL,
+ `android_id` varchar(64) NOT NULL,
`userFk` int(10) unsigned DEFAULT NULL,
`created` timestamp NOT NULL DEFAULT current_timestamp(),
`nameApp` varchar(45) DEFAULT NULL,
`versionApp` varchar(45) DEFAULT NULL,
- `deviceProductionFk` int(10) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `deviceLog_FK` (`userFk`),
CONSTRAINT `deviceLog_FK` FOREIGN KEY (`userFk`) REFERENCES `worker` (`id`) ON UPDATE CASCADE
) ENGINE=InnoDBDEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_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_unicode_ci */ ;
-/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
-/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
-DELIMITER ;;
-/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `vn`.`deviceLog_beforeInsert`
-BEFORE INSERT
-ON deviceLog FOR EACH ROW
-BEGIN
- DECLARE vDeviceProductionFk INTEGER;
- SELECT dp.id INTO vDeviceProductionFk
- FROM deviceProduction dp
- WHERE dp.android_id = NEW.android_id;
- SET NEW.deviceProductionFk = vDeviceProductionFk;
-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 `deviceProduction`
@@ -26820,21 +26576,90 @@ CREATE TABLE `deviceProduction` (
`modelFk` varchar(50) NOT NULL,
`macWifi` varchar(45) DEFAULT NULL,
`serialNumber` varchar(45) DEFAULT NULL,
- `android_id` varchar(50) DEFAULT NULL,
+ `android_id` varchar(64) DEFAULT NULL,
`purchased` date NOT NULL DEFAULT '1900-01-01' COMMENT 'Fecha de compra',
`stateFk` varchar(50) DEFAULT 'idle',
`isInScalefusion` tinyint(1) DEFAULT 0 COMMENT 'Para saber si esta en Scalefusion',
`description` varchar(100) DEFAULT NULL,
+ `editorFk` int(10) unsigned DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `device_id_UNIQUE` (`id`),
UNIQUE KEY `sn_UNIQUE` (`imei`),
UNIQUE KEY `serial_number_UN` (`serialNumber`),
+ UNIQUE KEY `deviceProduction_UN` (`android_id`),
KEY `deviceProductionModelsFgn` (`modelFk`),
KEY `deviceProduction_FK` (`stateFk`),
+ KEY `deviceProduction_fk_editor` (`editorFk`),
CONSTRAINT `deviceProductionModelsFgn` FOREIGN KEY (`modelFk`) REFERENCES `deviceProductionModels` (`code`) ON UPDATE CASCADE,
- CONSTRAINT `deviceProduction_FK` FOREIGN KEY (`stateFk`) REFERENCES `deviceProductionState` (`code`)
+ CONSTRAINT `deviceProduction_FK` FOREIGN KEY (`stateFk`) REFERENCES `deviceProductionState` (`code`),
+ CONSTRAINT `deviceProduction_fk_editor` FOREIGN KEY (`editorFk`) REFERENCES `account`.`user` (`id`),
+ CONSTRAINT `deviceProduction_CHECK` CHECK (`android_id` regexp '[A-Za-z0-9]{16,}' or `android_id` is null)
) ENGINE=InnoDBDEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_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_unicode_ci */ ;
+/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
+DELIMITER ;;
+/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `vn`.`deviceProduction_beforeInsert`
+ BEFORE INSERT ON `deviceProduction`
+ FOR EACH ROW
+BEGIN
+ SET NEW.editorFk = account.myUser_getId();
+END */;;
+DELIMITER ;
+/*!50003 SET sql_mode = @saved_sql_mode */ ;
+/*!50003 SET character_set_client = @saved_cs_client */ ;
+/*!50003 SET character_set_results = @saved_cs_results */ ;
+/*!50003 SET collation_connection = @saved_col_connection */ ;
+/*!50003 SET @saved_cs_client = @@character_set_client */ ;
+/*!50003 SET @saved_cs_results = @@character_set_results */ ;
+/*!50003 SET @saved_col_connection = @@collation_connection */ ;
+/*!50003 SET character_set_client = utf8mb4 */ ;
+/*!50003 SET character_set_results = utf8mb4 */ ;
+/*!50003 SET collation_connection = utf8mb4_unicode_ci */ ;
+/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
+DELIMITER ;;
+/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `vn`.`deviceProduction_beforeUpdate`
+ BEFORE UPDATE ON `deviceProduction`
+ FOR EACH ROW
+BEGIN
+ SET NEW.editorFk = account.myUser_getId();
+END */;;
+DELIMITER ;
+/*!50003 SET sql_mode = @saved_sql_mode */ ;
+/*!50003 SET character_set_client = @saved_cs_client */ ;
+/*!50003 SET character_set_results = @saved_cs_results */ ;
+/*!50003 SET collation_connection = @saved_col_connection */ ;
+/*!50003 SET @saved_cs_client = @@character_set_client */ ;
+/*!50003 SET @saved_cs_results = @@character_set_results */ ;
+/*!50003 SET @saved_col_connection = @@collation_connection */ ;
+/*!50003 SET character_set_client = utf8mb4 */ ;
+/*!50003 SET character_set_results = utf8mb4 */ ;
+/*!50003 SET collation_connection = utf8mb4_unicode_ci */ ;
+/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
+DELIMITER ;;
+/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `vn`.`deviceProduction_afterDelete`
+ AFTER DELETE ON `deviceProduction`
+ FOR EACH ROW
+BEGIN
+ INSERT INTO deviceProductionLog
+ SET `action` = 'delete',
+ `changedModel` = 'DeviceProduction',
+ `changedModelId` = OLD.id,
+ `userFk` = account.myUser_getId();
+END */;;
+DELIMITER ;
+/*!50003 SET sql_mode = @saved_sql_mode */ ;
+/*!50003 SET character_set_client = @saved_cs_client */ ;
+/*!50003 SET character_set_results = @saved_cs_results */ ;
+/*!50003 SET collation_connection = @saved_col_connection */ ;
--
-- Table structure for table `deviceProductionConfig`
@@ -26885,16 +26710,22 @@ DROP TABLE IF EXISTS `deviceProductionLog`;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `deviceProductionLog` (
`id` int(11) NOT NULL AUTO_INCREMENT,
- `originFk` int(11) NOT NULL,
+ `originFk` int(11) DEFAULT NULL,
`userFk` int(10) unsigned DEFAULT NULL,
- `deviceProduction` int(10) unsigned NOT NULL,
- `action` set('insert','update','delete','retired') NOT NULL,
- `created` timestamp NULL DEFAULT current_timestamp(),
- `oldInstance` varchar(50) DEFAULT NULL,
- `newInstance` varchar(50) DEFAULT NULL,
- `changedModel` varchar(50) DEFAULT NULL,
- `changedModelId` int(11) DEFAULT NULL,
- PRIMARY KEY (`id`)
+ `action` set('insert','update','delete') NOT NULL,
+ `creationDate` timestamp NULL DEFAULT current_timestamp(),
+ `description` text CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL,
+ `changedModel` enum('DeviceProduction','DeviceProductionModels','DeviceProductionState','DeviceProductionUser') NOT NULL DEFAULT 'DeviceProduction',
+ `oldInstance` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`oldInstance`)),
+ `newInstance` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`newInstance`)),
+ `changedModelId` int(11) NOT NULL,
+ `changedModelValue` varchar(45) DEFAULT NULL,
+ PRIMARY KEY (`id`),
+ KEY `userFk` (`userFk`),
+ KEY `deviceProductionLog_changedModel` (`changedModel`,`changedModelId`,`creationDate`),
+ KEY `deviceProductionLog_deviceProductionLog` (`originFk`,`creationDate`),
+ CONSTRAINT `deviceProductionOriginFk` FOREIGN KEY (`originFk`) REFERENCES `deviceProduction` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
+ CONSTRAINT `deviceProductionUserFk` FOREIGN KEY (`userFk`) REFERENCES `account`.`user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDBDEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci `PAGE_COMPRESSED`=1;
/*!40101 SET character_set_client = @saved_cs_client */;
@@ -26907,9 +26738,52 @@ DROP TABLE IF EXISTS `deviceProductionModels`;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `deviceProductionModels` (
`code` varchar(50) NOT NULL,
- PRIMARY KEY (`code`)
+ `editorFk` int(10) unsigned DEFAULT NULL,
+ PRIMARY KEY (`code`),
+ KEY `deviceProductionModels_fk_editor` (`editorFk`),
+ CONSTRAINT `deviceProductionModels_fk_editor` FOREIGN KEY (`editorFk`) REFERENCES `account`.`user` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
+/*!50003 SET @saved_cs_client = @@character_set_client */ ;
+/*!50003 SET @saved_cs_results = @@character_set_results */ ;
+/*!50003 SET @saved_col_connection = @@collation_connection */ ;
+/*!50003 SET character_set_client = utf8mb4 */ ;
+/*!50003 SET character_set_results = utf8mb4 */ ;
+/*!50003 SET collation_connection = utf8mb4_unicode_ci */ ;
+/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
+DELIMITER ;;
+/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `vn`.`deviceProductionModels_beforeInsert`
+ BEFORE INSERT ON `deviceProductionModels`
+ FOR EACH ROW
+BEGIN
+ SET NEW.editorFk = account.myUser_getId();
+END */;;
+DELIMITER ;
+/*!50003 SET sql_mode = @saved_sql_mode */ ;
+/*!50003 SET character_set_client = @saved_cs_client */ ;
+/*!50003 SET character_set_results = @saved_cs_results */ ;
+/*!50003 SET collation_connection = @saved_col_connection */ ;
+/*!50003 SET @saved_cs_client = @@character_set_client */ ;
+/*!50003 SET @saved_cs_results = @@character_set_results */ ;
+/*!50003 SET @saved_col_connection = @@collation_connection */ ;
+/*!50003 SET character_set_client = utf8mb4 */ ;
+/*!50003 SET character_set_results = utf8mb4 */ ;
+/*!50003 SET collation_connection = utf8mb4_unicode_ci */ ;
+/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
+DELIMITER ;;
+/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `vn`.`deviceProductionModels_beforeUpdate`
+ BEFORE UPDATE ON `deviceProductionModels`
+ FOR EACH ROW
+BEGIN
+ SET NEW.editorFk = account.myUser_getId();
+END */;;
+DELIMITER ;
+/*!50003 SET sql_mode = @saved_sql_mode */ ;
+/*!50003 SET character_set_client = @saved_cs_client */ ;
+/*!50003 SET character_set_results = @saved_cs_results */ ;
+/*!50003 SET collation_connection = @saved_col_connection */ ;
--
-- Table structure for table `deviceProductionState`
@@ -26921,9 +26795,52 @@ DROP TABLE IF EXISTS `deviceProductionState`;
CREATE TABLE `deviceProductionState` (
`code` varchar(50) NOT NULL,
`description` varchar(50) NOT NULL,
- PRIMARY KEY (`code`)
+ `editorFk` int(10) unsigned DEFAULT NULL,
+ PRIMARY KEY (`code`),
+ KEY `deviceProductionState_fk_editor` (`editorFk`),
+ CONSTRAINT `deviceProductionState_fk_editor` FOREIGN KEY (`editorFk`) REFERENCES `account`.`user` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
+/*!50003 SET @saved_cs_client = @@character_set_client */ ;
+/*!50003 SET @saved_cs_results = @@character_set_results */ ;
+/*!50003 SET @saved_col_connection = @@collation_connection */ ;
+/*!50003 SET character_set_client = utf8mb4 */ ;
+/*!50003 SET character_set_results = utf8mb4 */ ;
+/*!50003 SET collation_connection = utf8mb4_unicode_ci */ ;
+/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
+DELIMITER ;;
+/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `vn`.`deviceProductionState_beforeInsert`
+ BEFORE INSERT ON `deviceProductionState`
+ FOR EACH ROW
+BEGIN
+ SET NEW.editorFk = account.myUser_getId();
+END */;;
+DELIMITER ;
+/*!50003 SET sql_mode = @saved_sql_mode */ ;
+/*!50003 SET character_set_client = @saved_cs_client */ ;
+/*!50003 SET character_set_results = @saved_cs_results */ ;
+/*!50003 SET collation_connection = @saved_col_connection */ ;
+/*!50003 SET @saved_cs_client = @@character_set_client */ ;
+/*!50003 SET @saved_cs_results = @@character_set_results */ ;
+/*!50003 SET @saved_col_connection = @@collation_connection */ ;
+/*!50003 SET character_set_client = utf8mb4 */ ;
+/*!50003 SET character_set_results = utf8mb4 */ ;
+/*!50003 SET collation_connection = utf8mb4_unicode_ci */ ;
+/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
+DELIMITER ;;
+/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `vn`.`deviceProductionState_beforeUpdate`
+ BEFORE UPDATE ON `deviceProductionState`
+ FOR EACH ROW
+BEGIN
+ SET NEW.editorFk = account.myUser_getId();
+END */;;
+DELIMITER ;
+/*!50003 SET sql_mode = @saved_sql_mode */ ;
+/*!50003 SET character_set_client = @saved_cs_client */ ;
+/*!50003 SET character_set_results = @saved_cs_results */ ;
+/*!50003 SET collation_connection = @saved_col_connection */ ;
--
-- Table structure for table `deviceProductionUser`
@@ -26936,13 +26853,80 @@ CREATE TABLE `deviceProductionUser` (
`deviceProductionFk` int(11) NOT NULL,
`userFk` int(10) unsigned NOT NULL,
`created` timestamp NULL DEFAULT current_timestamp(),
+ `editorFk` int(10) unsigned DEFAULT NULL,
PRIMARY KEY (`deviceProductionFk`),
UNIQUE KEY `deviceProductionUser_UN` (`userFk`),
KEY `userFgn_idx` (`userFk`),
+ KEY `deviceProductionUser_fk_editor` (`editorFk`),
CONSTRAINT `deviceProductionUser_FK` FOREIGN KEY (`deviceProductionFk`) REFERENCES `deviceProduction` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
- CONSTRAINT `deviceProductionUser_PK` FOREIGN KEY (`userFk`) REFERENCES `account`.`user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
+ CONSTRAINT `deviceProductionUser_PK` FOREIGN KEY (`userFk`) REFERENCES `account`.`user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
+ CONSTRAINT `deviceProductionUser_fk_editor` FOREIGN KEY (`editorFk`) REFERENCES `account`.`user` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
+/*!50003 SET @saved_cs_client = @@character_set_client */ ;
+/*!50003 SET @saved_cs_results = @@character_set_results */ ;
+/*!50003 SET @saved_col_connection = @@collation_connection */ ;
+/*!50003 SET character_set_client = utf8mb4 */ ;
+/*!50003 SET character_set_results = utf8mb4 */ ;
+/*!50003 SET collation_connection = utf8mb4_unicode_ci */ ;
+/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
+DELIMITER ;;
+/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `vn`.`deviceProductionUser_beforeInsert`
+ BEFORE INSERT ON `deviceProductionUser`
+ FOR EACH ROW
+BEGIN
+ SET NEW.editorFk = account.myUser_getId();
+END */;;
+DELIMITER ;
+/*!50003 SET sql_mode = @saved_sql_mode */ ;
+/*!50003 SET character_set_client = @saved_cs_client */ ;
+/*!50003 SET character_set_results = @saved_cs_results */ ;
+/*!50003 SET collation_connection = @saved_col_connection */ ;
+/*!50003 SET @saved_cs_client = @@character_set_client */ ;
+/*!50003 SET @saved_cs_results = @@character_set_results */ ;
+/*!50003 SET @saved_col_connection = @@collation_connection */ ;
+/*!50003 SET character_set_client = utf8mb4 */ ;
+/*!50003 SET character_set_results = utf8mb4 */ ;
+/*!50003 SET collation_connection = utf8mb4_unicode_ci */ ;
+/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
+DELIMITER ;;
+/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `vn`.`deviceProductionUser_beforeUpdate`
+ BEFORE UPDATE ON `deviceProductionUser`
+ FOR EACH ROW
+BEGIN
+ SET NEW.editorFk = account.myUser_getId();
+END */;;
+DELIMITER ;
+/*!50003 SET sql_mode = @saved_sql_mode */ ;
+/*!50003 SET character_set_client = @saved_cs_client */ ;
+/*!50003 SET character_set_results = @saved_cs_results */ ;
+/*!50003 SET collation_connection = @saved_col_connection */ ;
+/*!50003 SET @saved_cs_client = @@character_set_client */ ;
+/*!50003 SET @saved_cs_results = @@character_set_results */ ;
+/*!50003 SET @saved_col_connection = @@collation_connection */ ;
+/*!50003 SET character_set_client = utf8mb4 */ ;
+/*!50003 SET character_set_results = utf8mb4 */ ;
+/*!50003 SET collation_connection = utf8mb4_unicode_ci */ ;
+/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
+DELIMITER ;;
+/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `vn`.`deviceProductionUser_afterDelete`
+ AFTER DELETE ON `deviceProductionUser`
+ FOR EACH ROW
+BEGIN
+ INSERT INTO deviceProductionLog
+ SET `action` = 'delete',
+ `changedModel` = 'DeviceProductionUser',
+ `changedModelId` = OLD.deviceProductionFk,
+ `userFk` = account.myUser_getId();
+END */;;
+DELIMITER ;
+/*!50003 SET sql_mode = @saved_sql_mode */ ;
+/*!50003 SET character_set_client = @saved_cs_client */ ;
+/*!50003 SET character_set_results = @saved_cs_results */ ;
+/*!50003 SET collation_connection = @saved_col_connection */ ;
--
-- Table structure for table `disabilityGrade`
@@ -27149,7 +27133,10 @@ CREATE TABLE `docuware` (
`action` varchar(255) NOT NULL,
`dialogName` varchar(100) NOT NULL,
`findById` varchar(50) DEFAULT NULL,
- PRIMARY KEY (`id`)
+ `dmsTypeFk` int(11) DEFAULT NULL,
+ PRIMARY KEY (`id`),
+ KEY `docuware_FK` (`dmsTypeFk`),
+ CONSTRAINT `docuware_FK` FOREIGN KEY (`dmsTypeFk`) REFERENCES `dmsType` (`id`) ON UPDATE CASCADE
) ENGINE=InnoDBDEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
@@ -27334,13 +27321,12 @@ DROP TABLE IF EXISTS `ediGenus`;
/*!50001 DROP VIEW IF EXISTS `ediGenus`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `ediGenus` (
- `id` tinyint NOT NULL,
- `latinGenusName` tinyint NOT NULL,
- `entried` tinyint NOT NULL,
- `dued` tinyint NOT NULL,
- `modified` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `ediGenus` AS SELECT
+ 1 AS `id`,
+ 1 AS `latinGenusName`,
+ 1 AS `entried`,
+ 1 AS `dued`,
+ 1 AS `modified` */;
SET character_set_client = @saved_cs_client;
--
@@ -27351,14 +27337,13 @@ DROP TABLE IF EXISTS `ediSpecie`;
/*!50001 DROP VIEW IF EXISTS `ediSpecie`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `ediSpecie` (
- `id` tinyint NOT NULL,
- `genusFk` tinyint NOT NULL,
- `latinSpeciesName` tinyint NOT NULL,
- `entried` tinyint NOT NULL,
- `dued` tinyint NOT NULL,
- `modified` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `ediSpecie` AS SELECT
+ 1 AS `id`,
+ 1 AS `genusFk`,
+ 1 AS `latinSpeciesName`,
+ 1 AS `entried`,
+ 1 AS `dued`,
+ 1 AS `modified` */;
SET character_set_client = @saved_cs_client;
--
@@ -27451,12 +27436,11 @@ DROP TABLE IF EXISTS `ektSubAddress`;
/*!50001 DROP VIEW IF EXISTS `ektSubAddress`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `ektSubAddress` (
- `sub` tinyint NOT NULL,
- `clientFk` tinyint NOT NULL,
- `nickname` tinyint NOT NULL,
- `addressFk` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `ektSubAddress` AS SELECT
+ 1 AS `sub`,
+ 1 AS `clientFk`,
+ 1 AS `nickname`,
+ 1 AS `addressFk` */;
SET character_set_client = @saved_cs_client;
--
@@ -27543,6 +27527,8 @@ CREATE TABLE `entry` (
`observationEditorFk` int(10) unsigned DEFAULT NULL COMMENT 'Último usuario que ha modificado el campo evaNotes',
`clonedFrom` int(11) DEFAULT NULL,
`editorFk` int(10) unsigned DEFAULT NULL,
+ `lockerUserFk` int(10) unsigned DEFAULT NULL,
+ `locked` datetime DEFAULT current_timestamp(),
PRIMARY KEY (`id`),
KEY `Id_Proveedor` (`supplierFk`),
KEY `Fecha` (`dated`),
@@ -27554,7 +27540,9 @@ CREATE TABLE `entry` (
KEY `entry_FK_1` (`typeFk`),
KEY `entry_observationEditorFk` (`observationEditorFk`),
KEY `entry_fk_editor` (`editorFk`),
+ KEY `entryAccountFk` (`lockerUserFk`),
CONSTRAINT `Entradas_fk8` FOREIGN KEY (`invoiceInFk`) REFERENCES `invoiceIn` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
+ CONSTRAINT `entryAccountFk` FOREIGN KEY (`lockerUserFk`) REFERENCES `account`.`user` (`id`),
CONSTRAINT `entryCompany_Fk` FOREIGN KEY (`companyFk`) REFERENCES `company` (`id`) ON UPDATE CASCADE,
CONSTRAINT `entry_FK` FOREIGN KEY (`buyerFk`) REFERENCES `worker` (`id`) ON UPDATE CASCADE,
CONSTRAINT `entry_FK_1` FOREIGN KEY (`typeFk`) REFERENCES `entryType` (`code`) ON UPDATE CASCADE,
@@ -27758,6 +27746,8 @@ CREATE TABLE `entryConfig` (
`defaultEntry` int(11) NOT NULL,
`mailToNotify` varchar(255) DEFAULT NULL,
`inventorySupplierFk` int(11) DEFAULT 4,
+ `maxLockTime` int(10) unsigned DEFAULT NULL COMMENT 'Tiempo máximo que puede estar una entrada bloqueada en segundos',
+ `defaultSupplierFk` int(11) DEFAULT 13,
PRIMARY KEY (`defaultEntry`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
@@ -28032,11 +28022,10 @@ DROP TABLE IF EXISTS `exchangeInsuranceEntry`;
/*!50001 DROP VIEW IF EXISTS `exchangeInsuranceEntry`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `exchangeInsuranceEntry` (
- `dated` tinyint NOT NULL,
- `Dolares` tinyint NOT NULL,
- `rate` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `exchangeInsuranceEntry` AS SELECT
+ 1 AS `dated`,
+ 1 AS `Dolares`,
+ 1 AS `rate` */;
SET character_set_client = @saved_cs_client;
--
@@ -28047,11 +28036,10 @@ DROP TABLE IF EXISTS `exchangeInsuranceIn`;
/*!50001 DROP VIEW IF EXISTS `exchangeInsuranceIn`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `exchangeInsuranceIn` (
- `dated` tinyint NOT NULL,
- `amount` tinyint NOT NULL,
- `rate` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `exchangeInsuranceIn` AS SELECT
+ 1 AS `dated`,
+ 1 AS `amount`,
+ 1 AS `rate` */;
SET character_set_client = @saved_cs_client;
--
@@ -28062,11 +28050,10 @@ DROP TABLE IF EXISTS `exchangeInsuranceOut`;
/*!50001 DROP VIEW IF EXISTS `exchangeInsuranceOut`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `exchangeInsuranceOut` (
- `received` tinyint NOT NULL,
- `divisa` tinyint NOT NULL,
- `rate` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `exchangeInsuranceOut` AS SELECT
+ 1 AS `received`,
+ 1 AS `divisa`,
+ 1 AS `rate` */;
SET character_set_client = @saved_cs_client;
--
@@ -28077,15 +28064,14 @@ DROP TABLE IF EXISTS `exchangeReportSourcePrevious`;
/*!50001 DROP VIEW IF EXISTS `exchangeReportSourcePrevious`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `exchangeReportSourcePrevious` (
- `dated` tinyint NOT NULL,
- `amountIn` tinyint NOT NULL,
- `rateIn` tinyint NOT NULL,
- `amountOut` tinyint NOT NULL,
- `rateOut` tinyint NOT NULL,
- `amountEntry` tinyint NOT NULL,
- `rateEntry` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `exchangeReportSourcePrevious` AS SELECT
+ 1 AS `dated`,
+ 1 AS `amountIn`,
+ 1 AS `rateIn`,
+ 1 AS `amountOut`,
+ 1 AS `rateOut`,
+ 1 AS `amountEntry`,
+ 1 AS `rateEntry` */;
SET character_set_client = @saved_cs_client;
--
@@ -28274,6 +28260,7 @@ CREATE TABLE `expeditionBoxVol` (
`boxFk` int(11) NOT NULL,
`m3` double NOT NULL,
`ratio` double NOT NULL,
+ `code` varchar(45) DEFAULT NULL,
PRIMARY KEY (`boxFk`),
CONSTRAINT `expeditionBoxVol_FK` FOREIGN KEY (`boxFk`) REFERENCES `item` (`id`) ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci COMMENT='Establece el volumen de cada servicio para poder comparar el teorico y el real en el control de portes';
@@ -28287,19 +28274,18 @@ DROP TABLE IF EXISTS `expeditionCommon`;
/*!50001 DROP VIEW IF EXISTS `expeditionCommon`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `expeditionCommon` (
- `truckFk` tinyint NOT NULL,
- `eta` tinyint NOT NULL,
- `description` tinyint NOT NULL,
- `palletFk` tinyint NOT NULL,
- `routeFk` tinyint NOT NULL,
- `scanFk` tinyint NOT NULL,
- `expeditionFk` tinyint NOT NULL,
- `expeditionTruckFk` tinyint NOT NULL,
- `warehouseFk` tinyint NOT NULL,
- `lastPacked` tinyint NOT NULL,
- `ticketFk` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `expeditionCommon` AS SELECT
+ 1 AS `truckFk`,
+ 1 AS `eta`,
+ 1 AS `description`,
+ 1 AS `palletFk`,
+ 1 AS `routeFk`,
+ 1 AS `scanFk`,
+ 1 AS `expeditionFk`,
+ 1 AS `expeditionTruckFk`,
+ 1 AS `warehouseFk`,
+ 1 AS `lastPacked`,
+ 1 AS `ticketFk` */;
SET character_set_client = @saved_cs_client;
--
@@ -28392,16 +28378,15 @@ DROP TABLE IF EXISTS `expeditionPallet_Print`;
/*!50001 DROP VIEW IF EXISTS `expeditionPallet_Print`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `expeditionPallet_Print` (
- `truck` tinyint NOT NULL,
- `routeFk` tinyint NOT NULL,
- `zone` tinyint NOT NULL,
- `eti` tinyint NOT NULL,
- `palletFk` tinyint NOT NULL,
- `isMatch` tinyint NOT NULL,
- `warehouseFk` tinyint NOT NULL,
- `nombreDia` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `expeditionPallet_Print` AS SELECT
+ 1 AS `truck`,
+ 1 AS `routeFk`,
+ 1 AS `zone`,
+ 1 AS `eti`,
+ 1 AS `palletFk`,
+ 1 AS `isMatch`,
+ 1 AS `warehouseFk`,
+ 1 AS `nombreDia` */;
SET character_set_client = @saved_cs_client;
--
@@ -28412,14 +28397,13 @@ DROP TABLE IF EXISTS `expeditionRoute_Monitor`;
/*!50001 DROP VIEW IF EXISTS `expeditionRoute_Monitor`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `expeditionRoute_Monitor` (
- `routeFk` tinyint NOT NULL,
- `tickets` tinyint NOT NULL,
- `expeditions` tinyint NOT NULL,
- `scanned` tinyint NOT NULL,
- `lastPacked` tinyint NOT NULL,
- `created` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `expeditionRoute_Monitor` AS SELECT
+ 1 AS `routeFk`,
+ 1 AS `tickets`,
+ 1 AS `expeditions`,
+ 1 AS `scanned`,
+ 1 AS `lastPacked`,
+ 1 AS `created` */;
SET character_set_client = @saved_cs_client;
--
@@ -28430,14 +28414,13 @@ DROP TABLE IF EXISTS `expeditionRoute_freeTickets`;
/*!50001 DROP VIEW IF EXISTS `expeditionRoute_freeTickets`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `expeditionRoute_freeTickets` (
- `routeFk` tinyint NOT NULL,
- `ticket` tinyint NOT NULL,
- `code` tinyint NOT NULL,
- `almacen` tinyint NOT NULL,
- `updated` tinyint NOT NULL,
- `parkingCode` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `expeditionRoute_freeTickets` AS SELECT
+ 1 AS `routeFk`,
+ 1 AS `ticket`,
+ 1 AS `code`,
+ 1 AS `almacen`,
+ 1 AS `updated`,
+ 1 AS `parkingCode` */;
SET character_set_client = @saved_cs_client;
--
@@ -28494,17 +28477,16 @@ DROP TABLE IF EXISTS `expeditionScan_Monitor`;
/*!50001 DROP VIEW IF EXISTS `expeditionScan_Monitor`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `expeditionScan_Monitor` (
- `truckFk` tinyint NOT NULL,
- `ETD` tinyint NOT NULL,
- `description` tinyint NOT NULL,
- `palletFk` tinyint NOT NULL,
- `position` tinyint NOT NULL,
- `built` tinyint NOT NULL,
- `scanFk` tinyint NOT NULL,
- `expeditionFk` tinyint NOT NULL,
- `scanned` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `expeditionScan_Monitor` AS SELECT
+ 1 AS `truckFk`,
+ 1 AS `ETD`,
+ 1 AS `description`,
+ 1 AS `palletFk`,
+ 1 AS `position`,
+ 1 AS `built`,
+ 1 AS `scanFk`,
+ 1 AS `expeditionFk`,
+ 1 AS `scanned` */;
SET character_set_client = @saved_cs_client;
--
@@ -28597,22 +28579,21 @@ DROP TABLE IF EXISTS `expeditionSticker`;
/*!50001 DROP VIEW IF EXISTS `expeditionSticker`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `expeditionSticker` (
- `expeditionFk` tinyint NOT NULL,
- `ticketFk` tinyint NOT NULL,
- `addressFk` tinyint NOT NULL,
- `clientFk` tinyint NOT NULL,
- `street` tinyint NOT NULL,
- `postalCode` tinyint NOT NULL,
- `city` tinyint NOT NULL,
- `nickname` tinyint NOT NULL,
- `routeFk` tinyint NOT NULL,
- `beachFk` tinyint NOT NULL,
- `zona` tinyint NOT NULL,
- `province` tinyint NOT NULL,
- `phone` tinyint NOT NULL,
- `workerCode` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `expeditionSticker` AS SELECT
+ 1 AS `expeditionFk`,
+ 1 AS `ticketFk`,
+ 1 AS `addressFk`,
+ 1 AS `clientFk`,
+ 1 AS `street`,
+ 1 AS `postalCode`,
+ 1 AS `city`,
+ 1 AS `nickname`,
+ 1 AS `routeFk`,
+ 1 AS `beachFk`,
+ 1 AS `zona`,
+ 1 AS `province`,
+ 1 AS `phone`,
+ 1 AS `workerCode` */;
SET character_set_client = @saved_cs_client;
--
@@ -28623,12 +28604,11 @@ DROP TABLE IF EXISTS `expeditionTicket_NoBoxes`;
/*!50001 DROP VIEW IF EXISTS `expeditionTicket_NoBoxes`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `expeditionTicket_NoBoxes` (
- `ticketFk` tinyint NOT NULL,
- `warehouseFk` tinyint NOT NULL,
- `routeFk` tinyint NOT NULL,
- `description` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `expeditionTicket_NoBoxes` AS SELECT
+ 1 AS `ticketFk`,
+ 1 AS `warehouseFk`,
+ 1 AS `routeFk`,
+ 1 AS `description` */;
SET character_set_client = @saved_cs_client;
--
@@ -28639,14 +28619,13 @@ DROP TABLE IF EXISTS `expeditionTimeExpended`;
/*!50001 DROP VIEW IF EXISTS `expeditionTimeExpended`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `expeditionTimeExpended` (
- `ticketFk` tinyint NOT NULL,
- `started` tinyint NOT NULL,
- `finished` tinyint NOT NULL,
- `cajas` tinyint NOT NULL,
- `code` tinyint NOT NULL,
- `warehouseFk` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `expeditionTimeExpended` AS SELECT
+ 1 AS `ticketFk`,
+ 1 AS `started`,
+ 1 AS `finished`,
+ 1 AS `cajas`,
+ 1 AS `code`,
+ 1 AS `warehouseFk` */;
SET character_set_client = @saved_cs_client;
--
@@ -28675,7 +28654,7 @@ CREATE TABLE `expeditionTruck` (
CONSTRAINT `expeditionTruck_FK_1` FOREIGN KEY (`warehouseFk`) REFERENCES `warehouse` (`id`) ON UPDATE CASCADE,
CONSTRAINT `expeditionTruck_FK_2` FOREIGN KEY (`roadmapFk`) REFERENCES `roadmap` (`id`) ON UPDATE CASCADE,
CONSTRAINT `expeditionTruck_FK_3` FOREIGN KEY (`userFk`) REFERENCES `account`.`user` (`id`) ON UPDATE CASCADE
-) ENGINE=InnoDBDEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci COMMENT='Distintas paradas que hacen los trocales';
/*!40101 SET character_set_client = @saved_cs_client */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -28730,18 +28709,17 @@ DROP TABLE IF EXISTS `expeditionTruck_Control`;
/*!50001 DROP VIEW IF EXISTS `expeditionTruck_Control`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `expeditionTruck_Control` (
- `id` tinyint NOT NULL,
- `ETD` tinyint NOT NULL,
- `description` tinyint NOT NULL,
- `ticketsSinBultos` tinyint NOT NULL,
- `pallets` tinyint NOT NULL,
- `routes` tinyint NOT NULL,
- `scans` tinyint NOT NULL,
- `expeditions` tinyint NOT NULL,
- `fallos` tinyint NOT NULL,
- `lastPacked` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `expeditionTruck_Control` AS SELECT
+ 1 AS `id`,
+ 1 AS `ETD`,
+ 1 AS `description`,
+ 1 AS `ticketsSinBultos`,
+ 1 AS `pallets`,
+ 1 AS `routes`,
+ 1 AS `scans`,
+ 1 AS `expeditions`,
+ 1 AS `fallos`,
+ 1 AS `lastPacked` */;
SET character_set_client = @saved_cs_client;
--
@@ -28752,17 +28730,16 @@ DROP TABLE IF EXISTS `expeditionTruck_Control_Detail`;
/*!50001 DROP VIEW IF EXISTS `expeditionTruck_Control_Detail`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `expeditionTruck_Control_Detail` (
- `id` tinyint NOT NULL,
- `eta` tinyint NOT NULL,
- `destino` tinyint NOT NULL,
- `pallet` tinyint NOT NULL,
- `routes` tinyint NOT NULL,
- `scans` tinyint NOT NULL,
- `destinos` tinyint NOT NULL,
- `fallos` tinyint NOT NULL,
- `lastPacked` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `expeditionTruck_Control_Detail` AS SELECT
+ 1 AS `id`,
+ 1 AS `eta`,
+ 1 AS `destino`,
+ 1 AS `pallet`,
+ 1 AS `routes`,
+ 1 AS `scans`,
+ 1 AS `destinos`,
+ 1 AS `fallos`,
+ 1 AS `lastPacked` */;
SET character_set_client = @saved_cs_client;
--
@@ -28773,18 +28750,17 @@ DROP TABLE IF EXISTS `expeditionTruck_Control_Detail_Pallet`;
/*!50001 DROP VIEW IF EXISTS `expeditionTruck_Control_Detail_Pallet`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `expeditionTruck_Control_Detail_Pallet` (
- `id` tinyint NOT NULL,
- `eta` tinyint NOT NULL,
- `destino` tinyint NOT NULL,
- `pallet` tinyint NOT NULL,
- `route` tinyint NOT NULL,
- `scans` tinyint NOT NULL,
- `destinos` tinyint NOT NULL,
- `fallos` tinyint NOT NULL,
- `expeditionTruckFk` tinyint NOT NULL,
- `lastPacked` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `expeditionTruck_Control_Detail_Pallet` AS SELECT
+ 1 AS `id`,
+ 1 AS `eta`,
+ 1 AS `destino`,
+ 1 AS `pallet`,
+ 1 AS `route`,
+ 1 AS `scans`,
+ 1 AS `destinos`,
+ 1 AS `fallos`,
+ 1 AS `expeditionTruckFk`,
+ 1 AS `lastPacked` */;
SET character_set_client = @saved_cs_client;
--
@@ -28896,10 +28872,9 @@ DROP TABLE IF EXISTS `firstTicketShipped`;
/*!50001 DROP VIEW IF EXISTS `firstTicketShipped`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `firstTicketShipped` (
- `shipped` tinyint NOT NULL,
- `clientFk` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `firstTicketShipped` AS SELECT
+ 1 AS `shipped`,
+ 1 AS `clientFk` */;
SET character_set_client = @saved_cs_client;
--
@@ -28910,14 +28885,13 @@ DROP TABLE IF EXISTS `floraHollandBuyedItems`;
/*!50001 DROP VIEW IF EXISTS `floraHollandBuyedItems`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `floraHollandBuyedItems` (
- `itemFk` tinyint NOT NULL,
- `longName` tinyint NOT NULL,
- `quantity` tinyint NOT NULL,
- `buyingValue` tinyint NOT NULL,
- `landed` tinyint NOT NULL,
- `companyFk` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `floraHollandBuyedItems` AS SELECT
+ 1 AS `itemFk`,
+ 1 AS `longName`,
+ 1 AS `quantity`,
+ 1 AS `buyingValue`,
+ 1 AS `landed`,
+ 1 AS `companyFk` */;
SET character_set_client = @saved_cs_client;
--
@@ -28935,6 +28909,7 @@ CREATE TABLE `floramondoConfig` (
`MaxLatestOrderHour` int(11) DEFAULT 12 COMMENT 'Hora máxima para aceptar pedidos hoy',
`LastUpdated` datetime DEFAULT NULL,
`itemMaxSize` int(11) DEFAULT NULL COMMENT 'tamaño maximo de los articulos a mostrar',
+ `daysToKeepItem` int(4) DEFAULT NULL COMMENT 'Número de dias para mantener artículos',
PRIMARY KEY (`id`),
KEY `floramondoConfigWarehouseIn_idx` (`warehouseInFk`),
CONSTRAINT `floramondoConfigWarehouseInFk` FOREIGN KEY (`warehouseInFk`) REFERENCES `warehouse` (`id`) ON DELETE SET NULL ON UPDATE CASCADE
@@ -29395,10 +29370,9 @@ DROP TABLE IF EXISTS `inkL10n`;
/*!50001 DROP VIEW IF EXISTS `inkL10n`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `inkL10n` (
- `id` tinyint NOT NULL,
- `name` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `inkL10n` AS SELECT
+ 1 AS `id`,
+ 1 AS `name` */;
SET character_set_client = @saved_cs_client;
--
@@ -29499,16 +29473,15 @@ DROP TABLE IF EXISTS `invoiceCorrectionDataSource`;
/*!50001 DROP VIEW IF EXISTS `invoiceCorrectionDataSource`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `invoiceCorrectionDataSource` (
- `itemFk` tinyint NOT NULL,
- `quantity` tinyint NOT NULL,
- `concept` tinyint NOT NULL,
- `price` tinyint NOT NULL,
- `discount` tinyint NOT NULL,
- `refFk` tinyint NOT NULL,
- `saleFk` tinyint NOT NULL,
- `shipped` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `invoiceCorrectionDataSource` AS SELECT
+ 1 AS `itemFk`,
+ 1 AS `quantity`,
+ 1 AS `concept`,
+ 1 AS `price`,
+ 1 AS `discount`,
+ 1 AS `refFk`,
+ 1 AS `saleFk`,
+ 1 AS `shipped` */;
SET character_set_client = @saved_cs_client;
--
@@ -29572,7 +29545,9 @@ CREATE TABLE `invoiceIn` (
KEY `invoiceIn_withholdingFk_idx` (`withholdingSageFk`),
KEY `invoiceIn_expenceFkDeductible_idx` (`expenceFkDeductible`),
KEY `invoiceIn_fk_editor` (`editorFk`),
+ KEY `invoiceIn_FK` (`currencyFk`),
CONSTRAINT `invoiceInCompany_Fk` FOREIGN KEY (`companyFk`) REFERENCES `company` (`id`) ON UPDATE CASCADE,
+ CONSTRAINT `invoiceIn_FK` FOREIGN KEY (`currencyFk`) REFERENCES `currency` (`id`) ON UPDATE CASCADE,
CONSTRAINT `invoiceIn_expenceFkDeductible` FOREIGN KEY (`expenceFkDeductible`) REFERENCES `expence` (`id`) ON UPDATE CASCADE,
CONSTRAINT `invoiceIn_fk_editor` FOREIGN KEY (`editorFk`) REFERENCES `account`.`user` (`id`),
CONSTRAINT `invoiceIn_ibfk_3` FOREIGN KEY (`cplusSubjectOpFk`) REFERENCES `cplusSubjectOp` (`id`) ON UPDATE CASCADE,
@@ -29787,9 +29762,12 @@ CREATE TABLE `invoiceInDueDay` (
`amount` decimal(10,2) NOT NULL DEFAULT 0.00,
`foreignValue` decimal(10,2) DEFAULT NULL,
`created` timestamp NOT NULL DEFAULT current_timestamp(),
+ `editorFk` int(10) unsigned DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `recibida_id` (`invoiceInFk`),
KEY `banco_id` (`bankFk`),
+ KEY `invoiceInDueDay_fk_editor` (`editorFk`),
+ CONSTRAINT `invoiceInDueDay_fk_editor` FOREIGN KEY (`editorFk`) REFERENCES `account`.`user` (`id`),
CONSTRAINT `invoiceInDueDay_ibfk_6` FOREIGN KEY (`bankFk`) REFERENCES `accounting` (`id`) ON UPDATE CASCADE,
CONSTRAINT `invoiceInDueDay_ibfk_7` FOREIGN KEY (`invoiceInFk`) REFERENCES `invoiceIn` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDBDEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;
@@ -29809,6 +29787,8 @@ DELIMITER ;;
BEGIN
DECLARE vIsNotified BOOLEAN;
+ SET NEW.editorFk = account.myUser_getId();
+
SELECT isNotified INTO vIsNotified
FROM vn.invoiceIn ii
JOIN vn.supplier s ON s.id = ii.supplierFk
@@ -29849,6 +29829,8 @@ DELIMITER ;;
BEGIN
DECLARE vIsNotified BOOLEAN;
+ SET NEW.editorFk = account.myUser_getId();
+
SELECT isNotified INTO vIsNotified
FROM vn.invoiceIn ii
JOIN vn.supplier s ON s.id = ii.supplierFk
@@ -29874,6 +29856,30 @@ 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_unicode_ci */ ;
+/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
+DELIMITER ;;
+/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `vn`.`invoiceInDueDay_afterDelete`
+ AFTER DELETE ON `invoiceInDueDay`
+ FOR EACH ROW
+BEGIN
+ INSERT INTO invoiceInLog
+ SET `action` = 'delete',
+ `changedModel` = 'InvoiceInDueDay',
+ `changedModelId` = OLD.id,
+ `userFk` = account.myUser_getId();
+END */;;
+DELIMITER ;
+/*!50003 SET sql_mode = @saved_sql_mode */ ;
+/*!50003 SET character_set_client = @saved_cs_client */ ;
+/*!50003 SET character_set_results = @saved_cs_results */ ;
+/*!50003 SET collation_connection = @saved_col_connection */ ;
--
-- Table structure for table `invoiceInIntrastat`
@@ -29914,7 +29920,7 @@ CREATE TABLE `invoiceInLog` (
`action` set('insert','update','delete') NOT NULL,
`creationDate` timestamp NULL DEFAULT current_timestamp(),
`description` text CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL,
- `changedModel` enum('InvoiceIn','invoiceInTax') NOT NULL DEFAULT 'InvoiceIn',
+ `changedModel` enum('InvoiceIn','InvoiceInTax','InvoiceInDueDay') NOT NULL DEFAULT 'InvoiceIn',
`oldInstance` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`oldInstance`)),
`newInstance` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`newInstance`)),
`changedModelId` int(11) NOT NULL,
@@ -30254,6 +30260,20 @@ DELIMITER ;
/*!50003 SET character_set_results = @saved_cs_results */ ;
/*!50003 SET collation_connection = @saved_col_connection */ ;
+--
+-- Table structure for table `invoiceOutConfig`
+--
+
+DROP TABLE IF EXISTS `invoiceOutConfig`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `invoiceOutConfig` (
+ `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `parallelism` int(10) unsigned NOT NULL DEFAULT 1,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDBDEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
--
-- Table structure for table `invoiceOutExpence`
--
@@ -30412,6 +30432,8 @@ CREATE TABLE `item` (
`lastUsed` datetime DEFAULT current_timestamp(),
`weightByPiece` int(10) unsigned DEFAULT NULL COMMENT 'peso por defecto para un articulo por tallo/unidad',
`editorFk` int(10) unsigned DEFAULT NULL,
+ `recycledPlastic` int(11) DEFAULT NULL,
+ `nonRecycledPlastic` int(11) DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `item_supplyResponseFk_idx` (`supplyResponseFk`),
KEY `Color` (`inkFk`),
@@ -30764,10 +30786,9 @@ DROP TABLE IF EXISTS `itemBotanicalWithGenus`;
/*!50001 DROP VIEW IF EXISTS `itemBotanicalWithGenus`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `itemBotanicalWithGenus` (
- `itemFk` tinyint NOT NULL,
- `ediBotanic` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `itemBotanicalWithGenus` AS SELECT
+ 1 AS `itemFk`,
+ 1 AS `ediBotanic` */;
SET character_set_client = @saved_cs_client;
--
@@ -30844,10 +30865,9 @@ DROP TABLE IF EXISTS `itemCategoryL10n`;
/*!50001 DROP VIEW IF EXISTS `itemCategoryL10n`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `itemCategoryL10n` (
- `id` tinyint NOT NULL,
- `name` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `itemCategoryL10n` AS SELECT
+ 1 AS `id`,
+ 1 AS `name` */;
SET character_set_client = @saved_cs_client;
--
@@ -30873,10 +30893,9 @@ DROP TABLE IF EXISTS `itemColor`;
/*!50001 DROP VIEW IF EXISTS `itemColor`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `itemColor` (
- `itemFk` tinyint NOT NULL,
- `color` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `itemColor` AS SELECT
+ 1 AS `itemFk`,
+ 1 AS `color` */;
SET character_set_client = @saved_cs_client;
--
@@ -31001,15 +31020,14 @@ DROP TABLE IF EXISTS `itemEntryIn`;
/*!50001 DROP VIEW IF EXISTS `itemEntryIn`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `itemEntryIn` (
- `warehouseInFk` tinyint NOT NULL,
- `landed` tinyint NOT NULL,
- `itemFk` tinyint NOT NULL,
- `quantity` tinyint NOT NULL,
- `isReceived` tinyint NOT NULL,
- `isVirtualStock` tinyint NOT NULL,
- `entryFk` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `itemEntryIn` AS SELECT
+ 1 AS `warehouseInFk`,
+ 1 AS `landed`,
+ 1 AS `itemFk`,
+ 1 AS `quantity`,
+ 1 AS `isReceived`,
+ 1 AS `isVirtualStock`,
+ 1 AS `entryFk` */;
SET character_set_client = @saved_cs_client;
--
@@ -31020,14 +31038,13 @@ DROP TABLE IF EXISTS `itemEntryOut`;
/*!50001 DROP VIEW IF EXISTS `itemEntryOut`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `itemEntryOut` (
- `warehouseOutFk` tinyint NOT NULL,
- `shipped` tinyint NOT NULL,
- `itemFk` tinyint NOT NULL,
- `quantity` tinyint NOT NULL,
- `isDelivered` tinyint NOT NULL,
- `entryFk` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `itemEntryOut` AS SELECT
+ 1 AS `warehouseOutFk`,
+ 1 AS `shipped`,
+ 1 AS `itemFk`,
+ 1 AS `quantity`,
+ 1 AS `isDelivered`,
+ 1 AS `entryFk` */;
SET character_set_client = @saved_cs_client;
--
@@ -31072,11 +31089,10 @@ DROP TABLE IF EXISTS `itemInk`;
/*!50001 DROP VIEW IF EXISTS `itemInk`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `itemInk` (
- `longName` tinyint NOT NULL,
- `inkFk` tinyint NOT NULL,
- `color` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `itemInk` AS SELECT
+ 1 AS `longName`,
+ 1 AS `inkFk`,
+ 1 AS `color` */;
SET character_set_client = @saved_cs_client;
--
@@ -31192,22 +31208,21 @@ DROP TABLE IF EXISTS `itemPlacementSupplyList`;
/*!50001 DROP VIEW IF EXISTS `itemPlacementSupplyList`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `itemPlacementSupplyList` (
- `id` tinyint NOT NULL,
- `itemFk` tinyint NOT NULL,
- `quantity` tinyint NOT NULL,
- `priority` tinyint NOT NULL,
- `created` tinyint NOT NULL,
- `userFk` tinyint NOT NULL,
- `repoUserFk` tinyint NOT NULL,
- `saldo` tinyint NOT NULL,
- `longName` tinyint NOT NULL,
- `subName` tinyint NOT NULL,
- `size` tinyint NOT NULL,
- `workerCode` tinyint NOT NULL,
- `repoCode` tinyint NOT NULL,
- `sectorFk` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `itemPlacementSupplyList` AS SELECT
+ 1 AS `id`,
+ 1 AS `itemFk`,
+ 1 AS `quantity`,
+ 1 AS `priority`,
+ 1 AS `created`,
+ 1 AS `userFk`,
+ 1 AS `repoUserFk`,
+ 1 AS `saldo`,
+ 1 AS `longName`,
+ 1 AS `subName`,
+ 1 AS `size`,
+ 1 AS `workerCode`,
+ 1 AS `repoCode`,
+ 1 AS `sectorFk` */;
SET character_set_client = @saved_cs_client;
--
@@ -31218,10 +31233,9 @@ DROP TABLE IF EXISTS `itemProductor`;
/*!50001 DROP VIEW IF EXISTS `itemProductor`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `itemProductor` (
- `itemFk` tinyint NOT NULL,
- `productor` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `itemProductor` AS SELECT
+ 1 AS `itemFk`,
+ 1 AS `productor` */;
SET character_set_client = @saved_cs_client;
--
@@ -31250,13 +31264,12 @@ DROP TABLE IF EXISTS `itemSearch`;
/*!50001 DROP VIEW IF EXISTS `itemSearch`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `itemSearch` (
- `itemFk` tinyint NOT NULL,
- `concept` tinyint NOT NULL,
- `quantity` tinyint NOT NULL,
- `nickname` tinyint NOT NULL,
- `shipped` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `itemSearch` AS SELECT
+ 1 AS `itemFk`,
+ 1 AS `concept`,
+ 1 AS `quantity`,
+ 1 AS `nickname`,
+ 1 AS `shipped` */;
SET character_set_client = @saved_cs_client;
--
@@ -31357,7 +31370,9 @@ DELIMITER ;;
BEFORE UPDATE ON `itemShelving`
FOR EACH ROW
BEGIN
- SET NEW.userFk = account.myUser_getId();
+ IF NEW.userFk IS NULL THEN
+ SET NEW.userFk = account.myUser_getId();
+ END IF;
END */;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
@@ -31434,31 +31449,30 @@ DROP TABLE IF EXISTS `itemShelvingAvailable`;
/*!50001 DROP VIEW IF EXISTS `itemShelvingAvailable`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `itemShelvingAvailable` (
- `saleFk` tinyint NOT NULL,
- `Modificado` tinyint NOT NULL,
- `ticketFk` tinyint NOT NULL,
- `isPicked` tinyint NOT NULL,
- `itemFk` tinyint NOT NULL,
- `quantity` tinyint NOT NULL,
- `concept` tinyint NOT NULL,
- `size` tinyint NOT NULL,
- `Estado` tinyint NOT NULL,
- `sectorProdPriority` tinyint NOT NULL,
- `available` tinyint NOT NULL,
- `sectorFk` tinyint NOT NULL,
- `matricula` tinyint NOT NULL,
- `parking` tinyint NOT NULL,
- `itemShelving` tinyint NOT NULL,
- `Agency` tinyint NOT NULL,
- `shipped` tinyint NOT NULL,
- `grouping` tinyint NOT NULL,
- `packing` tinyint NOT NULL,
- `hour` tinyint NOT NULL,
- `isPreviousPreparable` tinyint NOT NULL,
- `physicalVolume` tinyint NOT NULL,
- `warehouseFk` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `itemShelvingAvailable` AS SELECT
+ 1 AS `saleFk`,
+ 1 AS `Modificado`,
+ 1 AS `ticketFk`,
+ 1 AS `isPicked`,
+ 1 AS `itemFk`,
+ 1 AS `quantity`,
+ 1 AS `concept`,
+ 1 AS `size`,
+ 1 AS `Estado`,
+ 1 AS `sectorProdPriority`,
+ 1 AS `available`,
+ 1 AS `sectorFk`,
+ 1 AS `matricula`,
+ 1 AS `parking`,
+ 1 AS `itemShelving`,
+ 1 AS `Agency`,
+ 1 AS `shipped`,
+ 1 AS `grouping`,
+ 1 AS `packing`,
+ 1 AS `hour`,
+ 1 AS `isPreviousPreparable`,
+ 1 AS `physicalVolume`,
+ 1 AS `warehouseFk` */;
SET character_set_client = @saved_cs_client;
--
@@ -31469,18 +31483,17 @@ DROP TABLE IF EXISTS `itemShelvingList`;
/*!50001 DROP VIEW IF EXISTS `itemShelvingList`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `itemShelvingList` (
- `shelvingFk` tinyint NOT NULL,
- `visible` tinyint NOT NULL,
- `created` tinyint NOT NULL,
- `parking` tinyint NOT NULL,
- `itemFk` tinyint NOT NULL,
- `longName` tinyint NOT NULL,
- `size` tinyint NOT NULL,
- `subName` tinyint NOT NULL,
- `parked` tinyint NOT NULL,
- `sectorFk` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `itemShelvingList` AS SELECT
+ 1 AS `shelvingFk`,
+ 1 AS `visible`,
+ 1 AS `created`,
+ 1 AS `parking`,
+ 1 AS `itemFk`,
+ 1 AS `longName`,
+ 1 AS `size`,
+ 1 AS `subName`,
+ 1 AS `parked`,
+ 1 AS `sectorFk` */;
SET character_set_client = @saved_cs_client;
--
@@ -31505,7 +31518,9 @@ CREATE TABLE `itemShelvingLog` (
`packing` int(11) DEFAULT NULL,
`stars` int(11) DEFAULT NULL,
PRIMARY KEY (`id`),
- KEY `itemShelving_Log_FK` (`itemShelvingFk`)
+ KEY `itemShelving_Log_FK` (`itemShelvingFk`),
+ KEY `itemShelvingLog_itemFk_IDX` (`itemFk`) USING BTREE,
+ KEY `itemShelvingLog_shelvingFk_IDX` (`shelvingFk`) USING BTREE
) ENGINE=InnoDBDEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
@@ -31541,21 +31556,20 @@ DROP TABLE IF EXISTS `itemShelvingPlacementSupplyStock`;
/*!50001 DROP VIEW IF EXISTS `itemShelvingPlacementSupplyStock`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `itemShelvingPlacementSupplyStock` (
- `itemShelvingFk` tinyint NOT NULL,
- `itemFk` tinyint NOT NULL,
- `packing` tinyint NOT NULL,
- `stock` tinyint NOT NULL,
- `longName` tinyint NOT NULL,
- `size` tinyint NOT NULL,
- `subName` tinyint NOT NULL,
- `shelving` tinyint NOT NULL,
- `parking` tinyint NOT NULL,
- `created` tinyint NOT NULL,
- `priority` tinyint NOT NULL,
- `parkingFk` tinyint NOT NULL,
- `sectorFk` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `itemShelvingPlacementSupplyStock` AS SELECT
+ 1 AS `itemShelvingFk`,
+ 1 AS `itemFk`,
+ 1 AS `packing`,
+ 1 AS `stock`,
+ 1 AS `longName`,
+ 1 AS `size`,
+ 1 AS `subName`,
+ 1 AS `shelving`,
+ 1 AS `parking`,
+ 1 AS `created`,
+ 1 AS `priority`,
+ 1 AS `parkingFk`,
+ 1 AS `sectorFk` */;
SET character_set_client = @saved_cs_client;
--
@@ -31614,14 +31628,13 @@ DROP TABLE IF EXISTS `itemShelvingSaleSum`;
/*!50001 DROP VIEW IF EXISTS `itemShelvingSaleSum`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `itemShelvingSaleSum` (
- `id` tinyint NOT NULL,
- `itemShelvingFk` tinyint NOT NULL,
- `saleFk` tinyint NOT NULL,
- `quantity` tinyint NOT NULL,
- `created` tinyint NOT NULL,
- `sectorFk` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `itemShelvingSaleSum` AS SELECT
+ 1 AS `id`,
+ 1 AS `itemShelvingFk`,
+ 1 AS `saleFk`,
+ 1 AS `quantity`,
+ 1 AS `created`,
+ 1 AS `sectorFk` */;
SET character_set_client = @saved_cs_client;
--
@@ -31632,23 +31645,22 @@ DROP TABLE IF EXISTS `itemShelvingStock`;
/*!50001 DROP VIEW IF EXISTS `itemShelvingStock`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `itemShelvingStock` (
- `itemFk` tinyint NOT NULL,
- `visible` tinyint NOT NULL,
- `packing` tinyint NOT NULL,
- `grouping` tinyint NOT NULL,
- `sector` tinyint NOT NULL,
- `visibleOriginal` tinyint NOT NULL,
- `removed` tinyint NOT NULL,
- `sectorFk` tinyint NOT NULL,
- `warehouseFk` tinyint NOT NULL,
- `shelvingFk` tinyint NOT NULL,
- `parkingCode` tinyint NOT NULL,
- `parkingFk` tinyint NOT NULL,
- `itemShelvingFk` tinyint NOT NULL,
- `created` tinyint NOT NULL,
- `isPreviousPrepared` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `itemShelvingStock` AS SELECT
+ 1 AS `itemFk`,
+ 1 AS `visible`,
+ 1 AS `packing`,
+ 1 AS `grouping`,
+ 1 AS `sector`,
+ 1 AS `visibleOriginal`,
+ 1 AS `removed`,
+ 1 AS `sectorFk`,
+ 1 AS `warehouseFk`,
+ 1 AS `shelvingFk`,
+ 1 AS `parkingCode`,
+ 1 AS `parkingFk`,
+ 1 AS `itemShelvingFk`,
+ 1 AS `created`,
+ 1 AS `isPreviousPrepared` */;
SET character_set_client = @saved_cs_client;
--
@@ -31659,21 +31671,20 @@ DROP TABLE IF EXISTS `itemShelvingStockFull`;
/*!50001 DROP VIEW IF EXISTS `itemShelvingStockFull`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `itemShelvingStockFull` (
- `itemFk` tinyint NOT NULL,
- `quantity` tinyint NOT NULL,
- `packing` tinyint NOT NULL,
- `grouping` tinyint NOT NULL,
- `sector` tinyint NOT NULL,
- `removed` tinyint NOT NULL,
- `sectorFk` tinyint NOT NULL,
- `warehouseFk` tinyint NOT NULL,
- `shelvingFk` tinyint NOT NULL,
- `parkingCode` tinyint NOT NULL,
- `parkingFk` tinyint NOT NULL,
- `itemShelvingFk` tinyint NOT NULL,
- `created` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `itemShelvingStockFull` AS SELECT
+ 1 AS `itemFk`,
+ 1 AS `quantity`,
+ 1 AS `packing`,
+ 1 AS `grouping`,
+ 1 AS `sector`,
+ 1 AS `removed`,
+ 1 AS `sectorFk`,
+ 1 AS `warehouseFk`,
+ 1 AS `shelvingFk`,
+ 1 AS `parkingCode`,
+ 1 AS `parkingFk`,
+ 1 AS `itemShelvingFk`,
+ 1 AS `created` */;
SET character_set_client = @saved_cs_client;
--
@@ -31684,11 +31695,10 @@ DROP TABLE IF EXISTS `itemShelvingStockRemoved`;
/*!50001 DROP VIEW IF EXISTS `itemShelvingStockRemoved`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `itemShelvingStockRemoved` (
- `itemShelvingFk` tinyint NOT NULL,
- `itemFk` tinyint NOT NULL,
- `removed` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `itemShelvingStockRemoved` AS SELECT
+ 1 AS `itemShelvingFk`,
+ 1 AS `itemFk`,
+ 1 AS `removed` */;
SET character_set_client = @saved_cs_client;
--
@@ -31699,11 +31709,10 @@ DROP TABLE IF EXISTS `itemShelvingStock_byWarehouse`;
/*!50001 DROP VIEW IF EXISTS `itemShelvingStock_byWarehouse`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `itemShelvingStock_byWarehouse` (
- `itemFk` tinyint NOT NULL,
- `visible` tinyint NOT NULL,
- `warehouseFk` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `itemShelvingStock_byWarehouse` AS SELECT
+ 1 AS `itemFk`,
+ 1 AS `visible`,
+ 1 AS `warehouseFk` */;
SET character_set_client = @saved_cs_client;
--
@@ -31717,7 +31726,7 @@ CREATE TABLE `itemTag` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`itemFk` int(11) NOT NULL,
`tagFk` int(11) NOT NULL,
- `value` varchar(50) NOT NULL,
+ `value` varchar(50) DEFAULT NULL,
`intValue` int(11) DEFAULT NULL,
`priority` int(2) NOT NULL DEFAULT 0,
`editorFk` int(10) unsigned DEFAULT NULL,
@@ -31764,26 +31773,15 @@ DELIMITER ;
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
-/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `vn`.`itemTag_AFTER_INSERT`
+/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `vn`.`itemTag_afterInsert`
AFTER INSERT ON `itemTag`
FOR EACH ROW
trig: BEGIN
- DECLARE vItemFk INT;
- DECLARE visTriggerDisabled BOOL;
-
- SELECT isItemTagTriggerDisabled INTO visTriggerDisabled
- FROM vn.itemConfig;
-
- IF @isTriggerDisabled OR visTriggerDisabled THEN
+ IF @isTriggerDisabled THEN
LEAVE trig;
END IF;
- SET vItemFk = NEW.itemFk;
- DROP TEMPORARY TABLE IF EXISTS tmp.item;
- CREATE TEMPORARY TABLE tmp.item
- SELECT vItemFk id;
- CALL item_refreshTags();
- DROP TEMPORARY TABLE tmp.item;
+ CALL item_refreshFromTags(NEW.itemFk);
END */;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
@@ -31864,28 +31862,17 @@ DELIMITER ;;
AFTER DELETE ON `itemTag`
FOR EACH ROW
trig: BEGIN
- DECLARE vItemFk INT;
- DECLARE visTriggerDisabled BOOL;
-
INSERT INTO itemLog
SET `action` = 'delete',
`changedModel` = 'ItemTag',
`changedModelId` = OLD.id,
`userFk` = account.myUser_getId();
- SELECT isItemTagTriggerDisabled INTO visTriggerDisabled
- FROM vn.itemConfig;
-
- IF @isTriggerDisabled OR visTriggerDisabled THEN
+ IF @isTriggerDisabled THEN
LEAVE trig;
END IF;
- SET vItemFk = OLD.itemFk;
- DROP TEMPORARY TABLE IF EXISTS tmp.item;
- CREATE TEMPORARY TABLE tmp.item
- SELECT vItemFk id;
- CALL item_refreshTags();
- DROP TEMPORARY TABLE tmp.item;
+ CALL item_refreshFromTags(OLD.itemFk);
END */;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
@@ -31901,9 +31888,8 @@ DROP TABLE IF EXISTS `itemTagged`;
/*!50001 DROP VIEW IF EXISTS `itemTagged`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `itemTagged` (
- `itemFk` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `itemTagged` AS SELECT
+ 1 AS `itemFk` */;
SET character_set_client = @saved_cs_client;
--
@@ -32004,17 +31990,16 @@ DROP TABLE IF EXISTS `itemTicketOut`;
/*!50001 DROP VIEW IF EXISTS `itemTicketOut`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `itemTicketOut` (
- `warehouseFk` tinyint NOT NULL,
- `shipped` tinyint NOT NULL,
- `itemFk` tinyint NOT NULL,
- `quantity` tinyint NOT NULL,
- `isPicked` tinyint NOT NULL,
- `reserved` tinyint NOT NULL,
- `refFk` tinyint NOT NULL,
- `saleFk` tinyint NOT NULL,
- `ticketFk` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `itemTicketOut` AS SELECT
+ 1 AS `warehouseFk`,
+ 1 AS `shipped`,
+ 1 AS `itemFk`,
+ 1 AS `quantity`,
+ 1 AS `isPicked`,
+ 1 AS `reserved`,
+ 1 AS `refFk`,
+ 1 AS `saleFk`,
+ 1 AS `ticketFk` */;
SET character_set_client = @saved_cs_client;
--
@@ -32124,10 +32109,9 @@ DROP TABLE IF EXISTS `itemTypeL10n`;
/*!50001 DROP VIEW IF EXISTS `itemTypeL10n`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `itemTypeL10n` (
- `id` tinyint NOT NULL,
- `name` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `itemTypeL10n` AS SELECT
+ 1 AS `id`,
+ 1 AS `name` */;
SET character_set_client = @saved_cs_client;
--
@@ -32178,9 +32162,8 @@ 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 TABLE `item_Free_Id` (
- `newId` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `item_Free_Id` AS SELECT
+ 1 AS `newId` */;
SET character_set_client = @saved_cs_client;
--
@@ -32191,24 +32174,23 @@ DROP TABLE IF EXISTS `labelInfo`;
/*!50001 DROP VIEW IF EXISTS `labelInfo`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `labelInfo` (
- `itemId` tinyint NOT NULL,
- `itemName` tinyint NOT NULL,
- `stickers` tinyint NOT NULL,
- `life` tinyint NOT NULL,
- `colorCode` tinyint NOT NULL,
- `stems` tinyint NOT NULL,
- `category` tinyint NOT NULL,
- `productor` tinyint NOT NULL,
- `packing` tinyint NOT NULL,
- `warehouse_id` tinyint NOT NULL,
- `size` tinyint NOT NULL,
- `isPickedOff` tinyint NOT NULL,
- `notes` tinyint NOT NULL,
- `wh_in` tinyint NOT NULL,
- `entryId` tinyint NOT NULL,
- `buyId` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!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 `packing`,
+ 1 AS `warehouse_id`,
+ 1 AS `size`,
+ 1 AS `isPickedOff`,
+ 1 AS `notes`,
+ 1 AS `wh_in`,
+ 1 AS `entryId`,
+ 1 AS `buyId` */;
SET character_set_client = @saved_cs_client;
--
@@ -32237,10 +32219,9 @@ DROP TABLE IF EXISTS `lastHourProduction`;
/*!50001 DROP VIEW IF EXISTS `lastHourProduction`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `lastHourProduction` (
- `warehouseFk` tinyint NOT NULL,
- `m3` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `lastHourProduction` AS SELECT
+ 1 AS `warehouseFk`,
+ 1 AS `m3` */;
SET character_set_client = @saved_cs_client;
--
@@ -32251,21 +32232,20 @@ DROP TABLE IF EXISTS `lastPurchases`;
/*!50001 DROP VIEW IF EXISTS `lastPurchases`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `lastPurchases` (
- `landed` tinyint NOT NULL,
- `warehouseFk` tinyint NOT NULL,
- `warehouse` tinyint NOT NULL,
- `longName` tinyint NOT NULL,
- `subName` tinyint NOT NULL,
- `entryFk` tinyint NOT NULL,
- `stickers` tinyint NOT NULL,
- `packing` tinyint NOT NULL,
- `ref` tinyint NOT NULL,
- `itemFk` tinyint NOT NULL,
- `pro` tinyint NOT NULL,
- `ektRef` tinyint NOT NULL,
- `agj` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `lastPurchases` AS SELECT
+ 1 AS `landed`,
+ 1 AS `warehouseFk`,
+ 1 AS `warehouse`,
+ 1 AS `longName`,
+ 1 AS `subName`,
+ 1 AS `entryFk`,
+ 1 AS `stickers`,
+ 1 AS `packing`,
+ 1 AS `ref`,
+ 1 AS `itemFk`,
+ 1 AS `pro`,
+ 1 AS `ektRef`,
+ 1 AS `agj` */;
SET character_set_client = @saved_cs_client;
--
@@ -32276,14 +32256,13 @@ DROP TABLE IF EXISTS `lastTopClaims`;
/*!50001 DROP VIEW IF EXISTS `lastTopClaims`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `lastTopClaims` (
- `itemFk` tinyint NOT NULL,
- `itemName` tinyint NOT NULL,
- `itemTypeName` tinyint NOT NULL,
- `claimsNumber` tinyint NOT NULL,
- `claimedAmount` tinyint NOT NULL,
- `totalAmount` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `lastTopClaims` AS SELECT
+ 1 AS `itemFk`,
+ 1 AS `itemName`,
+ 1 AS `itemTypeName`,
+ 1 AS `claimsNumber`,
+ 1 AS `claimedAmount`,
+ 1 AS `totalAmount` */;
SET character_set_client = @saved_cs_client;
--
@@ -32784,16 +32763,15 @@ DROP TABLE IF EXISTS `mistake`;
/*!50001 DROP VIEW IF EXISTS `mistake`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `mistake` (
- `revisador` tinyint NOT NULL,
- `concept` tinyint NOT NULL,
- `sacador` tinyint NOT NULL,
- `firstName` tinyint NOT NULL,
- `lastName` tinyint NOT NULL,
- `description` tinyint NOT NULL,
- `created` tinyint NOT NULL,
- `workerFk` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `mistake` AS SELECT
+ 1 AS `revisador`,
+ 1 AS `concept`,
+ 1 AS `sacador`,
+ 1 AS `firstName`,
+ 1 AS `lastName`,
+ 1 AS `description`,
+ 1 AS `created`,
+ 1 AS `workerFk` */;
SET character_set_client = @saved_cs_client;
--
@@ -32804,16 +32782,15 @@ DROP TABLE IF EXISTS `mistakeRatio`;
/*!50001 DROP VIEW IF EXISTS `mistakeRatio`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `mistakeRatio` (
- `revisador` tinyint NOT NULL,
- `sacador` tinyint NOT NULL,
- `firstName` tinyint NOT NULL,
- `lastName` tinyint NOT NULL,
- `description` tinyint NOT NULL,
- `created` tinyint NOT NULL,
- `workerFk` tinyint NOT NULL,
- `saleFk` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `mistakeRatio` AS SELECT
+ 1 AS `revisador`,
+ 1 AS `sacador`,
+ 1 AS `firstName`,
+ 1 AS `lastName`,
+ 1 AS `description`,
+ 1 AS `created`,
+ 1 AS `workerFk`,
+ 1 AS `saleFk` */;
SET character_set_client = @saved_cs_client;
--
@@ -32909,13 +32886,12 @@ DROP TABLE IF EXISTS `newBornSales`;
/*!50001 DROP VIEW IF EXISTS `newBornSales`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `newBornSales` (
- `amount` tinyint NOT NULL,
- `clientFk` tinyint NOT NULL,
- `userFk` tinyint NOT NULL,
- `dated` tinyint NOT NULL,
- `firstShipped` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `newBornSales` AS SELECT
+ 1 AS `amount`,
+ 1 AS `clientFk`,
+ 1 AS `userFk`,
+ 1 AS `dated`,
+ 1 AS `firstShipped` */;
SET character_set_client = @saved_cs_client;
--
@@ -33064,12 +33040,11 @@ DROP TABLE IF EXISTS `operatorWorkerCode`;
/*!50001 DROP VIEW IF EXISTS `operatorWorkerCode`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `operatorWorkerCode` (
- `workerFk` tinyint NOT NULL,
- `fullName` tinyint NOT NULL,
- `code` tinyint NOT NULL,
- `numberOfWagons` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `operatorWorkerCode` AS SELECT
+ 1 AS `workerFk`,
+ 1 AS `fullName`,
+ 1 AS `code`,
+ 1 AS `numberOfWagons` */;
SET character_set_client = @saved_cs_client;
--
@@ -33133,10 +33108,9 @@ DROP TABLE IF EXISTS `originL10n`;
/*!50001 DROP VIEW IF EXISTS `originL10n`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `originL10n` (
- `id` tinyint NOT NULL,
- `name` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `originL10n` AS SELECT
+ 1 AS `id`,
+ 1 AS `name` */;
SET character_set_client = @saved_cs_client;
--
@@ -33223,10 +33197,9 @@ DROP TABLE IF EXISTS `packageEquivalentItem`;
/*!50001 DROP VIEW IF EXISTS `packageEquivalentItem`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `packageEquivalentItem` (
- `itemFk` tinyint NOT NULL,
- `equivalentFk` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `packageEquivalentItem` AS SELECT
+ 1 AS `itemFk`,
+ 1 AS `equivalentFk` */;
SET character_set_client = @saved_cs_client;
--
@@ -33414,6 +33387,23 @@ CREATE TABLE `packingSite` (
) ENGINE=InnoDBDEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
+--
+-- Table structure for table `packingSiteAdvanced`
+--
+
+DROP TABLE IF EXISTS `packingSiteAdvanced`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `packingSiteAdvanced` (
+ `ticketFk` int(11) NOT NULL,
+ `workerFk` int(10) unsigned DEFAULT NULL,
+ PRIMARY KEY (`ticketFk`),
+ KEY `packingSiteAdvanced_FK_1` (`workerFk`),
+ CONSTRAINT `packingSiteAdvanced_FK` FOREIGN KEY (`ticketFk`) REFERENCES `ticket` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
+ CONSTRAINT `packingSiteAdvanced_FK_1` FOREIGN KEY (`workerFk`) REFERENCES `worker` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
--
-- Table structure for table `packingSiteConfig`
--
@@ -33906,10 +33896,9 @@ DROP TABLE IF EXISTS `personMedia`;
/*!50001 DROP VIEW IF EXISTS `personMedia`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `personMedia` (
- `workerFk` tinyint NOT NULL,
- `mediaValue` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `personMedia` AS SELECT
+ 1 AS `workerFk`,
+ 1 AS `mediaValue` */;
SET character_set_client = @saved_cs_client;
--
@@ -33989,12 +33978,11 @@ DROP TABLE IF EXISTS `phoneBook`;
/*!50001 DROP VIEW IF EXISTS `phoneBook`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `phoneBook` (
- `Tipo` tinyint NOT NULL,
- `Id` tinyint NOT NULL,
- `Cliente` tinyint NOT NULL,
- `Telefono` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `phoneBook` AS SELECT
+ 1 AS `Tipo`,
+ 1 AS `Id`,
+ 1 AS `Cliente`,
+ 1 AS `Telefono` */;
SET character_set_client = @saved_cs_client;
--
@@ -34535,13 +34523,12 @@ DROP TABLE IF EXISTS `productionVolume`;
/*!50001 DROP VIEW IF EXISTS `productionVolume`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `productionVolume` (
- `hora` tinyint NOT NULL,
- `minuto` tinyint NOT NULL,
- `cm3` tinyint NOT NULL,
- `warehouseFk` tinyint NOT NULL,
- `created` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `productionVolume` AS SELECT
+ 1 AS `hora`,
+ 1 AS `minuto`,
+ 1 AS `cm3`,
+ 1 AS `warehouseFk`,
+ 1 AS `created` */;
SET character_set_client = @saved_cs_client;
--
@@ -34552,10 +34539,9 @@ DROP TABLE IF EXISTS `productionVolume_LastHour`;
/*!50001 DROP VIEW IF EXISTS `productionVolume_LastHour`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `productionVolume_LastHour` (
- `m3` tinyint NOT NULL,
- `warehouseFk` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `productionVolume_LastHour` AS SELECT
+ 1 AS `m3`,
+ 1 AS `warehouseFk` */;
SET character_set_client = @saved_cs_client;
--
@@ -34713,11 +34699,14 @@ CREATE TABLE `property` (
`protocol` varchar(100) DEFAULT NULL COMMENT 'numero de protocolo notarial de la escritura de compra venta',
`purchased` date NOT NULL DEFAULT curdate() COMMENT 'date of purchase of the property',
`booked` date DEFAULT NULL COMMENT 'date of completion of property registration',
+ `supplierFk` int(10) unsigned DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `property_FK` (`propertyGroupFk`),
KEY `property_FK_1` (`townFk`),
KEY `property_company` (`companyFk`),
+ KEY `propertySupplierFk` (`supplierFk`),
CONSTRAINT `propertyCompany_Fk` FOREIGN KEY (`companyFk`) REFERENCES `company` (`id`) ON UPDATE CASCADE,
+ CONSTRAINT `propertySupplierFk` FOREIGN KEY (`supplierFk`) REFERENCES `supplier` (`id`) ON UPDATE CASCADE,
CONSTRAINT `property_FK` FOREIGN KEY (`propertyGroupFk`) REFERENCES `propertyGroup` (`id`) ON UPDATE CASCADE,
CONSTRAINT `property_FK_1` FOREIGN KEY (`townFk`) REFERENCES `town` (`id`) ON UPDATE CASCADE
) ENGINE=InnoDBDEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;
@@ -34961,11 +34950,78 @@ CREATE TABLE `rate` (
`rate1` double NOT NULL,
`rate2` double NOT NULL,
`rate3` double NOT NULL,
+ `editorFk` int(10) unsigned DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `tarifa_warehouse` (`warehouseFk`),
+ KEY `rate_fk_editor` (`editorFk`),
+ CONSTRAINT `rate_fk_editor` FOREIGN KEY (`editorFk`) REFERENCES `account`.`user` (`id`),
CONSTRAINT `tarifa_warehouse` FOREIGN KEY (`warehouseFk`) REFERENCES `warehouse` (`id`) ON UPDATE CASCADE
) ENGINE=InnoDBDEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_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_unicode_ci */ ;
+/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
+DELIMITER ;;
+/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `vn`.`rate_beforeInsert`
+ BEFORE INSERT ON `rate`
+ FOR EACH ROW
+BEGIN
+ SET NEW.editorFk = account.myUser_getId();
+END */;;
+DELIMITER ;
+/*!50003 SET sql_mode = @saved_sql_mode */ ;
+/*!50003 SET character_set_client = @saved_cs_client */ ;
+/*!50003 SET character_set_results = @saved_cs_results */ ;
+/*!50003 SET collation_connection = @saved_col_connection */ ;
+/*!50003 SET @saved_cs_client = @@character_set_client */ ;
+/*!50003 SET @saved_cs_results = @@character_set_results */ ;
+/*!50003 SET @saved_col_connection = @@collation_connection */ ;
+/*!50003 SET character_set_client = utf8mb4 */ ;
+/*!50003 SET character_set_results = utf8mb4 */ ;
+/*!50003 SET collation_connection = utf8mb4_unicode_ci */ ;
+/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
+DELIMITER ;;
+/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `vn`.`rate_beforeUpdate`
+ BEFORE UPDATE ON `rate`
+ FOR EACH ROW
+BEGIN
+ SET NEW.editorFk = account.myUser_getId();
+END */;;
+DELIMITER ;
+/*!50003 SET sql_mode = @saved_sql_mode */ ;
+/*!50003 SET character_set_client = @saved_cs_client */ ;
+/*!50003 SET character_set_results = @saved_cs_results */ ;
+/*!50003 SET collation_connection = @saved_col_connection */ ;
+/*!50003 SET @saved_cs_client = @@character_set_client */ ;
+/*!50003 SET @saved_cs_results = @@character_set_results */ ;
+/*!50003 SET @saved_col_connection = @@collation_connection */ ;
+/*!50003 SET character_set_client = utf8mb4 */ ;
+/*!50003 SET character_set_results = utf8mb4 */ ;
+/*!50003 SET collation_connection = utf8mb4_unicode_ci */ ;
+/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
+DELIMITER ;;
+/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `vn`.`rate_afterDelete`
+ AFTER DELETE ON `rate`
+ FOR EACH ROW
+BEGIN
+ INSERT INTO rateLog
+ SET `action` = 'delete',
+ `changedModel` = 'Rate',
+ `changedModelId` = OLD.id,
+ `userFk` = account.myUser_getId();
+END */;;
+DELIMITER ;
+/*!50003 SET sql_mode = @saved_sql_mode */ ;
+/*!50003 SET character_set_client = @saved_cs_client */ ;
+/*!50003 SET character_set_results = @saved_cs_results */ ;
+/*!50003 SET collation_connection = @saved_col_connection */ ;
--
-- Table structure for table `rateConfig`
@@ -34984,6 +35040,34 @@ CREATE TABLE `rateConfig` (
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
+--
+-- Table structure for table `rateLog`
+--
+
+DROP TABLE IF EXISTS `rateLog`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `rateLog` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `originFk` int(11) DEFAULT NULL,
+ `userFk` int(10) unsigned DEFAULT NULL,
+ `action` set('insert','update','delete','select') NOT NULL,
+ `creationDate` timestamp NULL DEFAULT current_timestamp(),
+ `description` text CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL,
+ `changedModel` enum('Rate') NOT NULL DEFAULT 'Rate',
+ `oldInstance` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`oldInstance`)),
+ `newInstance` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`newInstance`)),
+ `changedModelId` int(11) NOT NULL,
+ `changedModelValue` varchar(45) DEFAULT NULL,
+ PRIMARY KEY (`id`),
+ KEY `logRateuserFk` (`userFk`),
+ KEY `rateLog_changedModel` (`changedModel`,`changedModelId`,`creationDate`),
+ KEY `rateLog_originFk` (`originFk`,`creationDate`),
+ CONSTRAINT `rateOriginFk` FOREIGN KEY (`originFk`) REFERENCES `rate` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
+ CONSTRAINT `rateUserFk` FOREIGN KEY (`userFk`) REFERENCES `account`.`user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
--
-- Table structure for table `receipt`
--
@@ -35354,20 +35438,23 @@ DROP TABLE IF EXISTS `roadmap`;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `roadmap` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `name` varchar(45) NOT NULL,
`tractorPlate` varchar(10) DEFAULT NULL,
`trailerPlate` varchar(12) DEFAULT NULL,
`phone` varchar(15) DEFAULT NULL,
`supplierFk` int(10) unsigned DEFAULT NULL,
- `etd` datetime DEFAULT NULL,
+ `etd` datetime NOT NULL,
`observations` varchar(255) DEFAULT NULL,
`created` timestamp NULL DEFAULT current_timestamp(),
`userFk` int(10) unsigned DEFAULT NULL,
+ `price` decimal(10,2) DEFAULT NULL,
+ `driverName` varchar(45) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `userFk` (`userFk`),
KEY `roadmap_supplierFk` (`supplierFk`),
CONSTRAINT `roadmap_ibfk_2` FOREIGN KEY (`userFk`) REFERENCES `account`.`user` (`id`) ON UPDATE CASCADE,
CONSTRAINT `roadmap_supplierFk` FOREIGN KEY (`supplierFk`) REFERENCES `supplier` (`id`) ON UPDATE CASCADE
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci COMMENT='Troncales diarios que se contratan';
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -35378,12 +35465,11 @@ DROP TABLE IF EXISTS `role`;
/*!50001 DROP VIEW IF EXISTS `role`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `role` (
- `id` tinyint NOT NULL,
- `name` tinyint NOT NULL,
- `description` tinyint NOT NULL,
- `hasLogin` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `role` AS SELECT
+ 1 AS `id`,
+ 1 AS `name`,
+ 1 AS `description`,
+ 1 AS `hasLogin` */;
SET character_set_client = @saved_cs_client;
--
@@ -35447,6 +35533,8 @@ DELIMITER ;;
BEFORE INSERT ON `route`
FOR EACH ROW
BEGIN
+ DECLARE vDefaultAgencyModeFk INT;
+
SET NEW.editorFk = account.myUser_getId();
SET NEW.commissionWorkCenterFk = (
@@ -35454,6 +35542,16 @@ BEGIN
FROM vn.routeConfig r
LEFT JOIN vn.business b ON b.workerFk = account.myUser_getId()
AND NEW.created BETWEEN b.started AND IFNULL(b.ended, NEW.created));
+
+ IF ISNULL(NEW.agencyModeFk) THEN
+ SELECT r.agencyModeFk INTO vDefaultAgencyModeFk
+ FROM routeDefaultAgencyMode r
+ JOIN business b ON b.workCenterFk = r.workCenterFK
+ JOIN worker w ON w.businessFk = b.id
+ WHERE b.workerFk = account.myUser_getId();
+
+ SET NEW.agencyModeFk = vDefaultAgencyModeFk;
+ END IF;
END */;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
@@ -35707,6 +35805,25 @@ CREATE TABLE `routeConfig` (
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
+--
+-- Table structure for table `routeDefaultAgencyMode`
+--
+
+DROP TABLE IF EXISTS `routeDefaultAgencyMode`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `routeDefaultAgencyMode` (
+ `id` int(11) NOT NULL DEFAULT 0,
+ `workcenterFk` int(11) DEFAULT NULL,
+ `agencyModeFk` int(11) DEFAULT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `workcenterFk` (`workcenterFk`),
+ KEY `routeDefaultAgencyMode_FK` (`agencyModeFk`),
+ CONSTRAINT `routeDefaultAgencyMode_FK` FOREIGN KEY (`agencyModeFk`) REFERENCES `agencyMode` (`id`),
+ CONSTRAINT `routeDefaultAgencyMode_FK_1` FOREIGN KEY (`workcenterFk`) REFERENCES `workCenter` (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
--
-- Table structure for table `routeLoadWorker__`
--
@@ -35759,7 +35876,7 @@ DROP TABLE IF EXISTS `routeMaster`;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `routeMaster` (
`id` int(11) NOT NULL AUTO_INCREMENT,
- `warehoseFk` smallint(6) unsigned DEFAULT NULL,
+ `warehouseFk` smallint(6) unsigned DEFAULT NULL,
`km` int(11) NOT NULL DEFAULT 0,
`packages` int(11) NOT NULL DEFAULT 0,
`vehicleCost` decimal(10,2) NOT NULL DEFAULT 0.00,
@@ -35769,7 +35886,7 @@ CREATE TABLE `routeMaster` (
`fuel` int(11) NOT NULL DEFAULT 0,
`freelancers` decimal(10,2) NOT NULL DEFAULT 0.00,
`year` int(11) NOT NULL DEFAULT 0,
- `mounth` int(11) NOT NULL DEFAULT 0,
+ `month` int(11) NOT NULL DEFAULT 0,
`expense` decimal(10,2) NOT NULL DEFAULT 0.00,
`freelancersPackages` int(11) NOT NULL DEFAULT 0,
`kmCost` decimal(10,2) NOT NULL DEFAULT 0.00,
@@ -35777,8 +35894,8 @@ CREATE TABLE `routeMaster` (
`freelancerPackageCost` decimal(10,2) NOT NULL DEFAULT 0.00,
`created` timestamp NULL DEFAULT current_timestamp(),
PRIMARY KEY (`id`),
- KEY `fk_rutas_warehouse_id_idx` (`warehoseFk`),
- CONSTRAINT `routeMaster_FK` FOREIGN KEY (`warehoseFk`) REFERENCES `warehouse` (`id`)
+ KEY `fk_rutas_warehouse_id_idx` (`warehouseFk`),
+ CONSTRAINT `routeMaster_FK` FOREIGN KEY (`warehouseFk`) REFERENCES `warehouse` (`id`)
) ENGINE=InnoDBDEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
@@ -35856,15 +35973,14 @@ DROP TABLE IF EXISTS `routesReduced`;
/*!50001 DROP VIEW IF EXISTS `routesReduced`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `routesReduced` (
- `description` tinyint NOT NULL,
- `name` tinyint NOT NULL,
- `routeFk` tinyint NOT NULL,
- `eta` tinyint NOT NULL,
- `bufferFk` tinyint NOT NULL,
- `beachFk` tinyint NOT NULL,
- `itempackingTypeFk` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `routesReduced` AS SELECT
+ 1 AS `description`,
+ 1 AS `name`,
+ 1 AS `routeFk`,
+ 1 AS `eta`,
+ 1 AS `bufferFk`,
+ 1 AS `beachFk`,
+ 1 AS `itempackingTypeFk` */;
SET character_set_client = @saved_cs_client;
--
@@ -36316,16 +36432,15 @@ DROP TABLE IF EXISTS `saleCost`;
/*!50001 DROP VIEW IF EXISTS `saleCost`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `saleCost` (
- `itemFk` tinyint NOT NULL,
- `ticketFk` tinyint NOT NULL,
- `concept` tinyint NOT NULL,
- `quantity` tinyint NOT NULL,
- `discount` tinyint NOT NULL,
- `price` tinyint NOT NULL,
- `component` tinyint NOT NULL,
- `coste` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `saleCost` AS SELECT
+ 1 AS `itemFk`,
+ 1 AS `ticketFk`,
+ 1 AS `concept`,
+ 1 AS `quantity`,
+ 1 AS `discount`,
+ 1 AS `price`,
+ 1 AS `component`,
+ 1 AS `coste` */;
SET character_set_client = @saved_cs_client;
--
@@ -36392,12 +36507,11 @@ DROP TABLE IF EXISTS `saleLabel`;
/*!50001 DROP VIEW IF EXISTS `saleLabel`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `saleLabel` (
- `saleFk` tinyint NOT NULL,
- `label` tinyint NOT NULL,
- `stem` tinyint NOT NULL,
- `created` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `saleLabel` AS SELECT
+ 1 AS `saleFk`,
+ 1 AS `label`,
+ 1 AS `stem`,
+ 1 AS `created` */;
SET character_set_client = @saved_cs_client;
--
@@ -36431,15 +36545,14 @@ DROP TABLE IF EXISTS `saleMistakeList`;
/*!50001 DROP VIEW IF EXISTS `saleMistakeList`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `saleMistakeList` (
- `saleFk` tinyint NOT NULL,
- `workerFk` tinyint NOT NULL,
- `sacador` tinyint NOT NULL,
- `created` tinyint NOT NULL,
- `revisador` tinyint NOT NULL,
- `description` tinyint NOT NULL,
- `controlled` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `saleMistakeList` AS SELECT
+ 1 AS `saleFk`,
+ 1 AS `workerFk`,
+ 1 AS `sacador`,
+ 1 AS `created`,
+ 1 AS `revisador`,
+ 1 AS `description`,
+ 1 AS `controlled` */;
SET character_set_client = @saved_cs_client;
--
@@ -36450,15 +36563,14 @@ DROP TABLE IF EXISTS `saleMistake_list__2`;
/*!50001 DROP VIEW IF EXISTS `saleMistake_list__2`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `saleMistake_list__2` (
- `saleFk` tinyint NOT NULL,
- `workerFk` tinyint NOT NULL,
- `sacador` tinyint NOT NULL,
- `created` tinyint NOT NULL,
- `revisador` tinyint NOT NULL,
- `description` tinyint NOT NULL,
- `controlled` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `saleMistake_list__2` AS SELECT
+ 1 AS `saleFk`,
+ 1 AS `workerFk`,
+ 1 AS `sacador`,
+ 1 AS `created`,
+ 1 AS `revisador`,
+ 1 AS `description`,
+ 1 AS `controlled` */;
SET character_set_client = @saved_cs_client;
--
@@ -36469,9 +36581,8 @@ DROP TABLE IF EXISTS `saleSaleTracking`;
/*!50001 DROP VIEW IF EXISTS `saleSaleTracking`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `saleSaleTracking` (
- `saleFk` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `saleSaleTracking` AS SELECT
+ 1 AS `saleFk` */;
SET character_set_client = @saved_cs_client;
--
@@ -36559,21 +36670,20 @@ DROP TABLE IF EXISTS `saleValue`;
/*!50001 DROP VIEW IF EXISTS `saleValue`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `saleValue` (
- `warehouse` tinyint NOT NULL,
- `client` tinyint NOT NULL,
- `clientTypeFk` tinyint NOT NULL,
- `buyer` tinyint NOT NULL,
- `itemTypeFk` tinyint NOT NULL,
- `family` tinyint NOT NULL,
- `itemFk` tinyint NOT NULL,
- `concept` tinyint NOT NULL,
- `quantity` tinyint NOT NULL,
- `cost` tinyint NOT NULL,
- `value` tinyint NOT NULL,
- `year` tinyint NOT NULL,
- `week` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `saleValue` AS SELECT
+ 1 AS `warehouse`,
+ 1 AS `client`,
+ 1 AS `clientTypeFk`,
+ 1 AS `buyer`,
+ 1 AS `itemTypeFk`,
+ 1 AS `family`,
+ 1 AS `itemFk`,
+ 1 AS `concept`,
+ 1 AS `quantity`,
+ 1 AS `cost`,
+ 1 AS `value`,
+ 1 AS `year`,
+ 1 AS `week` */;
SET character_set_client = @saved_cs_client;
--
@@ -36584,24 +36694,23 @@ DROP TABLE IF EXISTS `saleVolume`;
/*!50001 DROP VIEW IF EXISTS `saleVolume`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `saleVolume` (
- `ticketFk` tinyint NOT NULL,
- `saleFk` tinyint NOT NULL,
- `litros` tinyint NOT NULL,
- `routeFk` tinyint NOT NULL,
- `shipped` tinyint NOT NULL,
- `landed` tinyint NOT NULL,
- `volume` tinyint NOT NULL,
- `physicalWeight` tinyint NOT NULL,
- `weight` tinyint NOT NULL,
- `physicalVolume` tinyint NOT NULL,
- `freight` tinyint NOT NULL,
- `zoneFk` tinyint NOT NULL,
- `clientFk` tinyint NOT NULL,
- `isPicked` tinyint NOT NULL,
- `eurosValue` tinyint NOT NULL,
- `itemPackingTypeFk` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `saleVolume` AS SELECT
+ 1 AS `ticketFk`,
+ 1 AS `saleFk`,
+ 1 AS `litros`,
+ 1 AS `routeFk`,
+ 1 AS `shipped`,
+ 1 AS `landed`,
+ 1 AS `volume`,
+ 1 AS `physicalWeight`,
+ 1 AS `weight`,
+ 1 AS `physicalVolume`,
+ 1 AS `freight`,
+ 1 AS `zoneFk`,
+ 1 AS `clientFk`,
+ 1 AS `isPicked`,
+ 1 AS `eurosValue`,
+ 1 AS `itemPackingTypeFk` */;
SET character_set_client = @saved_cs_client;
--
@@ -36612,12 +36721,11 @@ DROP TABLE IF EXISTS `saleVolume_Today_VNH`;
/*!50001 DROP VIEW IF EXISTS `saleVolume_Today_VNH`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `saleVolume_Today_VNH` (
- `Cliente` tinyint NOT NULL,
- `Provincia` tinyint NOT NULL,
- `Pais` tinyint NOT NULL,
- `volume` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `saleVolume_Today_VNH` AS SELECT
+ 1 AS `Cliente`,
+ 1 AS `Provincia`,
+ 1 AS `Pais`,
+ 1 AS `volume` */;
SET character_set_client = @saved_cs_client;
--
@@ -36628,11 +36736,10 @@ DROP TABLE IF EXISTS `sale_freightComponent`;
/*!50001 DROP VIEW IF EXISTS `sale_freightComponent`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `sale_freightComponent` (
- `ticketFk` tinyint NOT NULL,
- `amount` tinyint NOT NULL,
- `shipped` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `sale_freightComponent` AS SELECT
+ 1 AS `ticketFk`,
+ 1 AS `amount`,
+ 1 AS `shipped` */;
SET character_set_client = @saved_cs_client;
--
@@ -36651,6 +36758,20 @@ CREATE TABLE `salesPersonGoal` (
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
+--
+-- Table structure for table `salesPersonProtected`
+--
+
+DROP TABLE IF EXISTS `salesPersonProtected`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `salesPersonProtected` (
+ `salesPersonFk` int(10) unsigned NOT NULL,
+ PRIMARY KEY (`salesPersonFk`),
+ CONSTRAINT `salesPersonProtected_FK` FOREIGN KEY (`salesPersonFk`) REFERENCES `worker` (`id`) ON UPDATE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci COMMENT='Lista de comerciales que no se desasignarán automáticamente los clientes';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
--
-- Temporary table structure for view `salesPersonSince`
--
@@ -36659,10 +36780,9 @@ 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 TABLE `salesPersonSince` (
- `workerFk` tinyint NOT NULL,
- `started` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `salesPersonSince` AS SELECT
+ 1 AS `workerFk`,
+ 1 AS `started` */;
SET character_set_client = @saved_cs_client;
--
@@ -36673,20 +36793,19 @@ DROP TABLE IF EXISTS `salesPreparedLastHour`;
/*!50001 DROP VIEW IF EXISTS `salesPreparedLastHour`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `salesPreparedLastHour` (
- `warehouseFk` tinyint NOT NULL,
- `saleFk` tinyint NOT NULL,
- `isChecked` tinyint NOT NULL,
- `originalQuantity` tinyint NOT NULL,
- `created` tinyint NOT NULL,
- `code` tinyint NOT NULL,
- `firstname` tinyint NOT NULL,
- `lastName` tinyint NOT NULL,
- `workerCode` tinyint NOT NULL,
- `litros` tinyint NOT NULL,
- `concept` tinyint NOT NULL,
- `departmentName` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `salesPreparedLastHour` AS SELECT
+ 1 AS `warehouseFk`,
+ 1 AS `saleFk`,
+ 1 AS `isChecked`,
+ 1 AS `originalQuantity`,
+ 1 AS `created`,
+ 1 AS `code`,
+ 1 AS `firstname`,
+ 1 AS `lastName`,
+ 1 AS `workerCode`,
+ 1 AS `litros`,
+ 1 AS `concept`,
+ 1 AS `departmentName` */;
SET character_set_client = @saved_cs_client;
--
@@ -36697,9 +36816,8 @@ DROP TABLE IF EXISTS `salesPreviousPreparated`;
/*!50001 DROP VIEW IF EXISTS `salesPreviousPreparated`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `salesPreviousPreparated` (
- `saleFk` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `salesPreviousPreparated` AS SELECT
+ 1 AS `saleFk` */;
SET character_set_client = @saved_cs_client;
--
@@ -37668,16 +37786,16 @@ DROP TABLE IF EXISTS `stockBuyed`;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `stockBuyed` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `user` int(10) unsigned DEFAULT NULL,
+ `userFk` int(10) unsigned DEFAULT NULL,
`buyed` decimal(10,2) DEFAULT NULL,
- `date` date DEFAULT NULL,
+ `dated` date DEFAULT NULL,
`creationDate` timestamp NULL DEFAULT current_timestamp(),
`reserved` decimal(10,2) DEFAULT NULL,
`requested` decimal(10,2) DEFAULT NULL,
`description` varchar(100) DEFAULT NULL,
PRIMARY KEY (`id`),
- KEY `stockBuyed_user_idx` (`user`),
- CONSTRAINT `stockBuyedUserFk` FOREIGN KEY (`user`) REFERENCES `account`.`user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
+ KEY `stockBuyed_user_idx` (`userFk`),
+ CONSTRAINT `stockBuyedUserFk` FOREIGN KEY (`userFk`) REFERENCES `account`.`user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDBDEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
@@ -37736,6 +37854,7 @@ CREATE TABLE `supplier` (
`healthRegister` varchar(45) DEFAULT NULL,
`isPayMethodChecked` tinyint(4) NOT NULL DEFAULT 0 COMMENT 'Se ha validado la forma de pago',
`isVies` tinyint(4) NOT NULL DEFAULT 0,
+ `stamp` longblob DEFAULT NULL,
`editorFk` int(10) unsigned DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `cuenta` (`account`),
@@ -38256,18 +38375,17 @@ DROP TABLE IF EXISTS `supplierPackaging`;
/*!50001 DROP VIEW IF EXISTS `supplierPackaging`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `supplierPackaging` (
- `supplierFk` tinyint NOT NULL,
- `itemFk` tinyint NOT NULL,
- `longName` tinyint NOT NULL,
- `supplier` tinyint NOT NULL,
- `entryFk` tinyint NOT NULL,
- `landed` tinyint NOT NULL,
- `out` tinyint NOT NULL,
- `in` tinyint NOT NULL,
- `warehouse` tinyint NOT NULL,
- `buyingValue` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `supplierPackaging` AS SELECT
+ 1 AS `supplierFk`,
+ 1 AS `itemFk`,
+ 1 AS `longName`,
+ 1 AS `supplier`,
+ 1 AS `entryFk`,
+ 1 AS `landed`,
+ 1 AS `out`,
+ 1 AS `in`,
+ 1 AS `warehouse`,
+ 1 AS `buyingValue` */;
SET character_set_client = @saved_cs_client;
--
@@ -38388,10 +38506,9 @@ DROP TABLE IF EXISTS `tagL10n`;
/*!50001 DROP VIEW IF EXISTS `tagL10n`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `tagL10n` (
- `id` tinyint NOT NULL,
- `name` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `tagL10n` AS SELECT
+ 1 AS `id`,
+ 1 AS `name` */;
SET character_set_client = @saved_cs_client;
--
@@ -38566,6 +38683,7 @@ CREATE TABLE `ticket` (
`totalWithoutVat` decimal(10,2) DEFAULT NULL COMMENT 'cache calculada del total sin iva',
`weight` decimal(10,2) DEFAULT NULL COMMENT 'En caso de informar, se utilizará su valor para calcular el peso de la factura',
`clonedFrom` int(11) DEFAULT NULL,
+ `cmrFk` int(11) DEFAULT NULL,
`editorFk` int(10) unsigned DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `Id_Cliente` (`clientFk`),
@@ -38580,8 +38698,10 @@ CREATE TABLE `ticket` (
KEY `Fecha` (`shipped`,`clientFk`),
KEY `tickets_zone_fk_idx` (`zoneFk`),
KEY `ticket_fk_editor` (`editorFk`),
+ KEY `ticket_cmrFk` (`cmrFk`),
CONSTRAINT `ticketCompany_Fk` FOREIGN KEY (`companyFk`) REFERENCES `company` (`id`) ON UPDATE CASCADE,
CONSTRAINT `ticket_FK` FOREIGN KEY (`refFk`) REFERENCES `invoiceOut` (`ref`) ON UPDATE CASCADE,
+ CONSTRAINT `ticket_cmrFk` FOREIGN KEY (`cmrFk`) REFERENCES `cmr` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `ticket_customer_id` FOREIGN KEY (`clientFk`) REFERENCES `client` (`id`) ON UPDATE CASCADE,
CONSTRAINT `ticket_fk_editor` FOREIGN KEY (`editorFk`) REFERENCES `account`.`user` (`id`),
CONSTRAINT `ticket_ibfk_1` FOREIGN KEY (`warehouseFk`) REFERENCES `warehouse` (`id`) ON UPDATE CASCADE,
@@ -38852,7 +38972,7 @@ CREATE TABLE `ticketCollection` (
`itemCount` int(11) DEFAULT NULL COMMENT 'número de productos distintos en el pedido',
`liters` int(11) DEFAULT NULL COMMENT 'volumen del pedido en litros',
PRIMARY KEY (`id`),
- UNIQUE KEY `ticketCollection_UN` (`ticketFk`,`collectionFk`),
+ UNIQUE KEY `ticketCollection_UN` (`ticketFk`),
KEY `ticketCollection_fk1_idx` (`collectionFk`),
KEY `ticketCollection_fk2_idx` (`ticketFk`),
KEY `ticketCollection_smartTagFk_IDX` (`smartTagFk`) USING BTREE,
@@ -39109,10 +39229,9 @@ DROP TABLE IF EXISTS `ticketLastUpdated`;
/*!50001 DROP VIEW IF EXISTS `ticketLastUpdated`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `ticketLastUpdated` (
- `ticketFk` tinyint NOT NULL,
- `lastUpdated` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `ticketLastUpdated` AS SELECT
+ 1 AS `ticketFk`,
+ 1 AS `lastUpdated` */;
SET character_set_client = @saved_cs_client;
--
@@ -39123,10 +39242,9 @@ DROP TABLE IF EXISTS `ticketLastUpdatedList`;
/*!50001 DROP VIEW IF EXISTS `ticketLastUpdatedList`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `ticketLastUpdatedList` (
- `ticketFk` tinyint NOT NULL,
- `created` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `ticketLastUpdatedList` AS SELECT
+ 1 AS `ticketFk`,
+ 1 AS `created` */;
SET character_set_client = @saved_cs_client;
--
@@ -39165,24 +39283,23 @@ DROP TABLE IF EXISTS `ticketMRW`;
/*!50001 DROP VIEW IF EXISTS `ticketMRW`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `ticketMRW` (
- `id_Agencia` tinyint NOT NULL,
- `empresa_id` tinyint NOT NULL,
- `Consignatario` tinyint NOT NULL,
- `DOMICILIO` tinyint NOT NULL,
- `POBLACION` tinyint NOT NULL,
- `CODPOSTAL` tinyint NOT NULL,
- `telefono` tinyint NOT NULL,
- `movil` tinyint NOT NULL,
- `IF` tinyint NOT NULL,
- `Id_Ticket` tinyint NOT NULL,
- `warehouse_id` tinyint NOT NULL,
- `Id_Consigna` tinyint NOT NULL,
- `CodigoPais` tinyint NOT NULL,
- `Fecha` tinyint NOT NULL,
- `province_id` tinyint NOT NULL,
- `landing` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `ticketMRW` AS SELECT
+ 1 AS `id_Agencia`,
+ 1 AS `empresa_id`,
+ 1 AS `Consignatario`,
+ 1 AS `DOMICILIO`,
+ 1 AS `POBLACION`,
+ 1 AS `CODPOSTAL`,
+ 1 AS `telefono`,
+ 1 AS `movil`,
+ 1 AS `IF`,
+ 1 AS `Id_Ticket`,
+ 1 AS `warehouse_id`,
+ 1 AS `Id_Consigna`,
+ 1 AS `CodigoPais`,
+ 1 AS `Fecha`,
+ 1 AS `province_id`,
+ 1 AS `landing` */;
SET character_set_client = @saved_cs_client;
--
@@ -39193,14 +39310,13 @@ DROP TABLE IF EXISTS `ticketNotInvoiced`;
/*!50001 DROP VIEW IF EXISTS `ticketNotInvoiced`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `ticketNotInvoiced` (
- `companyFk` tinyint NOT NULL,
- `companyCode` tinyint NOT NULL,
- `clientFk` tinyint NOT NULL,
- `clientName` tinyint NOT NULL,
- `shipped` tinyint NOT NULL,
- `value` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `ticketNotInvoiced` AS SELECT
+ 1 AS `companyFk`,
+ 1 AS `companyCode`,
+ 1 AS `clientFk`,
+ 1 AS `clientName`,
+ 1 AS `shipped`,
+ 1 AS `value` */;
SET character_set_client = @saved_cs_client;
--
@@ -39430,18 +39546,17 @@ DROP TABLE IF EXISTS `ticketPackingList`;
/*!50001 DROP VIEW IF EXISTS `ticketPackingList`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `ticketPackingList` (
- `nickname` tinyint NOT NULL,
- `ticketFk` tinyint NOT NULL,
- `agencyMode` tinyint NOT NULL,
- `flag` tinyint NOT NULL,
- `province` tinyint NOT NULL,
- `itemFk` tinyint NOT NULL,
- `concept` tinyint NOT NULL,
- `quantity` tinyint NOT NULL,
- `litros` tinyint NOT NULL,
- `observaciones` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `ticketPackingList` AS SELECT
+ 1 AS `nickname`,
+ 1 AS `ticketFk`,
+ 1 AS `agencyMode`,
+ 1 AS `flag`,
+ 1 AS `province`,
+ 1 AS `itemFk`,
+ 1 AS `concept`,
+ 1 AS `quantity`,
+ 1 AS `litros`,
+ 1 AS `observaciones` */;
SET character_set_client = @saved_cs_client;
--
@@ -39496,17 +39611,16 @@ DROP TABLE IF EXISTS `ticketPreviousPreparingList`;
/*!50001 DROP VIEW IF EXISTS `ticketPreviousPreparingList`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `ticketPreviousPreparingList` (
- `ticketFk` tinyint NOT NULL,
- `code` tinyint NOT NULL,
- `saleLines` tinyint NOT NULL,
- `alreadyMadeSaleLines` tinyint NOT NULL,
- `madeRate` tinyint NOT NULL,
- `created` tinyint NOT NULL,
- `parking` tinyint NOT NULL,
- `sectorFk` tinyint NOT NULL,
- `alertCode` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `ticketPreviousPreparingList` AS SELECT
+ 1 AS `ticketFk`,
+ 1 AS `code`,
+ 1 AS `saleLines`,
+ 1 AS `alreadyMadeSaleLines`,
+ 1 AS `madeRate`,
+ 1 AS `created`,
+ 1 AS `parking`,
+ 1 AS `sectorFk`,
+ 1 AS `alertCode` */;
SET character_set_client = @saved_cs_client;
--
@@ -39931,20 +40045,19 @@ DROP TABLE IF EXISTS `ticketState`;
/*!50001 DROP VIEW IF EXISTS `ticketState`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `ticketState` (
- `updated` tinyint NOT NULL,
- `stateFk` tinyint NOT NULL,
- `workerFk` tinyint NOT NULL,
- `ticketFk` tinyint NOT NULL,
- `state` tinyint NOT NULL,
- `productionOrder` tinyint NOT NULL,
- `alertLevel` tinyint NOT NULL,
- `code` tinyint NOT NULL,
- `ticket` tinyint NOT NULL,
- `worker` tinyint NOT NULL,
- `isPreviousPreparable` tinyint NOT NULL,
- `isPicked` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `ticketState` AS SELECT
+ 1 AS `updated`,
+ 1 AS `stateFk`,
+ 1 AS `workerFk`,
+ 1 AS `ticketFk`,
+ 1 AS `state`,
+ 1 AS `productionOrder`,
+ 1 AS `alertLevel`,
+ 1 AS `code`,
+ 1 AS `ticket`,
+ 1 AS `worker`,
+ 1 AS `isPreviousPreparable`,
+ 1 AS `isPicked` */;
SET character_set_client = @saved_cs_client;
--
@@ -39955,16 +40068,15 @@ DROP TABLE IF EXISTS `ticketStateToday`;
/*!50001 DROP VIEW IF EXISTS `ticketStateToday`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `ticketStateToday` (
- `ticket` tinyint NOT NULL,
- `state` tinyint NOT NULL,
- `productionOrder` tinyint NOT NULL,
- `alertLevel` tinyint NOT NULL,
- `worker` tinyint NOT NULL,
- `code` tinyint NOT NULL,
- `updated` tinyint NOT NULL,
- `isPicked` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `ticketStateToday` AS SELECT
+ 1 AS `ticket`,
+ 1 AS `state`,
+ 1 AS `productionOrder`,
+ 1 AS `alertLevel`,
+ 1 AS `worker`,
+ 1 AS `code`,
+ 1 AS `updated`,
+ 1 AS `isPicked` */;
SET character_set_client = @saved_cs_client;
--
@@ -40342,9 +40454,9 @@ DELIMITER ;;
BEFORE INSERT ON `till`
FOR EACH ROW
BEGIN
- IF IFNULL(NEW.concept,"") = "" THEN
- CALL util.throw ('Error. El concepto esta vacío');
- END IF;
+ IF NEW.concept IS NULL OR NEW.concept REGEXP '^[[:space:]]*$' THEN
+ SET NEW.concept = 'SIN DETALLE';
+ END IF;
END */;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
@@ -40552,23 +40664,22 @@ DROP TABLE IF EXISTS `tr2`;
/*!50001 DROP VIEW IF EXISTS `tr2`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `tr2` (
- `id` tinyint NOT NULL,
- `shipped` tinyint NOT NULL,
- `shipmentHour` tinyint NOT NULL,
- `landed` tinyint NOT NULL,
- `landingHour` tinyint NOT NULL,
- `warehouseInFk` tinyint NOT NULL,
- `warehouseOutFk` tinyint NOT NULL,
- `agencyFk` tinyint NOT NULL,
- `ref` tinyint NOT NULL,
- `isDelivered` tinyint NOT NULL,
- `isReceived` tinyint NOT NULL,
- `m3` tinyint NOT NULL,
- `kg` tinyint NOT NULL,
- `cargoSupplierFk` tinyint NOT NULL,
- `totalEntries` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `tr2` AS SELECT
+ 1 AS `id`,
+ 1 AS `shipped`,
+ 1 AS `shipmentHour`,
+ 1 AS `landed`,
+ 1 AS `landingHour`,
+ 1 AS `warehouseInFk`,
+ 1 AS `warehouseOutFk`,
+ 1 AS `agencyFk`,
+ 1 AS `ref`,
+ 1 AS `isDelivered`,
+ 1 AS `isReceived`,
+ 1 AS `m3`,
+ 1 AS `kg`,
+ 1 AS `cargoSupplierFk`,
+ 1 AS `totalEntries` */;
SET character_set_client = @saved_cs_client;
--
@@ -40579,15 +40690,14 @@ DROP TABLE IF EXISTS `traceabilityBuy`;
/*!50001 DROP VIEW IF EXISTS `traceabilityBuy`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `traceabilityBuy` (
- `buyFk` tinyint NOT NULL,
- `quantity` tinyint NOT NULL,
- `landed` tinyint NOT NULL,
- `warehouseName` tinyint NOT NULL,
- `entryFk` tinyint NOT NULL,
- `supplierName` tinyint NOT NULL,
- `itemFk` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `traceabilityBuy` AS SELECT
+ 1 AS `buyFk`,
+ 1 AS `quantity`,
+ 1 AS `landed`,
+ 1 AS `warehouseName`,
+ 1 AS `entryFk`,
+ 1 AS `supplierName`,
+ 1 AS `itemFk` */;
SET character_set_client = @saved_cs_client;
--
@@ -40598,14 +40708,13 @@ DROP TABLE IF EXISTS `traceabilitySale`;
/*!50001 DROP VIEW IF EXISTS `traceabilitySale`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `traceabilitySale` (
- `ticketFk` tinyint NOT NULL,
- `buyFk` tinyint NOT NULL,
- `shipped` tinyint NOT NULL,
- `nickname` tinyint NOT NULL,
- `quantity` tinyint NOT NULL,
- `worker` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `traceabilitySale` AS SELECT
+ 1 AS `ticketFk`,
+ 1 AS `buyFk`,
+ 1 AS `shipped`,
+ 1 AS `nickname`,
+ 1 AS `quantity`,
+ 1 AS `worker` */;
SET character_set_client = @saved_cs_client;
--
@@ -40881,6 +40990,31 @@ CREATE TABLE `travelClonedWeekly` (
) ENGINE=InnoDBDEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
+--
+-- Table structure for table `travelConfig`
+--
+
+DROP TABLE IF EXISTS `travelConfig`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `travelConfig` (
+ `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
+ `warehouseInFk` smallint(6) unsigned NOT NULL DEFAULT 8 COMMENT 'Warehouse de origen',
+ `warehouseOutFk` smallint(6) unsigned NOT NULL DEFAULT 60 COMMENT 'Warehouse destino',
+ `agencyFk` int(11) NOT NULL DEFAULT 1378 COMMENT 'Agencia por defecto',
+ `companyFk` int(10) unsigned NOT NULL DEFAULT 442 COMMENT 'Compañía por defecto',
+ PRIMARY KEY (`id`),
+ KEY `travelConfig_FK` (`warehouseInFk`),
+ KEY `travelConfig_FK_1` (`warehouseOutFk`),
+ KEY `travelConfig_FK_2` (`agencyFk`),
+ KEY `travelConfig_FK_3` (`companyFk`),
+ CONSTRAINT `travelConfig_FK` FOREIGN KEY (`warehouseInFk`) REFERENCES `warehouse` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
+ CONSTRAINT `travelConfig_FK_1` FOREIGN KEY (`warehouseOutFk`) REFERENCES `warehouse` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
+ CONSTRAINT `travelConfig_FK_2` FOREIGN KEY (`agencyFk`) REFERENCES `agencyMode` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
+ CONSTRAINT `travelConfig_FK_3` FOREIGN KEY (`companyFk`) REFERENCES `company` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
--
-- Table structure for table `travelLog`
--
@@ -41158,6 +41292,7 @@ CREATE TABLE `vehicle` (
`countryCodeFk` varchar(2) DEFAULT 'ES',
`leasing` varchar(50) DEFAULT NULL COMMENT 'Id de arrendamiento',
PRIMARY KEY (`id`),
+ UNIQUE KEY `vehicle_UN` (`numberPlate`),
KEY `empresa_id` (`companyFk`),
KEY `provinceFk_idx` (`warehouseFk`),
KEY `vehicle_deliveryPointFk_idx` (`deliveryPointFk`),
@@ -41336,6 +41471,25 @@ CREATE TABLE `vehicleState` (
) ENGINE=InnoDBDEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
+--
+-- Table structure for table `viaexpressConfig`
+--
+
+DROP TABLE IF EXISTS `viaexpressConfig`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `viaexpressConfig` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `url` varchar(100) NOT NULL,
+ `client` varchar(100) NOT NULL,
+ `user` varchar(100) NOT NULL,
+ `password` varchar(100) NOT NULL,
+ `defaultWeight` decimal(10,2) NOT NULL,
+ `deliveryType` varchar(5) NOT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDBDEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
--
-- Table structure for table `volumeConfig`
--
@@ -41556,7 +41710,7 @@ DELIMITER ;;
AFTER UPDATE ON `warehouse`
FOR EACH ROW
BEGIN
- IF NEW.isFeedStock IS TRUE and OLD.isFeedStock IS FALSE then
+ IF NEW.isFeedStock IS TRUE AND OLD.isFeedStock IS FALSE THEN
INSERT IGNORE INTO warehouseAlias(`name`) VALUES(NEW.`name`);
INSERT IGNORE INTO warehouseJoined(warehouseFk, warehouseAliasFk)
VALUES(NEW.id,LAST_INSERT_ID());
@@ -41643,9 +41797,9 @@ CREATE TABLE `worker` (
`seniority` date DEFAULT NULL,
`isTodayRelative` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'Para el F11. Calcula los problemas de visiblidad en funcion del dia actual',
`isF11Allowed` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'Usuario autorizado para abrir el F11',
- `sectorFk` int(11) DEFAULT NULL COMMENT 'Sector que tiene asociado el trabajador.',
+ `sectorFk__` int(11) DEFAULT NULL COMMENT '@deprecated 2023-06-26',
`maritalStatus` enum('S','M') NOT NULL,
- `labelerFk` tinyint(3) unsigned DEFAULT NULL,
+ `labelerFk__` tinyint(3) unsigned DEFAULT NULL COMMENT '@deprecated 2023-06-26',
`originCountryFk` mediumint(8) unsigned DEFAULT NULL COMMENT 'País de origen',
`educationLevelFk` smallint(6) DEFAULT NULL,
`SSN` varchar(15) DEFAULT NULL,
@@ -41666,11 +41820,11 @@ CREATE TABLE `worker` (
UNIQUE KEY `locker` (`locker`),
KEY `sub` (`sub`),
KEY `boss_idx` (`bossFk`),
- KEY `worker_FK` (`labelerFk`),
+ KEY `worker_FK` (`labelerFk__`),
KEY `worker_FK_2` (`educationLevelFk`),
KEY `worker_FK_1` (`originCountryFk`),
KEY `worker_fk_editor` (`editorFk`),
- CONSTRAINT `worker_FK` FOREIGN KEY (`labelerFk`) REFERENCES `printer` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
+ CONSTRAINT `worker_FK` FOREIGN KEY (`labelerFk__`) REFERENCES `printer` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `worker_FK_1` FOREIGN KEY (`originCountryFk`) REFERENCES `country` (`id`) ON UPDATE CASCADE,
CONSTRAINT `worker_FK_2` FOREIGN KEY (`educationLevelFk`) REFERENCES `educationLevel` (`id`) ON UPDATE CASCADE,
CONSTRAINT `worker_businessFk` FOREIGN KEY (`businessFk`) REFERENCES `business` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
@@ -41692,7 +41846,6 @@ DELIMITER ;;
FOR EACH ROW
BEGIN
SET NEW.editorFk = account.myUser_getId();
- CALL vn.printer_checkSector(NEW.labelerFk, NEW.sectorFk);
END */;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
@@ -41713,18 +41866,6 @@ DELIMITER ;;
FOR EACH ROW
BEGIN
SET NEW.editorFk = account.myUser_getId();
-
- IF NOT (NEW.labelerFk <=> OLD.labelerFk AND NEW.sectorFk <=> OLD.sectorFk) THEN
- CALL vn.printer_checkSector(NEW.labelerFk, NEW.sectorFk);
-
- INSERT IGNORE INTO vn.operator (workerFk)
- VALUES (NEW.id);
-
- UPDATE operator
- SET labelerFk = NEW.labelerFk,
- sectorFk = NEW.sectorFk
- WHERE workerFk = NEW.id;
- END IF;
END */;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
@@ -41791,6 +41932,24 @@ CREATE TABLE `workerBosses` (
) ENGINE=InnoDBDEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
+--
+-- Table structure for table `workerBusinessAgreement`
+--
+
+DROP TABLE IF EXISTS `workerBusinessAgreement`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `workerBusinessAgreement` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `name` varchar(50) DEFAULT NULL,
+ `monthHolidays` double DEFAULT NULL,
+ `yearHours` int(11) DEFAULT NULL,
+ `started` date DEFAULT NULL,
+ `ended` date DEFAULT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDBDEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
--
-- Temporary table structure for view `workerBusinessDated`
--
@@ -41799,11 +41958,10 @@ DROP TABLE IF EXISTS `workerBusinessDated`;
/*!50001 DROP VIEW IF EXISTS `workerBusinessDated`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `workerBusinessDated` (
- `dated` tinyint NOT NULL,
- `businessFk` tinyint NOT NULL,
- `workerFk` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `workerBusinessDated` AS SELECT
+ 1 AS `dated`,
+ 1 AS `businessFk`,
+ 1 AS `workerFk` */;
SET character_set_client = @saved_cs_client;
--
@@ -41872,10 +42030,9 @@ DROP TABLE IF EXISTS `workerDepartment`;
/*!50001 DROP VIEW IF EXISTS `workerDepartment`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `workerDepartment` (
- `workerFk` tinyint NOT NULL,
- `departmentFk` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `workerDepartment` AS SELECT
+ 1 AS `workerFk`,
+ 1 AS `departmentFk` */;
SET character_set_client = @saved_cs_client;
--
@@ -41927,8 +42084,8 @@ CREATE TABLE `workerDocument` (
KEY `workerDocument_ibfk_1` (`worker`),
KEY `workerDocument_ibfk_2` (`document`),
KEY `workerDocument_fk_editor` (`editorFk`),
+ CONSTRAINT `workerDocument_FK` FOREIGN KEY (`worker`) REFERENCES `worker` (`id`) ON UPDATE CASCADE,
CONSTRAINT `workerDocument_fk_editor` FOREIGN KEY (`editorFk`) REFERENCES `account`.`user` (`id`),
- CONSTRAINT `workerDocument_ibfk_1` FOREIGN KEY (`worker`) REFERENCES `worker` (`userFk`) ON UPDATE CASCADE,
CONSTRAINT `workerDocument_ibfk_2` FOREIGN KEY (`document`) REFERENCES `dms` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDBDEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
@@ -42185,15 +42342,14 @@ DROP TABLE IF EXISTS `workerLabour`;
/*!50001 DROP VIEW IF EXISTS `workerLabour`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `workerLabour` (
- `businessFk` tinyint NOT NULL,
- `workerFk` tinyint NOT NULL,
- `workCenterFk` tinyint NOT NULL,
- `started` tinyint NOT NULL,
- `ended` tinyint NOT NULL,
- `departmentFk` tinyint NOT NULL,
- `payedHolidays` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `workerLabour` AS SELECT
+ 1 AS `businessFk`,
+ 1 AS `workerFk`,
+ 1 AS `workCenterFk`,
+ 1 AS `started`,
+ 1 AS `ended`,
+ 1 AS `departmentFk`,
+ 1 AS `payedHolidays` */;
SET character_set_client = @saved_cs_client;
--
@@ -42265,10 +42421,9 @@ DROP TABLE IF EXISTS `workerMedia`;
/*!50001 DROP VIEW IF EXISTS `workerMedia`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `workerMedia` (
- `workerFk` tinyint NOT NULL,
- `mediaValue` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `workerMedia` AS SELECT
+ 1 AS `workerFk`,
+ 1 AS `mediaValue` */;
SET character_set_client = @saved_cs_client;
--
@@ -42382,15 +42537,14 @@ DROP TABLE IF EXISTS `workerSpeedExpedition`;
/*!50001 DROP VIEW IF EXISTS `workerSpeedExpedition`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `workerSpeedExpedition` (
- `ticketFk` tinyint NOT NULL,
- `litros` tinyint NOT NULL,
- `literLastHour` tinyint NOT NULL,
- `litersByMinute` tinyint NOT NULL,
- `workerCode` tinyint NOT NULL,
- `cajas` tinyint NOT NULL,
- `warehouseFk` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `workerSpeedExpedition` AS SELECT
+ 1 AS `ticketFk`,
+ 1 AS `litros`,
+ 1 AS `literLastHour`,
+ 1 AS `litersByMinute`,
+ 1 AS `workerCode`,
+ 1 AS `cajas`,
+ 1 AS `warehouseFk` */;
SET character_set_client = @saved_cs_client;
--
@@ -42401,17 +42555,16 @@ DROP TABLE IF EXISTS `workerSpeedSaleTracking`;
/*!50001 DROP VIEW IF EXISTS `workerSpeedSaleTracking`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `workerSpeedSaleTracking` (
- `warehouseFk` tinyint NOT NULL,
- `state` tinyint NOT NULL,
- `workerCode` tinyint NOT NULL,
- `sumaLitros` tinyint NOT NULL,
- `started` tinyint NOT NULL,
- `finished` tinyint NOT NULL,
- `sumaLitrosLastHour` tinyint NOT NULL,
- `litersByMinute` tinyint NOT NULL,
- `departmentName` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `workerSpeedSaleTracking` AS SELECT
+ 1 AS `warehouseFk`,
+ 1 AS `state`,
+ 1 AS `workerCode`,
+ 1 AS `sumaLitros`,
+ 1 AS `started`,
+ 1 AS `finished`,
+ 1 AS `sumaLitrosLastHour`,
+ 1 AS `litersByMinute`,
+ 1 AS `departmentName` */;
SET character_set_client = @saved_cs_client;
--
@@ -42440,10 +42593,9 @@ DROP TABLE IF EXISTS `workerTeamCollegues`;
/*!50001 DROP VIEW IF EXISTS `workerTeamCollegues`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `workerTeamCollegues` (
- `workerFk` tinyint NOT NULL,
- `collegueFk` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `workerTeamCollegues` AS SELECT
+ 1 AS `workerFk`,
+ 1 AS `collegueFk` */;
SET character_set_client = @saved_cs_client;
--
@@ -42632,15 +42784,14 @@ DROP TABLE IF EXISTS `workerTimeControlUserInfo`;
/*!50001 DROP VIEW IF EXISTS `workerTimeControlUserInfo`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `workerTimeControlUserInfo` (
- `userFk` tinyint NOT NULL,
- `name` tinyint NOT NULL,
- `surname` tinyint NOT NULL,
- `user` tinyint NOT NULL,
- `password` tinyint NOT NULL,
- `departmentFk` tinyint NOT NULL,
- `dni` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `workerTimeControlUserInfo` AS SELECT
+ 1 AS `userFk`,
+ 1 AS `name`,
+ 1 AS `surname`,
+ 1 AS `user`,
+ 1 AS `password`,
+ 1 AS `departmentFk`,
+ 1 AS `dni` */;
SET character_set_client = @saved_cs_client;
--
@@ -42651,14 +42802,13 @@ DROP TABLE IF EXISTS `workerTimeJourneyNG`;
/*!50001 DROP VIEW IF EXISTS `workerTimeJourneyNG`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `workerTimeJourneyNG` (
- `userFk` tinyint NOT NULL,
- `dated` tinyint NOT NULL,
- `Journey` tinyint NOT NULL,
- `dayName` tinyint NOT NULL,
- `name` tinyint NOT NULL,
- `firstname` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `workerTimeJourneyNG` AS SELECT
+ 1 AS `userFk`,
+ 1 AS `dated`,
+ 1 AS `Journey`,
+ 1 AS `dayName`,
+ 1 AS `name`,
+ 1 AS `firstname` */;
SET character_set_client = @saved_cs_client;
--
@@ -42669,12 +42819,11 @@ DROP TABLE IF EXISTS `workerWithoutTractor`;
/*!50001 DROP VIEW IF EXISTS `workerWithoutTractor`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `workerWithoutTractor` (
- `workerFk` tinyint NOT NULL,
- `Trabajador` tinyint NOT NULL,
- `Colecciones` tinyint NOT NULL,
- `created` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `workerWithoutTractor` AS SELECT
+ 1 AS `workerFk`,
+ 1 AS `Trabajador`,
+ 1 AS `Colecciones`,
+ 1 AS `created` */;
SET character_set_client = @saved_cs_client;
--
@@ -42882,16 +43031,15 @@ 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 TABLE `zoneEstimatedDelivery` (
- `zoneFk` tinyint NOT NULL,
- `hourTheoretical` tinyint NOT NULL,
- `totalVolume` tinyint NOT NULL,
- `remainingVolume` tinyint NOT NULL,
- `speed` tinyint NOT NULL,
- `hourEffective` tinyint NOT NULL,
- `minutesLess` tinyint NOT NULL,
- `etc` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!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;
--
@@ -43420,7 +43568,57 @@ DELIMITER ;
-- Dumping events for database 'vn'
--
/*!50106 SET @save_time_zone= @@TIME_ZONE */ ;
-/*!50106 DROP EVENT IF EXISTS `collection_make` */;
+/*!50106 DROP EVENT IF EXISTS `clientsDisable` */;
+DELIMITER ;;
+/*!50003 SET @saved_cs_client = @@character_set_client */ ;;
+/*!50003 SET @saved_cs_results = @@character_set_results */ ;;
+/*!50003 SET @saved_col_connection = @@collation_connection */ ;;
+/*!50003 SET character_set_client = utf8mb3 */ ;;
+/*!50003 SET character_set_results = utf8mb3 */ ;;
+/*!50003 SET collation_connection = utf8mb3_general_ci */ ;;
+/*!50003 SET @saved_sql_mode = @@sql_mode */ ;;
+/*!50003 SET sql_mode = '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 `clientsDisable` ON SCHEDULE EVERY 1 MONTH STARTS '2023-06-01 00:00:00' ON COMPLETION PRESERVE DISABLE ON SLAVE DO BEGIN
+ UPDATE account.user u
+ JOIN client c ON c.id = u.id
+ JOIN clientType ct ON ct.id = c.typeFk
+ SET u.active = FALSE
+ WHERE ct.code = 'normal'
+ AND u.id NOT IN (
+ SELECT DISTINCT c.id
+ FROM client c
+ LEFT JOIN ticket t ON t.clientFk = c.id
+ WHERE c.salesPersonFk IS NOT NULL
+ OR t.created > util.VN_CURDATE() - INTERVAL 2 MONTH
+ OR shipped > util.VN_CURDATE() - INTERVAL 2 MONTH
+ );
+END */ ;;
+/*!50003 SET time_zone = @saved_time_zone */ ;;
+/*!50003 SET sql_mode = @saved_sql_mode */ ;;
+/*!50003 SET character_set_client = @saved_cs_client */ ;;
+/*!50003 SET character_set_results = @saved_cs_results */ ;;
+/*!50003 SET collation_connection = @saved_col_connection */ ;;
+/*!50106 DROP EVENT IF EXISTS `client_unassignSalesPerson` */;;
+DELIMITER ;;
+/*!50003 SET @saved_cs_client = @@character_set_client */ ;;
+/*!50003 SET @saved_cs_results = @@character_set_results */ ;;
+/*!50003 SET @saved_col_connection = @@collation_connection */ ;;
+/*!50003 SET character_set_client = utf8mb3 */ ;;
+/*!50003 SET character_set_results = utf8mb3 */ ;;
+/*!50003 SET collation_connection = utf8mb3_general_ci */ ;;
+/*!50003 SET @saved_sql_mode = @@sql_mode */ ;;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;;
+/*!50003 SET @saved_time_zone = @@time_zone */ ;;
+/*!50003 SET time_zone = 'SYSTEM' */ ;;
+/*!50106 CREATE*/ /*!50117 DEFINER=`jgallego`@`%`*/ /*!50106 EVENT `client_unassignSalesPerson` ON SCHEDULE EVERY 1 DAY STARTS '2023-06-01 03:30:00' ON COMPLETION PRESERVE DISABLE ON SLAVE DO CALL client_unassignSalesPerson */ ;;
+/*!50003 SET time_zone = @saved_time_zone */ ;;
+/*!50003 SET sql_mode = @saved_sql_mode */ ;;
+/*!50003 SET character_set_client = @saved_cs_client */ ;;
+/*!50003 SET character_set_results = @saved_cs_results */ ;;
+/*!50003 SET collation_connection = @saved_col_connection */ ;;
+/*!50106 DROP EVENT IF EXISTS `collection_make` */;;
DELIMITER ;;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;;
@@ -43507,9 +43705,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_unicode_ci */ ;;
+/*!50003 SET character_set_client = utf8mb3 */ ;;
+/*!50003 SET character_set_results = utf8mb3 */ ;;
+/*!50003 SET collation_connection = utf8mb3_general_ci */ ;;
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;;
/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;;
/*!50003 SET @saved_time_zone = @@time_zone */ ;;
@@ -43677,25 +43875,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 `sale_checkWithoutComponents` ON SCHEDULE EVERY 10 MINUTE STARTS '2020-05-04 11:56:23' ON COMPLETION PRESERVE DISABLE DO call sale_checkNoComponents(DATE_ADD(util.VN_NOW(), INTERVAL -10 MINUTE),DATE_ADD(util.VN_NOW(), INTERVAL -1 MINUTE)) */ ;;
-/*!50003 SET time_zone = @saved_time_zone */ ;;
-/*!50003 SET sql_mode = @saved_sql_mode */ ;;
-/*!50003 SET character_set_client = @saved_cs_client */ ;;
-/*!50003 SET character_set_results = @saved_cs_results */ ;;
-/*!50003 SET collation_connection = @saved_col_connection */ ;;
-/*!50106 DROP EVENT IF EXISTS `ticketClosure` */;;
-DELIMITER ;;
-/*!50003 SET @saved_cs_client = @@character_set_client */ ;;
-/*!50003 SET @saved_cs_results = @@character_set_results */ ;;
-/*!50003 SET @saved_col_connection = @@collation_connection */ ;;
-/*!50003 SET character_set_client = utf8mb4 */ ;;
-/*!50003 SET character_set_results = utf8mb4 */ ;;
-/*!50003 SET collation_connection = utf8mb4_unicode_ci */ ;;
-/*!50003 SET @saved_sql_mode = @@sql_mode */ ;;
-/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;;
-/*!50003 SET @saved_time_zone = @@time_zone */ ;;
-/*!50003 SET time_zone = 'SYSTEM' */ ;;
-/*!50106 CREATE*/ /*!50117 DEFINER=`root`@`localhost`*/ /*!50106 EVENT `ticketClosure` ON SCHEDULE EVERY 1 DAY STARTS '2017-09-18 00:30:00' ON COMPLETION NOT PRESERVE DISABLE COMMENT 'Realiza el cierre de todos los almacenes del dia actual' DO CALL ticketClosureMultiWarehouse(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 DAY)) */ ;;
+/*!50106 CREATE*/ /*!50117 DEFINER=`root`@`localhost`*/ /*!50106 EVENT `sale_checkWithoutComponents` ON SCHEDULE EVERY 10 MINUTE STARTS '2020-05-04 11:56:23' ON COMPLETION PRESERVE DISABLE ON SLAVE DO call sale_checkNoComponents(DATE_ADD(util.VN_NOW(), INTERVAL -10 MINUTE),DATE_ADD(util.VN_NOW(), INTERVAL -1 MINUTE)) */ ;;
/*!50003 SET time_zone = @saved_time_zone */ ;;
/*!50003 SET sql_mode = @saved_sql_mode */ ;;
/*!50003 SET character_set_client = @saved_cs_client */ ;;
@@ -43755,6 +43935,24 @@ DELIMITER ;;
/*!50003 SET character_set_client = @saved_cs_client */ ;;
/*!50003 SET character_set_results = @saved_cs_results */ ;;
/*!50003 SET collation_connection = @saved_col_connection */ ;;
+/*!50106 DROP EVENT IF EXISTS `workerJourney_doRecalc` */;;
+DELIMITER ;;
+/*!50003 SET @saved_cs_client = @@character_set_client */ ;;
+/*!50003 SET @saved_cs_results = @@character_set_results */ ;;
+/*!50003 SET @saved_col_connection = @@collation_connection */ ;;
+/*!50003 SET character_set_client = utf8mb3 */ ;;
+/*!50003 SET character_set_results = utf8mb3 */ ;;
+/*!50003 SET collation_connection = utf8mb3_general_ci */ ;;
+/*!50003 SET @saved_sql_mode = @@sql_mode */ ;;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;;
+/*!50003 SET @saved_time_zone = @@time_zone */ ;;
+/*!50003 SET time_zone = 'SYSTEM' */ ;;
+/*!50106 CREATE*/ /*!50117 DEFINER=`root`@`localhost`*/ /*!50106 EVENT `workerJourney_doRecalc` ON SCHEDULE EVERY 1 DAY STARTS '2023-07-22 04:00:00' ON COMPLETION PRESERVE DISABLE ON SLAVE DO CALL workerJourney_replace(util.VN_CURDATE() - INTERVAL 1 WEEK, util.VN_CURDATE(), NULL) */ ;;
+/*!50003 SET time_zone = @saved_time_zone */ ;;
+/*!50003 SET sql_mode = @saved_sql_mode */ ;;
+/*!50003 SET character_set_client = @saved_cs_client */ ;;
+/*!50003 SET character_set_results = @saved_cs_results */ ;;
+/*!50003 SET collation_connection = @saved_col_connection */ ;;
/*!50106 DROP EVENT IF EXISTS `worker_updateChangedBusiness` */;;
DELIMITER ;;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;;
@@ -43797,6 +43995,8 @@ DELIMITER ;
--
-- Dumping routines for database 'vn'
--
+/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `addressTaxArea` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -43804,8 +44004,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `addressTaxArea`(vAddresId INT, vCompanyId INT) RETURNS varchar(25) CHARSET utf8mb3 COLLATE utf8mb3_general_ci
DETERMINISTIC
@@ -43838,6 +44036,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `address_getGeo` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -43845,8 +44045,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `address_getGeo`(vSelf INT) RETURNS int(11)
DETERMINISTIC
@@ -43874,6 +44072,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `barcodeToItem` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -43881,8 +44081,6 @@ DELIMITER ;
/*!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`@`localhost` FUNCTION `barcodeToItem`(vBarcode VARCHAR(22)) RETURNS int(11)
DETERMINISTIC
@@ -43937,6 +44135,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `botanicExport_isUpdatable` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -43944,8 +44144,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `botanicExport_isUpdatable`(vEdiGenusFk MEDIUMINT,
vEdiSpecieFk MEDIUMINT,
@@ -43965,6 +44163,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `buy_getUnitVolume` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -43972,8 +44172,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `buy_getUnitVolume`(vSelf INT) RETURNS int(11)
DETERMINISTIC
@@ -44000,6 +44198,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `buy_getVolume` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -44007,8 +44207,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `buy_getVolume`(vSelf INT) RETURNS int(11)
DETERMINISTIC
@@ -44033,6 +44231,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `catalog_componentReverse` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -44040,8 +44240,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `catalog_componentReverse`(vWarehouse INT,
vCost DECIMAL(10,3),
@@ -44140,6 +44338,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `clientGetMana` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -44147,8 +44347,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `clientGetMana`(vClient INT) RETURNS decimal(10,2)
DETERMINISTIC
@@ -44224,6 +44422,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `clientGetSalesPerson` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -44231,8 +44431,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `clientGetSalesPerson`(vClientFk INT, vDated DATE) RETURNS int(11)
DETERMINISTIC
@@ -44247,6 +44445,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `clientTaxArea` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -44254,8 +44454,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `clientTaxArea`(vClientId INT, vCompanyId INT) RETURNS varchar(25) CHARSET utf8mb3 COLLATE utf8mb3_general_ci
READS SQL DATA
@@ -44282,6 +44480,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `client_getDebt` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -44289,8 +44489,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `client_getDebt`(`vClient` INT, `vDate` DATE) RETURNS decimal(10,2)
READS SQL DATA
@@ -44327,6 +44525,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `client_getFromPhone` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -44334,8 +44534,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `client_getFromPhone`(vPhone VARCHAR(255)) RETURNS int(11)
DETERMINISTIC
@@ -44382,6 +44580,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `client_getSalesPerson` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -44389,8 +44589,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `client_getSalesPerson`(vClientFk INT, vDated DATE) RETURNS int(11)
DETERMINISTIC
@@ -44468,6 +44666,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `client_getSalesPersonByTicket` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -44475,8 +44675,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `client_getSalesPersonByTicket`(vTicketFk INT) RETURNS int(11)
DETERMINISTIC
@@ -44503,6 +44701,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `client_getSalesPersonCode` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -44510,8 +44710,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `client_getSalesPersonCode`(vClientFk INT, vDated DATE) RETURNS varchar(3) CHARSET utf8mb3 COLLATE utf8mb3_general_ci
DETERMINISTIC
@@ -44541,6 +44739,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `client_getSalesPersonCodeByTicket` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -44548,8 +44748,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `client_getSalesPersonCodeByTicket`(vTicketFk INT) RETURNS varchar(3) CHARSET utf8mb3 COLLATE utf8mb3_general_ci
DETERMINISTIC
@@ -44576,6 +44774,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `collection_isPacked` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -44583,8 +44783,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `collection_isPacked`(vSelf INT) RETURNS tinyint(1)
DETERMINISTIC
@@ -44610,6 +44808,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `currency_getCommission` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -44617,8 +44817,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `currency_getCommission`(vSelf INT) RETURNS int(11)
DETERMINISTIC
@@ -44645,6 +44843,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `currentRate` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -44652,8 +44852,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `currentRate`(vCurrencyFk INT, vDated DATE) RETURNS decimal(10,4)
READS SQL DATA
@@ -44676,6 +44874,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `deviceProductionUser_accessGranted` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -44683,8 +44883,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `deviceProductionUser_accessGranted`(vUserFK INT(10) , android_id VARCHAR(50)) RETURNS tinyint(1)
DETERMINISTIC
@@ -44717,6 +44915,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `duaTax_getRate` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -44724,8 +44924,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `duaTax_getRate`(vDua INT, vTaxClass INT) RETURNS decimal(5,2)
DETERMINISTIC
@@ -44754,6 +44952,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `ekt_getEntry` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -44761,8 +44961,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `ekt_getEntry`(vEktFk INT) RETURNS int(11)
READS SQL DATA
@@ -44836,6 +45034,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `ekt_getTravel` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -44843,8 +45043,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `ekt_getTravel`(vEntryAssignFk INT, vEktFk INT) RETURNS int(11)
READS SQL DATA
@@ -44892,6 +45090,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `entry_getCommission` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -44899,8 +45099,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `entry_getCommission`(vTravelFk INT,
vCurrencyFk INT,
@@ -44961,6 +45159,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `entry_getCurrency` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -44968,8 +45168,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `entry_getCurrency`(vCurrency INT,
vSupplierFk INT
@@ -44992,6 +45190,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `entry_getForLogiflora` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -44999,8 +45199,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `entry_getForLogiflora`(vLanded DATE, vWarehouseFk INT) RETURNS int(11)
READS SQL DATA
@@ -45067,6 +45265,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `entry_isIntrastat` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -45074,8 +45274,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `entry_isIntrastat`(vSelf INT) RETURNS int(11)
READS SQL DATA
@@ -45117,6 +45315,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `entry_isInventoryOrPrevious` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -45124,8 +45324,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `entry_isInventoryOrPrevious`(vSelf INT) RETURNS int(11)
DETERMINISTIC
@@ -45147,6 +45345,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `expedition_checkRoute` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -45154,8 +45354,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `expedition_checkRoute`(vPalletFk INT,vExpeditionFk INT) RETURNS tinyint(1)
DETERMINISTIC
@@ -45191,6 +45389,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `firstDayOfWeek` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -45198,8 +45398,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `firstDayOfWeek`(vYear INT, vWeek INT) RETURNS date
DETERMINISTIC
@@ -45227,6 +45425,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `getAlert3State` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -45234,8 +45434,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `getAlert3State`(vTicket INT) RETURNS varchar(45) CHARSET utf8mb3 COLLATE utf8mb3_unicode_ci
READS SQL DATA
@@ -45277,6 +45475,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `getAlert3StateTest` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -45284,8 +45484,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `getAlert3StateTest`(vTicket INT) RETURNS varchar(45) CHARSET latin1 COLLATE latin1_swedish_ci
READS SQL DATA
@@ -45328,6 +45526,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `getDueDate` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -45335,8 +45535,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `getDueDate`(vDated DATE, vDayToPay INT) RETURNS date
NO SQL
@@ -45356,6 +45554,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `getInventoryDate` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -45363,8 +45563,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `getInventoryDate`() RETURNS date
DETERMINISTIC
@@ -45376,6 +45574,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `getNewItemId` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -45383,8 +45583,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `getNewItemId`() RETURNS int(11)
READS SQL DATA
@@ -45405,6 +45603,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `getNextDueDate` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -45412,8 +45612,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `getNextDueDate`(vDated DATE, vGapDays INT, vPayDay INT) RETURNS date
NO SQL
@@ -45447,6 +45645,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `getShipmentHour` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -45454,8 +45654,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `getShipmentHour`(vTicket INT) RETURNS int(11)
READS SQL DATA
@@ -45492,6 +45690,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `getSpecialPrice` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -45499,8 +45699,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `getSpecialPrice`(vItemFk int(11),vClientFk int(11)) RETURNS decimal(10,2)
READS SQL DATA
@@ -45523,6 +45721,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `getTicketTrolleyLabelCount` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -45530,8 +45730,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `getTicketTrolleyLabelCount`(vTicket INT) RETURNS int(11)
READS SQL DATA
@@ -45554,6 +45752,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `getUser` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -45561,8 +45761,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `getUser`() RETURNS int(11)
DETERMINISTIC
@@ -45577,6 +45775,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `getUserId` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -45584,8 +45784,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `getUserId`(userName varchar(30)) RETURNS int(11)
READS SQL DATA
@@ -45604,13 +45802,6 @@ 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 FUNCTION IF EXISTS `getWorkerCode` */;
-/*!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 ;;
@@ -45621,7 +45812,7 @@ BEGIN
SELECT code INTO vUserCode
FROM worker
- WHERE id = account.myUser_getId();
+ WHERE userFk = account.myUser_getId();
RETURN vUserCode;
END ;;
@@ -45637,8 +45828,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `hasAnyNegativeBase`() RETURNS tinyint(1)
DETERMINISTIC
@@ -45679,6 +45868,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `hasItemsInSector` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -45686,8 +45877,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `hasItemsInSector`(vTicketFk INT, vSectorFk INT) RETURNS tinyint(1)
DETERMINISTIC
@@ -45711,6 +45900,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `hasSomeNegativeBase` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -45718,8 +45909,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `hasSomeNegativeBase`(vTicket INT) RETURNS tinyint(1)
READS SQL DATA
@@ -45752,6 +45941,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `invoiceOutAmount` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -45759,8 +45950,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `invoiceOutAmount`(vInvoiceRef VARCHAR(15)) RETURNS decimal(10,2)
READS SQL DATA
@@ -45787,6 +45976,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `invoiceOut_getMaxIssued` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -45794,8 +45985,6 @@ DELIMITER ;
/*!50003 SET character_set_client = utf8mb3 */ ;
/*!50003 SET character_set_results = utf8mb3 */ ;
/*!50003 SET collation_connection = utf8mb3_general_ci */ ;
-/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
-/*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `invoiceOut_getMaxIssued`(vSerial VARCHAR(2),
vCompanyFk INT,
@@ -45830,6 +46019,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `invoiceOut_getPath` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -45837,8 +46028,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `invoiceOut_getPath`(vSelf INT) RETURNS varchar(255) CHARSET utf8mb3 COLLATE utf8mb3_general_ci
DETERMINISTIC
@@ -45863,6 +46052,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `invoiceOut_getWeight` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -45870,8 +46061,6 @@ DELIMITER ;
/*!50003 SET character_set_client = utf8mb3 */ ;
/*!50003 SET character_set_results = utf8mb3 */ ;
/*!50003 SET collation_connection = utf8mb3_general_ci */ ;
-/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
-/*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `invoiceOut_getWeight`(vInvoiceRef VARCHAR(15)
) RETURNS decimal(10,2)
@@ -45904,6 +46093,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `invoiceSerial` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -45911,8 +46102,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `invoiceSerial`(vClientFk INT, vCompanyFk INT, vType CHAR(1)) RETURNS char(1) CHARSET utf8mb3 COLLATE utf8mb3_general_ci
DETERMINISTIC
@@ -45942,6 +46131,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `invoiceSerialArea` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -45949,8 +46140,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `invoiceSerialArea`(vType CHAR(1), vTaxArea VARCHAR(25)) RETURNS char(1) CHARSET utf8mb3 COLLATE utf8mb3_unicode_ci
DETERMINISTIC
@@ -45988,28 +46177,8 @@ 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 FUNCTION IF EXISTS `isIntrastatEntry` */;
-/*!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 ;;
-CREATE DEFINER=`root`@`localhost` FUNCTION `isIntrastatEntry`(vEntryFk INT) RETURNS int(11)
- READS SQL DATA
-BEGIN
- -- para retrocompatibilidad, eliminar en la siguiente version
-
- RETURN (SELECT entry_isIntrastat(vEntryFk));
-END ;;
-DELIMITER ;
-/*!50003 SET sql_mode = @saved_sql_mode */ ;
-/*!50003 SET character_set_client = @saved_cs_client */ ;
-/*!50003 SET character_set_results = @saved_cs_results */ ;
-/*!50003 SET collation_connection = @saved_col_connection */ ;
/*!50003 DROP FUNCTION IF EXISTS `isLogifloraDay` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -46017,8 +46186,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `isLogifloraDay`(vShipped DATE, vWarehouse INT) RETURNS tinyint(1)
DETERMINISTIC
@@ -46041,6 +46208,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `isPalletHomogeneus` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -46048,8 +46217,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `isPalletHomogeneus`(vExpedition INT) RETURNS tinyint(1)
READS SQL DATA
@@ -46079,6 +46246,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `itemPacking` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -46086,8 +46255,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `itemPacking`(vBarcode VARCHAR(22), vWarehouseFk INT) RETURNS int(11)
DETERMINISTIC
@@ -46132,6 +46299,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `itemShelvingPlacementSupply_ClosestGet` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -46139,8 +46308,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `itemShelvingPlacementSupply_ClosestGet`(vParkingFk INT) RETURNS int(11)
READS SQL DATA
@@ -46176,6 +46343,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `itemsInSector_get` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -46183,8 +46352,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `itemsInSector_get`(vTicketFk INT, vSectorFk INT) RETURNS int(11)
READS SQL DATA
@@ -46208,6 +46375,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `itemTag_getIntValue` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -46215,8 +46384,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `itemTag_getIntValue`(vValue VARCHAR(255)) RETURNS int(11)
DETERMINISTIC
@@ -46232,6 +46399,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `item_getFhImage` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -46239,8 +46408,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `item_getFhImage`(itemFk INT) RETURNS varchar(255) CHARSET utf8mb3 COLLATE utf8mb3_unicode_ci
DETERMINISTIC
@@ -46261,6 +46428,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `item_getPackage` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -46268,8 +46437,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `item_getPackage`(vItemFk INT) RETURNS varchar(50) CHARSET utf8mb3 COLLATE utf8mb3_unicode_ci
DETERMINISTIC
@@ -46303,6 +46470,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `item_getVolume` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -46310,8 +46479,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `item_getVolume`(vSelf INT, vPackaging VARCHAR(10)) RETURNS int(11)
DETERMINISTIC
@@ -46342,6 +46509,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `lastDayOfWeek` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -46349,8 +46518,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `lastDayOfWeek`(vYear INT, vWeek INT) RETURNS date
DETERMINISTIC
@@ -46378,6 +46545,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `machine_checkPlate` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -46385,8 +46554,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `machine_checkPlate`(vPlate VARCHAR(10)) RETURNS tinyint(1)
READS SQL DATA
@@ -46413,6 +46580,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `messageSend` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -46420,8 +46589,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `messageSend`(vRecipient VARCHAR(255) CHARSET utf8, vMessage TEXT CHARSET utf8) RETURNS int(11)
READS SQL DATA
@@ -46439,6 +46606,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `messageSendWithUser` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -46446,8 +46615,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `messageSendWithUser`(vSenderFK INT, vRecipient VARCHAR(255) CHARSET utf8, vMessage TEXT CHARSET utf8) RETURNS int(11)
DETERMINISTIC
@@ -46504,6 +46671,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `MIDNIGHT` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -46511,8 +46680,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `MIDNIGHT`(vDate DATE) RETURNS datetime
DETERMINISTIC
@@ -46524,6 +46691,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `nz` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -46531,8 +46700,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `nz`(vQuantity DOUBLE) RETURNS double
DETERMINISTIC
@@ -46550,6 +46717,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `orderTotalVolume` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -46557,8 +46726,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `orderTotalVolume`(vOrderId INT) RETURNS decimal(10,3)
READS SQL DATA
@@ -46581,6 +46748,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `orderTotalVolumeBoxes` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -46588,8 +46757,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `orderTotalVolumeBoxes`(vOrderId INT) RETURNS decimal(10,3)
READS SQL DATA
@@ -46617,6 +46784,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `packaging_calculate` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -46624,8 +46793,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `packaging_calculate`(isPackageReturnable TINYINT(1),
packagingReturnFk INT(11),
@@ -46656,6 +46823,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `phytoPassport` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -46663,8 +46832,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `phytoPassport`(vRef VARCHAR(15)) RETURNS text CHARSET utf8mb3 COLLATE utf8mb3_general_ci
DETERMINISTIC
@@ -46711,6 +46878,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `priceFixed_getRate2` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -46718,8 +46887,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `priceFixed_getRate2`(vFixedPriceFk INT, vRate3 DOUBLE) RETURNS double
BEGIN
@@ -46743,6 +46910,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `routeProposal` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -46750,8 +46919,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `routeProposal`(vTicketFk INT) RETURNS int(11)
READS SQL DATA
@@ -46809,6 +46976,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `routeProposal_` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -46816,8 +46985,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `routeProposal_`(vTicketFk INT) RETURNS int(11)
READS SQL DATA
@@ -46850,6 +47017,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `routeProposal_beta` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -46857,8 +47026,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `routeProposal_beta`(vTicketFk INT) RETURNS int(11)
READS SQL DATA
@@ -46916,6 +47083,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `specie_IsForbidden` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -46923,8 +47092,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `specie_IsForbidden`(vItemFk INT, vAddressFk INT) RETURNS tinyint(1)
READS SQL DATA
@@ -46955,6 +47122,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `testCIF` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -46962,8 +47131,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `testCIF`(vCIF VARCHAR(9)) RETURNS varchar(10) CHARSET utf8mb3 COLLATE utf8mb3_unicode_ci
DETERMINISTIC
@@ -47040,6 +47207,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `testNIE` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -47047,8 +47216,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `testNIE`(vNIE VARCHAR(9)) RETURNS tinyint(1)
DETERMINISTIC
@@ -47107,6 +47274,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `testNIF` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -47114,8 +47283,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `testNIF`(vNIF VARCHAR(9)) RETURNS tinyint(1)
DETERMINISTIC
@@ -47148,6 +47315,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `ticketCollection_getNoPacked` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -47155,8 +47324,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `ticketCollection_getNoPacked`(vCollectionFk INT) RETURNS varchar(100) CHARSET utf8mb3 COLLATE utf8mb3_unicode_ci
DETERMINISTIC
@@ -47187,6 +47354,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `ticketGetTotal` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -47194,8 +47363,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `ticketGetTotal`(vTicketId INT) RETURNS decimal(10,2)
READS SQL DATA
@@ -47230,6 +47397,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `ticketPositionInPath` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -47237,8 +47406,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `ticketPositionInPath`(vTicketId INT) RETURNS varchar(10) CHARSET utf8mb3 COLLATE utf8mb3_general_ci
DETERMINISTIC
@@ -47321,6 +47488,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `ticketSplitCounter` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -47328,8 +47497,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `ticketSplitCounter`(vTicketFk INT) RETURNS varchar(15) CHARSET utf8mb3 COLLATE utf8mb3_general_ci
READS SQL DATA
@@ -47353,6 +47520,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `ticketTotalVolume` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -47360,8 +47529,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `ticketTotalVolume`(vTicketId INT) RETURNS decimal(10,3)
READS SQL DATA
@@ -47381,6 +47548,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `ticketTotalVolumeBoxes` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -47388,8 +47557,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `ticketTotalVolumeBoxes`(vTicketId INT) RETURNS decimal(10,1)
DETERMINISTIC
@@ -47418,6 +47585,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `ticketWarehouseGet` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -47425,8 +47594,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `ticketWarehouseGet`(vTicketFk INT) RETURNS int(11)
READS SQL DATA
@@ -47444,6 +47611,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `ticket_CC_volume` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -47451,8 +47620,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `ticket_CC_volume`(vTicketFk INT) RETURNS decimal(10,1)
READS SQL DATA
@@ -47477,6 +47644,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `ticket_get` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -47484,8 +47653,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `ticket_get`(vParamFk INT) RETURNS int(11)
READS SQL DATA
@@ -47552,6 +47719,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `ticket_getFreightCost` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -47559,8 +47728,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `ticket_getFreightCost`(vTicketFk INT) RETURNS decimal(10,2)
DETERMINISTIC
@@ -47592,6 +47759,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `ticket_getWeight` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -47599,8 +47768,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `ticket_getWeight`(vTicketFk INT) RETURNS decimal(10,3)
READS SQL DATA
@@ -47625,6 +47792,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `ticket_HasUbication` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -47632,8 +47801,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `ticket_HasUbication`(vTicketFk INT) RETURNS tinyint(1)
READS SQL DATA
@@ -47655,6 +47822,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `ticket_isOutClosureZone` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -47662,8 +47831,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `ticket_isOutClosureZone`(vSelf INT) RETURNS tinyint(1)
DETERMINISTIC
@@ -47690,6 +47857,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `till_new` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -47697,8 +47866,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `till_new`(vClient INT
,vBank INT
@@ -47781,6 +47948,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `timeWorkerControl_getDirection` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -47788,8 +47957,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `timeWorkerControl_getDirection`(vUserFk INT, vTimed DATETIME) RETURNS varchar(6) CHARSET utf8mb3 COLLATE utf8mb3_unicode_ci
READS SQL DATA
@@ -47857,6 +48024,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `time_getSalesYear` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -47864,8 +48033,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `time_getSalesYear`(vMonth INT, vYear INT) RETURNS int(11)
DETERMINISTIC
@@ -47882,6 +48049,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `travel_getForLogiflora` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -47889,8 +48058,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `travel_getForLogiflora`(vLanded DATE, vWarehouseFk INT) RETURNS int(11)
READS SQL DATA
@@ -47945,6 +48112,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `validationCode` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -47952,8 +48121,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `validationCode`(vString VARCHAR(255)) RETURNS int(11)
DETERMINISTIC
@@ -47986,6 +48153,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `validationCode_beta` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -47993,8 +48162,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `validationCode_beta`(vString VARCHAR(255)) RETURNS int(11)
DETERMINISTIC
@@ -48027,32 +48194,25 @@ 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 FUNCTION IF EXISTS `workerIsBoss` */;
-/*!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 ;;
-CREATE DEFINER=`root`@`localhost` FUNCTION `workerIsBoss`(vSelf INT) RETURNS int(11)
+CREATE DEFINER=`root`@`localhost` FUNCTION `workerIsBoss`(vUserId INT) RETURNS int(11)
DETERMINISTIC
BEGIN
/**
* Comprueba por jerarquía si el trabajador actual es jefe
* de un trabajador en concreto.
*
- * @param vSelf Id del trabajador que se desea comprobar.
+ * @param vUserId Id del trabajador que se desea comprobar.
* @return Revuelve verdadero si es jefe del empleado por escala jerárquica.
*/
DECLARE vWorkerId INT;
DECLARE vBossId INT;
SELECT id INTO vWorkerId
- FROM worker
- WHERE id = vSelf;
+ FROM vn.worker
+ WHERE userFk = vUserId;
IF vWorkerId IS NULL THEN
CALL util.throw('USER_NOT_FOUND');
END IF;
@@ -48064,7 +48224,7 @@ BEGIN
SELECT id workerFk FROM worker LIMIT 0;
LOOP
SELECT bossFk INTO vBossId
- FROM worker
+ FROM vn.worker
WHERE id = vWorkerId;
IF (SELECT COUNT(*) FROM tCheckedWorker WHERE workerFk = vBossId) THEN
CALL util.throw('INFINITE_LOOP');
@@ -48093,8 +48253,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `workerMachinery_isRegistered`(vWorkerFk VARCHAR(10)) RETURNS tinyint(1)
READS SQL DATA
@@ -48120,6 +48278,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `workerNigthlyHours_calculate` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -48127,8 +48287,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `workerNigthlyHours_calculate`(vTimeIn DATETIME, vTimeOut DATETIME) RETURNS decimal(5,2)
READS SQL DATA
@@ -48159,6 +48317,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `workerTimeControl_add` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -48166,8 +48326,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `workerTimeControl_add`(vUserFk INT, vWarehouseFk INT, vTimed DATETIME, vIsManual BOOL) RETURNS int(11)
DETERMINISTIC
@@ -48228,6 +48386,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `workerTimeControl_addDirection` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -48235,8 +48395,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `workerTimeControl_addDirection`(vUserFk INT, vWarehouseFk INT, vTimed DATETIME, vIsManual BOOL) RETURNS int(11)
DETERMINISTIC
@@ -48297,6 +48455,93 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
+/*!50003 DROP FUNCTION IF EXISTS `worker_getCode` */;
+/*!50003 SET @saved_cs_client = @@character_set_client */ ;
+/*!50003 SET @saved_cs_results = @@character_set_results */ ;
+/*!50003 SET @saved_col_connection = @@collation_connection */ ;
+/*!50003 SET character_set_client = utf8mb4 */ ;
+/*!50003 SET character_set_results = utf8mb4 */ ;
+/*!50003 SET collation_connection = utf8mb4_unicode_ci */ ;
+DELIMITER ;;
+CREATE DEFINER=`root`@`localhost` FUNCTION `worker_getCode`() RETURNS varchar(3) CHARSET utf8mb3 COLLATE utf8mb3_general_ci
+ READS SQL DATA
+BEGIN
+ DECLARE vUserCode VARCHAR(3) CHARSET utf8 COLLATE utf8_unicode_ci;
+
+ SELECT code INTO vUserCode
+ FROM worker
+ WHERE id = account.myUser_getId();
+
+ RETURN vUserCode;
+END ;;
+DELIMITER ;
+/*!50003 SET sql_mode = @saved_sql_mode */ ;
+/*!50003 SET character_set_client = @saved_cs_client */ ;
+/*!50003 SET character_set_results = @saved_cs_results */ ;
+/*!50003 SET collation_connection = @saved_col_connection */ ;
+/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
+/*!50003 DROP FUNCTION IF EXISTS `worker_isBoss` */;
+/*!50003 SET @saved_cs_client = @@character_set_client */ ;
+/*!50003 SET @saved_cs_results = @@character_set_results */ ;
+/*!50003 SET @saved_col_connection = @@collation_connection */ ;
+/*!50003 SET character_set_client = utf8mb4 */ ;
+/*!50003 SET character_set_results = utf8mb4 */ ;
+/*!50003 SET collation_connection = utf8mb4_unicode_ci */ ;
+DELIMITER ;;
+CREATE DEFINER=`root`@`localhost` FUNCTION `worker_isBoss`(vUserId INT) RETURNS int(11)
+ DETERMINISTIC
+BEGIN
+/**
+ * Comprueba por jerarquía si el trabajador actual es jefe
+ * de un trabajador en concreto.
+ *
+ * @param vSelf Id del trabajador que se desea comprobar.
+ * @return Revuelve verdadero si es jefe del empleado por escala jerárquica.
+ */
+ DECLARE vWorkerId INT;
+ DECLARE vBossId INT;
+
+ SELECT id INTO vWorkerId
+ FROM worker
+ WHERE id = vSelf;
+ IF vWorkerId IS NULL THEN
+ CALL util.throw('USER_NOT_FOUND');
+ END IF;
+
+ DROP TEMPORARY TABLE IF EXISTS tCheckedWorker;
+ CREATE TEMPORARY TABLE tCheckedWorker
+ (PRIMARY KEY (workerFk))
+ ENGINE = MEMORY
+ SELECT id workerFk FROM worker LIMIT 0;
+ LOOP
+ SELECT bossFk INTO vBossId
+ FROM worker
+ WHERE id = vWorkerId;
+ IF (SELECT COUNT(*) FROM tCheckedWorker WHERE workerFk = vBossId) THEN
+ CALL util.throw('INFINITE_LOOP');
+ END IF;
+ IF vBossId = vWorkerId THEN
+ RETURN FALSE;
+ ELSEIF vBossId = account.myUser_getId() THEN
+ RETURN TRUE;
+ ELSE
+ INSERT INTO tCheckedWorker VALUES (vWorkerId);
+ SET vWorkerId = vBossId;
+ END IF;
+ END LOOP;
+ DROP TEMPORARY TABLE tCheckedWorker;
+ RETURN FALSE;
+END ;;
+DELIMITER ;
+/*!50003 SET sql_mode = @saved_sql_mode */ ;
+/*!50003 SET character_set_client = @saved_cs_client */ ;
+/*!50003 SET character_set_results = @saved_cs_results */ ;
+/*!50003 SET collation_connection = @saved_col_connection */ ;
+/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `worker_isWorking` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -48304,8 +48549,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `worker_isWorking`(vWorkerFk INT) RETURNS tinyint(1)
READS SQL DATA
@@ -48336,6 +48579,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `xdiario_new` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -48343,8 +48588,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `xdiario_new`(vAsiento INT,
vDated DATE,
@@ -48391,6 +48634,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP FUNCTION IF EXISTS `zoneGeo_new` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -48398,8 +48643,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `zoneGeo_new`(vType VARCHAR(255), vName VARCHAR(255), vParentFk INT) RETURNS int(11)
NO SQL
@@ -48431,6 +48674,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `addNoteFromDelivery` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -48438,8 +48683,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `addNoteFromDelivery`(idTicket INT,nota TEXT)
BEGIN
@@ -48457,6 +48700,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `addressTaxArea` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -48464,8 +48709,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `addressTaxArea`()
READS SQL DATA
@@ -48508,6 +48751,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `agencyHourGetFirstShipped` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -48515,8 +48760,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `agencyHourGetFirstShipped`(vAgencyMode INT, vAddress INT, vWarehouse INT)
BEGIN
@@ -48556,6 +48799,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `agencyHourGetLanded` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -48563,8 +48808,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `agencyHourGetLanded`(vDated DATE, vAddress INT, vAgency INT, vWarehouse INT)
BEGIN
@@ -48606,6 +48849,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `agencyHourGetWarehouse` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -48613,8 +48858,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `agencyHourGetWarehouse`(vAddress INT, vDate DATE, vWarehouse INT)
BEGIN
@@ -48697,6 +48940,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `agencyHourListGetShipped` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -48704,8 +48949,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `agencyHourListGetShipped`(vDate DATE, vAddress INT, vAgency INT)
BEGIN
@@ -48723,6 +48966,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `available_calc` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -48730,8 +48975,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `available_calc`(
vDate DATE,
@@ -48793,6 +49036,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `bankEntity_checkBic` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -48800,8 +49045,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `bankEntity_checkBic`(vBic VARCHAR(255))
BEGIN
@@ -48825,6 +49068,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `bankPolicy_notifyExpired` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -48832,8 +49077,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `bankPolicy_notifyExpired`()
BEGIN
@@ -48860,6 +49103,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `buyUltimate` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -48867,8 +49112,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `buyUltimate`(vWarehouseFk SMALLINT, vDated DATE)
BEGIN
@@ -48909,6 +49152,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `buyUltimateFromInterval` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -48916,8 +49161,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `buyUltimateFromInterval`(vWarehouseFk SMALLINT, vStarted DATE, vEnded DATE)
BEGIN
@@ -49051,6 +49294,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `buy_afterUpsert` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -49058,8 +49303,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `buy_afterUpsert`(vSelf INT)
BEGIN
@@ -49143,6 +49386,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `buy_checkGrouping` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -49150,8 +49395,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `buy_checkGrouping`(vGrouping INT)
BEGIN
@@ -49170,6 +49413,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `buy_getSplit` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -49177,8 +49422,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `buy_getSplit`(vSelf INT, vDated DATE)
BEGIN
@@ -49311,6 +49554,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `buy_getVolume` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -49318,8 +49563,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `buy_getVolume`()
BEGIN
@@ -49345,6 +49588,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `buy_getVolumeByAgency` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -49352,8 +49597,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `buy_getVolumeByAgency`(vDated DATE, vAgencyFk INT)
BEGIN
@@ -49378,6 +49621,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `buy_getVolumeByEntry` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -49385,8 +49630,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `buy_getVolumeByEntry`(vEntryFk INT)
BEGIN
@@ -49409,6 +49652,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `buy_recalcPrices` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -49416,8 +49661,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `buy_recalcPrices`()
BEGIN
@@ -49474,6 +49717,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `buy_recalcPricesByAwb` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -49481,8 +49726,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `buy_recalcPricesByAwb`(IN awbFk varchar(18))
BEGIN
@@ -49511,6 +49754,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `buy_recalcPricesByBuy` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -49518,8 +49763,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `buy_recalcPricesByBuy`(IN vBuyFk INT(11))
BEGIN
@@ -49542,6 +49785,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `buy_recalcPricesByEntry` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -49549,8 +49794,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `buy_recalcPricesByEntry`(IN vEntryFk INT(11))
BEGIN
@@ -49575,6 +49818,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `buy_scan` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -49582,8 +49827,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `buy_scan`(vBarcode VARCHAR(512))
BEGIN
@@ -49611,7 +49854,7 @@ BEGIN
JOIN vn.warehouse w ON w.id = tr.warehouseInFk
JOIN vn.country c ON c.id = w.countryFk AND c.code = 'NL';
- SELECT b.id buy, i.doPhoto do_photo, b.stickers - b.printedStickers stickersToPrint
+ SELECT b.id buy, i.doPhoto do_photo, b.stickers - CAST(b.printedStickers AS INT) stickersToPrint
FROM tBuy tb
JOIN vn.buy b ON tb.buyFk = b.id
JOIN vn.item i ON i.id = b.itemFk;
@@ -49627,6 +49870,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `buy_updateGrouping` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -49634,8 +49879,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `buy_updateGrouping`(vWarehouseFk INT, vItemFk INT, vGrouping INT)
BEGIN
@@ -49661,6 +49904,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `buy_updatePacking` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -49668,8 +49913,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `buy_updatePacking`(vWarehouseFk INT, vItemFk INT, vPacking INT)
BEGIN
@@ -49696,6 +49939,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `catalog_calcFromItem` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -49703,8 +49948,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `catalog_calcFromItem`(
vLanded DATE,
@@ -49735,6 +49978,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `catalog_calculate` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -49742,8 +49987,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `catalog_calculate`(vLanded DATE, vAddressFk INT, vAgencyModeFk INT)
BEGIN
@@ -49934,6 +50177,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `catalog_componentCalculate` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -49941,8 +50186,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `catalog_componentCalculate`(
vZoneFk INT,
@@ -50241,6 +50484,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `catalog_componentPrepare` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -50248,8 +50493,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `catalog_componentPrepare`()
BEGIN
@@ -50281,6 +50524,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `catalog_componentPurge` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -50288,8 +50533,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `catalog_componentPurge`()
BEGIN
@@ -50303,6 +50546,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `clean` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -50310,8 +50555,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `clean`()
BEGIN
@@ -50495,6 +50738,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `clean_logiflora` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -50502,99 +50747,93 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `clean_logiflora`()
BEGIN
/**
- * Partir en 2 procedimientos, uno que borre compras y otro articulos
- * item_clean, buy_clean.
+ * Elimina las compras y los artículos residuales de logiflora.
*/
-
- DECLARE vMaxDated DATE DEFAULT TIMESTAMPADD(DAY, - 7, util.VN_CURDATE());
DECLARE vDone INT DEFAULT FALSE;
DECLARE vBuyFk INT;
- DECLARE cur1 CURSOR FOR SELECT id FROM tmp.buy;
- DECLARE cur2 CURSOR FOR SELECT id FROM tmp.item;
+ DECLARE vItemFk INT;
+
+ DECLARE cur1 CURSOR FOR SELECT id FROM tBuy;
+ DECLARE cur2 CURSOR FOR SELECT id FROM tItem;
DECLARE CONTINUE HANDLER FOR NOT FOUND SET vDone = TRUE;
- DROP TEMPORARY TABLE IF EXISTS tmp.buy;
+ DECLARE CONTINUE HANDLER FOR SQLEXCEPTION
+ BEGIN
+ ROLLBACK;
+ RESIGNAL;
+ END;
- CREATE TEMPORARY TABLE tmp.buy
- ENGINE = MEMORY
+ CREATE OR REPLACE TEMPORARY TABLE tBuy
+ ENGINE = MEMORY
SELECT b.id
- FROM vn.buy b
- JOIN vn.entry e ON e.id = b.entryFk
- JOIN vn.travel tr ON tr.id = e.travelFk
- JOIN vn.agencyMode am ON am.id = tr.agencyModeFk
- WHERE b.quantity = 0
- AND am.name = 'LOGIFLORA'
- AND e.isRaid;
+ FROM buy b
+ JOIN entry e ON e.id = b.entryFk
+ JOIN travel tr ON tr.id = e.travelFk
+ JOIN agencyMode am ON am.id = tr.agencyModeFk
+ WHERE NOT b.quantity
+ AND am.code = 'logiflora'
+ AND e.isRaid;
+
+ START TRANSACTION;
OPEN cur1;
-
read_loop: LOOP
-
SET vDone = FALSE;
-
FETCH cur1 INTO vBuyFk;
IF vDone THEN
LEAVE read_loop;
END IF;
- DELETE FROM vn.buy WHERE id = vBuyFk;
-
+ DELETE FROM buy WHERE id = vBuyFk;
END LOOP;
-
CLOSE cur1;
- DROP TEMPORARY TABLE tmp.buy;
-
- DROP TEMPORARY TABLE IF EXISTS tmp.item;
-
- CREATE TEMPORARY TABLE tmp.item
- ENGINE = MEMORY
- SELECT DISTINCT i.id
- FROM vn.item i
- LEFT JOIN hedera.orderRow o ON o.itemFk = i.id
- LEFT JOIN vn.sale s ON s.itemFk = i.id
- LEFT JOIN vn.buy b ON b.itemFk = i.id
- LEFT JOIN bs.waste w ON w.itemFk = i.id
- WHERE i.supplyResponseFk
+ CREATE OR REPLACE TEMPORARY TABLE tItem
+ ENGINE = MEMORY
+ SELECT DISTINCT i.id
+ FROM item i
+ LEFT JOIN hedera.orderRow o ON o.itemFk = i.id
+ LEFT JOIN sale s ON s.itemFk = i.id
+ LEFT JOIN buy b ON b.itemFk = i.id
+ LEFT JOIN bs.waste w ON w.itemFk = i.id
+ WHERE i.supplyResponseFk
AND o.id IS NULL
AND b.id IS NULL
AND s.id IS NULL
- AND w.rate IS NULL
- AND i.created < vMaxDated;
+ AND w.itemFk IS NULL
+ AND i.created < (util.VN_CURDATE() - INTERVAL (SELECT daysToKeepItem FROM floramondoConfig) DAY);
OPEN cur2;
-
read_loop: LOOP
-
SET vDone = FALSE;
- FETCH cur2 INTO vBuyFk;
+ FETCH cur2 INTO vItemFk;
IF vDone THEN
LEAVE read_loop;
END IF;
- DELETE FROM vn.item WHERE id = vBuyFk;
-
+ DELETE FROM item WHERE id = vItemFk;
END LOOP;
-
CLOSE cur2;
- DROP TEMPORARY TABLE tmp.item;
+ COMMIT;
+
+ DROP TEMPORARY TABLE tBuy, tItem;
END ;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
/*!50003 SET character_set_client = @saved_cs_client */ ;
/*!50003 SET character_set_results = @saved_cs_results */ ;
/*!50003 SET collation_connection = @saved_col_connection */ ;
+/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `clearShelvingList` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -50602,8 +50841,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `clearShelvingList`(vShelvingFk VARCHAR(8))
BEGIN
@@ -50616,92 +50853,8 @@ 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 `clientCreate` */;
-/*!50003 SET @saved_cs_client = @@character_set_client */ ;
-/*!50003 SET @saved_cs_results = @@character_set_results */ ;
-/*!50003 SET @saved_col_connection = @@collation_connection */ ;
-/*!50003 SET character_set_client = utf8mb3 */ ;
-/*!50003 SET character_set_results = utf8mb3 */ ;
-/*!50003 SET collation_connection = utf8mb3_general_ci */ ;
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
-/*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ;
-DELIMITER ;;
-CREATE DEFINER=`root`@`localhost` PROCEDURE `clientCreate`(
- vFirstname VARCHAR(50),
- vSurnames VARCHAR(50),
- vFi VARCHAR(9),
- vAddress TEXT,
- vPostcode CHAR(5),
- vCity VARCHAR(25),
- vProvinceFk SMALLINT(5),
- vCompanyFk SMALLINT(5),
- vPhone VARCHAR(11),
- vEmail VARCHAR(255),
- vUserFk INT)
-BEGIN
-/**
- * Create new client
- *
- */
- DECLARE vPayMethodFk INT DEFAULT 4;
- DECLARE vDueDay INT DEFAULT 5;
- DECLARE vDefaultCredit DECIMAL(10, 2) DEFAULT 300.00;
- DECLARE vIsTaxDataChecked TINYINT(1) DEFAULT 1;
- DECLARE vHasCoreVnl BOOLEAN DEFAULT TRUE;
- DECLARE vMandateTypeFk INT DEFAULT 2;
-
- INSERT INTO `client` (
- id,
- name,
- street,
- fi,
- phone,
- email,
- provinceFk,
- city,
- postcode,
- socialName,
- payMethodFk,
- dueDay,
- credit,
- isTaxDataChecked,
- hasCoreVnl,
- isEqualizated)
- VALUES (
- vUserFk,
- CONCAT(vFirstname, ' ', vSurnames),
- vAddress,
- TRIM(vFi),
- vPhone,
- vEmail,
- vProvinceFk,
- vCity,
- vPostcode,
- CONCAT(vSurnames, ' ', vFirstname),
- vPayMethodFk,
- vDueDay,
- vDefaultCredit,
- vIsTaxDataChecked,
- vHasCoreVnl,
- FALSE
- ) ON duplicate key update
- payMethodFk = vPayMethodFk,
- dueDay = vDueDay,
- credit = vDefaultCredit,
- isTaxDataChecked = vIsTaxDataChecked,
- hasCoreVnl = vHasCoreVnl,
- isActive = TRUE;
-
- IF (SELECT COUNT(*) FROM mandate WHERE clientFk = vUserFk AND companyFk = vCompanyFk AND mandateTypeFk = vMandateTypeFk) = 0 THEN
- INSERT INTO mandate (clientFk, companyFk, mandateTypeFk)
- VALUES (vUserFk, vCompanyFk, vMandateTypeFk);
- END IF;
-END ;;
-DELIMITER ;
-/*!50003 SET sql_mode = @saved_sql_mode */ ;
-/*!50003 SET character_set_client = @saved_cs_client */ ;
-/*!50003 SET character_set_results = @saved_cs_results */ ;
-/*!50003 SET collation_connection = @saved_col_connection */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `clientDebtSpray` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -50709,8 +50862,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `clientDebtSpray`(vClientFk INT)
BEGIN
@@ -50744,6 +50895,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `clientFreeze` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -50751,8 +50904,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `clientFreeze`()
BEGIN
@@ -50800,6 +50951,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `clientGetDebtDiary` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -50807,8 +50960,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `clientGetDebtDiary`(vClientFK INT, vCompanyFk INT)
BEGIN
@@ -50930,6 +51081,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `clientGreugeSpray` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -50937,8 +51090,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `clientGreugeSpray`(IN vClientFk INT, IN onlyForHisOwner BOOL, IN vWorkerCode VARCHAR(3), IN vWithMana BOOLEAN)
BEGIN
@@ -51016,6 +51167,166 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
+/*!50003 DROP PROCEDURE IF EXISTS `clientPackagingOverstock` */;
+/*!50003 SET @saved_cs_client = @@character_set_client */ ;
+/*!50003 SET @saved_cs_results = @@character_set_results */ ;
+/*!50003 SET @saved_col_connection = @@collation_connection */ ;
+/*!50003 SET character_set_client = utf8mb4 */ ;
+/*!50003 SET character_set_results = utf8mb4 */ ;
+/*!50003 SET collation_connection = utf8mb4_unicode_ci */ ;
+DELIMITER ;;
+CREATE DEFINER=`root`@`localhost` PROCEDURE `clientPackagingOverstock`(vClientFk INT, vGraceDays INT)
+BEGIN
+ DROP TEMPORARY TABLE IF EXISTS tmp.clientPackagingOverstock;
+ CREATE TEMPORARY TABLE tmp.clientPackagingOverstock
+ ENGINE = MEMORY
+ SELECT itemFk,
+ sum(GotfromClient) - sum(SenttoClient) as devueltos,
+ sum(InvoicedtoClient) - sum(InvoicedfromClient) as facturados,
+ LEAST(
+ sum(GotfromClient) - sum(SenttoClient),
+ sum(InvoicedtoClient) - sum(InvoicedfromClient)
+ ) as abonables
+ FROM
+ (
+ SELECT t.*,
+ IF(@month = month, 0, 1) monthEnd,
+ @month := month
+ FROM
+ (
+ SELECT x.id as ticketFk,
+ date(x.shipped) as shipped,
+ x.itemFk,
+ IFNULL(cast(sum(x.InvoicedtoClient) as DECIMAL(10,0)),0) InvoicedtoClient,
+ IFNULL(cast(sum(x.InvoicedfromClient) as DECIMAL(10,0)),0) InvoicedfromClient,
+ IFNULL(cast(sum(x.SenttoClient) as DECIMAL(10,0)),0) SenttoClient,
+ IFNULL(cast(sum(x.GotfromClient) as DECIMAL(10,0)),0) GotfromClient,
+ i.name as concept,
+ x.refFk as invoice,
+ month(shipped) month,
+ x.companyFk
+ FROM
+ (
+ SELECT t.id,
+ t.shipped,
+ IFNULL(pe.equivalentFk, s.itemFk) itemFk,
+ IF(s.quantity > 0, s.quantity, NULL) InvoicedtoClient,
+ IF(s.quantity < 0, -s.quantity, NULL) InvoicedfromClient,
+ NULL SenttoClient,
+ NULL GotfromClient,
+ t.refFk,
+ @month := 0 month,
+ t.companyFk
+ FROM sale s
+ JOIN ticket t on t.id = s.ticketFk
+ JOIN packaging p ON p.itemFk = s.itemFk
+ LEFT JOIN packageEquivalentItem pe ON pe.itemFk = s.itemFk
+ WHERE t.clientFk = vClientFk
+ AND t.shipped > '2017-11-30'
+ AND p.isPackageReturnable
+ UNION ALL
+ SELECT NULL,
+ '2017-11-30',
+ IFNULL(pe.equivalentFk, tps.itemFk) itemFk,
+ tps.sent InvoicedtoClient,
+ tps.returned InvoicedfromClient,
+ NULL SenttoClient,
+ NULL GotfromClient,
+ 'Histórico',
+ NULL,
+ NULL
+ FROM ticketPackagingStartingStock tps
+ LEFT JOIN packageEquivalentItem pe ON pe.itemFk = tps.itemFk
+ WHERE tps.clientFk = vClientFk
+ AND tps.isForgetable = FALSE
+ UNION ALL
+ SELECT t.id,
+ t.shipped,
+ IFNULL(pe.equivalentFk, p.itemFk) itemFk,
+ NULL,
+ NULL,
+ IF(tp.quantity > 0 AND t.shipped <= TIMESTAMPADD(DAY, - vGraceDays, CURDATE()), tp.quantity, NULL) SenttoClient,
+ IF(tp.quantity < 0, -tp.quantity, NULL) GotfromClient,
+ NULL AS refFk,
+ NULL,
+ t.companyFk
+ FROM ticketPackaging tp
+ JOIN ticket t on t.id = tp.ticketFk
+ JOIN packaging p ON p.id = tp.packagingFk
+ LEFT JOIN packageEquivalentItem pe ON pe.itemFk = p.itemFk
+ WHERE t.clientFk = vClientFk
+ AND t.shipped > '2017-11-21' ) x
+
+ JOIN item i ON x.itemFk = i.id
+ GROUP BY x.id, x.itemFk
+ ) t
+ ORDER BY itemFk, shipped DESC
+ LIMIT 10000000000000000000
+ ) t2
+ GROUP BY itemFk;
+END ;;
+DELIMITER ;
+/*!50003 SET sql_mode = @saved_sql_mode */ ;
+/*!50003 SET character_set_client = @saved_cs_client */ ;
+/*!50003 SET character_set_results = @saved_cs_results */ ;
+/*!50003 SET collation_connection = @saved_col_connection */ ;
+/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
+/*!50003 DROP PROCEDURE IF EXISTS `clientPackagingOverstockReturn` */;
+/*!50003 SET @saved_cs_client = @@character_set_client */ ;
+/*!50003 SET @saved_cs_results = @@character_set_results */ ;
+/*!50003 SET @saved_col_connection = @@collation_connection */ ;
+/*!50003 SET character_set_client = utf8mb4 */ ;
+/*!50003 SET character_set_results = utf8mb4 */ ;
+/*!50003 SET collation_connection = utf8mb4_unicode_ci */ ;
+DELIMITER ;;
+CREATE DEFINER=`root`@`localhost` PROCEDURE `clientPackagingOverstockReturn`(vClientFk INT, vGraceDays INT)
+BEGIN
+ DECLARE vNewTicket INT DEFAULT 0;
+ DECLARE vWarehouseFk INT;
+
+ CALL vn.clientPackagingOverstock(vClientFk,vGraceDays);
+
+ SELECT id INTO vWarehouseFk
+ FROM vn.warehouse
+ WHERE hasConfectionTeam;
+
+ CALL vn.ticket_add(
+ vClientFk
+ ,CURDATE()
+ ,vWarehouseFk -- Algemesi
+ ,442 -- Verdnatura
+ ,NULL -- address
+ ,NULL -- agencia
+ ,NULL -- route
+ ,CURDATE()
+ ,account.myUser_getId()
+ ,TRUE
+ ,vNewTicket);
+
+ INSERT INTO vn.sale(ticketFk, itemFk, quantity, concept, price)
+ SELECT vNewTicket, cpo.itemFk, - cpo.abonables, i.longName, p.price
+ FROM tmp.clientPackagingOverstock cpo
+ JOIN vn.item i ON i.id = cpo.itemFk
+ JOIN vn.packaging p ON p.itemFk = cpo.itemFk
+ WHERE cpo.abonables > 0;
+ INSERT INTO vn.ticketPackaging(ticketFk, packagingFk, quantity)
+ SELECT vNewTicket, p.id, cpo.abonables
+ FROM tmp.clientPackagingOverstock cpo
+ JOIN vn.packaging p ON p.itemFk = cpo.itemFk
+ WHERE cpo.abonables > 0;
+
+ SELECT vNewTicket;
+END ;;
+DELIMITER ;
+/*!50003 SET sql_mode = @saved_sql_mode */ ;
+/*!50003 SET character_set_client = @saved_cs_client */ ;
+/*!50003 SET character_set_results = @saved_cs_results */ ;
+/*!50003 SET collation_connection = @saved_col_connection */ ;
+/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `clientRemoveWorker` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -51023,8 +51334,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `clientRemoveWorker`()
BEGIN
@@ -51050,7 +51359,7 @@ BEGIN
JOIN country co ON co.id = p.countryFk
WHERE cd.Aviso = 'TERCER AVISO'
AND cp.clientFk IS NULL
- AND co.code NOT IN ('PT','FR')
+ AND co.code NOT IN ('PT')
AND a.name <> 'Canarias'
AND c.salesPersonFk IS NOT NULL;
@@ -51069,6 +51378,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `clientRisk_update` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -51076,8 +51387,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `clientRisk_update`(vClientId INT, vCompanyId INT, vAmount DECIMAL(10,2))
BEGIN
@@ -51097,6 +51406,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `client_checkBalance` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -51104,8 +51415,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `client_checkBalance`(IN vDateTo DATETIME, IN vIsConciliated BOOL)
BEGIN
@@ -51178,6 +51487,108 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ;
+/*!50003 DROP PROCEDURE IF EXISTS `client_create` */;
+/*!50003 SET @saved_cs_client = @@character_set_client */ ;
+/*!50003 SET @saved_cs_results = @@character_set_results */ ;
+/*!50003 SET @saved_col_connection = @@collation_connection */ ;
+/*!50003 SET character_set_client = utf8mb3 */ ;
+/*!50003 SET character_set_results = utf8mb3 */ ;
+/*!50003 SET collation_connection = utf8mb3_general_ci */ ;
+DELIMITER ;;
+CREATE DEFINER=`root`@`localhost` PROCEDURE `client_create`(
+ vFirstname VARCHAR(50),
+ vSurnames VARCHAR(50),
+ vFi VARCHAR(9),
+ vAddress TEXT,
+ vPostcode CHAR(5),
+ vCity VARCHAR(25),
+ vProvinceFk SMALLINT(5),
+ vCompanyFk SMALLINT(5),
+ vPhone VARCHAR(11),
+ vEmail VARCHAR(255),
+ vUserFk INT
+)
+BEGIN
+/**
+ * Create new client
+ *
+ * @params vFirstname firstName
+ * @params vSurnames surnames
+ * @params vFi company code from accounting transactions
+ * @params vAddress address
+ * @params vPostcode postCode
+ * @params vCity city
+ * @params vProvinceFk province
+ * @params vCompanyFk company in which he has become a client
+ * @params vPhone telephone number
+ * @params vEmail email address
+ * @params vUserFk user id
+ */
+ DECLARE vPayMethodFk INT;
+ DECLARE vDueDay INT;
+ DECLARE vDefaultCredit DECIMAL(10, 2);
+ DECLARE vIsTaxDataChecked TINYINT(1);
+ DECLARE vHasCoreVnl BOOLEAN;
+ DECLARE vMandateTypeFk INT;
+
+ SELECT defaultPayMethodFk,
+ defaultDueDay,
+ defaultCredit,
+ defaultIsTaxDataChecked,
+ defaultHasCoreVnl,
+ defaultMandateTypeFk
+ INTO vPayMethodFk,
+ vDueDay,
+ vDefaultCredit,
+ vIsTaxDataChecked,
+ vHasCoreVnl,
+ vMandateTypeFk
+ FROM clientConfig;
+
+ INSERT INTO `client`
+ SET id = vUserFk,
+ name = CONCAT(vFirstname, ' ', vSurnames),
+ street = vAddress,
+ fi = TRIM(vFi),
+ phone = vPhone,
+ email = vEmail,
+ provinceFk = vProvinceFk,
+ city = vCity,
+ postcode = vPostcode,
+ socialName = UPPER(CONCAT(vSurnames, ' ', vFirstname)),
+ payMethodFk = vPayMethodFk,
+ dueDay = vDueDay,
+ credit = vDefaultCredit,
+ isTaxDataChecked = vIsTaxDataChecked,
+ hasCoreVnl = vHasCoreVnl,
+ isEqualizated = FALSE
+ ON duplicate KEY UPDATE
+ payMethodFk = vPayMethodFk,
+ dueDay = vDueDay,
+ credit = vDefaultCredit,
+ isTaxDataChecked = vIsTaxDataChecked,
+ hasCoreVnl = vHasCoreVnl,
+ isActive = TRUE;
+
+ INSERT INTO mandate (clientFk, companyFk, mandateTypeFk)
+ SELECT vUserFk, vCompanyFk, vMandateTypeFk
+ WHERE NOT EXISTS (
+ SELECT id
+ FROM mandate
+ WHERE clientFk = vUserFk
+ AND companyFk = vCompanyFk
+ AND mandateTypeFk = vMandateTypeFk
+ );
+END ;;
+DELIMITER ;
+/*!50003 SET sql_mode = @saved_sql_mode */ ;
+/*!50003 SET character_set_client = @saved_cs_client */ ;
+/*!50003 SET character_set_results = @saved_cs_results */ ;
+/*!50003 SET collation_connection = @saved_col_connection */ ;
+/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `client_getDebt` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -51185,8 +51596,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `client_getDebt`(vDate DATE)
BEGIN
@@ -51250,6 +51659,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `client_RandomList` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -51257,8 +51668,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `client_RandomList`(vNumber INT)
BEGIN
@@ -51322,6 +51731,72 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
+/*!50003 DROP PROCEDURE IF EXISTS `client_unassignSalesPerson` */;
+/*!50003 SET @saved_cs_client = @@character_set_client */ ;
+/*!50003 SET @saved_cs_results = @@character_set_results */ ;
+/*!50003 SET @saved_col_connection = @@collation_connection */ ;
+/*!50003 SET character_set_client = utf8mb4 */ ;
+/*!50003 SET character_set_results = utf8mb4 */ ;
+/*!50003 SET collation_connection = utf8mb4_unicode_ci */ ;
+DELIMITER ;;
+CREATE DEFINER=`root`@`localhost` PROCEDURE `client_unassignSalesPerson`()
+BEGIN
+/**
+ * Elimina la asignación de salesPersonFk de la ficha del clientes
+ * que no han realizado una compra en los últimos 3 meses y reparte
+ * su greuge entre el resto de clientes
+ */
+ DECLARE vDone BOOL DEFAULT FALSE;
+ DECLARE vClientFk INT;
+ DECLARE vCursor CURSOR FOR
+ SELECT c.clientFk
+ FROM tClientList c
+ LEFT JOIN clientRisk r ON r.clientFk = c.clientFk
+ GROUP BY c.clientFk
+ HAVING NOT SUM(IFNULL(r.amount, 0));
+
+ DECLARE CONTINUE HANDLER FOR NOT FOUND SET vDone = TRUE;
+
+ CREATE OR REPLACE TEMPORARY TABLE tClientList
+ SELECT c.id clientFk
+ FROM bs.clientDied cd
+ JOIN client c ON c.id = cd.id
+ LEFT JOIN clientProtected cp ON cp.clientFk = c.id
+ LEFT JOIN salesPersonProtected sp ON sp.salesPersonFk = c.salesPersonFk
+ JOIN province p ON p.id = c.provinceFk
+ LEFT JOIN autonomy a ON a.id = p.autonomyFk
+ JOIN country co ON co.id = p.countryFk
+ WHERE cd.Aviso = 'TERCER AVISO'
+ AND cp.clientFk IS NULL
+ AND sp.salesPersonFk IS NULL
+ AND a.name <> 'Canarias'
+ AND c.salesPersonFk IS NOT NULL;
+
+ OPEN vCursor;
+ l: LOOP
+ SET vDone = FALSE;
+ FETCH vCursor INTO vClientFk;
+ IF vDone THEN
+ LEAVE l;
+ END IF;
+ CALL clientGreugeSpray(vClientFk, TRUE, '', TRUE);
+ UPDATE client
+ SET salesPersonFk = NULL
+ WHERE id = vClientFk;
+ END LOOP;
+ CLOSE vCursor;
+
+ DROP TEMPORARY TABLE tClientList;
+END ;;
+DELIMITER ;
+/*!50003 SET sql_mode = @saved_sql_mode */ ;
+/*!50003 SET character_set_client = @saved_cs_client */ ;
+/*!50003 SET character_set_results = @saved_cs_results */ ;
+/*!50003 SET collation_connection = @saved_col_connection */ ;
+/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `cmrPallet_add` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -51329,8 +51804,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `cmrPallet_add`(vExpeditionPalletFk INT, vCmrFk INT)
BEGIN
@@ -51372,6 +51845,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `cmr_getByTicket` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -51379,8 +51854,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `cmr_getByTicket`(vTicketFk INT)
BEGIN
@@ -51422,6 +51895,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `cmr_sendOverview` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -51429,8 +51904,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `cmr_sendOverview`()
BEGIN
@@ -51493,6 +51966,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `collectionPlacement_get` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -51500,8 +51975,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `collectionPlacement_get`(
vParamFk INT(11),
@@ -51660,6 +52133,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `collection_addItem` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -51667,8 +52142,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `collection_addItem`(
vBarccodeFk INT,
@@ -51730,6 +52203,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `collection_assign` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -51737,8 +52212,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `collection_assign`(vUserFk INT, OUT vCollectionFk INT)
proc:BEGIN
@@ -51815,6 +52288,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `collection_get` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -51822,8 +52297,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `collection_get`(vWorkerFk INT)
BEGIN
@@ -51861,6 +52334,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `collection_getTickets` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -51868,8 +52343,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `collection_getTickets`(vParamFk INT)
BEGIN
@@ -51936,6 +52409,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `collection_kill` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -51943,8 +52418,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `collection_kill`(vSelf INT)
BEGIN
@@ -51965,6 +52438,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `collection_make` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -51972,8 +52447,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `collection_make`()
proc:BEGIN
@@ -52046,6 +52519,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `collection_new` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -52053,8 +52528,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `collection_new`(vUserFk INT, OUT vCollectionFk INT)
proc:BEGIN
@@ -52362,6 +52835,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `collection_printSticker` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -52369,8 +52844,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `collection_printSticker`(
vSelf INT,
@@ -52408,6 +52881,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `collection_setParking` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -52415,8 +52890,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `collection_setParking`(IN `vCollectionFk` VARCHAR(8), IN `vParkingFk` INT)
proc: BEGIN
@@ -52436,6 +52909,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `collection_setState` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -52443,8 +52918,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `collection_setState`(vSelf INT, vStateCode VARCHAR(255) COLLATE utf8_general_ci)
BEGIN
@@ -52493,6 +52966,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `company_getFiscaldata` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -52500,8 +52975,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `company_getFiscaldata`(workerFk INT)
BEGIN
@@ -52531,6 +53004,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `company_getSuppliersDebt` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -52538,8 +53013,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `company_getSuppliersDebt`(vSelf INT, vMonthsAgo INT)
BEGIN
@@ -52741,6 +53214,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `conveyorExpedition_Add` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -52748,8 +53223,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `conveyorExpedition_Add`(vStarted DATETIME, vEnded DATETIME)
BEGIN
@@ -52806,6 +53279,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `copyComponentsFromSaleList` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -52813,8 +53288,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `copyComponentsFromSaleList`(vTargetTicketFk INT)
BEGIN
@@ -52853,6 +53326,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `createPedidoInterno` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -52860,8 +53335,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `createPedidoInterno`(vItemFk INT,vQuantity INT)
BEGIN
@@ -52875,6 +53348,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `crypt` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -52882,8 +53357,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `crypt`(vText VARCHAR(255), vKey VARCHAR(255), OUT vResult VARCHAR(255) )
BEGIN
@@ -52945,6 +53418,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `cryptOff` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -52952,8 +53427,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `cryptOff`(vText VARCHAR(255), vKey VARCHAR(255), OUT vResult VARCHAR(255))
BEGIN
@@ -53012,6 +53485,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `department_calcTree` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -53019,8 +53494,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `department_calcTree`()
BEGIN
@@ -53056,6 +53529,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `department_calcTreeRec` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -53063,8 +53538,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `department_calcTreeRec`(
vSelf INT,
@@ -53138,6 +53611,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `department_doCalc` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -53145,8 +53620,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `department_doCalc`()
proc: BEGIN
@@ -53180,6 +53653,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `department_getHasMistake` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -53187,8 +53662,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `department_getHasMistake`()
BEGIN
@@ -53209,6 +53682,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `department_getLeaves` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -53216,8 +53691,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `department_getLeaves`(
vParentFk INT,
@@ -53300,6 +53773,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `deviceLog_add` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -53307,28 +53782,27 @@ DELIMITER ;
/*!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 ;;
-CREATE DEFINER=`root`@`localhost` PROCEDURE `deviceLog_add`(vWorkerFk INT, vAppName VARCHAR(45), vAppVersion VARCHAR(45), vAndroid_id VARCHAR(100))
+CREATE DEFINER=`root`@`localhost` PROCEDURE `deviceLog_add`(vWorkerFk INT, vAppName VARCHAR(45), vAppVersion VARCHAR(45), vAndroid_id VARCHAR(64))
BEGIN
-/*
- * Inserta registro en tabla devicelog el log del usuario conectado
+/**
+ * Inserta registro en tabla devicelog el log del usuario conectado.
+ *
* @param vAppName es el nombre de la app
* @param vAppVersion es la versión de la app
* @param vAndroid_id es el android_id del dispositivo que se ha logueado
*/
-
INSERT INTO deviceLog (userFK, nameApp, versionApp, android_id)
VALUES(vWorkerFk, vAppName, vAppVersion, vAndroid_id);
-
END ;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
/*!50003 SET character_set_client = @saved_cs_client */ ;
/*!50003 SET character_set_results = @saved_cs_results */ ;
/*!50003 SET collation_connection = @saved_col_connection */ ;
+/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `deviceProductionUser_exists` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -53336,8 +53810,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `deviceProductionUser_exists`(vUserFk INT)
BEGIN
@@ -53353,6 +53825,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `deviceProductionUser_getWorker` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -53360,27 +53834,26 @@ DELIMITER ;
/*!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 ;;
-CREATE DEFINER=`root`@`localhost` PROCEDURE `deviceProductionUser_getWorker`(vAndroid_id VARCHAR(50))
+CREATE DEFINER=`root`@`localhost` PROCEDURE `deviceProductionUser_getWorker`(vAndroid_id VARCHAR(64))
BEGIN
/**
* Selecciona si hay registrado un device con un android_id
*
* @param vAndroid_id el número android_id del dispositivo
- *
*/
SELECT account.user_getNameFromId(dpu.userFk)
- FROM deviceProductionUser dpu
- JOIN deviceProduction dp ON dpu.deviceProductionFk = dp.id
- WHERE dp.android_id = vAndroid_id;
+ FROM deviceProductionUser dpu
+ JOIN deviceProduction dp ON dpu.deviceProductionFk = dp.id
+ WHERE dp.android_id = vAndroid_id;
END ;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
/*!50003 SET character_set_client = @saved_cs_client */ ;
/*!50003 SET character_set_results = @saved_cs_results */ ;
/*!50003 SET collation_connection = @saved_col_connection */ ;
+/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `deviceProduction_getnameDevice` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -53388,28 +53861,25 @@ DELIMITER ;
/*!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 ;;
-CREATE DEFINER=`root`@`localhost` PROCEDURE `deviceProduction_getnameDevice`(vAndroid_id VARCHAR(50))
+CREATE DEFINER=`root`@`localhost` PROCEDURE `deviceProduction_getnameDevice`(vAndroid_id VARCHAR(64))
BEGIN
/**
- * Selecciona el id del dispositivo que corresponde al vAndroid_id
+ * Selecciona el id del dispositivo que corresponde al vAndroid_id.
*
* @param vAndroid_id el número android_id del dispositivo
- *
*/
-
SELECT dp.id
FROM deviceProduction dp
WHERE dp.android_id = vAndroid_id;
-
END ;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
/*!50003 SET character_set_client = @saved_cs_client */ ;
/*!50003 SET character_set_results = @saved_cs_results */ ;
/*!50003 SET collation_connection = @saved_col_connection */ ;
+/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `device_checkLogin` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -53417,8 +53887,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `device_checkLogin`(vUserFk INT, vAndroidID VARCHAR(50))
BEGIN
@@ -53466,6 +53934,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `duaEntryValueUpdate` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -53473,8 +53943,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `duaEntryValueUpdate`(vDuaFk INT)
BEGIN
@@ -53507,6 +53975,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `duaInvoiceInBooking` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -53514,8 +53984,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `duaInvoiceInBooking`(vDuaFk INT)
BEGIN
@@ -53590,6 +54058,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `duaParcialMake` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -53597,8 +54067,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `duaParcialMake`(vDuaFk INT)
BEGIN
@@ -53624,6 +54092,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `duaTaxBooking` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -53631,8 +54101,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `duaTaxBooking`(vDuaFk INT)
BEGIN
@@ -53773,6 +54241,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `duaTax_doRecalc` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -53780,8 +54250,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `duaTax_doRecalc`(vDuaFk INT)
BEGIN
@@ -53835,6 +54303,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `ediTables_Update` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -53842,8 +54312,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `ediTables_Update`()
BEGIN
@@ -53861,6 +54329,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `ektEntryAssign_setEntry` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -53868,8 +54338,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `ektEntryAssign_setEntry`()
BEGIN
@@ -53986,6 +54454,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `energyMeter_record` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -53993,8 +54463,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `energyMeter_record`(vInput INT, vActiveTime INT)
BEGIN
@@ -54019,6 +54487,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `entryDelivered` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -54026,8 +54496,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `entryDelivered`(vDated DATE, vEntryFk INT)
BEGIN
@@ -54063,6 +54531,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `entryWithItem` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -54070,8 +54540,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `entryWithItem`(vShipmentWarehouse INT, vLandingWarehouse INT,vSale INT, vVolume INT, netCost DECIMAL(10,2), vInOutDate DATE)
BEGIN
@@ -54130,6 +54598,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `entry_checkPackaging` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -54137,8 +54607,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `entry_checkPackaging`(vEntryFk INT)
BEGIN
@@ -54163,6 +54631,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `entry_clone` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -54170,8 +54640,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `entry_clone`(vSelf INT)
BEGIN
@@ -54196,6 +54664,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `entry_cloneHeader` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -54203,8 +54673,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `entry_cloneHeader`(
vSelf INT,
@@ -54243,13 +54711,14 @@ BEGIN
WHERE id = vSelf;
SET vNewEntryFk = LAST_INSERT_ID();
-
END ;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
/*!50003 SET character_set_client = @saved_cs_client */ ;
/*!50003 SET character_set_results = @saved_cs_results */ ;
/*!50003 SET collation_connection = @saved_col_connection */ ;
+/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `entry_cloneWithoutBuy` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -54257,8 +54726,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `entry_cloneWithoutBuy`(vSelf INT, OUT vNewEntryFk INT)
BEGIN
@@ -54284,6 +54751,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `entry_copyBuys` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -54291,8 +54760,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `entry_copyBuys`(vSelf INT, vCopyTo INT)
BEGIN
@@ -54356,6 +54823,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `entry_fixMisfit` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -54363,8 +54832,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `entry_fixMisfit`(
vSelf INT
@@ -54405,11 +54872,11 @@ BEGIN
weight)
SELECT vSelf,
itemFk,
- SUM(printedStickers - stickers) * packing quantity,
+ SUM(CAST(printedStickers AS INT) - stickers) * packing quantity,
buyingValue,
freightValue,
TRUE isIgnored,
- printedStickers - stickers,
+ CAST(printedStickers AS INT) - stickers,
packing,
`grouping`,
groupingMode,
@@ -54434,6 +54901,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `entry_getRate` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -54441,49 +54910,59 @@ DELIMITER ;
/*!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 ;;
-CREATE DEFINER=`root`@`localhost` PROCEDURE `entry_getRate`(vEntry INT)
+CREATE DEFINER=`root`@`localhost` PROCEDURE `entry_getRate`(vSelf INT)
BEGIN
- DECLARE vLanded DATE;
- DECLARE vWarehouseFk INT;
+/**
+ * Prepara una tabla con las tarifas aplicables en funcion de la fecha
+ * y el almacén
+ *
+ * @param vSelf Id de la tabla entry
+ * @return tmp.rate (rate0, rate1, rate2, rate3)
+ */
+ DECLARE vDated DATE;
+ DECLARE vWarehouseFk INT;
- -- Obtiene fecha de llegada y almacén entrante
-
- SELECT landed, warehouseInFk INTO vLanded, vWarehouseFk
- FROM vn.travel t
- JOIN vn.entry e ON t.id = e.travelFk
- WHERE e.id = vEntry;
-
- -- 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 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;
+ SELECT t.landed, t.warehouseInFk INTO vDated, vWarehouseFk
+ FROM entry e
+ JOIN travel t ON t.id = e.travelFk
+ WHERE e.id = vSelf;
+ CALL rate_getPrices(vDated, vWarehouseFk);
END ;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
/*!50003 SET character_set_client = @saved_cs_client */ ;
/*!50003 SET character_set_results = @saved_cs_results */ ;
/*!50003 SET collation_connection = @saved_col_connection */ ;
+/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
+/*!50003 DROP PROCEDURE IF EXISTS `entry_lock` */;
+/*!50003 SET @saved_cs_client = @@character_set_client */ ;
+/*!50003 SET @saved_cs_results = @@character_set_results */ ;
+/*!50003 SET @saved_col_connection = @@collation_connection */ ;
+/*!50003 SET character_set_client = utf8mb4 */ ;
+/*!50003 SET character_set_results = utf8mb4 */ ;
+/*!50003 SET collation_connection = utf8mb4_unicode_ci */ ;
+DELIMITER ;;
+CREATE DEFINER=`root`@`localhost` PROCEDURE `entry_lock`(vSelf INT)
+BEGIN
+/**
+ * Lock the indicated entry
+ * @vSelf params entry id
+ */
+ UPDATE `entry`
+ SET lockerUserFk = account.myUser_getId(),
+ locked = util.VN_NOW()
+ WHERE id = vSelf;
+END ;;
+DELIMITER ;
+/*!50003 SET sql_mode = @saved_sql_mode */ ;
+/*!50003 SET character_set_client = @saved_cs_client */ ;
+/*!50003 SET character_set_results = @saved_cs_results */ ;
+/*!50003 SET collation_connection = @saved_col_connection */ ;
+/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `entry_moveNotPrinted` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -54491,8 +54970,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `entry_moveNotPrinted`(vSelf INT,
vDays INT,
@@ -54555,11 +55032,11 @@ BEGIN
itemOriginalFk)
SELECT vNewEntryFk,
itemFk,
- ((stickers - printedStickers) * packing) quantity,
+ ((stickers - CAST(printedStickers AS INT)) * packing) quantity,
buyingValue,
freightValue,
isIgnored,
- (stickers - printedStickers) stickers,
+ (stickers - CAST(printedStickers AS INT)) stickers,
packing,
`grouping`,
groupingMode,
@@ -54611,11 +55088,11 @@ BEGIN
minPrice)
SELECT vSelf,
itemFk,
- (printedStickers - stickers) * packing quantity,
+ (CAST(printedStickers AS INT) - stickers) * packing quantity,
buyingValue,
freightValue,
TRUE isIgnored,
- printedStickers - stickers,
+ CAST(printedStickers AS INT) - stickers,
packing,
`grouping`,
groupingMode,
@@ -54665,6 +55142,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `entry_notifyChanged` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -54672,8 +55151,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `entry_notifyChanged`(vSelf INT, vBuyFk INT, vOldValues VARCHAR(512), vNewValues VARCHAR(512))
BEGIN
@@ -54710,6 +55187,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `entry_recalc` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -54717,8 +55196,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `entry_recalc`()
BEGIN
@@ -54757,6 +55234,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `entry_splitByShelving` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -54764,8 +55243,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `entry_splitByShelving`(vShelvingFk VARCHAR(3), vFromEntryFk INT, vToEntryFk INT)
BEGIN
@@ -54777,13 +55254,13 @@ BEGIN
* @param vToEntryFk Entrada destino
*/
DECLARE vBuyFk INT;
- DECLARE ishStickers INT;
- DECLARE buyStickers INT;
+ DECLARE vIshStickers INT;
+ DECLARE vBuyStickers INT;
DECLARE vDone BOOLEAN DEFAULT FALSE;
DECLARE cur CURSOR FOR
SELECT bb.id buyFk,
- FLOOR(ish.visible / ish.packing) AS ishStickers,
+ FLOOR(ish.visible / ish.packing) ishStickers,
bb.stickers buyStickers
FROM vn.itemShelving ish
JOIN (SELECT b.id, b.itemFk, b.stickers
@@ -54818,19 +55295,19 @@ BEGIN
read_loop: LOOP
SET vDone = FALSE;
- FETCH cur INTO vBuyFk, ishStickers, buyStickers;
+ FETCH cur INTO vBuyFk, vIshStickers, vBuyStickers;
IF vDone THEN
LEAVE read_loop;
END IF;
- IF ishStickers = buyStickers THEN
+ IF vIshStickers = vBuyStickers THEN
UPDATE vn.buy
SET entryFk = vToEntryFk
WHERE id = vBuyFk;
ELSE
UPDATE vn.buy
- SET stickers = stickers - ishStickers,
+ SET stickers = stickers - vIshStickers,
quantity = stickers * packing
WHERE id = vBuyFk;
@@ -54853,7 +55330,6 @@ BEGIN
price2,
price3,
minPrice,
- printedStickers,
workerFk,
isChecked,
isPickedOff,
@@ -54864,11 +55340,11 @@ BEGIN
SELECT
vToEntryFk,
itemFk,
- ishStickers * packing,
+ vIshStickers * packing,
buyingValue,
freightValue,
isIgnored,
- ishStickers,
+ vIshStickers,
packing,
`grouping`,
groupingMode,
@@ -54881,7 +55357,6 @@ BEGIN
price2,
price3,
minPrice,
- ishStickers,
workerFk,
isChecked,
isPickedOff,
@@ -54892,6 +55367,7 @@ BEGIN
FROM vn.buy
WHERE id = vBuyFk;
+ UPDATE buy SET printedStickers = vIshStickers WHERE id = LAST_INSERT_ID();
END IF;
END LOOP;
@@ -54902,6 +55378,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `entry_splitMisfit` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -54909,8 +55387,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `entry_splitMisfit`(vSelf INT)
BEGIN
@@ -54949,6 +55425,34 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
+/*!50003 DROP PROCEDURE IF EXISTS `entry_unlock` */;
+/*!50003 SET @saved_cs_client = @@character_set_client */ ;
+/*!50003 SET @saved_cs_results = @@character_set_results */ ;
+/*!50003 SET @saved_col_connection = @@collation_connection */ ;
+/*!50003 SET character_set_client = utf8mb4 */ ;
+/*!50003 SET character_set_results = utf8mb4 */ ;
+/*!50003 SET collation_connection = utf8mb4_unicode_ci */ ;
+DELIMITER ;;
+CREATE DEFINER=`root`@`localhost` PROCEDURE `entry_unlock`(vSelf INT)
+BEGIN
+/**
+ * Unlock the indicated entry
+ * @vSelf params entry id
+ */
+ UPDATE `entry`
+ SET lockerUserFk = NULL,
+ locked = NULL
+ WHERE id = vSelf;
+END ;;
+DELIMITER ;
+/*!50003 SET sql_mode = @saved_sql_mode */ ;
+/*!50003 SET character_set_client = @saved_cs_client */ ;
+/*!50003 SET character_set_results = @saved_cs_results */ ;
+/*!50003 SET collation_connection = @saved_col_connection */ ;
+/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `entry_updateComission` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -54956,8 +55460,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `entry_updateComission`(vCurrency INT)
BEGIN
@@ -54966,6 +55468,9 @@ BEGIN
*
* @param vCurrency id del tipo de moneda(SAR,EUR,USD,GBP,JPY)
*/
+ DECLARE vCurrencyName VARCHAR(25);
+ DECLARE vComission INT;
+
CREATE OR REPLACE TEMPORARY TABLE tmp.recalcEntryCommision
SELECT e.id
FROM vn.entry e
@@ -54974,11 +55479,22 @@ BEGIN
WHERE t.shipped >= util.VN_CURDATE()
AND e.currencyFk = vCurrency;
+ SET vComission = currency_getCommission(vCurrency);
+
UPDATE vn.entry e
JOIN tmp.recalcEntryCommision tmp ON tmp.id = e.id
- SET e.commission = currency_getCommission(vCurrency);
+ SET e.commission = vComission;
+
+ SELECT `name` INTO vCurrencyName
+ FROM currency
+ WHERE id = vCurrency;
CALL entry_recalc();
+ SELECT util.notification_send(
+ 'entry-update-comission',
+ JSON_OBJECT('currencyName', vCurrencyName, 'referenceCurrent', vComission),
+ NULL
+ );
DROP TEMPORARY TABLE tmp.recalcEntryCommision;
END ;;
@@ -54987,6 +55503,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `errorProduction_add` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -54994,8 +55512,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `errorProduction_add`(
vAction VARCHAR(25),
@@ -55201,6 +55717,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `errorProduction_addLauncher` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -55208,8 +55726,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `errorProduction_addLauncher`()
BEGIN
@@ -55227,6 +55743,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `expeditionGetFromRoute` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -55234,8 +55752,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `expeditionGetFromRoute`(
vExpeditionFk INT)
@@ -55272,6 +55788,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `expeditionPallet_build` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -55279,8 +55797,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `expeditionPallet_build`(IN vExpeditions JSON, IN vArcId INT, IN vWorkerFk INT, OUT vPalletFk INT)
BEGIN
@@ -55385,6 +55901,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `expeditionPallet_Del` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -55392,8 +55910,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `expeditionPallet_Del`(vPalletFk INT)
BEGIN
@@ -55407,6 +55923,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `expeditionPallet_List` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -55414,8 +55932,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `expeditionPallet_List`(vTruckFk INT)
BEGIN
@@ -55436,6 +55952,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `expeditionPallet_printLabel` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -55443,8 +55961,6 @@ DELIMITER ;
/*!50003 SET character_set_client = utf8mb3 */ ;
/*!50003 SET character_set_results = utf8mb3 */ ;
/*!50003 SET collation_connection = utf8mb3_general_ci */ ;
-/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
-/*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `expeditionPallet_printLabel`(vSelf INT)
BEGIN
@@ -55478,6 +55994,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `expeditionPallet_View` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -55485,8 +56003,6 @@ DELIMITER ;
/*!50003 SET character_set_client = utf8mb3 */ ;
/*!50003 SET character_set_results = utf8mb3 */ ;
/*!50003 SET collation_connection = utf8mb3_general_ci */ ;
-/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
-/*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `expeditionPallet_View`(vPalletFk INT)
BEGIN
@@ -55507,6 +56023,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `expeditionScan_Add` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -55514,8 +56032,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `expeditionScan_Add`(vPalletFk INT, vTruckFk INT)
BEGIN
@@ -55547,6 +56063,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `expeditionScan_Del` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -55554,8 +56072,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `expeditionScan_Del`(vScanFk INT)
BEGIN
@@ -55569,6 +56085,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `expeditionScan_List` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -55576,8 +56094,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `expeditionScan_List`(vPalletFk INT)
BEGIN
@@ -55599,6 +56115,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `expeditionScan_Put` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -55606,8 +56124,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `expeditionScan_Put`(vPalletFk INT, vExpeditionFk INT)
BEGIN
@@ -55623,6 +56139,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `expeditionState_add` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -55630,8 +56148,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `expeditionState_add`(vParam INT, vStateCode VARCHAR(100))
BEGIN
@@ -55667,6 +56183,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `expeditionState_addByAdress` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -55674,8 +56192,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `expeditionState_addByAdress`(vAdressFk INT, vRouteFk INT, vStateCode VARCHAR(100))
BEGIN
@@ -55701,6 +56217,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `expeditionState_addByExpedition` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -55708,8 +56226,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `expeditionState_addByExpedition`(vExpeditionFk INT, vStateCode VARCHAR(100))
BEGIN
@@ -55732,6 +56248,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `expeditionState_addByPallet` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -55739,8 +56257,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `expeditionState_addByPallet`(vPalletFk INT, vStateCode VARCHAR(100))
BEGIN
@@ -55776,6 +56292,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `expeditionState_addByRoute` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -55783,8 +56301,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `expeditionState_addByRoute`(vRouteFk INT, vStateCode VARCHAR(100))
BEGIN
@@ -55809,6 +56325,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `expeditionTruck_Add` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -55816,8 +56334,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `expeditionTruck_Add`(vHour VARCHAR(5), vDescription VARCHAR(45))
BEGIN
@@ -55831,6 +56347,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `expeditionTruck_List` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -55838,8 +56356,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `expeditionTruck_List`()
BEGIN
@@ -55856,6 +56372,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `expedition_getFromRoute` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -55863,8 +56381,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `expedition_getFromRoute`(vRouteFk INT)
BEGIN
@@ -55908,6 +56424,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `expedition_getState` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -55915,8 +56433,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `expedition_getState`(vExpeditionFk INT)
BEGIN
@@ -55978,6 +56494,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `expedition_StateGet` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -55985,8 +56503,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `expedition_StateGet`(vExpeditionFk INT)
BEGIN
@@ -56065,6 +56581,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `freelance_getInfo` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -56072,8 +56590,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `freelance_getInfo`(workerFk INT)
BEGIN
@@ -56092,6 +56608,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `fustControl` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -56099,8 +56617,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `fustControl`(vFromDated DATE, vToDated DATE)
BEGIN
@@ -56184,6 +56700,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `fustControlDetail` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -56191,8 +56709,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `fustControlDetail`(vFromDated DATE, vToDated DATE)
BEGIN
@@ -56233,6 +56749,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `fv_pca` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -56240,8 +56758,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `fv_pca`()
BEGIN
@@ -56347,6 +56863,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `getDayExpeditions` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -56354,8 +56872,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `getDayExpeditions`()
BEGIN
@@ -56375,6 +56891,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `getInfoDelivery` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -56382,8 +56900,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `getInfoDelivery`(vRouteFk INT)
BEGIN
@@ -56398,6 +56914,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `getPedidosInternos` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -56405,8 +56923,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `getPedidosInternos`()
BEGIN
@@ -56419,6 +56935,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `greuge_add` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -56426,8 +56944,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `greuge_add`()
BEGIN
@@ -56454,6 +56970,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `greuge_notifyEvents` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -56461,8 +56979,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `greuge_notifyEvents`()
BEGIN
@@ -56539,6 +57055,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `inventoryFailureAdd` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -56546,8 +57064,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `inventoryFailureAdd`()
BEGIN
@@ -56600,6 +57116,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `inventoryMake` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -56607,8 +57125,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `inventoryMake`(vDate DATE, vWh INT)
proc: BEGIN
@@ -56623,7 +57139,10 @@ proc: BEGIN
DECLARE vEntryFk INT;
DECLARE vTravelFk INT;
DECLARE vDateLastInventory DATE;
- DECLARE vDateYesterday DATETIME DEFAULT TIMESTAMPADD(SECOND,-1,vDate);
+ DECLARE vDateYesterday DATETIME DEFAULT vDate - INTERVAL 1 SECOND;
+ DECLARE vWarehouseOutFkInventory INT;
+ DECLARE vInventorySupplierFk INT;
+ DECLARE vAgencyModeFkInventory INT;
DECLARE cWarehouses CURSOR FOR
SELECT id
@@ -56631,10 +57150,7 @@ proc: BEGIN
WHERE isInventory
AND vWh IN (0,id);
- DECLARE CONTINUE HANDLER FOR NOT FOUND
- SET vDone = TRUE;
-
- SELECT vDateYesterday;
+ DECLARE CONTINUE HANDLER FOR NOT FOUND SET vDone = TRUE;
OPEN cWarehouses;
SET @isModeInventory := TRUE;
@@ -56647,13 +57163,24 @@ proc: BEGIN
LEAVE l;
END IF;
+ SELECT w.id INTO vWarehouseOutFkInventory
+ FROM warehouse w
+ WHERE w.code = 'inv';
+
+ SELECT inventorySupplierFk INTO vInventorySupplierFk
+ FROM entryConfig;
+
+ SELECT am.id INTO vAgencyModeFkInventory
+ FROM agencyMode am
+ where code = 'inv';
+
SELECT MAX(landed) INTO vDateLastInventory
FROM travel tr
- JOIN entry e ON e.travelFk = tr.id
- JOIN buy b ON b.entryFk = e.id
- WHERE warehouseOutFk = 13
+ JOIN entry e ON e.travelFk = tr.id
+ JOIN buy b ON b.entryFk = e.id
+ WHERE warehouseOutFk = vWarehouseOutFkInventory
AND landed < vDate
- AND e.supplierFk = 4
+ AND e.supplierFk = vInventorySupplierFk
AND warehouseInFk = vWh
AND NOT isRaid;
@@ -56666,21 +57193,21 @@ proc: BEGIN
SELECT id INTO vTravelFk
FROM travel
- WHERE warehouseOutFk = 13
+ WHERE warehouseOutFk = vWarehouseOutFkInventory
AND warehouseInFk = vWh
AND landed = vDate
- AND agencyModeFk = 53
+ AND agencyModeFk = vAgencyModeFkInventory
AND ref = 'inventario'
LIMIT 1;
IF NOT vTravelFK THEN
INSERT INTO travel SET
- warehouseOutFk = 13,
+ warehouseOutFk = vWarehouseOutFkInventory,
warehouseInFk = vWh,
shipped = vDate,
landed = vDate,
- agencyModeFk = 53,
+ agencyModeFk = vAgencyModeFkInventory,
ref = 'inventario',
isDelivered = TRUE,
isReceived = TRUE;
@@ -56694,13 +57221,13 @@ proc: BEGIN
SELECT id INTO vEntryFk
FROM entry
- WHERE supplierFk = 4
+ WHERE supplierFk = vInventorySupplierFk
AND travelFk = vTravelFk;
IF NOT vEntryFk THEN
INSERT INTO entry SET
- supplierFk = 4,
+ supplierFk = vInventorySupplierFk,
isConfirmed = TRUE,
isOrdered = TRUE,
travelFk = vTravelFk;
@@ -56714,34 +57241,30 @@ proc: BEGIN
END IF;
-- Preparamos tabla auxilar
- DROP TEMPORARY TABLE IF EXISTS tmp.inventory;
-
- CREATE TEMPORARY TABLE tmp.inventory
- (
- itemFk INT(11) NOT NULL PRIMARY KEY,
- quantity int(11) DEFAULT '0',
- buyingValue decimal(10,3) DEFAULT '0.000',
- freightValue decimal(10,3) DEFAULT '0.000',
- packing int(11) DEFAULT '0',
- `grouping` smallint(5) unsigned NOT NULL DEFAULT '1',
- groupingMode tinyint(4) NOT NULL DEFAULT 0 ,
- comissionValue decimal(10,3) DEFAULT '0.000',
- packageValue decimal(10,3) DEFAULT '0.000',
- packageFk varchar(10) COLLATE utf8_unicode_ci DEFAULT '--',
- price1 decimal(10,2) DEFAULT '0.00',
- price2 decimal(10,2) DEFAULT '0.00',
- price3 decimal(10,2) DEFAULT '0.00',
- minPrice decimal(10,2) DEFAULT '0.00',
- producer varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
- INDEX (itemFK))
- ENGINE = MEMORY ;
+ CREATE OR REPLACE TEMPORARY TABLE tmp.inventory (
+ itemFk INT(11) NOT NULL PRIMARY KEY,
+ quantity int(11) DEFAULT '0',
+ buyingValue decimal(10,3) DEFAULT '0.000',
+ freightValue decimal(10,3) DEFAULT '0.000',
+ packing int(11) DEFAULT '0',
+ `grouping` smallint(5) unsigned NOT NULL DEFAULT '1',
+ groupingMode tinyint(4) NOT NULL DEFAULT 0 ,
+ comissionValue decimal(10,3) DEFAULT '0.000',
+ packageValue decimal(10,3) DEFAULT '0.000',
+ packageFk varchar(10) COLLATE utf8_unicode_ci DEFAULT '--',
+ price1 decimal(10,2) DEFAULT '0.00',
+ price2 decimal(10,2) DEFAULT '0.00',
+ price3 decimal(10,2) DEFAULT '0.00',
+ minPrice decimal(10,2) DEFAULT '0.00',
+ producer varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
+ INDEX (itemFK)) ENGINE = MEMORY;
-- Compras
INSERT INTO tmp.inventory(itemFk,quantity)
- SELECT b.itemFk, sum(b.quantity)
+ SELECT b.itemFk, SUM(b.quantity)
FROM buy b
- JOIN entry e ON e.id = b.entryFk
- JOIN travel tr ON tr.id = e.travelFk
+ JOIN entry e ON e.id = b.entryFk
+ JOIN travel tr ON tr.id = e.travelFk
WHERE tr.warehouseInFk = vWh
AND tr.landed BETWEEN vDateLastInventory
AND vDateYesterday
@@ -56750,93 +57273,92 @@ proc: BEGIN
SELECT vDateLastInventory , vDateYesterday;
-- Traslados
- INSERT INTO tmp.inventory(itemFk,quantity)
+ INSERT INTO tmp.inventory(itemFk, quantity)
SELECT itemFk, quantityOut
FROM (
- SELECT b.itemFk, -sum(b.quantity) quantityOut
+ SELECT b.itemFk,- SUM(b.quantity) quantityOut
FROM buy b
- JOIN entry e ON e.id = b.entryFk
- JOIN travel tr ON tr.id = e.travelFk
+ JOIN entry e ON e.id = b.entryFk
+ JOIN travel tr ON tr.id = e.travelFk
WHERE tr.warehouseOutFk = vWh
AND tr.shipped BETWEEN vDateLastInventory
AND vDateYesterday
AND NOT isRaid
GROUP BY b.itemFk
) sub
- ON DUPLICATE KEY UPDATE quantity = IFNULL(quantity,0) + sub.quantityOut;
+ ON DUPLICATE KEY UPDATE quantity = IFNULL(quantity, 0) + sub.quantityOut;
-- Ventas
INSERT INTO tmp.inventory(itemFk,quantity)
SELECT itemFk, saleOut
FROM (
- SELECT s.itemFk, -sum(s.quantity) saleOut
+ SELECT s.itemFk, - SUM(s.quantity) saleOut
FROM sale s
- JOIN ticket t ON t.id = s.ticketFk
+ JOIN ticket t ON t.id = s.ticketFk
WHERE t.warehouseFk = vWh
AND t.shipped BETWEEN vDateLastInventory AND vDateYesterday
GROUP BY s.itemFk
) sub
- ON DUPLICATE KEY UPDATE quantity = IFNULL(quantity,0) + sub.saleOut;
+ ON DUPLICATE KEY UPDATE quantity = IFNULL(quantity,0) + sub.saleOut;
-- Actualiza valores de la ultima compra
UPDATE tmp.inventory inv
- JOIN cache.last_buy lb ON lb.item_id = inv.itemFk AND lb.warehouse_id = vWh
- JOIN buy b ON b.id = lb.buy_id
- JOIN item i ON i.id = b.itemFk
- LEFT JOIN producer p ON p.id = i.producerFk
- SET
- inv.buyingValue = b.buyingValue,
- inv.freightValue = b.freightValue,
- inv.packing = b.packing,
- inv.`grouping` = b.`grouping`,
- inv.groupingMode = b.groupingMode,
+ JOIN cache.last_buy lb ON lb.item_id = inv.itemFk AND lb.warehouse_id = vWh
+ JOIN buy b ON b.id = lb.buy_id
+ JOIN item i ON i.id = b.itemFk
+ LEFT JOIN producer p ON p.id = i.producerFk
+ SET inv.buyingValue = b.buyingValue,
+ inv.freightValue = b.freightValue,
+ inv.packing = b.packing,
+ inv.`grouping`= b.`grouping`,
+ inv.groupingMode = b.groupingMode,
inv.comissionValue = b.comissionValue,
- inv.packageValue = b.packageValue,
- inv.packageFk = b.packageFk,
- inv.price1 = b.price1,
- inv.price2 = b.price2,
- inv.price3 = b.price3,
- inv.minPrice = b.minPrice,
- inv.producer = p.name;
+ inv.packageValue = b.packageValue,
+ inv.packageFk = b.packageFk,
+ inv.price1 = b.price1,
+ inv.price2 = b.price2,
+ inv.price3 = b.price3,
+ inv.minPrice = b.minPrice,
+ inv.producer = p.name;
- INSERT INTO buy( itemFk,
- quantity,
- buyingValue,
- freightValue,
- packing,
- `grouping`,
- groupingMode,
- comissionValue,
- packageValue,
- packageFk,
- price1,
- price2,
- price3,
- minPrice,
- entryFk)
- SELECT itemFk,
- GREATEST(quantity,0),
- buyingValue,
- freightValue,
- packing,
- `grouping`,
- groupingMode,
- comissionValue,
- packageValue,
- packageFk,
- price1,
- price2,
- price3,
- minPrice,
- vEntryFk
- FROM tmp.inventory;
+ INSERT INTO buy( itemFk,
+ quantity,
+ buyingValue,
+ freightValue,
+ packing,
+ `grouping`,
+ groupingMode,
+ comissionValue,
+ packageValue,
+ packageFk,
+ price1,
+ price2,
+ price3,
+ minPrice,
+ entryFk)
+ SELECT itemFk,
+ GREATEST(quantity, 0),
+ buyingValue,
+ freightValue,
+ packing,
+ `grouping`,
+ groupingMode,
+ comissionValue,
+ packageValue,
+ packageFk,
+ price1,
+ price2,
+ price3,
+ minPrice,
+ vEntryFk
+ FROM tmp.inventory;
- SELECT vWh, count(*), util.VN_NOW() FROM tmp.inventory;
+ SELECT vWh, COUNT(*), util.VN_NOW() FROM tmp.inventory;
- -- Actualizamos el campo lastUsed de vn.item
- UPDATE vn.item i
- JOIN tmp.inventory i2 ON i2.itemFk = i.id
- SET i.lastUsed = util.VN_NOW()
+ -- Actualizamos el campo lastUsed de item
+ UPDATE item i
+ JOIN tmp.inventory i2 ON i2.itemFk = i.id
+ SET i.lastUsed = NOW()
WHERE i2.quantity;
-- DROP TEMPORARY TABLE tmp.inventory;
@@ -56852,19 +57374,19 @@ proc: BEGIN
CREATE TEMPORARY TABLE tmp.entryToDelete
(INDEX(entryId) USING BTREE) ENGINE = MEMORY
SELECT e.id as entryId,
- t.id as travelId
- FROM vn.travel t
- JOIN vn.entry e ON e.travelFk = t.id
- WHERE e.supplierFk = 4
- AND t.shipped <= TIMESTAMPADD(DAY, -2, TIMESTAMPADD(DAY, -10, util.VN_CURDATE()))
- AND (DAY(t.shipped) <> 1 OR shipped < TIMESTAMPADD(MONTH, -12, util.VN_CURDATE()));
+ t.id as travelId
+ FROM travel t
+ JOIN `entry` e ON e.travelFk = t.id
+ WHERE e.supplierFk = vInventorySupplierFk
+ AND t.shipped <= util.VN_CURDATE() - INTERVAL 12 DAY
+ AND (DAY(t.shipped) <> 1 OR shipped < util.VN_CURDATE() - INTERVAL 12 DAY);
DELETE e
- FROM vn.entry e
+ FROM `entry` e
JOIN tmp.entryToDelete tmp ON tmp.entryId = e.id;
DELETE IGNORE t
- FROM vn.travel t
+ FROM travel t
JOIN tmp.entryToDelete tmp ON tmp.travelId = t.id;
END ;;
DELIMITER ;
@@ -56872,6 +57394,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `inventoryMakeLauncher` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -56879,8 +57403,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `inventoryMakeLauncher`()
BEGIN
@@ -56896,6 +57418,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `inventory_repair` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -56903,8 +57427,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `inventory_repair`()
BEGIN
@@ -57020,6 +57542,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `invoiceExpenceMake` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -57027,8 +57551,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `invoiceExpenceMake`(IN vInvoice INT)
BEGIN
@@ -57063,6 +57585,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `invoiceFromAddress` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -57070,8 +57594,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `invoiceFromAddress`(vMaxTicketDate DATETIME,vAddress INT,vCompany INT)
BEGIN
@@ -57095,6 +57617,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `invoiceFromClient` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -57102,8 +57626,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `invoiceFromClient`(
IN vMaxTicketDate datetime,
@@ -57130,6 +57652,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `invoiceFromTicket` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -57137,8 +57661,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `invoiceFromTicket`(IN vTicket INT)
BEGIN
@@ -57157,6 +57679,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `invoiceInDueDay_calculate` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -57164,49 +57688,76 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `invoiceInDueDay_calculate`(vInvoiceInFk INT)
BEGIN
+/**
+ * Calcula los vctos. de una factura recibida
+ * En caso de haberlos informado previamente o que el proveedor sea español, no los recalculará
+ *
+ * @param vInvoiceInFk Factura recibida
+ */
+ DECLARE vCompanyCountryCode VARCHAR(3);
+ DECLARE vHasDueDayTax BOOL;
+ DECLARE vHasDueDay BOOL;
- IF !(SELECT COUNT(*)
- FROM invoiceInDueDay iid
- WHERE iid.invoiceInFk = vInvoiceInFk) THEN
+ SELECT c.code, IFNULL(a.isUeeMember, TRUE AND co.code ='ES')
+ INTO vCompanyCountryCode, vHasDueDayTax
+ FROM invoiceIn ii
+ JOIN supplier su ON su.id = ii.companyFk
+ LEFT JOIN country c ON c.id = su.countryFk
+ LEFT JOIN supplier s ON s.id = ii.supplierFk
+ LEFT JOIN country co ON co.id = s.countryFk
+ LEFT JOIN province p ON p.id = s.provinceFk
+ LEFT JOIN autonomy a ON a.id = p.autonomyFk
+ WHERE ii.id = vInvoiceInFk;
- INSERT INTO invoiceInDueDay (invoiceInFk,
- dueDated,
- amount,
- foreignValue)
- SELECT vInvoiceInFk,
- IF(payDay,
- IF(vn.getNextDueDate(issued, detail, payDay) < DATE_ADD(created, INTERVAL 2 DAY),
- DATE_ADD(created, INTERVAL 2 DAY),
- vn.getNextDueDate(issued, detail, payDay)),
- GREATEST(TIMESTAMPADD(DAY, 2, created), TIMESTAMPADD(DAY, detail, issued))),
- IF((@cont:=@cont + 1) < cont, TRUNCATE(venc / cont, 2),venc-(TRUNCATE(venc / cont, 2) * (cont - 1))),
- IF(@cont < cont, TRUNCATE(foreignValue / cont, 2), foreignValue - (TRUNCATE(foreignValue / cont, 2) * (cont - 1)))
- FROM ( SELECT SUM((1 + (IFNULL(ti.PorcentajeIva, 0) / 100)*(s.countryFk = s2.countryFk)) * iit.taxableBase)/COUNT(DISTINCT(pdd.detail)) venc,
- SUM(iit.foreignValue)/COUNT(DISTINCT(pdd.detail)) foreignValue,
- s.payDemFk,
- ii.companyFk,
- COUNT(DISTINCT(pdd.detail)) cont,
- s.payDay,
- ii.issued,
- DATE(ii.created) created
- FROM invoiceIn ii
- JOIN invoiceInTax iit ON iit.invoiceInFk = ii.id
- LEFT JOIN sage.TiposIva AS ti ON ti.CodigoIva= iit.taxTypeSageFk
- JOIN supplier s ON s.id = ii.supplierFk
- JOIN supplier s2 ON s2.id = ii.companyFk
- JOIN vn.payDemDetail pdd ON pdd.id = s.payDemFk
- WHERE ii.id = vInvoiceInFk
- GROUP BY ii.id
- ) sub
- JOIN (SELECT @cont:=0) sub2
- JOIN vn.payDemDetail pdd ON pdd.id = sub.payDemFk
- GROUP BY detail;
- END IF;
+ SELECT COUNT(*) INTO vHasDueDay
+ FROM invoiceInDueDay iid
+ WHERE iid.invoiceInFk = vInvoiceInFk;
+
+ IF NOT vHasDueDay AND vCompanyCountryCode = 'ES' THEN
+
+ SET @cont := 0;
+ INSERT INTO invoiceInDueDay (
+ invoiceInFk,
+ dueDated,
+ amount,
+ foreignValue
+ )
+ SELECT vInvoiceInFk,
+ IF(payDay,
+ IF(getNextDueDate(issued, pdd.detail, payDay) < created,
+ created,
+ getNextDueDate(issued, pdd.detail, payDay)),
+ GREATEST(created, issued + INTERVAL pdd.detail DAY)),
+ IF((@cont := @cont + 1) < cont,
+ TRUNCATE(venc / cont, 2),
+ venc - (TRUNCATE(venc / cont, 2) * (cont - 1))),
+ IF(@cont < cont,
+ TRUNCATE(foreignValue / cont, 2),
+ foreignValue - (TRUNCATE(foreignValue / cont, 2) * (cont - 1)))
+ FROM (
+ SELECT SUM((1 + (IFNULL(ti.PorcentajeIva, 0) / 100) * vHasDueDayTax)
+ * iit.taxableBase) / COUNT(DISTINCT(pdd.detail)) venc,
+ SUM(iit.foreignValue) / COUNT(DISTINCT(pdd.detail)) foreignValue,
+ s.payDemFk,
+ ii.companyFk,
+ COUNT(DISTINCT(pdd.detail)) cont,
+ s.payDay,
+ ii.issued,
+ DATE(ii.created) + INTERVAL 2 DAY created
+ FROM invoiceIn ii
+ JOIN invoiceInTax iit ON iit.invoiceInFk = ii.id
+ LEFT JOIN sage.TiposIva ti ON ti.CodigoIva= iit.taxTypeSageFk
+ JOIN supplier s ON s.id = ii.supplierFk
+ JOIN payDemDetail pdd ON pdd.id = s.payDemFk
+ WHERE ii.id = vInvoiceInFk
+ GROUP BY ii.id
+ )sub
+ JOIN payDemDetail pdd ON pdd.id = sub.payDemFk
+ GROUP BY pdd.detail;
+ END IF;
END ;;
DELIMITER ;
@@ -57214,6 +57765,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `invoiceInDueDay_recalc` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -57221,8 +57774,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `invoiceInDueDay_recalc`(vInvoiceInFk INT)
BEGIN
@@ -57238,6 +57789,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `invoiceInTaxMakeByDua` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -57245,8 +57798,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `invoiceInTaxMakeByDua`(vDuaFk INT)
BEGIN
@@ -57283,6 +57834,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `invoiceInTax_getFromDua` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -57290,8 +57843,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `invoiceInTax_getFromDua`(vDuaFk INT)
BEGIN
@@ -57328,6 +57879,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `invoiceInTax_getFromEntries` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -57335,8 +57888,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `invoiceInTax_getFromEntries`(IN vId INT)
BEGIN
@@ -57386,6 +57937,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `invoiceIn_booking` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -57393,21 +57946,19 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `invoiceIn_booking`(vSelf INT)
BEGIN
DECLARE vBookNumber INT;
- DROP TEMPORARY TABLE IF EXISTS tInvoiceIn;
- CREATE TEMPORARY TABLE tInvoiceIn
+ CREATE OR REPLACE TEMPORARY TABLE tInvoiceIn
ENGINE = MEMORY
SELECT ii.bookEntried,
iit.foreignValue,
ii.companyFk,
ii.expenceFkDeductible,
iit.taxableBase,
+ iit.transactionTypeSageFk,
ii.serial,
ii.issued,
ii.operated,
@@ -57423,6 +57974,7 @@ BEGIN
s.account supplierAccount,
s.name supplierName,
s.nif,
+ s.IsVies,
iit.taxTypeSageFk,
tt.code taxCode,
ti.Iva,
@@ -57646,8 +58198,12 @@ BEGIN
tii.supplierName TERNOM,
tii.companyFk
FROM tInvoiceIn tii
+ JOIN sage.config c
WHERE tii.taxCode = 'ISP21' OR MID(tii.supplierAccount, 4, 1) = '1'
AND tii.taxTypeSageFk IS NOT NULL
+ AND NOT(tii.isVies
+ AND c.nontaxableTransactionTypeFk = tii.transactionTypeSageFk
+ AND tii.taxCode = 'nonTaxable')
GROUP BY tii.PorcentajeIva, tii.expenceFk;
-- Actualización del registro original
@@ -57677,6 +58233,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `invoiceOutAgain` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -57684,8 +58242,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `invoiceOutAgain`(IN vInvoiceRef VARCHAR(15), vTaxArea VARCHAR(25))
BEGIN
@@ -57747,6 +58303,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `invoiceOutBooking` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -57754,8 +58312,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `invoiceOutBooking`(IN vInvoice INT)
BEGIN
@@ -57954,6 +58510,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `invoiceOutBookingRange` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -57961,8 +58519,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `invoiceOutBookingRange`()
BEGIN
@@ -58014,6 +58570,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `invoiceOutDelete` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -58021,8 +58579,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `invoiceOutDelete`(vRef VARCHAR(15))
BEGIN
@@ -58093,6 +58649,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `invoiceOutListByCompany` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -58100,8 +58658,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `invoiceOutListByCompany`(vCompany INT, vStarted DATE, vEnded DATE)
BEGIN
@@ -58133,6 +58689,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `invoiceOutTaxAndExpence` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -58140,8 +58698,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `invoiceOutTaxAndExpence`()
BEGIN
@@ -58222,6 +58778,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `invoiceOut_exportationFromClient` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -58229,8 +58787,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `invoiceOut_exportationFromClient`(
vMaxTicketDate DATETIME,
@@ -58267,15 +58823,15 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `invoiceOut_new` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
-/*!50003 SET character_set_client = utf8mb3 */ ;
-/*!50003 SET character_set_results = utf8mb3 */ ;
-/*!50003 SET collation_connection = utf8mb3_general_ci */ ;
-/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
-/*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ;
+/*!50003 SET character_set_client = utf8mb4 */ ;
+/*!50003 SET character_set_results = utf8mb4 */ ;
+/*!50003 SET collation_connection = utf8mb4_unicode_ci */ ;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `invoiceOut_new`(
vSerial VARCHAR(255),
@@ -58552,6 +59108,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `invoiceOut_newFromClient` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -58559,8 +59117,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `invoiceOut_newFromClient`(
IN vClientFk INT,
@@ -58621,6 +59177,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `invoiceOut_newFromTicket` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -58628,8 +59186,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `invoiceOut_newFromTicket`(IN vTicketFk int, IN vSerial char(2), IN vTaxArea varchar(25),
IN vRef varchar(25), OUT vInvoiceId int)
@@ -58668,6 +59224,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `invoiceTaxMake` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -58675,8 +59233,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `invoiceTaxMake`(vInvoice INT, vTaxArea VARCHAR(25))
BEGIN
@@ -58725,6 +59281,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `itemBarcode_update` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -58732,8 +59290,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `itemBarcode_update`(vItemFk INT,vCode VARCHAR(22), vDelete BOOL)
BEGIN
@@ -58749,6 +59305,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `itemFreight_Show` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -58756,8 +59314,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `itemFreight_Show`(vItemFk INT, vWarehouseFk INT)
BEGIN
@@ -58789,6 +59345,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `itemFuentesBalance` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -58796,8 +59354,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `itemFuentesBalance`(vDaysInFuture INT)
BEGIN
@@ -58882,6 +59438,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `itemPlacementFromTicket` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -58889,8 +59447,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `itemPlacementFromTicket`(vTicket INT)
BEGIN
@@ -58919,6 +59475,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `itemPlacementSupplyAiming` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -58926,8 +59484,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `itemPlacementSupplyAiming`(vShelvingFk VARCHAR(10), quantity INT, vItemFk INT)
BEGIN
@@ -58962,6 +59518,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `itemPlacementSupplyCloseOrder` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -58969,8 +59527,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `itemPlacementSupplyCloseOrder`(vId INT, vQuantity INT)
BEGIN
@@ -58985,6 +59541,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `itemPlacementSupplyGetOrder` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -58992,8 +59550,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `itemPlacementSupplyGetOrder`(vSector INT )
BEGIN
@@ -59035,6 +59591,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `itemPlacementSupplyStockGetTargetList` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -59042,8 +59600,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `itemPlacementSupplyStockGetTargetList`(vItemFk INT,vSectorFk INT)
BEGIN
@@ -59082,6 +59638,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `itemProposal` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -59089,8 +59647,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `itemProposal`(vItemFk INT, vTicketFk INT,vShowType BOOL)
BEGIN
@@ -59182,6 +59738,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `itemProposal_Add` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -59189,8 +59747,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `itemProposal_Add`(vSaleFk INT, vMateFk INT, vQuantity INT)
BEGIN
@@ -59254,6 +59810,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `itemProposal_beta` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -59261,8 +59819,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `itemProposal_beta`(vItemFk INT, vTicketFk INT)
BEGIN
@@ -59343,6 +59899,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `itemRefreshTags` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -59350,8 +59908,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `itemRefreshTags`(IN vItem INT)
BEGIN
@@ -59376,6 +59932,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `itemSale_byWeek` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -59383,8 +59941,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `itemSale_byWeek`(vWeek INT, IN vYear INT, vItemFk INT, vWarehouseFk INT)
BEGIN
@@ -59399,7 +59955,6 @@ BEGIN
SELECT t.shipped,
w.name warehouse,
s.ticketFk,
- c.quality,
t.nickname client,
am.name agencyName,
wk.code salesPerson,
@@ -59435,6 +59990,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `itemSaveMin` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -59442,8 +59999,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `itemSaveMin`(min INT,vBarcode VARCHAR(22))
BEGIN
@@ -59461,6 +60016,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `itemSearchShelving` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -59468,8 +60025,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `itemSearchShelving`(`vShelvingFk` VARCHAR(3))
BEGIN
@@ -59483,6 +60038,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `itemShelvingDelete` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -59490,8 +60047,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `itemShelvingDelete`(vId INT)
BEGIN
@@ -59504,6 +60059,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `itemShelvingLog_get` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -59511,8 +60068,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `itemShelvingLog_get`(vShelvingFk VARCHAR(10) )
BEGIN
@@ -59552,6 +60107,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `itemShelvingMakeFromDate` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -59559,8 +60116,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `itemShelvingMakeFromDate`(IN `vShelvingFk` VARCHAR(8), IN `vBarcode` VARCHAR(22), IN `vQuantity` INT, IN `vPackagingFk` VARCHAR(10), IN `vGrouping` INT, IN `vPacking` INT, IN `vWarehouseFk` INT, `vCreated` VARCHAR(22))
BEGIN
@@ -59623,6 +60178,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `itemShelvingMatch` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -59630,8 +60187,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `itemShelvingMatch`(vEntryFk INT, vAllTravel BOOLEAN, vFromTimed DATETIME, vToTimed DATETIME)
BEGIN
@@ -59667,6 +60222,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `itemShelvingPlacementSupplyAdd` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -59674,8 +60231,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `itemShelvingPlacementSupplyAdd`(vItemShelvingFk INT, vItemPlacementSupplyFk INT, vQuantity INT)
BEGIN
@@ -59700,6 +60255,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `itemShelvingProblem` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -59707,8 +60264,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `itemShelvingProblem`(vSectorFk INT)
BEGIN
@@ -59762,6 +60317,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `itemShelvingRadar` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -59769,8 +60326,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `itemShelvingRadar`(vSectorFk INT)
proc:BEGIN
@@ -59974,6 +60529,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `itemShelvingRadar_Entry` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -59981,8 +60538,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `itemShelvingRadar_Entry`(vEntryFk INT)
BEGIN
@@ -60039,6 +60594,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `itemShelvingRadar_Entry_State_beta` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -60046,8 +60603,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `itemShelvingRadar_Entry_State_beta`(vEntryFk INT)
BEGIN
@@ -60090,6 +60645,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `itemShelvingSale_Add` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -60097,8 +60654,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `itemShelvingSale_Add`(vItemShelvingFk INT, vSaleFk INT, vQuantity INT)
BEGIN
@@ -60132,6 +60687,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `itemShelvingTransfer` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -60139,8 +60696,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `itemShelvingTransfer`(vItemShelvingFk INT, vShelvingFk VARCHAR(3))
BEGIN
@@ -60190,6 +60745,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `itemShelving_add` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -60197,8 +60754,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `itemShelving_add`(IN vShelvingFk VARCHAR(8), IN vBarcode VARCHAR(22), IN vQuantity INT, IN vPackagingFk VARCHAR(10), IN vGrouping INT, IN vPacking INT, IN vWarehouseFk INT)
BEGIN
@@ -60266,6 +60821,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `itemShelving_addByClaim` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -60273,8 +60830,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `itemShelving_addByClaim`(vClaimFk INT, vShelvingFk VARCHAR(3))
BEGIN
@@ -60309,6 +60864,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `itemShelving_addList` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -60316,8 +60873,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `itemShelving_addList`(vShelvingFk VARCHAR(3), vList TEXT, vIsChecking BOOL, vWarehouseFk INT)
BEGIN
@@ -60369,6 +60924,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `itemShelving_BuyerGet` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -60376,8 +60933,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `itemShelving_BuyerGet`( )
BEGIN
@@ -60390,6 +60945,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `itemShelving_filterBuyer` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -60397,8 +60954,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `itemShelving_filterBuyer`(vBuyerFk INT, vWarehouseFk INT)
proc:BEGIN
@@ -60489,6 +61044,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `itemShelving_get` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -60496,8 +61053,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `itemShelving_get`(IN vSelf VARCHAR(8))
BEGIN
@@ -60527,15 +61082,15 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `itemShelving_getAlternatives` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
-/*!50003 SET character_set_client = utf8mb3 */ ;
-/*!50003 SET character_set_results = utf8mb3 */ ;
-/*!50003 SET collation_connection = utf8mb3_general_ci */ ;
-/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
-/*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ;
+/*!50003 SET character_set_client = utf8mb4 */ ;
+/*!50003 SET character_set_results = utf8mb4 */ ;
+/*!50003 SET collation_connection = utf8mb4_unicode_ci */ ;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `itemShelving_getAlternatives`(vShelvingFk VARCHAR(10))
BEGIN
@@ -60550,10 +61105,9 @@ BEGIN
JOIN shelving sh ON sh.code = is2.shelvingFk
JOIN parking p ON p.id = sh.parkingFk
JOIN sector s ON s.id = p.sectorFk
- LEFT JOIN operator o ON o.sectorFk = s.id
- LEFT JOIN worker w ON w.sectorFk = s.id AND w.id = account.myUser_getId()
+ LEFT JOIN operator o ON o.sectorFk = s.id AND o.workerFk = account.myUser_getId()
JOIN warehouse wh ON wh.id = s.warehouseFk
- JOIN itemShelving is3 ON is3.itemFk = is2.itemFk AND is3.shelvingFk = vShelvingFk COLLATE utf8_unicode_ci
+ JOIN itemShelving is3 ON is3.itemFk = is2.itemFk AND is3.shelvingFk = vShelvingFk COLLATE utf8_unicode_ci
WHERE is2.shelvingFk <> vShelvingFk COLLATE utf8_unicode_ci
GROUP BY is2.id
ORDER BY p.pickingOrder DESC;
@@ -60563,6 +61117,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `itemShelving_getInfo` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -60570,8 +61126,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `itemShelving_getInfo`(vItemFk VARCHAR(22))
BEGIN
@@ -60600,6 +61154,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `itemShelving_getSaleDate` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -60607,8 +61163,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `itemShelving_getSaleDate`(vShelvingFk VARCHAR(3))
BEGIN
@@ -60703,6 +61257,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `itemShelving_inventory` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -60710,56 +61266,74 @@ DELIMITER ;
/*!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 ;;
-CREATE DEFINER=`root`@`localhost` PROCEDURE `itemShelving_inventory`(vParkingFromFk INT, vParkingToFk INT)
+CREATE DEFINER=`root`@`localhost` PROCEDURE `itemShelving_inventory`(vParkingFromFk VARCHAR(8), vParkingToFk VARCHAR(8))
BEGIN
-
- /**
- * Devuelve un listado de ubicaciones a revisar
- *
- * @param vParkingFromFk Parking de partida, identificador de vn.parking
- * @param vParkingToFk Parking de llegada, identificador de vn.parking
- */
-
+/**
+ * Devuelve un listado de ubicaciones a revisar
+ *
+ * @param vParkingFromFk Parking de partida, identificador de parking
+ * @param vParkingToFk Parking de llegada, identificador de parking
+ */
DECLARE vSectorFk INT;
DECLARE vPickingOrderFrom INT;
DECLARE vPickingOrderTo INT;
SELECT p.sectorFk, p.pickingOrder INTO vSectorFk, vPickingOrderFrom
- FROM vn.parking p
- WHERE p.id = vParkingFromFk;
+ FROM parking p
+ WHERE p.code = vParkingFromFk COLLATE 'utf8mb3_general_ci';
SELECT p.pickingOrder INTO vPickingOrderTo
- FROM vn.parking p
- WHERE p.id = vParkingToFk;
+ FROM parking p
+ WHERE p.code = vParkingToFk COLLATE 'utf8mb3_general_ci';
- CALL vn.visible_getMisfit(vSectorFk);
+ CALL visible_getMisfit(vSectorFk);
- SELECT p.code parking ,
- ish.shelvingFk ,
+ SELECT ish.id,
+ p.pickingOrder,
+ p.code parking,
+ ish.shelvingFk,
ish.itemFk,
i.longName,
- ish.visible ,
- ish.visible / ish.packing packs,
- ish.packing,
- sm.visible - sm.parked faltan
- FROM vn.itemShelving ish
- JOIN vn.item i ON i.id = ish.itemFk
+ ish.visible,
+ p.sectorFk,
+ it.workerFk buyer,
+ CONCAT('http:',ic.url, '/catalog/1600x900/',i.image) urlImage,
+ ish.isChecked,
+ CASE
+ WHEN s.notPrepared > sm.parked THEN 0
+ WHEN sm.visible > sm.parked THEN 1
+ ELSE 2
+ END priority
+ FROM itemShelving ish
+ JOIN item i ON i.id = ish.itemFk
+ JOIN itemType it ON it.id = i.typeFk
JOIN tmp.stockMisfit sm ON sm.itemFk = ish.itemFk
- JOIN vn.shelving sh ON sh.code = ish.shelvingFk
- JOIN vn.parking p ON p.id = sh.parkingFk
+ JOIN shelving sh ON sh.code = ish.shelvingFk
+ JOIN parking p ON p.id = sh.parkingFk
+ JOIN (
+ SELECT s.itemFk, sum(s.quantity) notPrepared
+ FROM sale s
+ JOIN ticket t ON t.id = s.ticketFk
+ JOIN warehouse w ON w.id = t.warehouseFk
+ JOIN config c ON c.mainWarehouseFk = w.id
+ WHERE t.shipped BETWEEN util.VN_CURDATE()
+ AND util.dayEnd(util.VN_CURDATE())
+ AND s.isPicked = FALSE
+ GROUP BY s.itemFk
+ ) s ON s.itemFk = i.id
+ JOIN hedera.imageConfig ic
WHERE p.pickingOrder BETWEEN vPickingOrderFrom AND vPickingOrderTo
AND p.sectorFk = vSectorFk
- ORDER BY p.pickingOrder ;
-
+ ORDER BY p.pickingOrder;
END ;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
/*!50003 SET character_set_client = @saved_cs_client */ ;
/*!50003 SET character_set_results = @saved_cs_results */ ;
/*!50003 SET collation_connection = @saved_col_connection */ ;
+/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `itemShelving_selfConsumption` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -60767,8 +61341,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `itemShelving_selfConsumption`(
vShelvingFk VARCHAR(10) COLLATE utf8_general_ci,
@@ -60858,6 +61430,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `itemShelving_update` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -60865,8 +61439,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `itemShelving_update`(vVisible INT, vPacking INT, vShelf INT ,vGrouping INT )
BEGIN
@@ -60890,75 +61462,8 @@ 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 `itemStock` */;
-/*!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 ;;
-CREATE DEFINER=`root`@`localhost` PROCEDURE `itemStock`(vWarehouseFk SMALLINT, vDated DATETIME, vItemFk INT)
-BEGIN
-/**
- * Calcula el stock del vWarehouseFk desde FechaInventario hasta vDated
- * @param vWarehouse warehouse id
- * @param vDated max date to filter
- * @param vItemFk item id
- **/
-
-
- DECLARE vIsLogifloraDay BOOLEAN;
-
- SET vDated = TIMESTAMP(DATE(vDated), '00:00:00');
-
- SELECT vn.isLogifloraDay(vDated, vWarehouseFk) INTO vIsLogifloraDay ;
-
- DROP TEMPORARY TABLE IF EXISTS tmp.itemList;
- CREATE TEMPORARY TABLE tmp.itemList
- (UNIQUE INDEX i USING HASH (itemFk))
- ENGINE = MEMORY
- SELECT itemFk, SUM(quantity) stock, SUM(quantity) visible, SUM(quantity) available FROM (
- SELECT itemFk, quantity
- FROM itemTicketOut
- WHERE shipped >= util.VN_CURDATE() AND shipped < vDated
- AND warehouseFk = vWarehouseFk
- AND (vItemFk IS NULL OR itemFk = vItemFk)
- UNION ALL
- SELECT itemFk, quantity
- FROM itemEntryIn i
- LEFT JOIN edi.warehouseFloramondo wf ON wf.entryFk = i.entryFk
- WHERE i.landed >= util.VN_CURDATE() AND i.landed < vDated
- AND i.warehouseInFk = vWarehouseFk
- AND (vItemFk IS NULL OR i.itemFk = vItemFk)
- AND (ISNULL(wf.entryFk) OR vIsLogifloraDay)
- UNION ALL
- SELECT itemFk, quantity
- FROM itemEntryOut
- WHERE shipped >= util.VN_CURDATE() AND shipped < vDated
- AND warehouseOutFk = vWarehouseFk
- AND (vItemFk IS NULL OR itemFk = vItemFk)
- ) t
- GROUP BY itemFk HAVING stock != 0;
-
- CALL `cache`.stock_refresh (FALSE);
-
- INSERT INTO tmp.itemList (itemFk,stock,visible,available)
- SELECT item_id,amount,amount,amount
- FROM `cache`.stock
- WHERE warehouse_id = vWarehouseFk AND (vItemFk IS NULL OR vItemFk = item_id)
- ON DUPLICATE KEY UPDATE
- stock = stock + VALUES(stock),
- visible = visible + VALUES(visible),
- available = available + VALUES(available);
-END ;;
-DELIMITER ;
-/*!50003 SET sql_mode = @saved_sql_mode */ ;
-/*!50003 SET character_set_client = @saved_cs_client */ ;
-/*!50003 SET character_set_results = @saved_cs_results */ ;
-/*!50003 SET collation_connection = @saved_col_connection */ ;
/*!50003 DROP PROCEDURE IF EXISTS `itemTagMake` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -60966,8 +61471,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `itemTagMake`(vItemFk INT)
BEGIN
@@ -61028,6 +61531,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `itemTagReorder` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -61035,8 +61540,6 @@ DELIMITER ;
/*!50003 SET character_set_client = utf8mb3 */ ;
/*!50003 SET character_set_results = utf8mb3 */ ;
/*!50003 SET collation_connection = utf8mb3_general_ci */ ;
-/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
-/*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `itemTagReorder`(itemTypeFk INT)
BEGIN
@@ -61068,6 +61571,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `itemTagReorderByName` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -61075,8 +61580,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `itemTagReorderByName`(vName VARCHAR(255))
BEGIN
@@ -61108,6 +61611,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `itemTag_replace` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -61115,8 +61620,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `itemTag_replace`(vItemFromFk INT, vItemToFk INT, vPicture VARCHAR(100))
BEGIN
@@ -61156,6 +61659,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `itemTopSeller` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -61163,8 +61668,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `itemTopSeller`()
BEGIN
@@ -61232,6 +61735,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `itemTrash` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -61239,8 +61744,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `itemTrash`(
vItemFk INT,
@@ -61286,7 +61789,7 @@ BEGIN
INSERT INTO sale(ticketFk, itemFk, concept, quantity)
SELECT vTicketFk,
vItemFk,
- CONCAT(longName,' ',getWorkerCode(), ' ', LEFT(CAST(util.VN_NOW() AS TIME),5)),
+ CONCAT(longName,' ',worker_getCode(), ' ', LEFT(CAST(util.VN_NOW() AS TIME),5)),
vQuantity
FROM item
WHERE id = vItemFk;
@@ -61301,6 +61804,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `itemUpdateTag` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -61308,8 +61813,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `itemUpdateTag`(IN vItem BIGINT)
BEGIN
@@ -61355,6 +61858,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `item_cleanFloramondo` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -61362,8 +61867,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `item_cleanFloramondo`()
BEGIN
@@ -61545,6 +62048,14 @@ BEGIN
SET itemFk = vItemNew
WHERE itemFk = vItemOld;
+ # Mantenemos la imagen si el nuevo no tiene
+ UPDATE vn.item itemNew
+ LEFT JOIN item itemOld ON itemOld.id = vItemOld
+ AND itemOld.image IS NOT NULL
+ SET itemNew.image = itemOld.image
+ WHERE itemNew.id = vItemNew
+ AND itemNew.image IS NULL;
+
# Eliminamos el item sustituido
DELETE FROM item
WHERE id = vItemOld;
@@ -61563,6 +62074,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `item_deactivateUnused` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -61570,8 +62083,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `item_deactivateUnused`()
BEGIN
@@ -61607,6 +62118,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `item_getAtp` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -61614,8 +62127,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `item_getAtp`(vDated DATE)
BEGIN
@@ -61669,6 +62180,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `item_getBalance` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -61676,8 +62189,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `item_getBalance`(
vItemFk INT,
@@ -61692,7 +62203,6 @@ BEGIN
* Si la fecha no es null, muestra histórico desde la fecha pasada.
*/
DECLARE vDateInventory DATETIME;
- DECLARE vInvCalculated INT;
IF vDate IS NULL THEN
SELECT inventoried INTO vDateInventory
@@ -61860,7 +62370,7 @@ BEGIN
LEFT JOIN alertLevel a ON a.id = tItemDiary.alertLevel;
ELSE
- SELECT SUM(`in`) - SUM(`out`) INTO vInvCalculated
+ SELECT SUM(`in`) - SUM(`out`) INTO @a
FROM tItemDiary
WHERE shipped < vDate;
@@ -61871,9 +62381,9 @@ BEGIN
'' reference,
0 clientFk,
'Inventario calculado',
- vInvCalculated invalue,
+ @a invalue,
NULL `out`,
- 0 balance,
+ @a balance,
0 lastPreparedLineFk,
0 isTicket,
0 lineFk,
@@ -61889,7 +62399,7 @@ BEGIN
clientFk,
name, `in`,
`out`,
- 0,
+ @a := @a + IFNULL(`in`, 0) - IFNULL(`out`, 0),
0,
isTicket,
lineFk,
@@ -61907,6 +62417,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `item_getInfo` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -61914,8 +62426,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `item_getInfo`(IN `vBarcode` VARCHAR(22), IN `vWarehouseFk` INT)
BEGIN
@@ -61992,6 +62502,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `item_getLack` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -61999,8 +62511,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `item_getLack`(IN vForce BOOLEAN, IN vDays INT)
BEGIN
@@ -62056,6 +62566,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `item_getMinacum` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -62063,8 +62575,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `item_getMinacum`(IN vWarehouseFk TINYINT, IN vDatedFrom DATETIME, IN vRange INT, IN vItemFk INT)
BEGIN
@@ -62148,6 +62658,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `item_getMinETD` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -62155,8 +62667,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `item_getMinETD`()
BEGIN
@@ -62185,6 +62695,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `item_getSimilar` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -62192,8 +62704,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `item_getSimilar`(vItemFk INT, vWarehouseFk INT, vDate DATE, vIsShowedByType BOOL)
BEGIN
@@ -62282,6 +62792,93 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
+/*!50003 DROP PROCEDURE IF EXISTS `item_getStock` */;
+/*!50003 SET @saved_cs_client = @@character_set_client */ ;
+/*!50003 SET @saved_cs_results = @@character_set_results */ ;
+/*!50003 SET @saved_col_connection = @@collation_connection */ ;
+/*!50003 SET character_set_client = utf8mb4 */ ;
+/*!50003 SET character_set_results = utf8mb4 */ ;
+/*!50003 SET collation_connection = utf8mb4_unicode_ci */ ;
+DELIMITER ;;
+CREATE DEFINER=`root`@`localhost` PROCEDURE `item_getStock`(
+ vWarehouseFk SMALLINT,
+ vDated DATE,
+ vItemFk INT
+)
+BEGIN
+/**
+ * Calcula el stock de un artículo de un vWarehouseFk,
+ * desde la fecha del inventario hasta vDated
+ *
+ * @param vWarehouse Warehouse id
+ * @param vDated Max date to filter
+ * @param vItemFk Item id
+ *
+ * @return tmp.itemList(itemFk, stock, visible, available)
+ */
+ DECLARE vIsLogifloraDay BOOL DEFAULT vn.isLogifloraDay(vDated, vWarehouseFk);
+
+ SET vDated = TIMESTAMP(vDated, '00:00:00');
+
+ CREATE OR REPLACE TEMPORARY TABLE tmp.itemList
+ (UNIQUE INDEX i USING HASH (itemFk))
+ ENGINE = MEMORY
+ SELECT itemFk,
+ SUM(quantity) stock,
+ SUM(quantity) visible,
+ SUM(quantity) available
+ FROM (
+ SELECT itemFk, quantity
+ FROM itemTicketOut
+ WHERE shipped >= util.VN_CURDATE()
+ AND shipped < vDated
+ AND warehouseFk = vWarehouseFk
+ AND (vItemFk IS NULL OR itemFk = vItemFk)
+ UNION ALL
+ SELECT iei.itemFk, iei.quantity
+ FROM itemEntryIn iei
+ LEFT JOIN edi.warehouseFloramondo wf ON wf.entryFk = iei.entryFk
+ JOIN item i ON i.id = iei.itemFk
+ WHERE iei.landed >= util.VN_CURDATE()
+ AND iei.landed < vDated
+ AND iei.warehouseInFk = vWarehouseFk
+ AND (vItemFk IS NULL OR iei.itemFk = vItemFk)
+ AND (wf.entryFk IS NULL OR vIsLogifloraDay)
+ AND NOT (iei.landed > util.VN_CURDATE() AND i.isFloramondo)
+ UNION ALL
+ SELECT ieo.itemFk, ieo.quantity
+ FROM itemEntryOut ieo
+ JOIN item i ON i.id = ieo.itemFk
+ WHERE ieo.shipped >= util.VN_CURDATE()
+ AND ieo.shipped < vDated
+ AND ieo.warehouseOutFk = vWarehouseFk
+ AND (vItemFk IS NULL OR ieo.itemFk = vItemFk)
+ AND NOT (ieo.shipped > util.VN_CURDATE() AND i.isFloramondo)
+ ) sub
+ GROUP BY itemFk
+ HAVING stock;
+
+ CALL cache.stock_refresh(FALSE);
+
+ INSERT INTO tmp.itemList(itemFk, stock, visible, available)
+ SELECT item_id, amount, amount, amount
+ FROM cache.stock
+ WHERE warehouse_id = vWarehouseFk
+ AND (vItemFk IS NULL OR vItemFk = item_id)
+ ON DUPLICATE KEY UPDATE
+ stock = stock + VALUES(stock),
+ visible = visible + VALUES(visible),
+ available = available + VALUES(available);
+END ;;
+DELIMITER ;
+/*!50003 SET sql_mode = @saved_sql_mode */ ;
+/*!50003 SET character_set_client = @saved_cs_client */ ;
+/*!50003 SET character_set_results = @saved_cs_results */ ;
+/*!50003 SET collation_connection = @saved_col_connection */ ;
+/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `item_GetVisible` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -62289,8 +62886,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `item_GetVisible`(vWarehouse SMALLINT, vItem INT)
BEGIN
@@ -62338,6 +62933,83 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
+/*!50003 DROP PROCEDURE IF EXISTS `item_refreshFromTags` */;
+/*!50003 SET @saved_cs_client = @@character_set_client */ ;
+/*!50003 SET @saved_cs_results = @@character_set_results */ ;
+/*!50003 SET @saved_col_connection = @@collation_connection */ ;
+/*!50003 SET character_set_client = utf8mb4 */ ;
+/*!50003 SET character_set_results = utf8mb4 */ ;
+/*!50003 SET collation_connection = utf8mb4_unicode_ci */ ;
+DELIMITER ;;
+CREATE DEFINER=`root`@`localhost` PROCEDURE `item_refreshFromTags`(vSelf INT)
+BEGIN
+/**
+ * Updates item attributes with its corresponding tags.
+ *
+ * @param vSelf The item id
+ */
+ DECLARE vTags JSON;
+ DECLARE vValues JSON;
+ DECLARE vAbbrs JSON;
+ DECLARE vOverwrites JSON;
+
+ SELECT JSON_OBJECTAGG(`priority`, t.`name`),
+ JSON_OBJECTAGG(`priority`, it.`value`),
+ JSON_OBJECTAGG(`priority`, IFNULL(a.abbreviation, it.`value`)),
+ JSON_OBJECTAGG(`overwrite`, it.`value`)
+ INTO vTags, vValues, vAbbrs, vOverwrites
+ FROM itemTag it
+ JOIN tag t ON t.id = it.tagFk
+ LEFT JOIN tagAbbreviation a ON a.`value` = it.`value`
+ AND (a.tagFk IS NULL OR a.tagFk = t.id)
+ WHERE it.itemFk = vSelf;
+
+ UPDATE item i
+ LEFT JOIN ink k ON k.name = JSON_VALUE(vOverwrites, '$.inkFk')
+ LEFT JOIN origin o ON o.name = JSON_VALUE(vOverwrites, '$.originFk')
+ LEFT JOIN producer p ON p.name = JSON_VALUE(vOverwrites, '$.producerFk')
+ SET i.`name` = CONCAT_WS(' ',
+ JSON_VALUE(vAbbrs, '$.1'),
+ JSON_VALUE(vAbbrs, '$.2'),
+ IF(i.isFloramondo, NULL, JSON_VALUE(vAbbrs, '$.3'))
+ ),
+ i.longName = CONCAT_WS(' ',
+ JSON_VALUE(vValues, '$.1'),
+ JSON_VALUE(vValues, '$.2'),
+ JSON_VALUE(vValues, '$.3')
+ ),
+ i.subname = JSON_VALUE(vValues, '$.4'),
+ i.size = JSON_VALUE(vOverwrites, '$.size'),
+ i.stems = JSON_VALUE(vOverwrites, '$.stems'),
+ i.category = JSON_VALUE(vOverwrites, '$.category'),
+ i.tag5 = JSON_VALUE(vTags, '$.5'),
+ i.tag6 = JSON_VALUE(vTags, '$.6'),
+ i.tag7 = JSON_VALUE(vTags, '$.7'),
+ i.tag8 = JSON_VALUE(vTags, '$.8'),
+ i.tag9 = JSON_VALUE(vTags, '$.9'),
+ i.tag10 = JSON_VALUE(vTags, '$.10'),
+ i.value5 = JSON_VALUE(vValues, '$.5'),
+ i.value6 = JSON_VALUE(vValues, '$.6'),
+ i.value7 = JSON_VALUE(vValues, '$.7'),
+ i.value8 = JSON_VALUE(vValues, '$.8'),
+ i.value9 = JSON_VALUE(vValues, '$.9'),
+ i.value10 = JSON_VALUE(vValues, '$.10'),
+ i.producerFk = p.id,
+ i.inkFk = k.id,
+ i.originFk = IFNULL(o.id, i.originFk)
+ WHERE i.id = vSelf;
+
+ CALL item_setGeneric(vSelf);
+END ;;
+DELIMITER ;
+/*!50003 SET sql_mode = @saved_sql_mode */ ;
+/*!50003 SET character_set_client = @saved_cs_client */ ;
+/*!50003 SET character_set_results = @saved_cs_results */ ;
+/*!50003 SET collation_connection = @saved_col_connection */ ;
+/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `item_refreshTags` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -62345,152 +63017,41 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `item_refreshTags`()
BEGIN
/**
- * Actualiza la tabla item, los campos "cache" de tags
+ * Update item table, tag "cache" fields
*
- * @param temporary table tmp.item(id) del articulo
- **/
+ * @param temporary table tmp.item(id) of the article
+ */
+ DECLARE vDone BOOL;
+ DECLARE vItemFk INT;
+ DECLARE vCur CURSOR FOR SELECT id FROM tmp.item;
+ DECLARE CONTINUE HANDLER FOR NOT FOUND SET vDone = TRUE;
- DECLARE done INT DEFAULT FALSE;
- DECLARE vItemFk INT;
- DECLARE cur1 CURSOR FOR SELECT id FROM tmp.item;
+ OPEN vCur;
- DECLARE CONTINUE HANDLER FOR NOT FOUND SET done = TRUE;
+ l: LOOP
+ SET vDone = FALSE;
+ FETCH vCur INTO vItemFk;
- OPEN cur1;
+ IF vDone THEN
+ LEAVE l;
+ END IF;
- read_loop: LOOP
-
- FETCH cur1 INTO vItemFk;
-
- IF done THEN
- LEAVE read_loop;
- END IF;
-
- 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`, IF(it3.`value` = 'A1','',it3.`value`))
- WHERE i.id = vItemFk;
-
- 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` AND ta2.tagFk IS NULL
- 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`),
- IF(i.isFloramondo,'',IFNULL(ta3.abbreviation,it3.`value`)))
- WHERE i.id = vItemFk;
-
- UPDATE item i
- LEFT JOIN itemTag it ON it.itemFk = i.id AND it.priority = 4
- SET i.subName = it.`value`
- WHERE i.id = vItemFk;
-
- 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 i.id = vItemFk;
-
- 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 i.id = vItemFk;
-
- 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 i.id = vItemFk;
-
- 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 i.id = vItemFk;
-
- 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 i.id = vItemFk;
-
- 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 i.id = vItemFk;
-
- -- Al insertar el tag color se modifica también el antiguo campo color
- UPDATE item i
- 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
- WHERE i.id = vItemFk;
-
- -- Al insertar el tag origen se modifica también en la tabla item
- UPDATE item i
- 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
- WHERE i.id = vItemFk;
-
- -- Al insertar el tag medida se modifica también en la tabla item
- UPDATE item i
- 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`
- WHERE i.id = vItemFk;
-
- -- Al insertar el tag productor se modifica también en la tabla item
- UPDATE item i
- 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
- WHERE i.id = vItemFk;
-
- -- Al insertar el tag tallos se modifica también en la tabla item
- UPDATE item i
- 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`
- WHERE i.id = vItemFk;
-
- -- Al insertar el tag categoria se modifica también en la tabla item
- UPDATE item i
- JOIN tag t ON t.overwrite = 'category'
- JOIN itemTag it ON it.itemFk = i.id AND it.tagFk = t.id
- SET i.category = it.`value`
- WHERE i.id = vItemFk;
-
- -- Comprueba si existe un genérico y lo asigna
- CALL vn.item_setGeneric(vItemFk);
-
- END LOOP;
-
- CLOSE cur1;
+ CALL item_refreshFromTags(vItemFk);
+ END LOOP;
+ CLOSE vCur;
END ;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
/*!50003 SET character_set_client = @saved_cs_client */ ;
/*!50003 SET character_set_results = @saved_cs_results */ ;
/*!50003 SET collation_connection = @saved_col_connection */ ;
+/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `item_saveReference` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -62498,8 +63059,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `item_saveReference`(vBarcode VARCHAR(22), vReference VARCHAR(150))
BEGIN
@@ -62523,6 +63082,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `item_setGeneric` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -62530,8 +63091,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `item_setGeneric`(vSelf INT)
BEGIN
@@ -62544,24 +63103,34 @@ BEGIN
SELECT itemFk INTO vGenericFk
FROM (
- SELECT itemFk, (sum(matches) = maxMatches) `match`
+ SELECT itemFk, SUM(matches) = maxMatches `match`
FROM (
- SELECT ga.id gaid,
- ga.itemFk,
- (it.value <=> ga.origin)
- + (it.value <=> ga.color)
- + (it.value <=> ga.quality)
- + (it.value <=> ga.numFlores)
- + (it.value <=> ga.category)
- + (it.value <=> ga.productor) matches,
- !ISNULL(ga.origin)
- +!ISNULL(ga.color)
- +!ISNULL(ga.quality)
- +!ISNULL(ga.numFlores)
- +!ISNULL(ga.category)
- +!ISNULL(ga.productor) maxMatches
+ SELECT ga.id gaid, ga.itemFk,
+ CASE
+ WHEN t.code = 'nflowers' THEN
+ it.value <=> ga.numFlores
+ WHEN t.code = 'origin' THEN
+ it.value <=> ga.origin
+ WHEN t.code = 'quality' THEN
+ it.value <=> ga.quality
+ WHEN t.code = 'color' THEN
+ it.value <=> ga.color
+ WHEN t.code = 'category' THEN
+ it.value <=> ga.category
+ WHEN t.code = 'producer' THEN
+ it.value <=> ga.productor
+ ELSE
+ 0
+ END matches,
+ (NOT ISNULL(ga.origin))
+ + (NOT ISNULL(ga.color))
+ + (NOT ISNULL(ga.quality))
+ + (NOT ISNULL(ga.numFlores))
+ + (NOT ISNULL(ga.category))
+ + (NOT ISNULL(ga.productor)) maxMatches
FROM vn.item i
JOIN vn.itemTag it ON it.itemFk = i.id
+ JOIN vn.tag t ON t.id = it.tagFk
JOIN vn.genericAllocation ga
ON (i.typeFk = ga.typeFk OR ga.typeFk IS NULL)
AND (i.longName = ga.longName OR ga.longName IS NULL)
@@ -62570,7 +63139,8 @@ BEGIN
WHERE i.id = vSelf
AND NOT i.isFloramondo) sub
GROUP BY gaid
- HAVING `match`) sub2;
+ HAVING `match`) sub2
+ LIMIT 1;
UPDATE vn.item
SET genericFk = vGenericFk
@@ -62581,6 +63151,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `item_updatePackingShelve` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -62588,8 +63160,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `item_updatePackingShelve`(vSelf INT, vPacking INT)
BEGIN
@@ -62611,6 +63181,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `item_updatePackingType` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -62618,8 +63190,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `item_updatePackingType`(vItem INT, vItemPackingTypeFk VARCHAR(1))
BEGIN
@@ -62637,6 +63207,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `item_ValuateInventory` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -62644,8 +63216,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `item_ValuateInventory`(IN vDated DATE, IN vIsDetailed BOOLEAN)
BEGIN
@@ -62842,6 +63412,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `ledger_doCompensation` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -62849,8 +63421,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `ledger_doCompensation`(vDated DATE, vCompensationAccount VARCHAR(10) , vBankFk VARCHAR(10), vConcept VARCHAR(255), vAmount DECIMAL(10,2), vCompanyFk INT, vOriginalAccount VARCHAR(10))
BEGIN
@@ -62933,6 +63503,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `ledger_next` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -62940,8 +63512,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `ledger_next`(OUT vNewBookEntry INT)
BEGIN
@@ -62955,6 +63525,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `logShow` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -62962,8 +63534,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `logShow`(vOriginFk INT, vEntity VARCHAR(45))
BEGIN
@@ -62991,6 +63561,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `lungSize_generator` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -62998,8 +63570,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `lungSize_generator`(vDate DATE)
BEGIN
@@ -63052,6 +63622,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `machineWorker_add` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -63059,8 +63631,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `machineWorker_add`(vPlate VARCHAR(10), vWorkerFk INT)
BEGIN
@@ -63087,6 +63657,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `machineWorker_getHistorical` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -63094,8 +63666,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `machineWorker_getHistorical`(vPlate VARCHAR(20), vWorkerFk INT)
BEGIN
@@ -63121,6 +63691,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `machineWorker_update` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -63128,8 +63700,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `machineWorker_update`(vPlate VARCHAR(10), vWorkerFk INT)
BEGIN
@@ -63172,6 +63742,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `machine_getWorkerPlate` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -63179,8 +63751,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `machine_getWorkerPlate`(vWorkerFk INT)
BEGIN
@@ -63201,6 +63771,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `mail_insert` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -63208,8 +63780,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `mail_insert`(
vReceiver VARCHAR(255),
@@ -63252,6 +63822,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `makeNewItem` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -63259,8 +63831,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `makeNewItem`()
BEGIN
@@ -63281,6 +63851,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `makePCSGraf` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -63288,8 +63860,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `makePCSGraf`(vDated DATE)
BEGIN
@@ -63333,6 +63903,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `manaSpellersRequery` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -63340,8 +63912,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `manaSpellersRequery`(vWorkerFk INTEGER)
BEGIN
@@ -63418,6 +63988,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `mysqlConnectionsSorter_kill` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -63425,8 +63997,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `mysqlConnectionsSorter_kill`()
BEGIN
@@ -63468,6 +64038,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `mysqlPreparedCount_check` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -63475,8 +64047,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `mysqlPreparedCount_check`()
BEGIN
@@ -63502,6 +64072,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `nextShelvingCodeMake` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -63509,8 +64081,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `nextShelvingCodeMake`()
BEGIN
@@ -63556,6 +64126,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `observationAdd` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -63563,8 +64135,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `observationAdd`(vOriginFk INT, vTableCode VARCHAR(45), vDescription TEXT)
BEGIN
@@ -63597,6 +64167,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `orderCreate` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -63604,8 +64176,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `orderCreate`(
vLanded DATE,
@@ -63637,6 +64207,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `orderDelete` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -63644,8 +64216,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `orderDelete`(IN vId INT)
BEGIN
@@ -63658,6 +64228,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `orderListCreate` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -63665,8 +64237,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `orderListCreate`(
vLanded DATE,
@@ -63685,6 +64255,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `orderListVolume` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -63692,8 +64264,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `orderListVolume`(IN vOrderId INT)
BEGIN
@@ -63714,6 +64284,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `packageInvoicing` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -63721,8 +64293,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `packageInvoicing`(
IN vClient INT,
@@ -63848,6 +64418,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `packingListPrinted` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -63855,8 +64427,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `packingListPrinted`(ticketFk INT)
BEGIN
@@ -63874,6 +64444,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `packingListSwitch` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -63881,8 +64453,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `packingListSwitch`(saleFk INT)
BEGIN
@@ -63907,52 +64477,72 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `packingSite_startCollection` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
-/*!50003 SET character_set_client = utf8mb4 */ ;
-/*!50003 SET character_set_results = utf8mb4 */ ;
-/*!50003 SET collation_connection = utf8mb4_unicode_ci */ ;
-/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
-/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
+/*!50003 SET character_set_client = utf8mb3 */ ;
+/*!50003 SET character_set_results = utf8mb3 */ ;
+/*!50003 SET collation_connection = utf8mb3_general_ci */ ;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `packingSite_startCollection`(vSelf INT, vTicketFk INT)
-BEGIN
+proc: BEGIN
/**
* @param vSelf packingSite id
* @param vTicketFk A ticket id from the collection to start
*/
- DECLARE vNewCollectionFk INT;
- DECLARE vOldCollectionFk INT;
- DECLARE vIsPackingByOther BOOL;
+ DECLARE vExists BOOL;
+ DECLARE vIsAdvanced BOOL;
+ DECLARE vNewCollectionFk INT;
+ DECLARE vOldCollectionFk INT;
+ DECLARE vIsPackingByOther BOOL;
- SELECT collectionFk INTO vNewCollectionFk
- FROM ticketCollection WHERE ticketFk = vTicketFk;
+ SELECT id, collectionFk
+ INTO vExists, vOldCollectionFk
+ FROM packingSite
+ WHERE id = vSelf;
- SELECT collectionFk INTO vOldCollectionFk
- FROM packingSite WHERE id = vSelf;
+ IF NOT vExists THEN
+ CALL util.throw('packingSiteNotExists');
+ END IF;
- IF NOT (vOldCollectionFk <=> vNewCollectionFk) THEN
- SELECT COUNT(*) > 0
- INTO vIsPackingByOther
- FROM packingSite
- WHERE id <> vSelf
- AND collectionFk = vOldCollectionFk;
+ SELECT COUNT(*) > 0
+ INTO vIsAdvanced
+ FROM packingSiteAdvanced
+ WHERE ticketFk = vTicketFk;
- IF NOT vIsPackingByOther AND NOT collection_isPacked(vOldCollectionFk) AND vSelf IS NOT NULL THEN
- CALL util.throw('cannotChangeCollection');
- END IF;
- END IF;
+ IF vIsAdvanced THEN
+ LEAVE proc;
+ END IF;
- UPDATE packingSite SET collectionFk = vNewCollectionFk
- WHERE id = vSelf;
+ SELECT collectionFk INTO vNewCollectionFk
+ FROM ticketCollection WHERE ticketFk = vTicketFk;
+
+ IF vOldCollectionFk IS NOT NULL
+ AND vOldCollectionFk <> vNewCollectionFk THEN
+ SELECT COUNT(*) > 0
+ INTO vIsPackingByOther
+ FROM packingSite
+ WHERE id <> vSelf
+ AND collectionFk = vOldCollectionFk;
+
+ IF NOT vIsPackingByOther AND NOT collection_isPacked(vOldCollectionFk) THEN
+ CALL util.throw('cannotChangeCollection');
+ END IF;
+ END IF;
+
+ UPDATE packingSite SET collectionFk = vNewCollectionFk
+ WHERE id = vSelf;
END ;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
/*!50003 SET character_set_client = @saved_cs_client */ ;
/*!50003 SET character_set_results = @saved_cs_results */ ;
/*!50003 SET collation_connection = @saved_col_connection */ ;
+/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `parking_add` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -63960,8 +64550,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `parking_add`(vFromColumn INT, vToColumn INT, vFromRow INT, vToRow INT, vSectorFk INT, vIsLetterMode BOOLEAN)
BEGIN
@@ -64007,6 +64595,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `parking_algemesi` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -64014,8 +64604,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `parking_algemesi`(vFromRow INT, vToRow INT, vSectorFk INT, vLetter VARCHAR(1), vPickingOrder INT, vTrolleysByLine INT)
BEGIN
@@ -64082,6 +64670,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `parking_new` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -64089,8 +64679,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `parking_new`(vStart INT, vEnd INT, vSectorFk INT)
BEGIN
@@ -64127,6 +64715,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `parking_setOrder` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -64134,8 +64724,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `parking_setOrder`(vWarehouseFk INT)
BEGIN
@@ -64167,6 +64755,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `prepareClientList` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -64174,8 +64764,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `prepareClientList`()
BEGIN
@@ -64196,6 +64784,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `prepareTicketList` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -64203,8 +64793,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `prepareTicketList`(vStartingDate DATETIME, vEndingDate DATETIME)
BEGIN
@@ -64231,6 +64819,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `previousSticker_get` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -64238,8 +64828,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `previousSticker_get`(vSaleGroupFk INT)
BEGIN
@@ -64302,6 +64890,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `printer_checkSector` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -64309,8 +64899,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `printer_checkSector`(vLabelerFk tinyint(3) unsigned, vSector INT(11))
BEGIN
@@ -64337,6 +64925,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `productionControl` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -64344,8 +64934,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `productionControl`(
vWarehouseFk INT,
@@ -64559,6 +65147,7 @@ proc: BEGIN
AND (sc.itemPackingTypeFk IS NULL
OR (i.itemPackingTypeFk IS NULL AND NOT pb.V)
OR sc.itemPackingTypeFk = i.itemPackingTypeFk)
+ AND s.quantity > 0
GROUP BY pb.ticketFk;
-- Se calcula la cantidad de productos que estan ya preparados porque su saleGroup está aparcado
@@ -64569,6 +65158,7 @@ proc: BEGIN
JOIN saleGroupDetail sgd ON sgd.saleFk = s.id
JOIN saleGroup sg ON sg.id = sgd.saleGroupFk
WHERE sg.parkingFk IS NOT NULL
+ AND s.quantity > 0
GROUP BY pb.ticketFk) sub ON twp.ticketFk = sub.ticketFk
SET twp.salesInParkingCount = sub.salesInParkingCount;
@@ -64589,6 +65179,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `productionSectorList` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -64596,8 +65188,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `productionSectorList`(vSectorFk INT)
BEGIN
@@ -64710,6 +65300,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `rangeDateInfo` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -64717,8 +65309,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `rangeDateInfo`(vStarted DATE, vEnded DATE)
BEGIN
@@ -64760,6 +65350,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `rate_getPrices` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -64767,82 +65359,57 @@ DELIMITER ;
/*!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 ;;
-CREATE DEFINER=`root`@`localhost` PROCEDURE `rate_getPrices`(vDated DATE, vWarehouseFk INT)
+CREATE DEFINER=`root`@`localhost` PROCEDURE `rate_getPrices`(
+ vDated DATE,
+ vWarehouseFk INT
+)
BEGIN
/**
- * Prepara una tabla con las tarifas aplicables en funcion de la fecha y el almacén
+ * Prepara una tabla con las tarifas aplicables
+ * en funcion de la fecha y el almacén.
*
- * @param vDated fecha para la cual calcula la tarifa
- * @param vWarehouseFk warehouse para el cual calcula la tafia
- * @return tmp.rate(rate0, rate1, rate2, rate3)
+ * @param vDated Fecha para la cual calcula la tarifa
+ * @param vWarehouseFk Warehouse para el cual calcula la tarifa
+ * @return tmp.rate (rate0, rate1, rate2, rate3)
*/
- DROP TEMPORARY TABLE IF EXISTS tRate;
- CREATE TEMPORARY TABLE tRate
- SELECT rate0, rate1, rate2, rate3
- FROM vn.rate
- WHERE dated <= vDated
- AND warehouseFk = vWarehouseFk
- ORDER BY dated DESC;
-
- DROP TEMPORARY TABLE IF EXISTS tmp.rate;
- CREATE TEMPORARY TABLE tmp.rate
+ CREATE OR REPLACE TEMPORARY TABLE tmp.rate
ENGINE = MEMORY
- SELECT * FROM
- (
- SELECT * FROM tRate
- UNION ALL
- SELECT rate0, rate1, rate2, rate3 FROM rateConfig
- ) sub2
- LIMIT 1;
- DROP TEMPORARY TABLE tRate;
+ SELECT rate0,
+ rate1,
+ rate2,
+ rate3
+ FROM(
+ (SELECT 1 `order`,
+ rate0,
+ rate1,
+ rate2,
+ rate3
+ FROM rate
+ WHERE dated <= vDated
+ AND warehouseFk = vWarehouseFk
+ ORDER BY dated DESC
+ LIMIT 1
+ )
+ UNION
+ (SELECT 2,
+ rate0,
+ rate1,
+ rate2,
+ rate3
+ FROM rateConfig
+ )
+ ORDER BY `order` ASC
+ LIMIT 1
+ )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 `rate_getPrices2` */;
-/*!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 ;;
-CREATE DEFINER=`root`@`localhost` PROCEDURE `rate_getPrices2`(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 tRate;
- CREATE TEMPORARY TABLE tRate
- SELECT rate0, rate1, rate2, rate3
- FROM vn.rate
- WHERE dated <= vLanded
- AND warehouseFk = vWarehouseFk
- ORDER BY dated DESC;
-
- DROP TEMPORARY TABLE IF EXISTS tmp.rate;
- CREATE TEMPORARY TABLE tmp.rate
- ENGINE = MEMORY
- SELECT * FROM
- (
- SELECT * FROM tRate
- UNION ALL
- SELECT rate0, rate1, rate2, rate3 FROM rateConfig
- ) sub2
- LIMIT 1;
- DROP TEMPORARY TABLE tRate;
-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 */ ;
@@ -64850,8 +65417,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `recipe_Cook`(vItemFk INT, vBunchesQuantity INT, vDate DATE)
BEGIN
@@ -64930,6 +65495,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `recipe_Plaster` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -64937,8 +65504,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `recipe_Plaster`(vItemFk INT, vTicketFk INT, vQuantity INT)
BEGIN
@@ -65027,6 +65592,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `reportLabelCollection_get` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -65034,8 +65601,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `reportLabelCollection_get`(
vParam INT,
@@ -65095,6 +65660,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `report_print` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -65102,8 +65669,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `report_print`(
vReportName VARCHAR(100),
@@ -65191,6 +65756,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `riskAllClients` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -65198,8 +65765,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `riskAllClients`(maxRiskDate DATE)
BEGIN
@@ -65233,6 +65798,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `routeGuessPriority` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -65240,8 +65807,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `routeGuessPriority`(IN vRuta INT)
BEGIN
@@ -65266,6 +65831,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `routeInfo` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -65273,8 +65840,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `routeInfo`(vRouteFk INT)
BEGIN
@@ -65312,6 +65877,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `routeMonitor_calculate` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -65319,8 +65886,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `routeMonitor_calculate`(
vDate DATE,
@@ -65439,6 +66004,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `routeSetOk` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -65446,8 +66013,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `routeSetOk`(
vRouteFk INT)
@@ -65463,6 +66028,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `routeUpdateM3` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -65470,8 +66037,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `routeUpdateM3`(vRoute INT)
BEGIN
@@ -65485,6 +66050,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `route_calcCommission` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -65492,8 +66059,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `route_calcCommission`(vSelf INT)
proc: BEGIN
@@ -65578,6 +66143,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `route_doRecalc` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -65585,8 +66152,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `route_doRecalc`()
proc: BEGIN
@@ -65639,6 +66204,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `route_getTickets` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -65646,8 +66213,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `route_getTickets`(vRouteFk INT)
BEGIN
@@ -65678,7 +66243,8 @@ SELECT *
wm.mediaValue SalePersonPhone,
tob.description Note,
t.isSigned Signed,
- t.priority
+ t.priority,
+ t.cmrFk
FROM ticket t
JOIN client c ON t.clientFk = c.id
JOIN address a ON t.addressFk = a.id
@@ -65720,6 +66286,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `route_updateM3` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -65727,8 +66295,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `route_updateM3`(vRoute INT)
BEGIN
@@ -65747,187 +66313,8 @@ 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 `rutasAnalyze` */;
-/*!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 ;;
-CREATE DEFINER=`root`@`localhost` PROCEDURE `rutasAnalyze`(vYear INT, vMonth INT)
-BEGIN
-
-/**
- * Analiza los costes de las rutas de reparto y lo almacena en la tabla Rutas_Master
- *
- * PAK 15/4/2019
- */
-
- DELETE FROM bi.rutasBoard
- WHERE year = vYear AND month = vMonth;
-
- -- Rellenamos la tabla con los datos de las rutas VOLUMETRICAS, especialmente con los bultos "virtuales"
- INSERT INTO bi.rutasBoard(year,
- month,
- warehouse_id,
- Id_Ruta,
- Id_Agencia,
- km,
- Dia,
- Fecha,
- m3,
- bultos,
- Matricula,
- Tipo,
- Terceros)
- SELECT YEAR(r.created),
- MONTH(r.created),
- IFNULL(GREATEST(1,a.warehouseFk), 0),
- r.id,
- r.agencyModeFk,
- IFNULL(r.kmEnd, 0) - IFNULL(r.kmStart, 0),
- DAYNAME(r.created),
- r.created,
- SUM(r.m3),
- SUM(sv.volume / ebv.m3),
- v.numberPlate,
- IF(ISNULL(`r`.`cost`), 'P', 'A'),
- IFNULL(r.cost,0)
- FROM route r
- JOIN ticket t ON t.routeFk = r.id
- LEFT JOIN zone z ON z.id = t.zoneFk
- LEFT JOIN agencyMode am ON am.id = r.agencyModeFk
- LEFT JOIN agency a ON a.id = am.agencyFk
- LEFT JOIN vehicle v ON v.id = r.vehicleFk
- JOIN saleVolume sv ON sv.ticketFk = t.id
- JOIN expeditionBoxVol ebv ON ebv.boxFk = 71
- WHERE YEAR(r.created) = vYear AND MONTH(r.created) = vMonth
- AND z.isVolumetric
- GROUP BY r.id;
- -- Rellenamos la tabla con los datos de las rutas NO VOLUMETRICAS, especialmente con los bultos "virtuales"
- INSERT INTO bi.rutasBoard(year,
- month,
- warehouse_id,
- Id_Ruta,
- Id_Agencia,
- km,
- Dia,
- Fecha,
- m3,
- Bultos,
- Matricula,
- Tipo,
- Terceros)
- SELECT YEAR(r.created),
- MONTH(r.created),
- IFNULL(GREATEST(1,a.warehouseFk), 0),
- r.id,
- r.agencyModeFk,
- IFNULL(r.kmEnd, 0) - IFNULL(r.kmStart,0),
- DAYNAME(r.created),
- r.created,
- SUM(r.m3),
- SUM(t.packages),
- v.numberPlate,
- IF(ISNULL(`r`.`cost`), 'P', 'A'),
- IFnULL(r.cost,0)
- FROM route r
- JOIN ticket t ON t.routeFk = r.id
- LEFT JOIN zone z ON z.id = t.zoneFk
- LEFT JOIN agencyMode am ON am.id = r.agencyModeFk
- LEFT JOIN agency a ON a.id = am.agencyFk
- LEFT JOIN vehicle v ON v.id = r.vehicleFk
- WHERE YEAR(r.created) = vYear AND MONTH(r.created) = vMonth
- AND z.isVolumetric = FALSE
- GROUP BY r.id
- ON DUPLICATE KEY UPDATE Bultos = Bultos + VALUES(Bultos);
-
- -- Coste REAL de cada bulto "virtual", de acuerdo con el valor apuntado a mano en la ruta
- UPDATE bi.rutasBoard r
- INNER JOIN vn2008.Rutas_Master rm ON rm.año = r.year AND rm.mes = r.month AND rm.warehouse_id = r.warehouse_id
- SET r.coste_bulto = IF(r.Tipo ='A', r.Terceros, r.km * rm.coste_km ) / r.Bultos
- WHERE r.Bultos > 0
- AND rm.año = vYear
- AND rm.mes = vMonth;
-
- -- Coste PRACTICO de cada bulto, de acuerdo con los componentes de tipo AGENCIA en cada linea de venta
- UPDATE bi.rutasBoard r
- JOIN (
- SELECT t.routeFk, sum(s.quantity * sc.value) practicoTotal
- FROM route r
- JOIN time tm ON tm.dated = r.created
- JOIN ticket t ON t.routeFk = r.id
- JOIN sale s ON s.ticketFk = t.id
- JOIN saleComponent sc ON sc.saleFk = s.id
- JOIN component c ON c.id = sc.componentFk
- JOIN componentType ct ON ct.id = c.typeFk
- WHERE ct.type = 'agencia'
- AND tm.year = vYear
- AND tm.month = vMonth
- GROUP BY r.id
- ) sub ON sub.routeFk = r.Id_Ruta
- SET r.practico = IFNULL(sub.practicoTotal / r.Bultos, 0);
-
- -- Coste TEORICO de una caja "virtual" para cada ruta, teniendo en cuenta que hay carros, pallets, etc
- UPDATE bi.rutasBoard r
- JOIN (
- SELECT t.routeFk,
- SUM(t.zonePrice/ ebv.ratio)/ count(*) AS BultoTeoricoMedio
- FROM ticket t
- JOIN route r ON r.id = t.routeFk
- JOIN time tm ON tm.dated = r.created
- JOIN expedition e ON e.ticketFk = t.id
- JOIN expeditionBoxVol ebv ON ebv.boxFk = e.freightItemFk
- JOIN address ad ON ad.id = t.addressFk
- JOIN client c ON c.id = ad.clientFk
- LEFT JOIN zone z ON z.id = t.zoneFk
- WHERE tm.year = vYear
- AND tm.month = vMonth
- AND z.isVolumetric = FALSE
- GROUP BY t.routeFk) sub ON r.Id_Ruta = sub.routeFk
- SET r.teorico = IFNULL(sub.BultoTeoricoMedio, 0);
-
- -- Coste VOLUMETRICO TEORICO de una caja "virtual" para cada ruta
- UPDATE bi.rutasBoard r
- JOIN (
- SELECT t.routeFk,
- SUM(freight) AS BultoTeoricoMedio
- FROM ticket t
- JOIN route r ON r.id = t.routeFk
- JOIN time tm ON tm.dated = r.created
- JOIN saleVolume sf ON sf.ticketFk = t.id
- JOIN client c ON c.id = t.clientFk
- JOIN zone z ON z.id = t.zoneFk
- WHERE tm.year = vYear
- AND tm.month = vMonth
- AND z.isVolumetric != FALSE
- GROUP BY t.routeFk) sub ON r.Id_Ruta = sub.routeFk
- SET r.teorico = IFNULL(sub.BultoTeoricoMedio / r.Bultos, 0);
-
- -- La diferencia entre el teorico y el practico se deberia de cobrar en greuges, cada noche
- UPDATE bi.rutasBoard r
- JOIN (
- SELECT t.routeFk,
- Sum(g.amount) AS greuge
- FROM ticket t
- JOIN route r ON r.id = t.routeFk
- JOIN time tm ON tm.dated = r.created
- JOIN greuge g ON g.ticketFk = t.id
- JOIN greugeType gt ON gt.id = g.greugeTypeFk
- WHERE tm.year = vYear
- AND tm.month = vMonth
- AND gt.name = 'Diferencia portes'
- GROUP BY t.routeFk) sub ON r.Id_Ruta = sub.routeFk
- SET r.greuge = sub.greuge / r.Bultos;
-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 `saleBuy_Add` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -65935,8 +66322,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `saleBuy_Add`(vSaleFk INT, vBuyFk INT)
BEGIN
@@ -65967,6 +66352,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `saleGroup_add` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -65974,8 +66361,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `saleGroup_add`(vSectorFk INT)
BEGIN
@@ -65994,6 +66379,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `saleGroup_setParking` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -66001,8 +66388,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `saleGroup_setParking`(IN `vSaleGroupFk` VARCHAR(8), IN `vParkingFk` INT)
proc: BEGIN
@@ -66024,6 +66409,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `saleMistake_Add` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -66031,8 +66418,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `saleMistake_Add`(vSaleFk INT, vUserFk INT, vTypeFk INT)
BEGIN
@@ -66046,6 +66431,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `salePreparingList` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -66053,8 +66440,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `salePreparingList`(IN vTicketFk BIGINT)
BEGIN
@@ -66105,6 +66490,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `sales_merge` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -66112,42 +66499,51 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `sales_merge`(vTicketFk INT)
BEGIN
- DROP TEMPORARY TABLE IF EXISTS salesToPreserve;
- CREATE TEMPORARY TABLE salesToPreserve
- SELECT s.id, s.itemFk, sum(s.quantity) as newQuantity
- FROM vn.sale s
+ DECLARE EXIT HANDLER FOR SQLEXCEPTION
+ BEGIN
+ ROLLBACK;
+ RESIGNAL;
+ END;
+
+ CREATE OR REPLACE TEMPORARY TABLE tSalesToPreserve
+ SELECT s.id, s.itemFk, SUM(s.quantity) newQuantity
+ FROM sale s
JOIN item i ON i.id = s.itemFk
JOIN itemType it ON it.id = i.typeFk
WHERE s.ticketFk = vTicketFk
AND it.isMergeable
GROUP BY s.itemFk, s.price, s.discount;
- UPDATE vn.sale s
- JOIN salesToPreserve stp ON stp.id = s.id
+ START TRANSACTION;
+
+ UPDATE sale s
+ JOIN tSalesToPreserve stp ON stp.id = s.id
SET quantity = newQuantity
WHERE s.ticketFk = vTicketFk;
DELETE s.*
- FROM vn.sale s
- LEFT JOIN salesToPreserve stp ON stp.id = s.id
+ FROM sale s
+ LEFT JOIN tSalesToPreserve stp ON stp.id = s.id
JOIN item i ON i.id = s.itemFk
JOIN itemType it ON it.id = i.typeFk
WHERE s.ticketFk = vTicketFk
AND stp.id IS NULL
AND it.isMergeable;
- DROP TEMPORARY TABLE salesToPreserve;
+ COMMIT;
+
+ DROP TEMPORARY TABLE tSalesToPreserve;
END ;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
/*!50003 SET character_set_client = @saved_cs_client */ ;
/*!50003 SET character_set_results = @saved_cs_results */ ;
/*!50003 SET collation_connection = @saved_col_connection */ ;
+/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `sales_mergeByCollection` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -66155,8 +66551,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `sales_mergeByCollection`(vCollectionFk INT)
BEGIN
@@ -66197,6 +66591,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `saleTracking_add` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -66204,8 +66600,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `saleTracking_add`(vSaleGroupFk INT)
BEGIN
@@ -66232,6 +66626,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `saleTracking_addPreparedSaleGroup` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -66239,8 +66635,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `saleTracking_addPreparedSaleGroup`(vSaleGroupFk INT)
BEGIN
@@ -66260,6 +66654,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `saleTracking_addPrevOK` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -66267,8 +66663,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `saleTracking_addPrevOK`(vSectorCollectionFk INT)
BEGIN
@@ -66298,6 +66692,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `saleTracking_del` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -66305,8 +66701,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `saleTracking_del`(vSaleFk INT, vState VARCHAR(50))
BEGIN
@@ -66326,6 +66720,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `saleTracking_new` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -66333,8 +66729,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `saleTracking_new`(
vSaleFK INT,
@@ -66377,6 +66771,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `saleTracking_updateIsChecked` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -66384,8 +66780,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `saleTracking_updateIsChecked`(vSaleFK INT, vIsChecked BOOL, vIsScanned BOOL)
BEGIN
@@ -66418,6 +66812,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `sale_calculateComponent` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -66425,8 +66821,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `sale_calculateComponent`(vSelf INT, vOption INT)
proc: BEGIN
@@ -66450,6 +66844,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `sale_checkNoComponents` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -66457,8 +66853,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `sale_checkNoComponents`(vCreatedFrom DATETIME, vCreatedTo DATETIME)
BEGIN
@@ -66533,6 +66927,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `sale_getFromTicketOrCollection` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -66540,8 +66936,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `sale_getFromTicketOrCollection`(vParam INT)
BEGIN
@@ -66619,12 +67013,12 @@ DECLARE vIsCollection BOOL;
TRIM(CONCAT(ic.color)) line3,
p.code cel3,
s.isAdded,
- sub2.originalQuantity startQuantity, -- eliminar cuando tengamos la nueva apk
IF(c.workerFk IS NULL, getUser(), c.workerFk) workerFk,
IF(SUM(iss.quantity) IS NULL, 0, SUM(iss.quantity)) pickedQuantity,
i.packingShelve,
MIN(iss.created) picked,
- IF(sm.id, TRUE, FALSE) hasMistake
+ IF(sm.id, TRUE, FALSE) hasMistake,
+ sg.sectorFk
FROM tmp.ticket t
JOIN sale s ON s.ticketFk = t.id
JOIN ticket tt ON tt.id = t.id
@@ -66661,6 +67055,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `sale_getProblems` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -66668,8 +67064,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `sale_getProblems`(IN vIsTodayRelative tinyint(1))
BEGIN
@@ -66762,6 +67156,7 @@ BEGIN
JOIN vn.agencyMode am ON am.id = t.agencyModeFk
JOIN vn.deliveryMethod dm ON dm.id = am.deliveryMethodFk
WHERE dm.code IN('AGENCY','DELIVERY','PICKUP')
+ AND s.quantity > 0
GROUP BY s.id
LIMIT 10000000000000000) sub
WHERE sub.hasComponentLack;
@@ -66944,6 +67339,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `sale_getProblemsByTicket` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -66951,8 +67348,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `sale_getProblemsByTicket`(IN vTicketFk INT, IN vIsTodayRelative TINYINT(1))
BEGIN
@@ -66983,6 +67378,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `sale_PriceFix` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -66990,8 +67387,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `sale_PriceFix`(vTicketFk INT)
BEGIN
@@ -67018,6 +67413,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `sale_recalcComponent` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -67025,8 +67422,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `sale_recalcComponent`(vOption INT)
proc: BEGIN
@@ -67085,8 +67480,8 @@ proc: BEGIN
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');
+ IF NOT EXISTS (SELECT TRUE FROM tmp.zoneGetLanded LIMIT 1) THEN
+ CALL util.throw(CONCAT('There is no zone for these parameters ', vTicketFk));
END IF;
IF vLanded IS NULL OR vZoneFk IS NULL THEN
@@ -67146,6 +67541,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `sectorCollectionSaleGroup_add` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -67153,8 +67550,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `sectorCollectionSaleGroup_add`(vSaleGroupFk INT, vSectorCollectionFk INT)
BEGIN
@@ -67197,6 +67592,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `sectorCollection_get` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -67204,8 +67601,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `sectorCollection_get`()
BEGIN
@@ -67232,6 +67627,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `sectorCollection_getSale` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -67239,8 +67636,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `sectorCollection_getSale`(vSelf INT)
BEGIN
@@ -67277,6 +67672,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `sectorCollection_new` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -67284,8 +67681,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `sectorCollection_new`(vSectorFk INT)
BEGIN
@@ -67318,6 +67713,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `sectorProductivity_add` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -67325,8 +67722,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `sectorProductivity_add`()
BEGIN
@@ -67405,6 +67800,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `sector_get` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -67412,8 +67809,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `sector_get`()
BEGIN
@@ -67431,6 +67826,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `sector_getWarehouse` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -67438,8 +67835,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `sector_getWarehouse`(vSectorFk INT)
BEGIN
@@ -67454,6 +67849,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `setParking` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -67461,8 +67858,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `setParking`(IN `vParam` VARCHAR(8), IN `vParkingCode` VARCHAR(8))
proc: BEGIN
@@ -67528,6 +67923,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `shelvingChange` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -67535,8 +67932,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `shelvingChange`(IN `vShelvingO` VARCHAR(8), IN `vShelvingD` VARCHAR(8))
BEGIN
@@ -67552,6 +67947,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `shelvingLog_get` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -67559,8 +67956,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `shelvingLog_get`(shelvingFk VARCHAR(10))
BEGIN
@@ -67583,6 +67978,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `shelvingParking_get` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -67590,8 +67987,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `shelvingParking_get`(vShelvingFk VARCHAR(10), vWarehouseFk INT, vDayRange INT)
BEGIN
@@ -67619,6 +68014,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `shelvingPriority_update` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -67626,8 +68023,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `shelvingPriority_update`(priority INT,vShelvingFk VARCHAR(10))
BEGIN
@@ -67640,6 +68035,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `shelving_clean` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -67647,8 +68044,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `shelving_clean`()
BEGIN
@@ -67684,6 +68079,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `shelving_getSpam` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -67691,8 +68088,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `shelving_getSpam`(vDated DATE, vWarehouseFk INT)
BEGIN
@@ -67781,6 +68176,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `shelving_setParking` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -67788,8 +68185,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `shelving_setParking`(IN `vShelvingCode` VARCHAR(8), IN `vParkingFk` INT)
proc: BEGIN
@@ -67817,6 +68212,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `sleep_X_min` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -67824,8 +68221,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `sleep_X_min`()
BEGIN
@@ -67839,6 +68234,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `solunionRiskRequest` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -67846,8 +68243,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `solunionRiskRequest`()
BEGIN
@@ -67883,6 +68278,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `stockBuyedByWorker` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -67890,8 +68287,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `stockBuyedByWorker`(
vDate DATE,
@@ -67942,6 +68337,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `stockBuyed_add` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -67949,62 +68346,75 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `stockBuyed_add`(vDated DATE)
BEGIN
/**
- * Inserta el volumen de compra por comprador en vn.stockBuyed de acuerdo con la fecha
+ * Inserta el volumen de compra por comprador en stockBuyed de acuerdo con la fecha
*
* @param vDated Fecha de compra
*/
- CALL vn.stockTraslation(vDated);
- DELETE
- FROM vn.stockBuyed
- WHERE `date` = vDated;
+ CREATE OR REPLACE TEMPORARY TABLE tStockBuyed
+ (INDEX (userFk))
+ ENGINE = MEMORY
+ SELECT requested, reserved, userFk
+ FROM stockBuyed
+ WHERE dated = vDated;
- INSERT INTO vn.stockBuyed(`user`, buyed, `date`, description)
+ CALL stockTraslation(vDated);
+
+ INSERT INTO stockBuyed(userFk, buyed, `dated`, description)
SELECT it.workerFk,
- SUM(( ti.amount / b.packing ) * vn.buy_getVolume(b.id)) / vc.palletM3 / 1000000 buyed,
+ SUM(( ti.amount / b.packing ) * buy_getVolume(b.id)) / vc.palletM3 / 1000000 buyed,
vDated,
u.name
FROM tmp.item ti
- JOIN vn.item i ON i.id = ti.item_id
- JOIN vn.itemType it ON it.id = i.typeFk
- JOIN vn.itemCategory ic ON ic.id = it.categoryFk
- JOIN vn.warehouse wh ON wh.code = 'VNH'
+ JOIN item i ON i.id = ti.item_id
+ JOIN itemType it ON it.id = i.typeFk
+ JOIN itemCategory ic ON ic.id = it.categoryFk
+ JOIN warehouse wh ON wh.code = 'VNH'
JOIN tmp.buyUltimate bu ON bu.itemFk = i.id AND bu.warehouseFk = wh.id
- JOIN vn.buy b ON b.id = bu.buyFk
- JOIN vn.volumeConfig vc
+ JOIN buy b ON b.id = bu.buyFk
+ JOIN volumeConfig vc
JOIN account.`user` u ON u.id = it.workerFk
- WHERE ic.display != 0
+ WHERE ic.display <> 0
GROUP BY it.workerFk;
- INSERT INTO stockBuyed(buyed, `date`, description)
- SELECT SUM(ic.cm3 * ito.quantity / vc.palletM3 / 1000000), vDated, IF(c.country = 'España',p.name,c.country) destiny
- FROM vn.itemTicketOut ito
- JOIN vn.ticket t ON t.id = ito.ticketFk
- JOIN vn.address a ON a.id = t.addressFk
- JOIN vn.province p ON p.id = a.provinceFk
- JOIN vn.country c ON c.id = p.countryFk
- JOIN vn.warehouse wh ON wh.id = t.warehouseFk
- JOIN vn.itemCost ic ON ic.itemFk = ito.itemFk AND ic.warehouseFk = t.warehouseFk
- JOIN vn.volumeConfig vc
+ INSERT INTO stockBuyed(buyed, dated, description)
+ SELECT SUM(ic.cm3 * ito.quantity / vc.palletM3 / 1000000),
+ vDated,
+ IF(c.country = 'España',p.name,c.country) destiny
+ FROM itemTicketOut ito
+ JOIN ticket t ON t.id = ito.ticketFk
+ JOIN `address` a ON a.id = t.addressFk
+ JOIN province p ON p.id = a.provinceFk
+ JOIN country c ON c.id = p.countryFk
+ JOIN warehouse wh ON wh.id = t.warehouseFk
+ JOIN itemCost ic ON ic.itemFk = ito.itemFk AND ic.warehouseFk = t.warehouseFk
+ JOIN volumeConfig vc
WHERE ito.shipped BETWEEN vDated AND util.dayend(vDated)
AND wh.code = 'VNH'
GROUP BY destiny;
+ UPDATE stockBuyed s
+ JOIN tStockBuyed ts ON ts.userFk = s.userFk
+ SET s.requested = ts.requested,
+ s.reserved = ts.reserved
+ WHERE s.dated = vDated;
+
DROP TEMPORARY TABLE
tmp.buyUltimate,
- tmp.item;
+ tmp.item,
+ tStockBuyed;
END ;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
/*!50003 SET character_set_client = @saved_cs_client */ ;
/*!50003 SET character_set_results = @saved_cs_results */ ;
/*!50003 SET collation_connection = @saved_col_connection */ ;
+/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `stockTraslation` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -68012,8 +68422,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `stockTraslation`(vDate DATE)
BEGIN
@@ -68025,7 +68433,7 @@ BEGIN
*/
DECLARE vAuctionWarehouseFk INT;
- DELETE FROM stockBuyed WHERE `date` = vDate;
+ DELETE FROM stockBuyed WHERE dated = vDate;
SELECT warehouseFk INTO vAuctionWarehouseFk
FROM auctionConfig;
@@ -68059,6 +68467,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `subordinateGetList` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -68066,8 +68476,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `subordinateGetList`(vBossFk INT)
BEGIN
@@ -68122,6 +68530,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `supplierExpenses` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -68129,8 +68539,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `supplierExpenses`(vEnded DATE)
BEGIN
@@ -68214,6 +68622,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `supplierPackaging_ReportSource` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -68221,71 +68631,62 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `supplierPackaging_ReportSource`(vFromDated DATE, vSupplierFk INT)
BEGIN
-
/**
- * Selecciona los embalajes de un proveedor a partir de una fecha
- *
- * @param vFromDated Fecha de la que partir
- * @param vSupplierFk Id del proveedor
- */
-
+* Selecciona los embalajes de un proveedor a partir de una fecha
+*
+* @param vFromDated Fecha de la que partir
+* @param vSupplierFk Id del proveedor
+*/
DECLARE vCounter INT DEFAULT 0;
DECLARE vMaxRow INT DEFAULT 0;
DECLARE vItemFk INT DEFAULT 0;
- SET @vRowNumber = 0;
SET @vBalance = 0;
- DROP TEMPORARY TABLE IF EXISTS tmp.supplierPackagingList;
- CREATE TEMPORARY TABLE tmp.supplierPackagingList
- SELECT itemFk,
- @vRowNumber:= @vRowNumber + 1 `row`
+ CREATE OR REPLACE TEMPORARY TABLE tSupplierPackagingList
+ SELECT ROW_NUMBER() OVER(ORDER BY landed) `row`,
+ itemFk,
+ entryFk
FROM (
- SELECT *
- FROM (
- SELECT supplierFk,
- itemFk,
- longName,
- supplier,
- entryFk,
- landed,
- `out`,
- `in`,
- warehouse,
- buyingValue
- FROM supplierPackaging
- WHERE supplierFk = vSupplierFk
- AND landed >= vFromDated
-
- UNION ALL
-
- SELECT vSupplierFk,
- itemFk,
- longName,
- supplier,
- 'previous',
- vFromDated,
- SUM(`out`),
- SUM(`in`),
- NULL,
- buyingValue
- FROM supplierPackaging
- WHERE supplierFk = vSupplierFk
- AND landed < vFromDated
- GROUP BY itemFk) i
+ SELECT supplierFk,
+ itemFk,
+ longName,
+ supplier,
+ entryFk,
+ landed,
+ `out`,
+ `in`,
+ warehouse,
+ buyingValue
+ FROM supplierPackaging
+ WHERE supplierFk = vSupplierFk
+ AND landed >= vFromDated
+ UNION ALL
+ SELECT vSupplierFk,
+ itemFk,
+ longName,
+ supplier,
+ 'previous',
+ vFromDated,
+ SUM(`out`),
+ SUM(`in`),
+ NULL,
+ buyingValue
+ FROM supplierPackaging
+ WHERE supplierFk = vSupplierFk
+ AND landed < vFromDated
GROUP BY itemFk
- ORDER BY landed) i2;
+ ) sub
+ GROUP BY itemFk
+ HAVING entryFk <> 'previous'
+ ORDER BY landed;
- SELECT MAX(`row`)
- INTO vMaxRow
- FROM tmp.supplierPackagingList;
+ SELECT MAX(`row`) INTO vMaxRow
+ FROM tSupplierPackagingList;
- DROP TEMPORARY TABLE IF EXISTS tmp.supplierPackaging;
- CREATE TEMPORARY TABLE tmp.supplierPackaging(
+ CREATE OR REPLACE TEMPORARY TABLE tSupplierPackaging(
supplierFk INT,
itemFk INT,
longName VARCHAR(50),
@@ -68296,24 +68697,23 @@ BEGIN
`out` VARCHAR(50),
warehouse INT,
buyingValue INT,
- balance INT);
+ balance INT
+ );
l1: LOOP
-
+ SET @vBalance = 0;
IF vCounter = vMaxRow THEN
LEAVE l1;
ELSE
SET vCounter = vCounter + 1;
- SET @vBalance = 0;
END IF;
- SELECT itemFk
- INTO vItemFk
- FROM tmp.supplierPackagingList
+ SELECT itemFk INTO vItemFk
+ FROM tSupplierPackagingList
WHERE `row` = vCounter;
- INSERT INTO tmp.supplierPackaging
- SELECT supplierFk,
+ INSERT INTO tSupplierPackaging
+ SELECT supplierFk,
itemFk,
longName,
supplier,
@@ -68325,7 +68725,7 @@ BEGIN
buyingValue,
@vBalance:= (`in` - `out` + @vBalance)
FROM (
- SELECT supplierFk,
+ SELECT supplierFk,
itemFk,
longName,
supplier,
@@ -68339,10 +68739,8 @@ BEGIN
WHERE supplierFk = vSupplierFk
AND landed >= vFromDated
AND itemFk = vItemFk
-
UNION ALL
-
- SELECT vSupplierFk,
+ SELECT vSupplierFk,
itemFk,
longName,
supplier,
@@ -68357,25 +68755,26 @@ BEGIN
AND landed < vFromDated
AND itemFk = vItemFk
GROUP BY itemFk
+ ORDER BY landed
) sub
- WHERE `out` OR `in`
- ORDER BY itemFk, landed;
-
+ WHERE `out` OR `in`;
END LOOP l1;
- SELECT * FROM tmp.supplierPackaging;
-
- DROP TEMPORARY TABLE IF EXISTS tmp.supplierPackagingList;
- DROP TEMPORARY TABLE IF EXISTS tmp.supplierPackaging;
- SET @vRowNumber = 0;
- SET @vBalance = 0;
+ SELECT *
+ FROM tSupplierPackaging
+ ORDER BY itemFk, landed;
+ DROP TEMPORARY TABLE IF EXISTS
+ tSupplierPackaging,
+ tSupplierPackagingList;
END ;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
/*!50003 SET character_set_client = @saved_cs_client */ ;
/*!50003 SET character_set_results = @saved_cs_results */ ;
/*!50003 SET collation_connection = @saved_col_connection */ ;
+/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `supplier_checkBalance` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -68383,8 +68782,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `supplier_checkBalance`(IN vDateTo DATETIME, IN vIsConciliated BOOL)
BEGIN
@@ -68463,6 +68860,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `supplier_checkIsActive` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -68470,8 +68869,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `supplier_checkIsActive`(vSelf INT)
BEGIN
@@ -68493,6 +68890,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `supplier_disablePayMethodChecked` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -68500,8 +68899,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `supplier_disablePayMethodChecked`()
BEGIN
@@ -68529,6 +68926,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `test` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -68536,8 +68935,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `test`()
BEGIN
@@ -68548,6 +68945,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `ticketBoxesView` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -68555,8 +68954,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `ticketBoxesView`(IN vTicketFk INT)
BEGIN
@@ -68586,6 +68983,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `ticketBuiltTime` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -68593,8 +68992,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `ticketBuiltTime`(vDate DATE)
BEGIN
@@ -68637,6 +69034,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `ticketCalculateClon` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -68644,8 +69043,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `ticketCalculateClon`(IN vTicketNew INT, vTicketOld INT)
BEGIN
@@ -68687,6 +69084,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `ticketCalculateFromType` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -68694,8 +69093,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `ticketCalculateFromType`( vLanded DATE,
vAddressFk INT,
@@ -68718,6 +69115,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `ticketCalculatePurge` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -68725,8 +69124,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `ticketCalculatePurge`()
BEGIN
@@ -68742,6 +69139,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `ticketClon` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -68749,8 +69148,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `ticketClon`(vTicketFk INT, vNewShipped DATE)
BEGIN
@@ -68810,6 +69207,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `ticketClon_OneYear` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -68817,8 +69216,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `ticketClon_OneYear`(vTicketFk INT)
BEGIN
@@ -68845,6 +69242,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `ticketCollection_get` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -68852,8 +69251,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `ticketCollection_get`(vTicketFk INT)
BEGIN
@@ -68868,6 +69265,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `ticketCollection_setUsedShelves` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -68875,8 +69274,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `ticketCollection_setUsedShelves`(vTicketFk INT, vUsedShelves INT)
BEGIN
@@ -68898,6 +69295,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `ticketComponentUpdate` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -68905,8 +69304,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `ticketComponentUpdate`(
vTicketFk INT,
@@ -68976,6 +69373,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `ticketComponentUpdateSale` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -68983,8 +69382,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `ticketComponentUpdateSale`(vOption INT)
BEGIN
@@ -69173,6 +69570,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `ticketDown_PrintableSelection` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -69180,8 +69579,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `ticketDown_PrintableSelection`(vSectorFk INT)
BEGIN
@@ -69208,6 +69605,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `ticketGetTaxAdd` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -69215,8 +69614,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `ticketGetTaxAdd`(vTicketFk INT)
BEGIN
@@ -69252,6 +69649,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `ticketGetTax_new` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -69259,8 +69658,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `ticketGetTax_new`()
READS SQL DATA
@@ -69331,6 +69728,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `ticketGetTotal` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -69338,14 +69737,13 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `ticketGetTotal`(vTaxArea VARCHAR(25))
BEGIN
/**
* Calcula el total con IVA para un conjunto de tickets.
*
+ * @param vTaxArea
* @table tmp.ticket(ticketFk) Identificadores de los tickets a calcular
* @return tmp.ticketTotal Total para cada ticket
*/
@@ -69370,6 +69768,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `ticketGetVisibleAvailable` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -69377,8 +69777,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `ticketGetVisibleAvailable`(
vTicket INT)
@@ -69416,6 +69814,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `ticketMissed_List` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -69423,8 +69823,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `ticketMissed_List`(vTicketFk INT)
BEGIN
@@ -69478,6 +69876,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `ticketNotInvoicedByClient` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -69485,8 +69885,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `ticketNotInvoicedByClient`(vClientFk INT)
BEGIN
@@ -69521,6 +69919,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `ticketObservation_addNewBorn` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -69528,8 +69928,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `ticketObservation_addNewBorn`(vTicketFk INT)
BEGIN
@@ -69554,6 +69952,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `ticketPackaging_add` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -69561,8 +69961,6 @@ DELIMITER ;
/*!50003 SET character_set_client = utf8mb3 */ ;
/*!50003 SET character_set_results = utf8mb3 */ ;
/*!50003 SET collation_connection = utf8mb3_general_ci */ ;
-/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
-/*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `ticketPackaging_add`(
vClientFk INT,
@@ -69705,6 +70103,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `ticketParking_findSkipped` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -69712,8 +70112,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `ticketParking_findSkipped`(vTicketFk INT, vItemPackingTypeFk VARCHAR(1))
BEGIN
@@ -69782,6 +70180,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `ticketRefund_beforeUpsert` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -69789,8 +70189,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `ticketRefund_beforeUpsert`(vRefundTicketFk INT, vOriginalTicketFk INT)
BEGIN
@@ -69813,6 +70211,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `ticketRequest_Add` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -69820,8 +70220,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `ticketRequest_Add`(vDescription VARCHAR(255), vQuantity INT, vPrice DOUBLE, vTicketFk INT, vBuyerCode VARCHAR(3))
BEGIN
@@ -69845,6 +70243,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `ticketStateToday_setState` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -69852,8 +70252,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `ticketStateToday_setState`(vTicketFk INT, vStateCode VARCHAR(45))
BEGIN
@@ -69885,6 +70283,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `ticketStateUpdate` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -69892,8 +70292,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `ticketStateUpdate`(vTicketFk INT, vStateCode VARCHAR(45))
BEGIN
@@ -69924,6 +70322,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `ticketToInvoiceByAddress` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -69931,8 +70331,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `ticketToInvoiceByAddress`(
vStarted DATE,
@@ -69960,6 +70358,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `ticketToInvoiceByDate` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -69967,8 +70367,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `ticketToInvoiceByDate`(
vStarted DATE,
@@ -69996,6 +70394,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `ticketToInvoiceByRef` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -70003,8 +70403,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `ticketToInvoiceByRef`(IN vInvoiceRef VARCHAR(15))
BEGIN
@@ -70056,6 +70454,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `ticket_add` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -70063,8 +70463,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `ticket_add`(
vClientId INT
@@ -70181,6 +70579,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `ticket_administrativeCopy` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -70188,8 +70588,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `ticket_administrativeCopy`(vOriginalTicket INT, OUT vNewTicket INT)
BEGIN
@@ -70213,6 +70611,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `ticket_canAdvance` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -70220,8 +70620,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `ticket_canAdvance`(vDateFuture DATE, vDateToAdvance DATE, vWarehouseFk INT)
BEGIN
@@ -70351,6 +70749,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `ticket_canbePostponed` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -70358,8 +70758,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `ticket_canbePostponed`(vOriginDated DATE, vFutureDated DATE, vWarehouseFk INT)
BEGIN
@@ -70436,6 +70834,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `ticket_canMerge` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -70443,8 +70843,6 @@ DELIMITER ;
/*!50003 SET character_set_client = utf8mb3 */ ;
/*!50003 SET character_set_results = utf8mb3 */ ;
/*!50003 SET collation_connection = utf8mb3_general_ci */ ;
-/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
-/*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `ticket_canMerge`(vDated DATE, vScopeDays INT, vLitersMax INT, vLinesMax INT, vWarehouseFk INT)
BEGIN
@@ -70514,6 +70912,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `ticket_checkNoComponents` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -70521,8 +70921,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `ticket_checkNoComponents`(vShippedFrom DATETIME, vShippedTo DATETIME)
BEGIN
@@ -70572,6 +70970,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `ticket_Clone` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -70579,8 +70979,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `ticket_Clone`(vOriginalTicket INT, OUT vNewTicket INT)
BEGIN
@@ -70646,6 +71044,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `ticket_cloneWeekly` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -70653,8 +71053,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `ticket_cloneWeekly`(vWeek INT)
BEGIN
@@ -70670,21 +71068,29 @@ BEGIN
DECLARE vAgencyModeFk INT;
DECLARE vNewTicket INT;
DECLARE vYear INT;
+ DECLARE vSalesPersonFK INT;
+ DECLARE vItemPicker INT;
DECLARE rsTicket CURSOR FOR
- SELECT tt.ticketFk, tt.weekDay, t.clientFk, t.warehouseFk, t.companyFk, t.addressFk, tt.agencyModeFk
- FROM vn.ticketWeekly tt
- JOIN vn.ticket t ON tt.ticketFk = t.id;
+ SELECT tt.ticketFk,
+ tt.weekDay,
+ t.clientFk,
+ t.warehouseFk,
+ t.companyFk,
+ t.addressFk,
+ tt.agencyModeFk
+ FROM ticketWeekly tt
+ JOIN ticket t ON tt.ticketFk = t.id;
DECLARE CONTINUE HANDLER FOR NOT FOUND SET vIsDone = TRUE;
- SET vYear = YEAR(util.VN_CURDATE()) + IF(vWeek < WEEK(util.VN_CURDATE()),1, 0);
+ SET vYear = YEAR(util.VN_CURDATE()) + IF(vWeek < WEEK(util.VN_CURDATE()),1, 0);
OPEN rsTicket;
myLoop: LOOP
BEGIN
DECLARE vSalesPersonEmail VARCHAR(150);
- DECLARE vMailSent BOOL;
+ DECLARE vIsDuplicateMail BOOL;
DECLARE vSubject VARCHAR(150);
DECLARE vMessage TEXT;
@@ -70701,12 +71107,14 @@ BEGIN
AND WEEKDAY(dated) = 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 = vTicketFk AND tClon.isDeleted = FALSE AND DATE(tClon.shipped) = vShipment) > 0
+ IF EXISTS (SELECT TRUE FROM ticket tOrig
+ JOIN sale saleOrig ON tOrig.id = saleOrig.ticketFk
+ JOIN saleCloned sc ON sc.saleOriginalFk = saleOrig.id
+ JOIN sale saleClon ON saleClon.id = sc.saleClonedFk
+ JOIN ticket tClon ON tClon.id = saleClon.ticketFk
+ WHERE tOrig.id = vTicketFk
+ AND tClon.isDeleted = FALSE
+ AND DATE(tClon.shipped) = vShipment)
THEN
ITERATE myLoop;
END IF;
@@ -70714,12 +71122,13 @@ BEGIN
IF vAgencyModeFk IS NULL THEN
SELECT agencyModeFk INTO vAgencyModeFk
FROM address
- WHERE clientFk = vClientFk AND isDefaultAddress;
+ WHERE clientFk = vClientFk
+ AND isDefaultAddress;
END IF;
- CALL vn.zone_getLanded(vShipment, vAddressFk, vAgencyModeFk, vWarehouseFk,FALSE);
+ CALL zone_getLanded(vShipment, vAddressFk, vAgencyModeFk, vWarehouseFk,FALSE);
SET vLanding = NULL;
- SELECT landed INTO vLanding from tmp.zoneGetLanded LIMIT 1;
+ SELECT landed INTO vLanding FROM tmp.zoneGetLanded LIMIT 1;
CALL ticket_add(
vClientFk,
@@ -70738,67 +71147,124 @@ BEGIN
SET clonedFrom = vTicketFk
WHERE id = vNewTicket;
+ INSERT INTO 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 sale saleOrig
+ WHERE saleOrig.ticketFk = vTicketFk;
+
+ INSERT IGNORE INTO saleCloned(saleOriginalFk, saleClonedFk)
+ SELECT saleOriginal.id, saleClon.id
+ FROM sale saleOriginal
+ JOIN sale saleClon ON saleOriginal.itemFk = saleClon.itemFk
+ AND saleOriginal.quantity = saleClon.quantity
+ WHERE saleOriginal.ticketFk = vTicketFk
+ AND saleClon.ticketFk = vNewTicket;
+
+ INSERT INTO ticketRequest (description,
+ ordered,
+ shipped,
+ quantity,
+ price,
+ itemFk,
+ clientFk,
+ response,
+ total,
+ buyed,
+ requesterFk
+ ,attenderFk,
+ ticketFk)
+ SELECT description,
+ ordered,
+ shipped,
+ quantity,
+ price,
+ itemFk,
+ clientFk,
+ response,
+ total,
+ buyed,
+ requesterFk,
+ attenderFk,
+ vNewTicket
+ FROM ticketRequest
+ WHERE ticketFk =vTicketFk;
+
+ SELECT id INTO vSalesPersonFK
+ FROM observationType
+ WHERE code = 'salesPerson';
+
+ SELECT id INTO vItemPicker
+ FROM observationType
+ WHERE code = 'itemPicker';
+
+ INSERT INTO ticketObservation(
+ ticketFk,
+ observationTypeFk,
+ description)
+ VALUES(
+ vNewTicket,
+ vSalesPersonFK,
+ CONCAT('turno desde ticket: ',vTicketFk))
+ ON DUPLICATE KEY UPDATE description =
+ CONCAT(ticketObservation.description,VALUES(description),' ');
+
+ INSERT INTO ticketObservation(ticketFk,
+ observationTypeFk,
+ description)
+ VALUES(
+ vNewTicket,
+ vItemPicker,
+ 'ATENCION: Contiene lineas de TURNO')
+ ON DUPLICATE KEY UPDATE description =
+ CONCAT(ticketObservation.description,VALUES(description),' ');
+
IF (vLanding IS NULL) THEN
SELECT e.email INTO vSalesPersonEmail
FROM vn.client c
- JOIN account.emailUser e ON e.userFk = c.salesPersonFk
+ JOIN vn.worker sp ON sp.id = c.salesPersonFk
+ JOIN account.emailUser e ON e.userFk = sp.userFk
WHERE c.id = vClientFk;
- SET vSubject = CONCAT('Turnos - No se ha podido clonar correctamente el ticket ', vTicketFk,
- ' para el dia: ', vShipment);
+ SET vSubject = CONCAT('Turnos - No se ha podido clonar correctamente el ticket ',
+ vTicketFk,' para el dia: ', vShipment);
SET vMessage = CONCAT('No se ha podido clonar el ticket ', vTicketFk,
' 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');
+ ' 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
+ SELECT COUNT(*) INTO vIsDuplicateMail
+ FROM mail
WHERE receiver = vSalesPersonEmail
AND subject = vSubject;
- IF NOT vMailSent THEN
+ IF NOT vIsDuplicateMail THEN
CALL mail_insert(vSalesPersonEmail, NULL, vSubject, vMessage);
END IF;
- CALL vn.ticketStateUpdate (vNewTicket, 'FIXING');
+ CALL ticketStateUpdate (vNewTicket, 'FIXING');
+ ELSE
+ CALL ticketCalculateClon(vNewTicket, vTicketFk);
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.sale saleOrig
- WHERE saleOrig.ticketFk = vTicketFk;
-
- 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 = vTicketFk AND saleClon.ticketFk = vNewTicket;
-
- INSERT INTO ticketRequest (description,ordered,shipped,quantity,price,itemFk,clientFk,response,
- total,buyed,requesterFk,attenderFk,ticketFk)
- SELECT description,ordered,shipped,quantity,price,itemFk,clientFk,response,
- total,buyed,requesterFk,attenderFk,vNewTicket
- FROM ticketRequest
- WHERE ticketFk =vTicketFk;
-
- INSERT INTO ticketObservation(ticketFk,observationTypeFk,description) VALUES(vNewTicket,4,CONCAT('turno desde ticket: ',vTicketFk))
- ON DUPLICATE KEY UPDATE description = CONCAT(ticketObservation.description,VALUES(description),' ');
-
- INSERT INTO ticketObservation(ticketFk,observationTypeFk,description) VALUES(vNewTicket,1,'ATENCION: Contiene lineas de TURNO')
- ON DUPLICATE KEY UPDATE description = CONCAT(ticketObservation.description,VALUES(description),' ');
-
- CALL vn.ticketCalculateClon(vNewTicket, vTicketFk);
END;
END LOOP;
-
CLOSE rsTicket;
-
END ;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
/*!50003 SET character_set_client = @saved_cs_client */ ;
/*!50003 SET character_set_results = @saved_cs_results */ ;
/*!50003 SET collation_connection = @saved_col_connection */ ;
+/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `ticket_close` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -70806,8 +71272,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `ticket_close`()
BEGIN
@@ -70915,6 +71379,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `ticket_closeByTicket` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -70922,8 +71388,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `ticket_closeByTicket`(IN vTicketFk int)
BEGIN
@@ -70955,6 +71419,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `ticket_componentMakeUpdate` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -70962,8 +71428,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `ticket_componentMakeUpdate`(
vTicketFk INT,
@@ -71067,6 +71531,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `ticket_componentPreview` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -71074,8 +71540,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `ticket_componentPreview`(
vTicketFk INT,
@@ -71181,6 +71645,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `ticket_DelayTruck` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -71188,8 +71654,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `ticket_DelayTruck`(vWarehouserFk INT, vHour INT, vMinute INT)
BEGIN
@@ -71228,6 +71692,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `ticket_DelayTruckSplit` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -71235,8 +71701,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `ticket_DelayTruckSplit`(vTicketFk INT)
BEGIN
@@ -71294,6 +71758,110 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
+/*!50003 DROP PROCEDURE IF EXISTS `ticket_doCmr` */;
+/*!50003 SET @saved_cs_client = @@character_set_client */ ;
+/*!50003 SET @saved_cs_results = @@character_set_results */ ;
+/*!50003 SET @saved_col_connection = @@collation_connection */ ;
+/*!50003 SET character_set_client = utf8mb4 */ ;
+/*!50003 SET character_set_results = utf8mb4 */ ;
+/*!50003 SET collation_connection = utf8mb4_unicode_ci */ ;
+DELIMITER ;;
+CREATE DEFINER=`root`@`localhost` PROCEDURE `ticket_doCmr`(vSelf INT)
+BEGIN
+/**
+* Crea u actualiza la información del CMR asociado con
+* un ticket específico en caso de que sea necesario.
+*
+* @param vSelf El id del ticket
+*/
+ DECLARE vCmrFk, vPreviousCmrFk, vCurrentCmrFk INT;
+ SELECT cmrFk INTO vCmrFk
+ FROM ticket
+ WHERE id = vSelf;
+
+ CREATE OR REPLACE TEMPORARY TABLE tTicket
+ SELECT wo.firstName,
+ v.numberPlate,
+ com.id companyFk,
+ a.id addressFk,
+ c2.defaultAddressFk,
+ su.id supplierFk,
+ t.landed
+ FROM ticket t
+ JOIN ticketState ts ON ts.ticketFk = t.id
+ JOIN `state` s ON s.id = ts.stateFk
+ JOIN alertLevel al ON al.id = s.alertLevel
+ JOIN client c ON c.id = t.clientFk
+ JOIN `address` a ON a.id = t.addressFk
+ JOIN province p ON p.id = a.provinceFk
+ JOIN country co ON co.id = p.countryFk
+ JOIN agencyMode am ON am.id = t.agencyModeFk
+ JOIN deliveryMethod dm ON dm.id = am.deliveryMethodFk
+ JOIN warehouse w ON w.id = t.warehouseFk
+ JOIN company com ON com.id = t.companyFk
+ JOIN client c2 ON c2.id = com.clientFk
+ JOIN supplierAccount sa ON sa.id = com.supplierAccountFk
+ JOIN supplier su ON su.id = sa.supplierFk
+ LEFT JOIN route r ON r.id = t.routeFk
+ LEFT JOIN worker wo ON wo.id = r.workerFk
+ LEFT JOIN vehicle v ON v.id = r.vehicleFk
+ WHERE t.shipped BETWEEN util.yesterday() AND util.dayEnd(util.VN_CURDATE())
+ AND al.code IN ('PACKED', 'DELIVERED')
+ AND co.code <> 'ES'
+ AND am.name <> 'ABONO'
+ AND w.code = 'ALG'
+ AND dm.code = 'DELIVERY'
+ AND t.id = vSelf
+ GROUP BY t.id;
+
+ START TRANSACTION;
+
+ IF vCmrFk THEN
+ UPDATE cmr c
+ JOIN tTicket t
+ SET c.senderInstruccions = t.firstName,
+ c.truckPlate = t.numberPlate,
+ c.companyFk = t.companyFk,
+ c.addressToFk = t.addressFk,
+ c.addressFromFk = t.defaultAddressFk,
+ c.supplierFk = t.supplierFk,
+ c.ead = t.landed
+ WHERE id = vCmrFk;
+ ELSE
+ SELECT MAX(id) INTO vPreviousCmrFk FROM cmr;
+
+ INSERT INTO cmr (
+ senderInstruccions,
+ truckPlate,
+ companyFk,
+ addressToFk,
+ addressFromFk,
+ supplierFk,
+ ead
+ )
+ SELECT * FROM tTicket;
+
+ SELECT MAX(id) INTO vCurrentCmrFk FROM cmr;
+
+ IF vPreviousCmrFk <> vCurrentCmrFk THEN
+ UPDATE ticket
+ SET cmrFk = vCurrentCmrFk
+ WHERE id = vSelf;
+ END IF;
+ END IF;
+
+ COMMIT;
+ DROP TEMPORARY TABLE tTicket;
+END ;;
+DELIMITER ;
+/*!50003 SET sql_mode = @saved_sql_mode */ ;
+/*!50003 SET character_set_client = @saved_cs_client */ ;
+/*!50003 SET character_set_results = @saved_cs_results */ ;
+/*!50003 SET collation_connection = @saved_col_connection */ ;
+/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `ticket_doRecalc` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -71301,8 +71869,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `ticket_doRecalc`()
proc: BEGIN
@@ -71360,6 +71926,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `ticket_getFromFloramondo` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -71367,8 +71935,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `ticket_getFromFloramondo`(vDateFrom DATE, vDateTo DATE)
BEGIN
@@ -71500,6 +72066,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `ticket_getMovable` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -71507,8 +72075,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `ticket_getMovable`(vTicketFk INT, vDatedNew DATETIME, vWarehouseFk INT)
BEGIN
@@ -71528,7 +72094,7 @@ BEGIN
FROM ticket t
WHERE t.id = vTicketFk;
- CALL itemStock(vWarehouseFk, vDatedNew, NULL);
+ CALL item_getStock(vWarehouseFk, vDatedNew, NULL);
CALL item_getMinacum(vWarehouseFk, vDatedNew, DATEDIFF(DATE_SUB(vDatedOld, INTERVAL 1 DAY), vDatedNew), NULL);
SELECT s.id,
@@ -71557,6 +72123,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `ticket_getProblems` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -71564,8 +72132,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `ticket_getProblems`(IN vIsTodayRelative tinyint(1))
BEGIN
@@ -71622,6 +72188,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `ticket_getSplitList` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -71629,8 +72197,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `ticket_getSplitList`(vDated DATE, vHour TIME, vWarehouseFk INT)
BEGIN
@@ -71772,6 +72338,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `ticket_getTax` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -71779,8 +72347,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `ticket_getTax`(IN vTaxArea VARCHAR(25))
BEGIN
@@ -71888,6 +72454,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `ticket_getWarnings` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -71895,8 +72463,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `ticket_getWarnings`()
BEGIN
@@ -71943,6 +72509,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `ticket_getWithParameters` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -71950,8 +72518,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `ticket_getWithParameters`(
vClientFk INT,
@@ -72005,6 +72571,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `ticket_insertZone` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -72012,8 +72580,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `ticket_insertZone`()
BEGIN
@@ -72048,6 +72614,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `ticket_priceDifference` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -72055,8 +72623,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `ticket_priceDifference`(
vTicketFk INT,
@@ -72105,6 +72671,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `ticket_printLabelPrevious` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -72112,8 +72680,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `ticket_printLabelPrevious`(vTicketFk INT)
BEGIN
@@ -72127,14 +72693,14 @@ BEGIN
DECLARE vSaleGroup INT;
DECLARE vUserFk INT DEFAULT account.myUser_getId();
- SELECT sg.id, w.labelerFk INTO vSaleGroup, vPrinterFk
+ SELECT sg.id, o.labelerFk INTO vSaleGroup, vPrinterFk
FROM saleGroup sg
JOIN sector sc ON sc.id = sg.sectorFk
JOIN saleGroupDetail sgd ON sg.id = sgd.saleGroupFk
JOIN sale s ON sgd.saleFk = s.id
JOIN ticket t ON s.ticketFk = t.id
- JOIN worker w ON w.id = vUserFk
- WHERE sc.id = w.sectorFk
+ JOIN operator o ON o.workerFk = vUserFk
+ WHERE sc.id = o.sectorFk
AND t.id = vTicketFk
LIMIT 1;
@@ -72151,6 +72717,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `ticket_recalc` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -72158,17 +72726,15 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `ticket_recalc`(vSelf INT, vTaxArea VARCHAR(25))
proc:BEGIN
/**
* Calcula y guarda el total con/sin IVA en un ticket.
*
- * @param vTicketId Identificador del ticket
+ * @param vSelf Identificador del ticket
+ * @param vTaxArea
*/
-
DECLARE hasInvoice BOOL;
SELECT COUNT(*) INTO hasInvoice
@@ -72201,6 +72767,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `ticket_recalcComponents` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -72208,8 +72776,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `ticket_recalcComponents`(vSelf INT, vOption INT)
proc: BEGIN
@@ -72235,6 +72801,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `ticket_requestRecalc` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -72242,8 +72810,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `ticket_requestRecalc`(vSelf INT)
proc: BEGIN
@@ -72263,6 +72829,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `ticket_setNextState` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -72270,8 +72838,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `ticket_setNextState`(vSelf INT)
BEGIN
@@ -72299,6 +72865,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `ticket_setParking` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -72306,8 +72874,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `ticket_setParking`(IN `vTicketFk` VARCHAR(8), IN `vParkingFk` INT)
proc: BEGIN
@@ -72354,6 +72920,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `ticket_setPreviousState` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -72361,8 +72929,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `ticket_setPreviousState`(vTicketFk INT)
BEGIN
@@ -72399,6 +72965,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `ticket_setState` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -72406,8 +72974,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `ticket_setState`(vSelf INT, vStateCode VARCHAR(255) COLLATE utf8_general_ci)
BEGIN
@@ -72459,6 +73025,10 @@ BEGIN
SELECT id, vSelf, account.myUser_getId()
FROM state
WHERE `code` = vStateCode COLLATE utf8_unicode_ci;
+
+ IF vStateCode = 'PACKED' THEN
+ CALL ticket_doCmr(vSelf);
+ END IF;
ELSE
CALL util.throw('INCORRECT_TICKET_STATE');
END IF;
@@ -72468,6 +73038,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `ticket_split` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -72475,8 +73047,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `ticket_split`(vTicketFk INT, vTicketFutureFk INT, vDated DATE)
proc:BEGIN
@@ -72559,6 +73129,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `ticket_splitItemPackingType` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -72566,8 +73138,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `ticket_splitItemPackingType`(vTicketFk INT, vOriginalItemPackingTypeFk VARCHAR(1))
proc:BEGIN
@@ -72678,6 +73248,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `ticket_splitPackingComplete` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -72685,8 +73257,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `ticket_splitPackingComplete`(vTicketFk INT, vSectorFk INT)
BEGIN
@@ -72733,6 +73303,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `ticket_WeightDeclaration` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -72740,8 +73312,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `ticket_WeightDeclaration`(vClientFk INT, vDated DATE)
BEGIN
@@ -72796,6 +73366,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `timeBusiness_calculate` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -72803,8 +73375,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `timeBusiness_calculate`(vDatedFrom DATETIME, vDatedTo DATETIME)
BEGIN
@@ -72848,8 +73418,7 @@ BEGIN
at2.permissionRate,
at2.discountRate,
ct.hoursWeek hoursWeek,
- at2.isAllowedToWork,
- u.userFk
+ at2.isAllowedToWork
FROM time t
LEFT JOIN business b ON t.dated BETWEEN b.started AND IFNULL(b.ended, vDatedTo)
LEFT JOIN worker w ON w.id = b.workerFk
@@ -72895,6 +73464,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `timeBusiness_calculateAll` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -72902,20 +73473,22 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `timeBusiness_calculateAll`(vDatedFrom DATETIME, vDatedTo DATETIME)
BEGIN
/**
- * @param vDatedFrom workerTimeControl
- * @param vDatedTo workerTimeControl
+ * @param vDatedFrom Fecha desde
+ * @param vDatedTo Fecha hasta
*/
- CREATE OR REPLACE TEMPORARY TABLE tmp.`user`
- SELECT w.id userFk
- FROM vn.worker w;
+ DROP TEMPORARY TABLE IF EXISTS tmp.`user`;
+
+ CREATE TEMPORARY TABLE IF NOT EXISTS tmp.`user`
+ SELECT userFk
+ FROM vn.worker w
+ JOIN account.`user` u ON u.id = w.userFk
+ WHERE userFk IS NOT NULL;
CALL vn.timeBusiness_calculate(vDatedFrom, vDatedTo);
@@ -72927,6 +73500,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `timeBusiness_calculateByDepartment` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -72934,8 +73509,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `timeBusiness_calculateByDepartment`(vDepartmentFk INT, vDatedFrom DATETIME, vDatedTo DATETIME)
BEGIN
@@ -72965,6 +73538,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `timeBusiness_calculateByUser` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -72972,8 +73547,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `timeBusiness_calculateByUser`(vUserFk INT, vDatedFrom DATETIME, vDatedTo DATETIME)
BEGIN
@@ -73000,6 +73573,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `timeBusiness_calculateByWorker` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -73007,24 +73582,25 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `timeBusiness_calculateByWorker`(vWorkerFk INT, vDatedFrom DATETIME, vDatedTo DATETIME)
BEGIN
/**
* @param vWorkerFk
- * @param vDatedFrom workerTimeControl
- * @param vDatedTo workerTimeControl
+ * @param vDatedFrom Fecha desde
+ * @param vDatedTo Fecha hasta
*/
- CREATE OR REPLACE TEMPORARY TABLE tmp.`user`
- SELECT w.id userFk
- FROM worker w
- WHERE w.id = vWorkerFk;
+ DROP TEMPORARY TABLE IF EXISTS tmp.`user`;
- CALL timeBusiness_calculate(vDatedFrom, vDatedTo);
+ CREATE TEMPORARY TABLE tmp.`user`
+ SELECT u.id userFk
+ FROM account.user u
+ JOIN vn.worker w ON w.userFk = u.id
+ WHERE w.id = vWorkerFk;
+
+ CALL vn.timeBusiness_calculate(vDatedFrom, vDatedTo);
DROP TEMPORARY TABLE tmp.`user`;
@@ -73034,6 +73610,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `timeControl_calculate` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -73041,8 +73619,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `timeControl_calculate`(
vDatedFrom DATETIME,
@@ -73248,6 +73824,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `timeControl_calculateAll` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -73255,20 +73833,22 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `timeControl_calculateAll`(vDatedFrom DATETIME, vDatedTo DATETIME)
BEGIN
/**
- * @param vDatedFrom workerTimeControl
- * @param vDatedTo workerTimeControl
+ * @param vDatedFrom Fecha desde
+ * @param vDatedTo Fecha hasta
*/
- CREATE OR REPLACE TEMPORARY TABLE tmp.`user`
- SELECT w.id userFk
- FROM vn.worker w;
+ DROP TEMPORARY TABLE IF EXISTS tmp.`user`;
+
+ CREATE TEMPORARY TABLE IF NOT EXISTS tmp.`user`
+ SELECT userFk
+ FROM vn.worker w
+ JOIN account.`user` u ON u.id = w.userFk
+ WHERE userFk IS NOT NULL;
CALL vn.timeControl_calculate(vDatedFrom, vDatedTo);
@@ -73280,6 +73860,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `timeControl_calculateByDepartment` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -73287,8 +73869,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `timeControl_calculateByDepartment`(vDepartmentFk INT, vDatedFrom DATETIME, vDatedTo DATETIME)
BEGIN
@@ -73318,6 +73898,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `timeControl_calculateByUser` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -73325,8 +73907,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `timeControl_calculateByUser`(vUserFk INT, vDatedFrom DATETIME, vDatedTo DATETIME)
BEGIN
@@ -73353,6 +73933,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `timeControl_calculateByWorker` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -73360,8 +73942,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `timeControl_calculateByWorker`(vWorkerFk INT, vDatedFrom DATETIME, vDatedTo DATETIME)
BEGIN
@@ -73390,6 +73970,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `timeControl_getError` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -73397,8 +73979,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `timeControl_getError`(vDatedFrom DATETIME, vDatedTo DATETIME)
BEGIN
@@ -73473,6 +74053,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `timeWorkerControl_check` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -73480,8 +74062,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `timeWorkerControl_check`(vUserFk INT, vDated DATE,vTabletFk VARCHAR(100))
proc: BEGIN
@@ -73496,6 +74076,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `tpvTransaction_checkStatus` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -73503,8 +74085,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `tpvTransaction_checkStatus`()
BEGIN
@@ -73514,25 +74094,27 @@ BEGIN
* trasladados a la ficha del cliente.
*
*/
- INSERT INTO mail (receiver,replyTo,subject,body)
- SELECT 'administracion@verdnatura.es',
+ INSERT INTO mail (receiver, replyTo, subject, body)
+ SELECT 'administracion@verdnatura.es, finanzas@verdnatura.es',
'noreply@verdnatura.es',
- CONCAT('Cobro web no trasladado a la ficha del cliente ', t.clientFk),
- CONCAT('Hay un importe de ', t.amount/100, '€ del cliente ', t.clientFk, ' con fecha ', t.created,
+ CONCAT('Cobro web no trasladado a la ficha del cliente ', clientFk),
+ CONCAT('Hay un importe de ', amount / 100, '€ del cliente ', clientFk, ' con fecha ', created,
', que no se ha trasladado a recibos. Si nos ha llegado el importe al banco confirme el pago en
-
- https://salix.verdnatura.es/#!/client/',t.clientFk,'/web-payment')
- FROM hedera.tpvTransaction t
- WHERE t.receiptFk IS NULL
- AND t.status = 'ok'
- AND t.created < DATE_ADD(util.VN_NOW(),INTERVAL - 2 DAY)
- GROUP BY t.clientFk;
+
+ https://salix.verdnatura.es/#!/client/', clientFk, '/web-payment')
+ FROM hedera.tpvTransaction
+ WHERE receiptFk IS NULL
+ AND status = 'ok'
+ AND created < (util.VN_NOW() - INTERVAL 2 DAY)
+ GROUP BY clientFk;
END ;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
/*!50003 SET character_set_client = @saved_cs_client */ ;
/*!50003 SET character_set_results = @saved_cs_results */ ;
/*!50003 SET collation_connection = @saved_col_connection */ ;
+/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `travelVolume` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -73540,8 +74122,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `travelVolume`(vTravelFk INT)
BEGIN
@@ -73576,6 +74156,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `travelVolume_get` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -73583,8 +74165,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `travelVolume_get`(vFromDated DATE, vToDated DATE, vWarehouseFk INT)
BEGIN
@@ -73606,6 +74186,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `travel_checkDates` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -73613,8 +74195,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `travel_checkDates`(vShipped DATE, vLanded DATE)
BEGIN
@@ -73636,6 +74216,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `travel_checkPackaging` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -73643,8 +74225,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `travel_checkPackaging`(vSelf INT)
BEGIN
@@ -73679,6 +74259,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `travel_checkWarehouseIsFeedStock` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -73686,8 +74268,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `travel_checkWarehouseIsFeedStock`(vWarehouseFk INT)
proc: BEGIN
@@ -73709,6 +74289,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `travel_clone` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -73716,8 +74298,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `travel_clone`(vSelf INT, vDays INT, OUT vNewTravelFk INT)
BEGIN
@@ -73770,6 +74350,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `travel_cloneWithEntries` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -73777,8 +74359,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `travel_cloneWithEntries`(
IN vTravelFk INT,
@@ -73864,6 +74444,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `travel_doRecalc` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -73871,8 +74453,6 @@ DELIMITER ;
/*!50003 SET character_set_client = utf8mb3 */ ;
/*!50003 SET character_set_results = utf8mb3 */ ;
/*!50003 SET collation_connection = utf8mb3_general_ci */ ;
-/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
-/*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `travel_doRecalc`()
BEGIN
@@ -73917,6 +74497,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `travel_getEntriesMissingPackage` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -73924,8 +74506,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `travel_getEntriesMissingPackage`(vSelf INT)
BEGIN
@@ -73948,6 +74528,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `travel_moveRaids` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -73955,8 +74537,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `travel_moveRaids`()
BEGIN
@@ -74033,6 +74613,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `travel_requestRecalc` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -74040,8 +74622,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `travel_requestRecalc`(vSelf INT)
proc: BEGIN
@@ -74061,6 +74641,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `travel_updatePacking` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -74068,8 +74650,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `travel_updatePacking`(vItemFk INT, vPacking INT)
BEGIN
@@ -74103,6 +74683,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `travel_weeklyClone` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -74110,8 +74692,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `travel_weeklyClone`(vSinceWeek INT, vToWeek INT)
BEGIN
@@ -74189,6 +74769,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `typeTagMake` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -74196,8 +74778,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `typeTagMake`(vTypeFk INT)
BEGIN
@@ -74260,6 +74840,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `updatePedidosInternos` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -74267,8 +74849,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `updatePedidosInternos`(vItemFk INT)
BEGIN
@@ -74282,6 +74862,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `vehicle_checkNumberPlate` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -74289,8 +74871,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `vehicle_checkNumberPlate`(vNumberPlate VARCHAR(10), vCountryCodeFk VARCHAR(2))
BEGIN
@@ -74312,6 +74892,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `vehicle_notifyEvents` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -74319,8 +74901,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `vehicle_notifyEvents`()
proc:BEGIN
@@ -74376,6 +74956,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `visible_getMisfit` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -74383,8 +74965,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `visible_getMisfit`(vSectorFk INT)
BEGIN
@@ -74435,6 +75015,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `warehouseFitting` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -74442,8 +75024,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `warehouseFitting`(IN vWhOrigin INT , IN vWhDestiny INT)
BEGIN
@@ -74473,6 +75053,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `warehouseFitting_byTravel` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -74480,8 +75062,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `warehouseFitting_byTravel`(IN vTravelFk INT)
BEGIN
@@ -74501,6 +75081,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `workerCalculateBoss` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -74508,8 +75090,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `workerCalculateBoss`(vWorker INT)
BEGIN
@@ -74542,6 +75122,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `workerCalendar_calculateBusiness` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -74549,8 +75131,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `workerCalendar_calculateBusiness`(vYear INT, vBusinessFk INT)
BEGIN
@@ -74616,6 +75196,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `workerCalendar_calculateYear` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -74623,8 +75205,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `workerCalendar_calculateYear`(vYear INT, vWorkerFk INT)
BEGIN
@@ -74688,6 +75268,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `workerCreate` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -74695,8 +75277,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `workerCreate`(
vFirstname VARCHAR(50),
@@ -74712,14 +75292,16 @@ BEGIN
* Create new worker
*
*/
- INSERT INTO worker(id, code, firstName, lastName, bossFk, fi, birth)
- VALUES (vUserFk, vCode, vFirstname, vLastName, vBossFk, vFi, vBirth);
+ INSERT INTO worker(id, code, firstName, lastName, userFk, bossFk, fi, birth)
+ VALUES (vUserFk, vCode, vFirstname, vLastName, vUserFk, vBossFk, vFi, vBirth);
END ;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
/*!50003 SET character_set_client = @saved_cs_client */ ;
/*!50003 SET character_set_results = @saved_cs_results */ ;
/*!50003 SET collation_connection = @saved_col_connection */ ;
+/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `workerCreateExternal` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -74727,8 +75309,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `workerCreateExternal`(
vFirstName VARCHAR(50),
@@ -74762,6 +75342,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `workerDepartmentByDate` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -74769,8 +75351,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `workerDepartmentByDate`(vDate DATE)
BEGIN
@@ -74778,7 +75358,7 @@ BEGIN
DROP TEMPORARY TABLE IF EXISTS tmp.workerDepartmentByDate;
CREATE TEMPORARY TABLE tmp.workerDepartmentByDate
ENGINE = MEMORY
- SELECT w.id,
+ SELECT w.userFk,
w.lastName name,
w.firstName firstname,
d.name department,
@@ -74799,6 +75379,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `workerDisable` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -74806,8 +75388,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `workerDisable`(vUserId int)
mainLabel:BEGIN
@@ -74839,6 +75419,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `workerDisableAll` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -74846,8 +75428,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `workerDisableAll`()
BEGIN
@@ -74888,6 +75468,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `workerForAllCalculateBoss` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -74895,8 +75477,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `workerForAllCalculateBoss`()
BEGIN
@@ -74934,6 +75514,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `workerJourney_replace` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -74941,8 +75523,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `workerJourney_replace`(
vDatedFrom DATE,
@@ -75255,6 +75835,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `workerMistakeType_get` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -75262,8 +75844,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `workerMistakeType_get`()
BEGIN
@@ -75282,6 +75862,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `workerMistake_add` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -75289,8 +75871,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `workerMistake_add`(vWorkerFk INT, vWorkerMistakeTypeFk VARCHAR(10))
BEGIN
@@ -75310,6 +75890,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `workerTimeControlAdd` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -75317,8 +75899,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `workerTimeControlAdd`(IN vUserFk INT, IN vWarehouseFk INT, IN vDated DATETIME)
BEGIN
@@ -75337,6 +75917,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `workerTimeControlPinGenerate` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -75344,8 +75926,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `workerTimeControlPinGenerate`(
vWorkerFk INT)
@@ -75363,6 +75943,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `workerTimeControlSetOrder` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -75370,8 +75952,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `workerTimeControlSetOrder`()
BEGIN
@@ -75392,6 +75972,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `workerTimeControlSOWP` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -75399,8 +75981,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `workerTimeControlSOWP`(IN vUserFk INT, IN vDated DATE)
BEGIN
@@ -75418,6 +75998,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `workerTimeControl_add` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -75425,8 +76007,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `workerTimeControl_add`(IN vUserFk INT, IN vWarehouseFk INT, IN vTimed DATETIME, IN vIsManual BOOL)
BEGIN
@@ -75439,6 +76019,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `workerTimeControl_calculateOddDays` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -75446,8 +76028,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `workerTimeControl_calculateOddDays`()
BEGIN
@@ -75479,14 +76059,16 @@ BEGIN
LIMIT 10000000000000000000)sub
GROUP BY cont
HAVING cont2 MOD 2 = 1
- )sub2;
- JOIN worker w ON w.id = sub2.userFk;
+ )sub2
+ JOIN worker w ON w.userFk = sub2.userFk;
END ;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
/*!50003 SET character_set_client = @saved_cs_client */ ;
/*!50003 SET character_set_results = @saved_cs_results */ ;
/*!50003 SET collation_connection = @saved_col_connection */ ;
+/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `workerTimeControl_check` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -75494,8 +76076,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `workerTimeControl_check`(vUserFk INT, vDated DATE,vTabletFk VARCHAR(100))
proc: BEGIN
@@ -75668,6 +76248,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `workerTimeControl_checkBreak` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -75675,8 +76257,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `workerTimeControl_checkBreak`(vStarted DATE)
BEGIN
@@ -75835,6 +76415,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `workerTimeControl_clockIn` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -75842,8 +76424,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `workerTimeControl_clockIn`(
vWorker INT,
@@ -76179,6 +76759,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `workerTimeControl_direction` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -76186,8 +76768,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `workerTimeControl_direction`(vWorkerFk VARCHAR(10), vTimed DATETIME)
BEGIN
@@ -76253,6 +76833,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `workerTimeControl_getClockIn` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -76260,8 +76842,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `workerTimeControl_getClockIn`(
vUserFk INT,
@@ -76344,6 +76924,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `workerTimeControl_login` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -76351,8 +76933,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `workerTimeControl_login`(vWorkerFk VARCHAR(10))
BEGIN
@@ -76383,6 +76963,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `workerTimeControl_remove` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -76390,8 +76972,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `workerTimeControl_remove`(IN vUserFk INT, IN vTimed DATETIME)
BEGIN
@@ -76445,6 +77025,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `workerTimeControl_repair` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -76452,8 +77034,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `workerTimeControl_repair`()
proc: BEGIN
@@ -76497,6 +77077,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `workerTimeControl_sendMailByDepartment` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -76504,8 +77086,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `workerTimeControl_sendMailByDepartment`(IN vDatedFrom DATETIME, IN vDatedTo DATETIME, IN vWorkerFk INT)
BEGIN
@@ -76639,6 +77219,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `workerTimeControl_sendMailByDepartmentLauncher` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -76646,8 +77228,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `workerTimeControl_sendMailByDepartmentLauncher`()
BEGIN
@@ -76664,6 +77244,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `workerTimeControl_setOrder` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -76671,8 +77253,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `workerTimeControl_setOrder`(vUserFk INT, vStarted DATE, vFinished DATE)
BEGIN
@@ -76692,6 +77272,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `workerTimeControl_weekCheckBreak` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -76699,8 +77281,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `workerTimeControl_weekCheckBreak`(vStarted DATE, vEnded DATE)
BEGIN
@@ -76741,6 +77321,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `workerWeekControl` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -76748,8 +77330,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `workerWeekControl`(vUserFk INT, vDated DATE, vTabletFk VARCHAR(100))
BEGIN
@@ -76887,6 +77467,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `worker_getFromHasMistake` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -76894,8 +77476,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `worker_getFromHasMistake`(vDepartmentFk INT)
BEGIN
@@ -76919,6 +77499,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `worker_getHierarchy` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -76926,8 +77508,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `worker_getHierarchy`(vBoss INT)
BEGIN
@@ -76975,6 +77555,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `worker_getSector` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -76982,8 +77564,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `worker_getSector`()
BEGIN
@@ -76994,8 +77574,8 @@ BEGIN
SELECT s.id,s.description,s.warehouseFk
FROM sector s
- JOIN worker w ON w.sectorFk = s.id
- WHERE w.id = account.myUser_getId();
+ JOIN operator o ON o.sectorFk = s.id
+ WHERE o.workerFk = account.myUser_getId();
END ;;
DELIMITER ;
@@ -77003,6 +77583,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `worker_updateBalance` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -77010,8 +77592,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `worker_updateBalance`(vSelfFk INT(11), vCredit DECIMAL(10,2), vDebit DECIMAL(10,2))
BEGIN
@@ -77029,6 +77609,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `worker_updateBusiness` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -77036,8 +77618,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `worker_updateBusiness`(vSelf INT)
BEGIN
@@ -77057,6 +77637,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `worker_updateChangedBusiness` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -77064,8 +77646,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `worker_updateChangedBusiness`()
BEGIN
@@ -77110,33 +77690,8 @@ 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 `worker_updateSector` */;
-/*!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 ;;
-CREATE DEFINER=`root`@`localhost` PROCEDURE `worker_updateSector`(vSectorFk INT)
-BEGIN
-/**
- * Actualiza el sector del usuario conectado y borra la impresora asociada al usuario
- *
- * @param vSectorFk id del sector
- */
- UPDATE worker
- SET sectorFk = vSectorFk,
- labelerFk = NULL
- WHERE id = account.myUser_getId();
-END ;;
-DELIMITER ;
-/*!50003 SET sql_mode = @saved_sql_mode */ ;
-/*!50003 SET character_set_client = @saved_cs_client */ ;
-/*!50003 SET character_set_results = @saved_cs_results */ ;
-/*!50003 SET collation_connection = @saved_col_connection */ ;
/*!50003 DROP PROCEDURE IF EXISTS `workingHours` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -77144,8 +77699,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `workingHours`(username varchar(255), logon boolean)
BEGIN
@@ -77166,6 +77719,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `workingHoursTimeIn` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -77173,8 +77728,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `workingHoursTimeIn`(vUserId INT(11))
BEGIN
@@ -77186,6 +77739,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `workingHoursTimeOut` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -77193,8 +77748,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `workingHoursTimeOut`(vUserId INT(11))
BEGIN
@@ -77208,6 +77761,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `wrongEqualizatedClient` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -77215,8 +77770,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `wrongEqualizatedClient`()
BEGIN
@@ -77248,6 +77801,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `XDiario_checkDate` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -77255,8 +77810,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `XDiario_checkDate`(vDate DATE)
proc: BEGIN
@@ -77285,6 +77838,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `zoneClosure_recalc` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -77292,8 +77847,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `zoneClosure_recalc`()
proc: BEGIN
@@ -77345,6 +77898,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `zoneGeo_calcTree` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -77352,8 +77907,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `zoneGeo_calcTree`()
BEGIN
@@ -77389,6 +77942,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `zoneGeo_calcTreeRec` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -77396,8 +77951,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `zoneGeo_calcTreeRec`(
vSelf INT,
@@ -77471,6 +78024,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `zoneGeo_checkName` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -77478,8 +78033,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `zoneGeo_checkName`(vName VARCHAR(255))
BEGIN
@@ -77493,6 +78046,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `zoneGeo_delete` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -77500,8 +78055,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `zoneGeo_delete`(vSelf INT)
BEGIN
@@ -77519,6 +78072,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `zoneGeo_doCalc` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -77526,8 +78081,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `zoneGeo_doCalc`()
proc: BEGIN
@@ -77561,6 +78114,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `zoneGeo_setParent` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -77568,8 +78123,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `zoneGeo_setParent`(vSelf INT, vParentFk INT)
BEGIN
@@ -77590,6 +78143,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `zoneGeo_throwNotEditable` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -77597,8 +78152,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `zoneGeo_throwNotEditable`()
BEGIN
@@ -77610,6 +78163,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `zone_excludeFromGeo` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -77617,8 +78172,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `zone_excludeFromGeo`(vZoneGeo INT)
BEGIN
@@ -77643,6 +78196,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `zone_getAgency` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -77650,8 +78205,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `zone_getAgency`(vAddress INT, vLanded DATE)
BEGIN
@@ -77692,6 +78245,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `zone_getAvailable` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -77699,8 +78254,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `zone_getAvailable`(vAddress INT, vLanded DATE)
BEGIN
@@ -77718,6 +78271,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `zone_getClosed` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -77725,8 +78280,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `zone_getClosed`()
proc:BEGIN
@@ -77765,6 +78318,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `zone_getCollisions` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -77772,8 +78327,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `zone_getCollisions`()
BEGIN
@@ -77903,6 +78456,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `zone_getEvents` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -77910,8 +78465,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `zone_getEvents`(
vGeoFk INT,
@@ -77969,7 +78522,7 @@ BEGIN
FROM tZone t
JOIN zoneExclusion e ON e.zoneFk = t.id
LEFT JOIN zoneExclusionGeo eg ON eg.zoneExclusionFk = e.id
- JOIN zoneGeo zg1 ON zg1.id = eg.geoFk
+ LEFT JOIN zoneGeo zg1 ON zg1.id = eg.geoFk
JOIN zoneGeo zg2 ON zg2.id = vGeoFk
WHERE eg.zoneExclusionFk IS NULL OR zg2.`path` LIKE CONCAT(zg1.`path`,'%');
@@ -77980,6 +78533,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `zone_getFromGeo` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -77987,8 +78542,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `zone_getFromGeo`(vGeoFk INT)
BEGIN
@@ -78049,6 +78602,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `zone_getLanded` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -78056,8 +78611,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `zone_getLanded`(vShipped DATE, vAddressFk INT, vAgencyModeFk INT, vWarehouseFk INT, vShowExpiredZones BOOLEAN)
BEGIN
@@ -78109,6 +78662,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `zone_getLeaves` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -78116,10 +78671,8 @@ DELIMITER ;
/*!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 ;;
-CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`zone_getLeaves`(
+CREATE DEFINER=`root`@`localhost` PROCEDURE `zone_getLeaves`(
vSelf INT,
vParentFk INT,
vSearch VARCHAR(255),
@@ -78245,123 +78798,8 @@ 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 `zone_getLeaves2` */;
-/*!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 ;;
-CREATE DEFINER=`root`@`localhost` PROCEDURE `zone_getLeaves2`(vSelf INT, vParentFk INT, vSearch VARCHAR(255))
-BEGIN
-/**
- * Devuelve los geoFk incluidos en la ruta y que sean hijos de parentFk
- * @param vSelf Id de la zona
- * @param vParentFk Id del geo a calcular
- * @param vSearch cadena a buscar
- *
- * @return tmp.zoneNodes(geoFk, name, parentFk, sons, isChecked, zoneFk)
- *
- */
- DECLARE vIsNumber BOOL;
- DECLARE vIsSearch BOOL DEFAULT vSearch IS NOT NULL AND vSearch != '';
-
- DROP TEMPORARY TABLE IF EXISTS tNodes;
- CREATE TEMPORARY TABLE tNodes
- (UNIQUE (id))
- ENGINE = MEMORY
- SELECT id
- FROM zoneGeo
- LIMIT 0;
-
- IF vIsSearch THEN
- SET vIsNumber = vSearch REGEXP '^[0-9]+$';
-
- INSERT INTO tNodes
- SELECT id
- FROM zoneGeo
- WHERE (vIsNumber AND `name` = vSearch)
- OR (!vIsNumber AND `name` LIKE CONCAT('%', vSearch, '%'))
- LIMIT 1000;
-
- ELSEIF vParentFk IS NULL THEN
- INSERT INTO tNodes
- SELECT geoFk
- FROM zoneIncluded
- WHERE zoneFk = vSelf;
- END IF;
-
- IF vParentFk IS NULL THEN
- DROP TEMPORARY TABLE IF EXISTS tChilds;
- CREATE TEMPORARY TABLE tChilds
- (INDEX(id))
- ENGINE = MEMORY
- SELECT id
- FROM tNodes;
-
- DROP TEMPORARY TABLE IF EXISTS tParents;
- CREATE TEMPORARY TABLE tParents
- (INDEX(id))
- ENGINE = MEMORY
- SELECT id
- FROM zoneGeo
- LIMIT 0;
-
- myLoop: LOOP
- DELETE FROM tParents;
- INSERT INTO tParents
- SELECT parentFk id
- FROM zoneGeo g
- JOIN tChilds c ON c.id = g.id
- WHERE g.parentFk IS NOT NULL;
-
- INSERT IGNORE INTO tNodes
- SELECT id
- FROM tParents;
-
- IF ROW_COUNT() = 0 THEN
- LEAVE myLoop;
- END IF;
-
- DELETE FROM tChilds;
- INSERT INTO tChilds
- SELECT id
- FROM tParents;
- END LOOP;
-
- DROP TEMPORARY TABLE tChilds, tParents;
- END IF;
-
- IF !vIsSearch THEN
- INSERT IGNORE INTO tNodes
- SELECT id
- FROM zoneGeo
- WHERE parentFk <=> vParentFk;
- END IF;
-
- INSERT IGNORE INTO tmp.zoneNodes(geoFk, name, parentFk, sons, isChecked, zoneFk)
- SELECT g.id,
- g.`name`,
- g.parentFk,
- g.sons,
- NOT g.sons OR type = 'country',
- vSelf
- FROM zoneGeo g
- JOIN tNodes n ON n.id = g.id
- LEFT JOIN zoneIncluded i ON i.geoFk = g.id AND i.zoneFk = vSelf
- WHERE i.isIncluded = TRUE
- OR (i.isIncluded IS NULL AND vParentFk IS NOT NULL);
-
- DROP TEMPORARY TABLE tNodes;
-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 `zone_getOptionsForLanding` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -78369,8 +78807,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `zone_getOptionsForLanding`(vLanded DATE, vShowExpiredZones BOOLEAN)
BEGIN
@@ -78439,6 +78875,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `zone_getOptionsForShipment` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -78446,8 +78884,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `zone_getOptionsForShipment`(vShipped DATE, vShowExpiredZones BOOLEAN)
BEGIN
@@ -78527,6 +78963,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `zone_getPostalCode` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -78534,8 +78972,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `zone_getPostalCode`(vSelf INT)
BEGIN
@@ -78591,6 +79027,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `zone_getShipped` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -78598,8 +79036,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `zone_getShipped`(vLanded DATE, vAddressFk INT, vAgencyModeFk INT, vShowExpiredZones BOOLEAN)
BEGIN
@@ -78655,6 +79091,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `zone_getState` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -78662,8 +79100,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `zone_getState`(vDated DATE)
BEGIN
@@ -78710,6 +79146,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `zone_getWarehouse` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -78717,8 +79155,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `zone_getWarehouse`(vAddress INT, vLanded DATE, vWarehouse INT)
BEGIN
@@ -78760,6 +79196,8 @@ 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_sql_mode = @@sql_mode */ ;
+/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
/*!50003 DROP PROCEDURE IF EXISTS `zone_upcomingDeliveries` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -78767,8 +79205,6 @@ DELIMITER ;
/*!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 ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `zone_upcomingDeliveries`()
BEGIN
@@ -78861,7 +79297,6 @@ USE `account`;
-- Final view structure for view `accountDovecot`
--
-/*!50001 DROP TABLE IF EXISTS `accountDovecot`*/;
/*!50001 DROP VIEW IF EXISTS `accountDovecot`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -78880,7 +79315,6 @@ USE `account`;
-- Final view structure for view `emailUser`
--
-/*!50001 DROP TABLE IF EXISTS `emailUser`*/;
/*!50001 DROP VIEW IF EXISTS `emailUser`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -78899,7 +79333,6 @@ USE `account`;
-- Final view structure for view `myRole`
--
-/*!50001 DROP TABLE IF EXISTS `myRole`*/;
/*!50001 DROP VIEW IF EXISTS `myRole`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -78918,7 +79351,6 @@ USE `account`;
-- Final view structure for view `myUser`
--
-/*!50001 DROP TABLE IF EXISTS `myUser`*/;
/*!50001 DROP VIEW IF EXISTS `myUser`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -78944,7 +79376,6 @@ USE `bs`;
-- Final view structure for view `bajasLaborales`
--
-/*!50001 DROP TABLE IF EXISTS `bajasLaborales`*/;
/*!50001 DROP VIEW IF EXISTS `bajasLaborales`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -78963,7 +79394,6 @@ USE `bs`;
-- Final view structure for view `lastIndicators`
--
-/*!50001 DROP TABLE IF EXISTS `lastIndicators`*/;
/*!50001 DROP VIEW IF EXISTS `lastIndicators`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -78982,7 +79412,6 @@ USE `bs`;
-- Final view structure for view `packingSpeed`
--
-/*!50001 DROP TABLE IF EXISTS `packingSpeed`*/;
/*!50001 DROP VIEW IF EXISTS `packingSpeed`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -79001,7 +79430,6 @@ USE `bs`;
-- Final view structure for view `s1_ticketDetail`
--
-/*!50001 DROP TABLE IF EXISTS `s1_ticketDetail`*/;
/*!50001 DROP VIEW IF EXISTS `s1_ticketDetail`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -79020,7 +79448,6 @@ USE `bs`;
-- Final view structure for view `s21_saleDetail`
--
-/*!50001 DROP TABLE IF EXISTS `s21_saleDetail`*/;
/*!50001 DROP VIEW IF EXISTS `s21_saleDetail`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -79039,7 +79466,6 @@ USE `bs`;
-- Final view structure for view `ventas`
--
-/*!50001 DROP TABLE IF EXISTS `ventas`*/;
/*!50001 DROP VIEW IF EXISTS `ventas`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -79070,7 +79496,6 @@ USE `edi`;
-- Final view structure for view `ektRecent`
--
-/*!50001 DROP TABLE IF EXISTS `ektRecent`*/;
/*!50001 DROP VIEW IF EXISTS `ektRecent`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -79089,7 +79514,6 @@ USE `edi`;
-- Final view structure for view `errorList`
--
-/*!50001 DROP TABLE IF EXISTS `errorList`*/;
/*!50001 DROP VIEW IF EXISTS `errorList`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -79108,7 +79532,6 @@ USE `edi`;
-- Final view structure for view `supplyOffer`
--
-/*!50001 DROP TABLE IF EXISTS `supplyOffer`*/;
/*!50001 DROP VIEW IF EXISTS `supplyOffer`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -79133,7 +79556,6 @@ USE `hedera`;
-- Final view structure for view `mainAccountBank`
--
-/*!50001 DROP TABLE IF EXISTS `mainAccountBank`*/;
/*!50001 DROP VIEW IF EXISTS `mainAccountBank`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -79152,7 +79574,6 @@ USE `hedera`;
-- Final view structure for view `messageL10n`
--
-/*!50001 DROP TABLE IF EXISTS `messageL10n`*/;
/*!50001 DROP VIEW IF EXISTS `messageL10n`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -79171,7 +79592,6 @@ USE `hedera`;
-- Final view structure for view `myAddress`
--
-/*!50001 DROP TABLE IF EXISTS `myAddress`*/;
/*!50001 DROP VIEW IF EXISTS `myAddress`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -79191,7 +79611,6 @@ USE `hedera`;
-- Final view structure for view `myBasketDefaults`
--
-/*!50001 DROP TABLE IF EXISTS `myBasketDefaults`*/;
/*!50001 DROP VIEW IF EXISTS `myBasketDefaults`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -79210,7 +79629,6 @@ USE `hedera`;
-- Final view structure for view `myClient`
--
-/*!50001 DROP TABLE IF EXISTS `myClient`*/;
/*!50001 DROP VIEW IF EXISTS `myClient`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -79230,7 +79648,6 @@ USE `hedera`;
-- Final view structure for view `myInvoice`
--
-/*!50001 DROP TABLE IF EXISTS `myInvoice`*/;
/*!50001 DROP VIEW IF EXISTS `myInvoice`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -79249,7 +79666,6 @@ USE `hedera`;
-- Final view structure for view `myMenu`
--
-/*!50001 DROP TABLE IF EXISTS `myMenu`*/;
/*!50001 DROP VIEW IF EXISTS `myMenu`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -79268,7 +79684,6 @@ USE `hedera`;
-- Final view structure for view `myOrder`
--
-/*!50001 DROP TABLE IF EXISTS `myOrder`*/;
/*!50001 DROP VIEW IF EXISTS `myOrder`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -79288,7 +79703,6 @@ USE `hedera`;
-- Final view structure for view `myOrderRow`
--
-/*!50001 DROP TABLE IF EXISTS `myOrderRow`*/;
/*!50001 DROP VIEW IF EXISTS `myOrderRow`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -79308,7 +79722,6 @@ USE `hedera`;
-- Final view structure for view `myOrderTicket`
--
-/*!50001 DROP TABLE IF EXISTS `myOrderTicket`*/;
/*!50001 DROP VIEW IF EXISTS `myOrderTicket`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -79327,7 +79740,6 @@ USE `hedera`;
-- Final view structure for view `myTicket`
--
-/*!50001 DROP TABLE IF EXISTS `myTicket`*/;
/*!50001 DROP VIEW IF EXISTS `myTicket`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -79346,7 +79758,6 @@ USE `hedera`;
-- Final view structure for view `myTicketRow`
--
-/*!50001 DROP TABLE IF EXISTS `myTicketRow`*/;
/*!50001 DROP VIEW IF EXISTS `myTicketRow`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -79366,7 +79777,6 @@ USE `hedera`;
-- Final view structure for view `myTicketService`
--
-/*!50001 DROP TABLE IF EXISTS `myTicketService`*/;
/*!50001 DROP VIEW IF EXISTS `myTicketService`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -79386,7 +79796,6 @@ USE `hedera`;
-- Final view structure for view `myTicketState`
--
-/*!50001 DROP TABLE IF EXISTS `myTicketState`*/;
/*!50001 DROP VIEW IF EXISTS `myTicketState`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -79405,7 +79814,6 @@ USE `hedera`;
-- Final view structure for view `myTpvTransaction`
--
-/*!50001 DROP TABLE IF EXISTS `myTpvTransaction`*/;
/*!50001 DROP VIEW IF EXISTS `myTpvTransaction`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -79424,7 +79832,6 @@ USE `hedera`;
-- Final view structure for view `orderTicket`
--
-/*!50001 DROP TABLE IF EXISTS `orderTicket`*/;
/*!50001 DROP VIEW IF EXISTS `orderTicket`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -79443,7 +79850,6 @@ USE `hedera`;
-- Final view structure for view `order_component`
--
-/*!50001 DROP TABLE IF EXISTS `order_component`*/;
/*!50001 DROP VIEW IF EXISTS `order_component`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -79462,7 +79868,6 @@ USE `hedera`;
-- Final view structure for view `order_row`
--
-/*!50001 DROP TABLE IF EXISTS `order_row`*/;
/*!50001 DROP VIEW IF EXISTS `order_row`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -79487,7 +79892,6 @@ USE `pbx`;
-- Final view structure for view `cdrConf`
--
-/*!50001 DROP TABLE IF EXISTS `cdrConf`*/;
/*!50001 DROP VIEW IF EXISTS `cdrConf`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -79506,7 +79910,6 @@ USE `pbx`;
-- Final view structure for view `followmeConf`
--
-/*!50001 DROP TABLE IF EXISTS `followmeConf`*/;
/*!50001 DROP VIEW IF EXISTS `followmeConf`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -79525,7 +79928,6 @@ USE `pbx`;
-- Final view structure for view `followmeNumberConf`
--
-/*!50001 DROP TABLE IF EXISTS `followmeNumberConf`*/;
/*!50001 DROP VIEW IF EXISTS `followmeNumberConf`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -79544,7 +79946,6 @@ USE `pbx`;
-- Final view structure for view `queueConf`
--
-/*!50001 DROP TABLE IF EXISTS `queueConf`*/;
/*!50001 DROP VIEW IF EXISTS `queueConf`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -79563,7 +79964,6 @@ USE `pbx`;
-- Final view structure for view `queueMemberConf`
--
-/*!50001 DROP TABLE IF EXISTS `queueMemberConf`*/;
/*!50001 DROP VIEW IF EXISTS `queueMemberConf`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -79582,7 +79982,6 @@ USE `pbx`;
-- Final view structure for view `sipConf`
--
-/*!50001 DROP TABLE IF EXISTS `sipConf`*/;
/*!50001 DROP VIEW IF EXISTS `sipConf`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -79597,12 +79996,6 @@ USE `pbx`;
/*!50001 SET character_set_results = @saved_cs_results */;
/*!50001 SET collation_connection = @saved_col_connection */;
---
--- Current Database: `postgresql`
---
-
-USE `postgresql`;
-
--
-- Current Database: `sage`
--
@@ -79613,7 +80006,6 @@ USE `sage`;
-- Final view structure for view `clientLastTwoMonths`
--
-/*!50001 DROP TABLE IF EXISTS `clientLastTwoMonths`*/;
/*!50001 DROP VIEW IF EXISTS `clientLastTwoMonths`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -79632,7 +80024,6 @@ USE `sage`;
-- Final view structure for view `supplierLastThreeMonths`
--
-/*!50001 DROP TABLE IF EXISTS `supplierLastThreeMonths`*/;
/*!50001 DROP VIEW IF EXISTS `supplierLastThreeMonths`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -79657,7 +80048,6 @@ USE `salix`;
-- Final view structure for view `Account`
--
-/*!50001 DROP TABLE IF EXISTS `Account`*/;
/*!50001 DROP VIEW IF EXISTS `Account`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -79676,7 +80066,6 @@ USE `salix`;
-- Final view structure for view `Role`
--
-/*!50001 DROP TABLE IF EXISTS `Role`*/;
/*!50001 DROP VIEW IF EXISTS `Role`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -79695,7 +80084,6 @@ USE `salix`;
-- Final view structure for view `RoleMapping`
--
-/*!50001 DROP TABLE IF EXISTS `RoleMapping`*/;
/*!50001 DROP VIEW IF EXISTS `RoleMapping`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -79714,7 +80102,6 @@ USE `salix`;
-- Final view structure for view `User`
--
-/*!50001 DROP TABLE IF EXISTS `User`*/;
/*!50001 DROP VIEW IF EXISTS `User`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -79745,7 +80132,6 @@ USE `util`;
-- Final view structure for view `eventLogGrouped`
--
-/*!50001 DROP TABLE IF EXISTS `eventLogGrouped`*/;
/*!50001 DROP VIEW IF EXISTS `eventLogGrouped`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -79770,7 +80156,6 @@ USE `vn`;
-- Final view structure for view `NewView`
--
-/*!50001 DROP TABLE IF EXISTS `NewView`*/;
/*!50001 DROP VIEW IF EXISTS `NewView`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -79789,7 +80174,6 @@ USE `vn`;
-- Final view structure for view `__coolerPathDetail`
--
-/*!50001 DROP TABLE IF EXISTS `__coolerPathDetail`*/;
/*!50001 DROP VIEW IF EXISTS `__coolerPathDetail`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -79808,7 +80192,6 @@ USE `vn`;
-- Final view structure for view `agencyTerm`
--
-/*!50001 DROP TABLE IF EXISTS `agencyTerm`*/;
/*!50001 DROP VIEW IF EXISTS `agencyTerm`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -79827,7 +80210,6 @@ USE `vn`;
-- Final view structure for view `annualAverageInvoiced`
--
-/*!50001 DROP TABLE IF EXISTS `annualAverageInvoiced`*/;
/*!50001 DROP VIEW IF EXISTS `annualAverageInvoiced`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -79846,7 +80228,6 @@ USE `vn`;
-- Final view structure for view `awbVolume`
--
-/*!50001 DROP TABLE IF EXISTS `awbVolume`*/;
/*!50001 DROP VIEW IF EXISTS `awbVolume`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -79865,7 +80246,6 @@ USE `vn`;
-- Final view structure for view `bank`
--
-/*!50001 DROP TABLE IF EXISTS `bank`*/;
/*!50001 DROP VIEW IF EXISTS `bank`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -79884,7 +80264,6 @@ USE `vn`;
-- Final view structure for view `bankPolicy`
--
-/*!50001 DROP TABLE IF EXISTS `bankPolicy`*/;
/*!50001 DROP VIEW IF EXISTS `bankPolicy`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -79903,7 +80282,6 @@ USE `vn`;
-- Final view structure for view `businessCalendar`
--
-/*!50001 DROP TABLE IF EXISTS `businessCalendar`*/;
/*!50001 DROP VIEW IF EXISTS `businessCalendar`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -79922,7 +80300,6 @@ USE `vn`;
-- Final view structure for view `buyer`
--
-/*!50001 DROP TABLE IF EXISTS `buyer`*/;
/*!50001 DROP VIEW IF EXISTS `buyer`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -79941,7 +80318,6 @@ USE `vn`;
-- Final view structure for view `buyerSales`
--
-/*!50001 DROP TABLE IF EXISTS `buyerSales`*/;
/*!50001 DROP VIEW IF EXISTS `buyerSales`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -79960,7 +80336,6 @@ USE `vn`;
-- Final view structure for view `clientLost`
--
-/*!50001 DROP TABLE IF EXISTS `clientLost`*/;
/*!50001 DROP VIEW IF EXISTS `clientLost`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -79979,7 +80354,6 @@ USE `vn`;
-- Final view structure for view `clientPhoneBook`
--
-/*!50001 DROP TABLE IF EXISTS `clientPhoneBook`*/;
/*!50001 DROP VIEW IF EXISTS `clientPhoneBook`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -79998,7 +80372,6 @@ USE `vn`;
-- Final view structure for view `cmr_list`
--
-/*!50001 DROP TABLE IF EXISTS `cmr_list`*/;
/*!50001 DROP VIEW IF EXISTS `cmr_list`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -80017,7 +80390,6 @@ USE `vn`;
-- Final view structure for view `companyL10n`
--
-/*!50001 DROP TABLE IF EXISTS `companyL10n`*/;
/*!50001 DROP VIEW IF EXISTS `companyL10n`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -80036,7 +80408,6 @@ USE `vn`;
-- Final view structure for view `defaulter`
--
-/*!50001 DROP TABLE IF EXISTS `defaulter`*/;
/*!50001 DROP VIEW IF EXISTS `defaulter`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -80055,7 +80426,6 @@ USE `vn`;
-- Final view structure for view `departmentTree`
--
-/*!50001 DROP TABLE IF EXISTS `departmentTree`*/;
/*!50001 DROP VIEW IF EXISTS `departmentTree`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -80074,7 +80444,6 @@ USE `vn`;
-- Final view structure for view `ediGenus`
--
-/*!50001 DROP TABLE IF EXISTS `ediGenus`*/;
/*!50001 DROP VIEW IF EXISTS `ediGenus`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -80093,7 +80462,6 @@ USE `vn`;
-- Final view structure for view `ediSpecie`
--
-/*!50001 DROP TABLE IF EXISTS `ediSpecie`*/;
/*!50001 DROP VIEW IF EXISTS `ediSpecie`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -80112,7 +80480,6 @@ USE `vn`;
-- Final view structure for view `ektSubAddress`
--
-/*!50001 DROP TABLE IF EXISTS `ektSubAddress`*/;
/*!50001 DROP VIEW IF EXISTS `ektSubAddress`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -80131,7 +80498,6 @@ USE `vn`;
-- Final view structure for view `exchangeInsuranceEntry`
--
-/*!50001 DROP TABLE IF EXISTS `exchangeInsuranceEntry`*/;
/*!50001 DROP VIEW IF EXISTS `exchangeInsuranceEntry`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -80150,7 +80516,6 @@ USE `vn`;
-- Final view structure for view `exchangeInsuranceIn`
--
-/*!50001 DROP TABLE IF EXISTS `exchangeInsuranceIn`*/;
/*!50001 DROP VIEW IF EXISTS `exchangeInsuranceIn`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -80169,7 +80534,6 @@ USE `vn`;
-- Final view structure for view `exchangeInsuranceOut`
--
-/*!50001 DROP TABLE IF EXISTS `exchangeInsuranceOut`*/;
/*!50001 DROP VIEW IF EXISTS `exchangeInsuranceOut`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -80188,7 +80552,6 @@ USE `vn`;
-- Final view structure for view `exchangeReportSourcePrevious`
--
-/*!50001 DROP TABLE IF EXISTS `exchangeReportSourcePrevious`*/;
/*!50001 DROP VIEW IF EXISTS `exchangeReportSourcePrevious`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -80207,7 +80570,6 @@ USE `vn`;
-- Final view structure for view `expeditionCommon`
--
-/*!50001 DROP TABLE IF EXISTS `expeditionCommon`*/;
/*!50001 DROP VIEW IF EXISTS `expeditionCommon`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -80226,7 +80588,6 @@ USE `vn`;
-- Final view structure for view `expeditionPallet_Print`
--
-/*!50001 DROP TABLE IF EXISTS `expeditionPallet_Print`*/;
/*!50001 DROP VIEW IF EXISTS `expeditionPallet_Print`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -80245,7 +80606,6 @@ USE `vn`;
-- Final view structure for view `expeditionRoute_Monitor`
--
-/*!50001 DROP TABLE IF EXISTS `expeditionRoute_Monitor`*/;
/*!50001 DROP VIEW IF EXISTS `expeditionRoute_Monitor`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -80264,7 +80624,6 @@ USE `vn`;
-- Final view structure for view `expeditionRoute_freeTickets`
--
-/*!50001 DROP TABLE IF EXISTS `expeditionRoute_freeTickets`*/;
/*!50001 DROP VIEW IF EXISTS `expeditionRoute_freeTickets`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -80283,7 +80642,6 @@ USE `vn`;
-- Final view structure for view `expeditionScan_Monitor`
--
-/*!50001 DROP TABLE IF EXISTS `expeditionScan_Monitor`*/;
/*!50001 DROP VIEW IF EXISTS `expeditionScan_Monitor`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -80302,7 +80660,6 @@ USE `vn`;
-- Final view structure for view `expeditionSticker`
--
-/*!50001 DROP TABLE IF EXISTS `expeditionSticker`*/;
/*!50001 DROP VIEW IF EXISTS `expeditionSticker`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -80321,7 +80678,6 @@ USE `vn`;
-- Final view structure for view `expeditionTicket_NoBoxes`
--
-/*!50001 DROP TABLE IF EXISTS `expeditionTicket_NoBoxes`*/;
/*!50001 DROP VIEW IF EXISTS `expeditionTicket_NoBoxes`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -80340,7 +80696,6 @@ USE `vn`;
-- Final view structure for view `expeditionTimeExpended`
--
-/*!50001 DROP TABLE IF EXISTS `expeditionTimeExpended`*/;
/*!50001 DROP VIEW IF EXISTS `expeditionTimeExpended`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -80359,7 +80714,6 @@ USE `vn`;
-- Final view structure for view `expeditionTruck_Control`
--
-/*!50001 DROP TABLE IF EXISTS `expeditionTruck_Control`*/;
/*!50001 DROP VIEW IF EXISTS `expeditionTruck_Control`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -80378,7 +80732,6 @@ USE `vn`;
-- Final view structure for view `expeditionTruck_Control_Detail`
--
-/*!50001 DROP TABLE IF EXISTS `expeditionTruck_Control_Detail`*/;
/*!50001 DROP VIEW IF EXISTS `expeditionTruck_Control_Detail`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -80397,7 +80750,6 @@ USE `vn`;
-- Final view structure for view `expeditionTruck_Control_Detail_Pallet`
--
-/*!50001 DROP TABLE IF EXISTS `expeditionTruck_Control_Detail_Pallet`*/;
/*!50001 DROP VIEW IF EXISTS `expeditionTruck_Control_Detail_Pallet`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -80416,7 +80768,6 @@ USE `vn`;
-- Final view structure for view `firstTicketShipped`
--
-/*!50001 DROP TABLE IF EXISTS `firstTicketShipped`*/;
/*!50001 DROP VIEW IF EXISTS `firstTicketShipped`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -80435,7 +80786,6 @@ USE `vn`;
-- Final view structure for view `floraHollandBuyedItems`
--
-/*!50001 DROP TABLE IF EXISTS `floraHollandBuyedItems`*/;
/*!50001 DROP VIEW IF EXISTS `floraHollandBuyedItems`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -80454,7 +80804,6 @@ USE `vn`;
-- Final view structure for view `inkL10n`
--
-/*!50001 DROP TABLE IF EXISTS `inkL10n`*/;
/*!50001 DROP VIEW IF EXISTS `inkL10n`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -80473,7 +80822,6 @@ USE `vn`;
-- Final view structure for view `invoiceCorrectionDataSource`
--
-/*!50001 DROP TABLE IF EXISTS `invoiceCorrectionDataSource`*/;
/*!50001 DROP VIEW IF EXISTS `invoiceCorrectionDataSource`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -80492,7 +80840,6 @@ USE `vn`;
-- Final view structure for view `itemBotanicalWithGenus`
--
-/*!50001 DROP TABLE IF EXISTS `itemBotanicalWithGenus`*/;
/*!50001 DROP VIEW IF EXISTS `itemBotanicalWithGenus`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -80511,7 +80858,6 @@ USE `vn`;
-- Final view structure for view `itemCategoryL10n`
--
-/*!50001 DROP TABLE IF EXISTS `itemCategoryL10n`*/;
/*!50001 DROP VIEW IF EXISTS `itemCategoryL10n`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -80530,7 +80876,6 @@ USE `vn`;
-- Final view structure for view `itemColor`
--
-/*!50001 DROP TABLE IF EXISTS `itemColor`*/;
/*!50001 DROP VIEW IF EXISTS `itemColor`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -80549,7 +80894,6 @@ USE `vn`;
-- Final view structure for view `itemEntryIn`
--
-/*!50001 DROP TABLE IF EXISTS `itemEntryIn`*/;
/*!50001 DROP VIEW IF EXISTS `itemEntryIn`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -80568,7 +80912,6 @@ USE `vn`;
-- Final view structure for view `itemEntryOut`
--
-/*!50001 DROP TABLE IF EXISTS `itemEntryOut`*/;
/*!50001 DROP VIEW IF EXISTS `itemEntryOut`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -80587,7 +80930,6 @@ USE `vn`;
-- Final view structure for view `itemInk`
--
-/*!50001 DROP TABLE IF EXISTS `itemInk`*/;
/*!50001 DROP VIEW IF EXISTS `itemInk`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -80606,7 +80948,6 @@ USE `vn`;
-- Final view structure for view `itemPlacementSupplyList`
--
-/*!50001 DROP TABLE IF EXISTS `itemPlacementSupplyList`*/;
/*!50001 DROP VIEW IF EXISTS `itemPlacementSupplyList`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -80616,7 +80957,7 @@ USE `vn`;
/*!50001 SET collation_connection = utf8mb4_unicode_ci */;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
-/*!50001 VIEW `itemPlacementSupplyList` AS select `ips`.`id` AS `id`,`ips`.`itemFk` AS `itemFk`,`ips`.`quantity` AS `quantity`,`ips`.`priority` AS `priority`,ifnull(`isps`.`created`,`ips`.`created`) AS `created`,`ips`.`userFk` AS `userFk`,`ips`.`repoUserFk` AS `repoUserFk`,`ips`.`quantity` - sum(ifnull(`isps`.`quantity`,0)) AS `saldo`,concat(`i`.`longName`,' ',`i`.`size`) AS `longName`,`i`.`subName` AS `subName`,`i`.`size` AS `size`,`w`.`code` AS `workerCode`,`rw`.`code` AS `repoCode`,`ips`.`sectorFk` AS `sectorFk` from ((((`itemPlacementSupply` `ips` join `item` `i` on(`i`.`id` = `ips`.`itemFk`)) left join `worker` `w` on(`w`.`userFk` = `ips`.`userFk`)) left join `worker` `rw` on(`rw`.`userFk` = `ips`.`repoUserFk`)) left join `itemShelvingPlacementSupply` `isps` on(`isps`.`itemPlacementSupplyFk` = `ips`.`id`)) where `ips`.`created` >= `util`.`VN_CURDATE`() group by `ips`.`priority`,`ips`.`id`,`ips`.`sectorFk` */;
+/*!50001 VIEW `itemPlacementSupplyList` AS select `ips`.`id` AS `id`,`ips`.`itemFk` AS `itemFk`,`ips`.`quantity` AS `quantity`,`ips`.`priority` AS `priority`,ifnull(`isps`.`created`,`ips`.`created`) AS `created`,`ips`.`userFk` AS `userFk`,`ips`.`repoUserFk` AS `repoUserFk`,`ips`.`quantity` - sum(ifnull(`isps`.`quantity`,0)) AS `saldo`,concat(`i`.`longName`,' ',`i`.`size`) AS `longName`,`i`.`subName` AS `subName`,`i`.`size` AS `size`,`w`.`code` AS `workerCode`,`rw`.`code` AS `repoCode`,`ips`.`sectorFk` AS `sectorFk` from ((((`itemPlacementSupply` `ips` join `item` `i` on(`i`.`id` = `ips`.`itemFk`)) left join `worker` `w` on(`w`.`id` = `ips`.`userFk`)) left join `worker` `rw` on(`rw`.`id` = `ips`.`repoUserFk`)) left join `itemShelvingPlacementSupply` `isps` on(`isps`.`itemPlacementSupplyFk` = `ips`.`id`)) where `ips`.`created` >= `util`.`VN_CURDATE`() group by `ips`.`priority`,`ips`.`id`,`ips`.`sectorFk` */;
/*!50001 SET character_set_client = @saved_cs_client */;
/*!50001 SET character_set_results = @saved_cs_results */;
/*!50001 SET collation_connection = @saved_col_connection */;
@@ -80625,7 +80966,6 @@ USE `vn`;
-- Final view structure for view `itemProductor`
--
-/*!50001 DROP TABLE IF EXISTS `itemProductor`*/;
/*!50001 DROP VIEW IF EXISTS `itemProductor`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -80644,7 +80984,6 @@ USE `vn`;
-- Final view structure for view `itemSearch`
--
-/*!50001 DROP TABLE IF EXISTS `itemSearch`*/;
/*!50001 DROP VIEW IF EXISTS `itemSearch`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -80663,7 +81002,6 @@ USE `vn`;
-- Final view structure for view `itemShelvingAvailable`
--
-/*!50001 DROP TABLE IF EXISTS `itemShelvingAvailable`*/;
/*!50001 DROP VIEW IF EXISTS `itemShelvingAvailable`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -80682,7 +81020,6 @@ USE `vn`;
-- Final view structure for view `itemShelvingList`
--
-/*!50001 DROP TABLE IF EXISTS `itemShelvingList`*/;
/*!50001 DROP VIEW IF EXISTS `itemShelvingList`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -80701,7 +81038,6 @@ USE `vn`;
-- Final view structure for view `itemShelvingPlacementSupplyStock`
--
-/*!50001 DROP TABLE IF EXISTS `itemShelvingPlacementSupplyStock`*/;
/*!50001 DROP VIEW IF EXISTS `itemShelvingPlacementSupplyStock`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -80720,7 +81056,6 @@ USE `vn`;
-- Final view structure for view `itemShelvingSaleSum`
--
-/*!50001 DROP TABLE IF EXISTS `itemShelvingSaleSum`*/;
/*!50001 DROP VIEW IF EXISTS `itemShelvingSaleSum`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -80739,7 +81074,6 @@ USE `vn`;
-- Final view structure for view `itemShelvingStock`
--
-/*!50001 DROP TABLE IF EXISTS `itemShelvingStock`*/;
/*!50001 DROP VIEW IF EXISTS `itemShelvingStock`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -80758,7 +81092,6 @@ USE `vn`;
-- Final view structure for view `itemShelvingStockFull`
--
-/*!50001 DROP TABLE IF EXISTS `itemShelvingStockFull`*/;
/*!50001 DROP VIEW IF EXISTS `itemShelvingStockFull`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -80777,7 +81110,6 @@ USE `vn`;
-- Final view structure for view `itemShelvingStockRemoved`
--
-/*!50001 DROP TABLE IF EXISTS `itemShelvingStockRemoved`*/;
/*!50001 DROP VIEW IF EXISTS `itemShelvingStockRemoved`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -80796,7 +81128,6 @@ USE `vn`;
-- Final view structure for view `itemShelvingStock_byWarehouse`
--
-/*!50001 DROP TABLE IF EXISTS `itemShelvingStock_byWarehouse`*/;
/*!50001 DROP VIEW IF EXISTS `itemShelvingStock_byWarehouse`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -80815,7 +81146,6 @@ USE `vn`;
-- Final view structure for view `itemTagged`
--
-/*!50001 DROP TABLE IF EXISTS `itemTagged`*/;
/*!50001 DROP VIEW IF EXISTS `itemTagged`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -80834,7 +81164,6 @@ USE `vn`;
-- Final view structure for view `itemTicketOut`
--
-/*!50001 DROP TABLE IF EXISTS `itemTicketOut`*/;
/*!50001 DROP VIEW IF EXISTS `itemTicketOut`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -80853,7 +81182,6 @@ USE `vn`;
-- Final view structure for view `itemTypeL10n`
--
-/*!50001 DROP TABLE IF EXISTS `itemTypeL10n`*/;
/*!50001 DROP VIEW IF EXISTS `itemTypeL10n`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -80872,7 +81200,6 @@ USE `vn`;
-- Final view structure for view `item_Free_Id`
--
-/*!50001 DROP TABLE IF EXISTS `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 */;
@@ -80891,7 +81218,6 @@ USE `vn`;
-- Final view structure for view `labelInfo`
--
-/*!50001 DROP TABLE IF EXISTS `labelInfo`*/;
/*!50001 DROP VIEW IF EXISTS `labelInfo`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -80910,7 +81236,6 @@ USE `vn`;
-- Final view structure for view `lastHourProduction`
--
-/*!50001 DROP TABLE IF EXISTS `lastHourProduction`*/;
/*!50001 DROP VIEW IF EXISTS `lastHourProduction`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -80929,7 +81254,6 @@ USE `vn`;
-- Final view structure for view `lastPurchases`
--
-/*!50001 DROP TABLE IF EXISTS `lastPurchases`*/;
/*!50001 DROP VIEW IF EXISTS `lastPurchases`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -80948,7 +81272,6 @@ USE `vn`;
-- Final view structure for view `lastTopClaims`
--
-/*!50001 DROP TABLE IF EXISTS `lastTopClaims`*/;
/*!50001 DROP VIEW IF EXISTS `lastTopClaims`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -80967,7 +81290,6 @@ USE `vn`;
-- Final view structure for view `mistake`
--
-/*!50001 DROP TABLE IF EXISTS `mistake`*/;
/*!50001 DROP VIEW IF EXISTS `mistake`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -80986,7 +81308,6 @@ USE `vn`;
-- Final view structure for view `mistakeRatio`
--
-/*!50001 DROP TABLE IF EXISTS `mistakeRatio`*/;
/*!50001 DROP VIEW IF EXISTS `mistakeRatio`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -81005,7 +81326,6 @@ USE `vn`;
-- Final view structure for view `newBornSales`
--
-/*!50001 DROP TABLE IF EXISTS `newBornSales`*/;
/*!50001 DROP VIEW IF EXISTS `newBornSales`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -81024,7 +81344,6 @@ USE `vn`;
-- Final view structure for view `operatorWorkerCode`
--
-/*!50001 DROP TABLE IF EXISTS `operatorWorkerCode`*/;
/*!50001 DROP VIEW IF EXISTS `operatorWorkerCode`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -81043,7 +81362,6 @@ USE `vn`;
-- Final view structure for view `originL10n`
--
-/*!50001 DROP TABLE IF EXISTS `originL10n`*/;
/*!50001 DROP VIEW IF EXISTS `originL10n`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -81062,7 +81380,6 @@ USE `vn`;
-- Final view structure for view `packageEquivalentItem`
--
-/*!50001 DROP TABLE IF EXISTS `packageEquivalentItem`*/;
/*!50001 DROP VIEW IF EXISTS `packageEquivalentItem`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -81081,7 +81398,6 @@ USE `vn`;
-- Final view structure for view `personMedia`
--
-/*!50001 DROP TABLE IF EXISTS `personMedia`*/;
/*!50001 DROP VIEW IF EXISTS `personMedia`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -81100,7 +81416,6 @@ USE `vn`;
-- Final view structure for view `phoneBook`
--
-/*!50001 DROP TABLE IF EXISTS `phoneBook`*/;
/*!50001 DROP VIEW IF EXISTS `phoneBook`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -81119,7 +81434,6 @@ USE `vn`;
-- Final view structure for view `productionVolume`
--
-/*!50001 DROP TABLE IF EXISTS `productionVolume`*/;
/*!50001 DROP VIEW IF EXISTS `productionVolume`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -81138,7 +81452,6 @@ USE `vn`;
-- Final view structure for view `productionVolume_LastHour`
--
-/*!50001 DROP TABLE IF EXISTS `productionVolume_LastHour`*/;
/*!50001 DROP VIEW IF EXISTS `productionVolume_LastHour`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -81157,7 +81470,6 @@ USE `vn`;
-- Final view structure for view `role`
--
-/*!50001 DROP TABLE IF EXISTS `role`*/;
/*!50001 DROP VIEW IF EXISTS `role`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -81176,7 +81488,6 @@ USE `vn`;
-- Final view structure for view `routesReduced`
--
-/*!50001 DROP TABLE IF EXISTS `routesReduced`*/;
/*!50001 DROP VIEW IF EXISTS `routesReduced`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -81195,7 +81506,6 @@ USE `vn`;
-- Final view structure for view `saleCost`
--
-/*!50001 DROP TABLE IF EXISTS `saleCost`*/;
/*!50001 DROP VIEW IF EXISTS `saleCost`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -81214,7 +81524,6 @@ USE `vn`;
-- Final view structure for view `saleLabel`
--
-/*!50001 DROP TABLE IF EXISTS `saleLabel`*/;
/*!50001 DROP VIEW IF EXISTS `saleLabel`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -81233,7 +81542,6 @@ USE `vn`;
-- Final view structure for view `saleMistakeList`
--
-/*!50001 DROP TABLE IF EXISTS `saleMistakeList`*/;
/*!50001 DROP VIEW IF EXISTS `saleMistakeList`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -81252,7 +81560,6 @@ USE `vn`;
-- Final view structure for view `saleMistake_list__2`
--
-/*!50001 DROP TABLE IF EXISTS `saleMistake_list__2`*/;
/*!50001 DROP VIEW IF EXISTS `saleMistake_list__2`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -81271,7 +81578,6 @@ USE `vn`;
-- Final view structure for view `saleSaleTracking`
--
-/*!50001 DROP TABLE IF EXISTS `saleSaleTracking`*/;
/*!50001 DROP VIEW IF EXISTS `saleSaleTracking`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -81290,7 +81596,6 @@ USE `vn`;
-- Final view structure for view `saleValue`
--
-/*!50001 DROP TABLE IF EXISTS `saleValue`*/;
/*!50001 DROP VIEW IF EXISTS `saleValue`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -81309,7 +81614,6 @@ USE `vn`;
-- Final view structure for view `saleVolume`
--
-/*!50001 DROP TABLE IF EXISTS `saleVolume`*/;
/*!50001 DROP VIEW IF EXISTS `saleVolume`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -81319,7 +81623,7 @@ USE `vn`;
/*!50001 SET collation_connection = utf8mb4_unicode_ci */;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
-/*!50001 VIEW `saleVolume` AS select `s`.`ticketFk` AS `ticketFk`,`s`.`id` AS `saleFk`,round(`ic`.`cm3delivery` * `s`.`quantity` / 1000,0) AS `litros`,`t`.`routeFk` AS `routeFk`,`t`.`shipped` AS `shipped`,`t`.`landed` AS `landed`,`s`.`quantity` * `ic`.`cm3delivery` / 1000000 AS `volume`,`s`.`quantity` * `ic`.`grams` / 1000 AS `physicalWeight`,`s`.`quantity` * `ic`.`cm3delivery` * greatest(`ic`.`grams` / `ic`.`cm3delivery`,`vc`.`aerealVolumetricDensity`) / 1000000 AS `weight`,`s`.`quantity` * `ic`.`cm3delivery` / 1000000 AS `physicalVolume`,`s`.`quantity` * `ic`.`cm3delivery` * ifnull(`t`.`zonePrice` - ifnull(`t`.`zoneBonus`,0),`z`.`price` - `z`.`bonus`) / (`vc`.`standardFlowerBox` * 1000) AS `freight`,`t`.`zoneFk` AS `zoneFk`,`t`.`clientFk` AS `clientFk`,`s`.`isPicked` AS `isPicked`,`s`.`quantity` * `s`.`price` * (100 - `s`.`discount`) / 100 AS `eurosValue`,`i`.`itemPackingTypeFk` AS `itemPackingTypeFk` from (((((`sale` `s` join `item` `i` on(`i`.`id` = `s`.`itemFk`)) join `ticket` `t` on(`t`.`id` = `s`.`ticketFk`)) join `zone` `z` on(`z`.`id` = `t`.`zoneFk`)) join `volumeConfig` `vc`) join `itemCost` `ic` on(`ic`.`itemFk` = `s`.`itemFk` and `ic`.`warehouseFk` = `t`.`warehouseFk`)) where `s`.`quantity` > 0 */;
+/*!50001 VIEW `saleVolume` AS select `s`.`ticketFk` AS `ticketFk`,`s`.`id` AS `saleFk`,round(`ic`.`cm3delivery` * `s`.`quantity` / 1000,0) AS `litros`,`t`.`routeFk` AS `routeFk`,`t`.`shipped` AS `shipped`,`t`.`landed` AS `landed`,`s`.`quantity` * `ic`.`cm3delivery` / 1000000 AS `volume`,`s`.`quantity` * `ic`.`grams` / 1000 AS `physicalWeight`,`s`.`quantity` * `ic`.`cm3delivery` * greatest(`ic`.`grams` / `ic`.`cm3delivery`,`vc`.`aerealVolumetricDensity`) / 1000000 AS `weight`,`s`.`quantity` * `ic`.`cm3delivery` / 1000000 AS `physicalVolume`,`s`.`quantity` * `ic`.`cm3delivery` * ifnull(`t`.`zonePrice` - ifnull(`t`.`zoneBonus`,0),`z`.`price` - `z`.`bonus`) / (`vc`.`standardFlowerBox` * 1000) * `z`.`inflation` AS `freight`,`t`.`zoneFk` AS `zoneFk`,`t`.`clientFk` AS `clientFk`,`s`.`isPicked` AS `isPicked`,`s`.`quantity` * `s`.`price` * (100 - `s`.`discount`) / 100 AS `eurosValue`,`i`.`itemPackingTypeFk` AS `itemPackingTypeFk` from (((((`sale` `s` join `item` `i` on(`i`.`id` = `s`.`itemFk`)) join `ticket` `t` on(`t`.`id` = `s`.`ticketFk`)) join `zone` `z` on(`z`.`id` = `t`.`zoneFk`)) join `volumeConfig` `vc`) join `itemCost` `ic` on(`ic`.`itemFk` = `s`.`itemFk` and `ic`.`warehouseFk` = `t`.`warehouseFk`)) where `s`.`quantity` > 0 */;
/*!50001 SET character_set_client = @saved_cs_client */;
/*!50001 SET character_set_results = @saved_cs_results */;
/*!50001 SET collation_connection = @saved_col_connection */;
@@ -81328,7 +81632,6 @@ USE `vn`;
-- Final view structure for view `saleVolume_Today_VNH`
--
-/*!50001 DROP TABLE IF EXISTS `saleVolume_Today_VNH`*/;
/*!50001 DROP VIEW IF EXISTS `saleVolume_Today_VNH`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -81347,7 +81650,6 @@ USE `vn`;
-- Final view structure for view `sale_freightComponent`
--
-/*!50001 DROP TABLE IF EXISTS `sale_freightComponent`*/;
/*!50001 DROP VIEW IF EXISTS `sale_freightComponent`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -81366,7 +81668,6 @@ USE `vn`;
-- Final view structure for view `salesPersonSince`
--
-/*!50001 DROP TABLE IF EXISTS `salesPersonSince`*/;
/*!50001 DROP VIEW IF EXISTS `salesPersonSince`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -81385,7 +81686,6 @@ USE `vn`;
-- Final view structure for view `salesPreparedLastHour`
--
-/*!50001 DROP TABLE IF EXISTS `salesPreparedLastHour`*/;
/*!50001 DROP VIEW IF EXISTS `salesPreparedLastHour`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -81404,7 +81704,6 @@ USE `vn`;
-- Final view structure for view `salesPreviousPreparated`
--
-/*!50001 DROP TABLE IF EXISTS `salesPreviousPreparated`*/;
/*!50001 DROP VIEW IF EXISTS `salesPreviousPreparated`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -81423,7 +81722,6 @@ USE `vn`;
-- Final view structure for view `supplierPackaging`
--
-/*!50001 DROP TABLE IF EXISTS `supplierPackaging`*/;
/*!50001 DROP VIEW IF EXISTS `supplierPackaging`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -81442,7 +81740,6 @@ USE `vn`;
-- Final view structure for view `tagL10n`
--
-/*!50001 DROP TABLE IF EXISTS `tagL10n`*/;
/*!50001 DROP VIEW IF EXISTS `tagL10n`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -81461,7 +81758,6 @@ USE `vn`;
-- Final view structure for view `ticketLastUpdated`
--
-/*!50001 DROP TABLE IF EXISTS `ticketLastUpdated`*/;
/*!50001 DROP VIEW IF EXISTS `ticketLastUpdated`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -81480,7 +81776,6 @@ USE `vn`;
-- Final view structure for view `ticketLastUpdatedList`
--
-/*!50001 DROP TABLE IF EXISTS `ticketLastUpdatedList`*/;
/*!50001 DROP VIEW IF EXISTS `ticketLastUpdatedList`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -81499,7 +81794,6 @@ USE `vn`;
-- Final view structure for view `ticketMRW`
--
-/*!50001 DROP TABLE IF EXISTS `ticketMRW`*/;
/*!50001 DROP VIEW IF EXISTS `ticketMRW`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -81518,7 +81812,6 @@ USE `vn`;
-- Final view structure for view `ticketNotInvoiced`
--
-/*!50001 DROP TABLE IF EXISTS `ticketNotInvoiced`*/;
/*!50001 DROP VIEW IF EXISTS `ticketNotInvoiced`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -81537,7 +81830,6 @@ USE `vn`;
-- Final view structure for view `ticketPackingList`
--
-/*!50001 DROP TABLE IF EXISTS `ticketPackingList`*/;
/*!50001 DROP VIEW IF EXISTS `ticketPackingList`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -81556,7 +81848,6 @@ USE `vn`;
-- Final view structure for view `ticketPreviousPreparingList`
--
-/*!50001 DROP TABLE IF EXISTS `ticketPreviousPreparingList`*/;
/*!50001 DROP VIEW IF EXISTS `ticketPreviousPreparingList`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -81575,7 +81866,6 @@ USE `vn`;
-- Final view structure for view `ticketState`
--
-/*!50001 DROP TABLE IF EXISTS `ticketState`*/;
/*!50001 DROP VIEW IF EXISTS `ticketState`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -81594,7 +81884,6 @@ USE `vn`;
-- Final view structure for view `ticketStateToday`
--
-/*!50001 DROP TABLE IF EXISTS `ticketStateToday`*/;
/*!50001 DROP VIEW IF EXISTS `ticketStateToday`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -81613,7 +81902,6 @@ USE `vn`;
-- Final view structure for view `tr2`
--
-/*!50001 DROP TABLE IF EXISTS `tr2`*/;
/*!50001 DROP VIEW IF EXISTS `tr2`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -81632,7 +81920,6 @@ USE `vn`;
-- Final view structure for view `traceabilityBuy`
--
-/*!50001 DROP TABLE IF EXISTS `traceabilityBuy`*/;
/*!50001 DROP VIEW IF EXISTS `traceabilityBuy`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -81651,7 +81938,6 @@ USE `vn`;
-- Final view structure for view `traceabilitySale`
--
-/*!50001 DROP TABLE IF EXISTS `traceabilitySale`*/;
/*!50001 DROP VIEW IF EXISTS `traceabilitySale`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -81670,7 +81956,6 @@ USE `vn`;
-- Final view structure for view `workerBusinessDated`
--
-/*!50001 DROP TABLE IF EXISTS `workerBusinessDated`*/;
/*!50001 DROP VIEW IF EXISTS `workerBusinessDated`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -81689,7 +81974,6 @@ USE `vn`;
-- Final view structure for view `workerDepartment`
--
-/*!50001 DROP TABLE IF EXISTS `workerDepartment`*/;
/*!50001 DROP VIEW IF EXISTS `workerDepartment`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -81708,7 +81992,6 @@ USE `vn`;
-- Final view structure for view `workerLabour`
--
-/*!50001 DROP TABLE IF EXISTS `workerLabour`*/;
/*!50001 DROP VIEW IF EXISTS `workerLabour`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -81727,7 +82010,6 @@ USE `vn`;
-- Final view structure for view `workerMedia`
--
-/*!50001 DROP TABLE IF EXISTS `workerMedia`*/;
/*!50001 DROP VIEW IF EXISTS `workerMedia`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -81746,7 +82028,6 @@ USE `vn`;
-- Final view structure for view `workerSpeedExpedition`
--
-/*!50001 DROP TABLE IF EXISTS `workerSpeedExpedition`*/;
/*!50001 DROP VIEW IF EXISTS `workerSpeedExpedition`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -81765,7 +82046,6 @@ USE `vn`;
-- Final view structure for view `workerSpeedSaleTracking`
--
-/*!50001 DROP TABLE IF EXISTS `workerSpeedSaleTracking`*/;
/*!50001 DROP VIEW IF EXISTS `workerSpeedSaleTracking`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -81784,7 +82064,6 @@ USE `vn`;
-- Final view structure for view `workerTeamCollegues`
--
-/*!50001 DROP TABLE IF EXISTS `workerTeamCollegues`*/;
/*!50001 DROP VIEW IF EXISTS `workerTeamCollegues`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -81803,14 +82082,13 @@ USE `vn`;
-- Final view structure for view `workerTimeControlUserInfo`
--
-/*!50001 DROP TABLE IF EXISTS `workerTimeControlUserInfo`*/;
/*!50001 DROP VIEW IF EXISTS `workerTimeControlUserInfo`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
/*!50001 SET @saved_col_connection = @@collation_connection */;
-/*!50001 SET character_set_client = utf8mb3 */;
-/*!50001 SET character_set_results = utf8mb3 */;
-/*!50001 SET collation_connection = utf8mb3_general_ci */;
+/*!50001 SET character_set_client = utf8mb4 */;
+/*!50001 SET character_set_results = utf8mb4 */;
+/*!50001 SET collation_connection = utf8mb4_unicode_ci */;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `workerTimeControlUserInfo` AS select `u`.`id` AS `userFk`,`w`.`firstName` AS `name`,`w`.`lastName` AS `surname`,`u`.`name` AS `user`,`u`.`password` AS `password`,`wd`.`departmentFk` AS `departmentFk`,left(`c`.`fi`,8) AS `dni` from (((`account`.`user` `u` join `vn`.`worker` `w` on(`w`.`id` = `u`.`id`)) join `vn`.`client` `c` on(`c`.`id` = `u`.`id`)) left join `vn`.`workerDepartment` `wd` on(`wd`.`workerFk` = `w`.`id`)) */;
@@ -81823,7 +82101,6 @@ USE `vn`;
-- Final view structure for view `workerTimeJourneyNG`
--
-/*!50001 DROP TABLE IF EXISTS `workerTimeJourneyNG`*/;
/*!50001 DROP VIEW IF EXISTS `workerTimeJourneyNG`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -81833,7 +82110,7 @@ USE `vn`;
/*!50001 SET collation_connection = utf8mb4_unicode_ci */;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
-/*!50001 VIEW `workerTimeJourneyNG` AS select `wtc`.`userFk` AS `userFk`,cast(`wtc`.`timed` as date) AS `dated`,if(`wtc`.`order` MOD 2,-1,1) * (hour(`wtc`.`timed`) + minute(`wtc`.`timed`) / 60) AS `Journey`,dayname(`wtc`.`timed`) AS `dayName`,`w`.`lastName` AS `name`,`w`.`firstName` AS `firstname` from (`workerTimeControl` `wtc` join `worker` `w` on(`w`.`userFk` = `wtc`.`userFk`)) */;
+/*!50001 VIEW `workerTimeJourneyNG` AS select `wtc`.`userFk` AS `userFk`,cast(`wtc`.`timed` as date) AS `dated`,if(`wtc`.`order` MOD 2,-1,1) * (hour(`wtc`.`timed`) + minute(`wtc`.`timed`) / 60) AS `Journey`,dayname(`wtc`.`timed`) AS `dayName`,`w`.`lastName` AS `name`,`w`.`firstName` AS `firstname` from (`workerTimeControl` `wtc` join `worker` `w` on(`w`.`id` = `wtc`.`userFk`)) */;
/*!50001 SET character_set_client = @saved_cs_client */;
/*!50001 SET character_set_results = @saved_cs_results */;
/*!50001 SET collation_connection = @saved_col_connection */;
@@ -81842,7 +82119,6 @@ USE `vn`;
-- Final view structure for view `workerWithoutTractor`
--
-/*!50001 DROP TABLE IF EXISTS `workerWithoutTractor`*/;
/*!50001 DROP VIEW IF EXISTS `workerWithoutTractor`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -81861,7 +82137,6 @@ USE `vn`;
-- Final view structure for view `zoneEstimatedDelivery`
--
-/*!50001 DROP TABLE IF EXISTS `zoneEstimatedDelivery`*/;
/*!50001 DROP VIEW IF EXISTS `zoneEstimatedDelivery`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@@ -81885,4 +82160,4 @@ USE `vn`;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
--- Dump completed on 2023-06-26 8:39:32
+-- Dump completed on 2023-08-30 15:59:19
diff --git a/db/export-data.sh b/db/export-data.sh
index 59edf6ebc..7d346b235 100755
--- a/db/export-data.sh
+++ b/db/export-data.sh
@@ -97,13 +97,6 @@ TABLES=(
)
dump_tables ${TABLES[@]}
-TABLES=(
- postgresql
- labour_agreement
- media_type
-)
-dump_tables ${TABLES[@]}
-
TABLES=(
sage
TiposIva
diff --git a/db/export-structure.sh b/db/export-structure.sh
index a6888f2ac..4ecbfa7e8 100755
--- a/db/export-structure.sh
+++ b/db/export-structure.sh
@@ -7,7 +7,6 @@ SCHEMAS=(
edi
hedera
pbx
- postgresql
sage
salix
stock
@@ -23,7 +22,6 @@ IGNORETABLES=(
--ignore-table=bs.productionIndicators
--ignore-table=bs.VentasPorCliente
--ignore-table=bs.v_ventas
- --ignore-table=postgresql.currentWorkersStats
--ignore-table=vn.accounting__
--ignore-table=vn.agencyModeZone
--ignore-table=vn.agencyProvince
diff --git a/db/tests/vn/workerTimeControlCheck.spec.js b/db/tests/vn/workerTimeControlCheck.spec.js
index 9140628e6..0ca1429d4 100644
--- a/db/tests/vn/workerTimeControlCheck.spec.js
+++ b/db/tests/vn/workerTimeControlCheck.spec.js
@@ -54,7 +54,6 @@ xdescribe('worker workerTimeControl_check()', () => {
});
it('should throw an error if the worker with a special category has not finished the 9h break', async() => {
- // dayBreak to 9h in postgresql.professional_category
const workerId = 1110;
const tabletId = 1;
let stmts = [];
@@ -91,7 +90,6 @@ xdescribe('worker workerTimeControl_check()', () => {
});
it('should check f the worker with a special category has finished the 9h break', async() => {
- // dayBreak to 9h in postgresql.professional_category
const workerId = 1110;
const tabletId = 1;
let stmts = [];
@@ -239,12 +237,6 @@ xdescribe('worker workerTimeControl_check()', () => {
stmts.push('START TRANSACTION');
- stmt = new ParameterizedSQL(`INSERT INTO postgresql.calendar_employee(businessFk,calendar_state_id,date)
- VALUES
- (?,1,CURDATE())`, [
- workerId
- ]);
- stmts.push(stmt);
stmt = new ParameterizedSQL(`INSERT INTO vn.workerTimeControl(userFk,timed,manual,direction)
VALUES
(?,TIMESTAMPADD(HOUR,-24,NOW()),0,"in"),
diff --git a/e2e/helpers/extensions.js b/e2e/helpers/extensions.js
index fe3ef08bd..b6ea32a6c 100644
--- a/e2e/helpers/extensions.js
+++ b/e2e/helpers/extensions.js
@@ -632,6 +632,7 @@ let actions = {
await this.write(selector, value.toString());
break;
case 'vn-autocomplete':
+ case 'vn-worker-autocomplete':
if (value)
await this.autocompleteSearch(selector, value.toString());
else
@@ -667,6 +668,7 @@ let actions = {
switch (tagName) {
case 'vn-textfield':
case 'vn-autocomplete':
+ case 'vn-worker-autocomplete':
case 'vn-input-time':
case 'vn-datalist':
el = await input.$('input');
diff --git a/e2e/helpers/selectors.js b/e2e/helpers/selectors.js
index 93288efa7..fe3633723 100644
--- a/e2e/helpers/selectors.js
+++ b/e2e/helpers/selectors.js
@@ -187,7 +187,7 @@ export default {
country: 'vn-client-create vn-autocomplete[ng-model="$ctrl.client.countryFk"]',
userName: 'vn-client-create vn-textfield[ng-model="$ctrl.client.userName"]',
email: 'vn-client-create vn-textfield[ng-model="$ctrl.client.email"]',
- salesPerson: 'vn-client-create vn-autocomplete[ng-model="$ctrl.client.salesPersonFk"]',
+ salesPerson: 'vn-client-create vn-worker-autocomplete[ng-model="$ctrl.client.salesPersonFk"]',
saveNewProvicenButton: '#saveProvince',
saveNewCityButton: '#saveCity',
saveNewPoscode: '#savePostcode',
@@ -199,7 +199,7 @@ export default {
email: 'vn-client-basic-data vn-textfield[ng-model="$ctrl.client.email"]',
phone: 'vn-client-basic-data vn-textfield[ng-model="$ctrl.client.phone"]',
mobile: 'vn-client-basic-data vn-textfield[ng-model="$ctrl.client.mobile"]',
- salesPerson: 'vn-client-basic-data vn-autocomplete[ng-model="$ctrl.client.salesPersonFk"]',
+ salesPerson: 'vn-client-basic-data vn-worker-autocomplete[ng-model="$ctrl.client.salesPersonFk"]',
channel: 'vn-client-basic-data vn-autocomplete[ng-model="$ctrl.client.contactChannelFk"]',
transferor: 'vn-client-basic-data vn-autocomplete[ng-model="$ctrl.client.transferorFk"]',
businessType: 'vn-client-basic-data vn-autocomplete[ng-model="$ctrl.client.businessTypeFk"]',
@@ -735,7 +735,7 @@ export default {
},
createStateView: {
state: 'vn-autocomplete[ng-model="$ctrl.stateFk"]',
- worker: 'vn-autocomplete[ng-model="$ctrl.workerFk"]',
+ worker: 'vn-worker-autocomplete[ng-model="$ctrl.workerFk"]',
saveStateButton: `button[type=submit]`
},
claimsIndex: {
@@ -781,12 +781,12 @@ export default {
firstClaimReason: 'vn-claim-development vn-horizontal:nth-child(1) vn-autocomplete[ng-model="claimDevelopment.claimReasonFk"]',
firstClaimResult: 'vn-claim-development vn-horizontal:nth-child(1) vn-autocomplete[ng-model="claimDevelopment.claimResultFk"]',
firstClaimResponsible: 'vn-claim-development vn-horizontal:nth-child(1) vn-autocomplete[ng-model="claimDevelopment.claimResponsibleFk"]',
- firstClaimWorker: 'vn-claim-development vn-horizontal:nth-child(1) vn-autocomplete[ng-model="claimDevelopment.workerFk"]',
+ firstClaimWorker: 'vn-claim-development vn-horizontal:nth-child(1) vn-worker-autocomplete[ng-model="claimDevelopment.workerFk"]',
firstClaimRedelivery: 'vn-claim-development vn-horizontal:nth-child(1) vn-autocomplete[ng-model="claimDevelopment.claimRedeliveryFk"]',
secondClaimReason: 'vn-claim-development vn-horizontal:nth-child(2) vn-autocomplete[ng-model="claimDevelopment.claimReasonFk"]',
secondClaimResult: 'vn-claim-development vn-horizontal:nth-child(2) vn-autocomplete[ng-model="claimDevelopment.claimResultFk"]',
secondClaimResponsible: 'vn-claim-development vn-horizontal:nth-child(2) vn-autocomplete[ng-model="claimDevelopment.claimResponsibleFk"]',
- secondClaimWorker: 'vn-claim-development vn-horizontal:nth-child(2) vn-autocomplete[ng-model="claimDevelopment.workerFk"]',
+ secondClaimWorker: 'vn-claim-development vn-horizontal:nth-child(2) vn-worker-autocomplete[ng-model="claimDevelopment.workerFk"]',
secondClaimRedelivery: 'vn-claim-development vn-horizontal:nth-child(2) vn-autocomplete[ng-model="claimDevelopment.claimRedeliveryFk"]',
saveDevelopmentButton: 'button[type=submit]'
},
@@ -854,7 +854,7 @@ export default {
},
createRouteView: {
- worker: 'vn-route-create vn-autocomplete[ng-model="$ctrl.route.workerFk"]',
+ worker: 'vn-route-create vn-worker-autocomplete[ng-model="$ctrl.route.workerFk"]',
createdDatePicker: 'vn-route-create vn-date-picker[ng-model="$ctrl.route.created"]',
vehicleAuto: 'vn-route-create vn-autocomplete[ng-model="$ctrl.route.vehicleFk"]',
agency: 'vn-route-create vn-autocomplete[ng-model="$ctrl.route.agencyModeFk"]',
@@ -976,7 +976,7 @@ export default {
street: 'vn-worker-create vn-textfield[ng-model="$ctrl.worker.street"]',
user: 'vn-worker-create vn-textfield[ng-model="$ctrl.worker.name"]',
email: 'vn-worker-create vn-textfield[ng-model="$ctrl.worker.email"]',
- boss: 'vn-worker-create vn-autocomplete[ng-model="$ctrl.worker.bossFk"]',
+ boss: 'vn-worker-create vn-worker-autocomplete[ng-model="$ctrl.worker.bossFk"]',
role: 'vn-worker-create vn-autocomplete[ng-model="$ctrl.worker.roleFk"]',
iban: 'vn-worker-create vn-textfield[ng-model="$ctrl.worker.iban"]',
createButton: 'vn-worker-create vn-submit[label="Create"]',
diff --git a/e2e/paths/04-item/01_summary.spec.js b/e2e/paths/04-item/01_summary.spec.js
index e09ecb778..51195be48 100644
--- a/e2e/paths/04-item/01_summary.spec.js
+++ b/e2e/paths/04-item/01_summary.spec.js
@@ -27,10 +27,10 @@ describe('Item summary path', () => {
});
it(`should check the item summary preview shows fields from basic data`, async() => {
- await page.waitForTextInElement(selectors.itemSummary.basicData, 'Ranged weapon longbow 2m');
+ await page.waitForTextInElement(selectors.itemSummary.basicData, 'Ranged weapon longbow 200cm');
const result = await page.waitToGetProperty(selectors.itemSummary.basicData, 'innerText');
- expect(result).toContain('Ranged weapon longbow 2m');
+ expect(result).toContain('Ranged weapon longbow 200cm');
});
it(`should check the item summary preview shows fields from tags`, async() => {
diff --git a/e2e/paths/04-item/03_tax.spec.js b/e2e/paths/04-item/03_tax.spec.js
index 16cc1667d..6013094e9 100644
--- a/e2e/paths/04-item/03_tax.spec.js
+++ b/e2e/paths/04-item/03_tax.spec.js
@@ -8,7 +8,7 @@ describe('Item edit tax path', () => {
browser = await getBrowser();
page = browser.page;
await page.loginAndModule('buyer', 'item');
- await page.accessToSearchResult('Ranged weapon longbow 2m');
+ await page.accessToSearchResult('Ranged weapon longbow 200cm');
await page.accessToSection('item.card.tax');
});
diff --git a/e2e/paths/04-item/04_tags.spec.js b/e2e/paths/04-item/04_tags.spec.js
index 574ff7562..f13cf9aa4 100644
--- a/e2e/paths/04-item/04_tags.spec.js
+++ b/e2e/paths/04-item/04_tags.spec.js
@@ -8,7 +8,7 @@ describe('Item create tags path', () => {
browser = await getBrowser();
page = browser.page;
await page.loginAndModule('buyer', 'item');
- await page.accessToSearchResult('Ranged weapon longbow 2m');
+ await page.accessToSearchResult('Ranged weapon longbow 200cm');
await page.accessToSection('item.card.tags');
});
diff --git a/e2e/paths/04-item/06_barcode.spec.js b/e2e/paths/04-item/06_barcode.spec.js
index 7fed5ea0c..36c9c39ae 100644
--- a/e2e/paths/04-item/06_barcode.spec.js
+++ b/e2e/paths/04-item/06_barcode.spec.js
@@ -8,7 +8,7 @@ describe('Item Create barcodes path', () => {
browser = await getBrowser();
page = browser.page;
await page.loginAndModule('buyer', 'item');
- await page.accessToSearchResult('Ranged weapon longbow 2m');
+ await page.accessToSearchResult('Ranged weapon longbow 200cm');
await page.accessToSection('item.card.itemBarcode');
});
diff --git a/e2e/paths/04-item/12_request.spec.js b/e2e/paths/04-item/12_request.spec.js
index 19838883e..e0f3a1b45 100644
--- a/e2e/paths/04-item/12_request.spec.js
+++ b/e2e/paths/04-item/12_request.spec.js
@@ -22,10 +22,10 @@ describe('Item request path', () => {
it('should fill the id and quantity then check the concept was updated', async() => {
await page.writeOnEditableTD(selectors.itemRequest.firstRequestItemID, '4');
await page.writeOnEditableTD(selectors.itemRequest.firstRequestQuantity, '10');
- await page.waitForTextInElement(selectors.itemRequest.firstRequestConcept, 'Melee weapon heavy shield 1x0.5m');
+ await page.waitForTextInElement(selectors.itemRequest.firstRequestConcept, 'Melee weapon heavy shield 100cm');
let filledConcept = await page.waitToGetProperty(selectors.itemRequest.firstRequestConcept, 'innerText');
- expect(filledConcept).toContain('Melee weapon heavy shield 1x0.5m');
+ expect(filledConcept).toContain('Melee weapon heavy shield 100cm');
});
it('should check the status of the request should now be accepted', async() => {
diff --git a/e2e/paths/05-ticket/01-sale/01_list_sales.spec.js b/e2e/paths/05-ticket/01-sale/01_list_sales.spec.js
index 44f2b6947..5c8eba571 100644
--- a/e2e/paths/05-ticket/01-sale/01_list_sales.spec.js
+++ b/e2e/paths/05-ticket/01-sale/01_list_sales.spec.js
@@ -54,7 +54,7 @@ describe('Ticket List sale path', () => {
});
it('should select a valid item to be added as the second item in the sales list', async() => {
- let searchValue = 'Melee weapon heavy shield 1x0.5m';
+ let searchValue = 'Melee weapon heavy shield 100cm';
await page.autocompleteSearch(selectors.ticketSales.secondSaleIdAutocomplete, searchValue);
await page.waitToClick(selectors.ticketSales.secondSaleQuantityCell);
await page.type(selectors.ticketSales.secondSaleQuantity, '1');
diff --git a/e2e/paths/05-ticket/04_packages.spec.js b/e2e/paths/05-ticket/04_packages.spec.js
index 2b79e9cb6..1e6a0a173 100644
--- a/e2e/paths/05-ticket/04_packages.spec.js
+++ b/e2e/paths/05-ticket/04_packages.spec.js
@@ -36,7 +36,7 @@ describe('Ticket Create packages path', () => {
it(`should delete the first package and receive and error to save a new one with blank quantity`, async() => {
await page.clearInput($.firstQuantity);
- await page.autocompleteSearch($.firstPackage, 'Container medical box 1m');
+ await page.autocompleteSearch($.firstPackage, 'Container medical box 100cm');
await page.waitToClick($.savePackagesButton);
const message = await page.waitForSnackbar();
@@ -63,10 +63,10 @@ describe('Ticket Create packages path', () => {
it(`should confirm the first select is the expected one`, async() => {
await page.reloadSection('ticket.card.package');
- await page.waitForTextInField($.firstPackage, 'Container medical box 1m');
+ await page.waitForTextInField($.firstPackage, 'Container medical box 100cm');
const result = await page.waitToGetProperty($.firstPackage, 'value');
- expect(result).toEqual('Container medical box 1m');
+ expect(result).toEqual('Container medical box 100cm');
});
it(`should confirm quantity is just a number and the string part was ignored by the imput number`, async() => {
diff --git a/e2e/paths/05-ticket/05_tracking_state.spec.js b/e2e/paths/05-ticket/05_tracking_state.spec.js
index 949c9a8e6..9ac373287 100644
--- a/e2e/paths/05-ticket/05_tracking_state.spec.js
+++ b/e2e/paths/05-ticket/05_tracking_state.spec.js
@@ -59,7 +59,7 @@ describe('Ticket Create new tracking state path', () => {
const result = await page
.waitToGetProperty(selectors.createStateView.worker, 'value');
- expect(result).toEqual('salesPersonNick');
+ expect(result).toEqual('salesPerson');
});
it(`should succesfully create a valid state`, async() => {
diff --git a/e2e/paths/12-entry/07_buys.spec.js b/e2e/paths/12-entry/07_buys.spec.js
index 28d39fb1d..b960673ec 100644
--- a/e2e/paths/12-entry/07_buys.spec.js
+++ b/e2e/paths/12-entry/07_buys.spec.js
@@ -41,10 +41,10 @@ describe('Entry import, create and edit buys path', () => {
await page.waitForTextInField(selectors.entryBuys.ref, '200573095, 200573106, 200573117, 200573506');
await page.waitForTextInField(selectors.entryBuys.observation, '729-6340 2846');
- await page.autocompleteSearch(selectors.entryBuys.firstImportedItem, 'Ranged weapon longbow 2m');
- await page.autocompleteSearch(selectors.entryBuys.secondImportedItem, 'Ranged weapon longbow 2m');
- await page.autocompleteSearch(selectors.entryBuys.thirdImportedItem, 'Ranged weapon sniper rifle 300mm');
- await page.autocompleteSearch(selectors.entryBuys.fourthImportedItem, 'Melee weapon heavy shield 1x0.5m');
+ await page.autocompleteSearch(selectors.entryBuys.firstImportedItem, 'Ranged weapon longbow 200cm');
+ await page.autocompleteSearch(selectors.entryBuys.secondImportedItem, 'Ranged weapon longbow 200cm');
+ await page.autocompleteSearch(selectors.entryBuys.thirdImportedItem, 'Ranged weapon sniper rifle 113cm');
+ await page.autocompleteSearch(selectors.entryBuys.fourthImportedItem, 'Melee weapon heavy shield 100cm');
await page.waitToClick(selectors.entryBuys.importBuysButton);
diff --git a/front/core/components/autocomplete/index.html b/front/core/components/autocomplete/index.html
index 69aac4d43..527ca77e7 100755
--- a/front/core/components/autocomplete/index.html
+++ b/front/core/components/autocomplete/index.html
@@ -18,7 +18,7 @@
+