Compare commits
169 Commits
9765d2b633
...
2511fbf71c
Author | SHA1 | Date |
---|---|---|
Robert Ferrús | 2511fbf71c | |
Pablo Natek | 55daa2d02b | |
Guillermo Bonet | b529ccfe29 | |
Guillermo Bonet | a3945070f2 | |
Pablo Natek | 86e4e3e981 | |
Guillermo Bonet | e1a091535e | |
Guillermo Bonet | b5463e5560 | |
Guillermo Bonet | e49285ace8 | |
Guillermo Bonet | e344ae3bf2 | |
Guillermo Bonet | 216b81adda | |
Guillermo Bonet | 48ffb80094 | |
Guillermo Bonet | 96b85701d8 | |
Guillermo Bonet | d1c528c8fd | |
Guillermo Bonet | 0fbef4c88a | |
Guillermo Bonet | 3b48cf3d5d | |
Jorge Penadés | 7e2194df41 | |
Jorge Penadés | 4b659c0b48 | |
Jorge Penadés | f96b914649 | |
Jorge Penadés | 86c95e185c | |
Jorge Penadés | f3e640e4a0 | |
Jorge Penadés | 1ca737fd13 | |
Jorge Penadés | e242320eed | |
Jorge Penadés | 4766d25dda | |
Jorge Penadés | eff251fbb5 | |
Jorge Penadés | ab2e88806e | |
Jorge Penadés | c4375b2505 | |
Jorge Penadés | 47ae1b59c1 | |
Alex Moreno | a8cb0b9eb8 | |
Jorge Penadés | a37332f7be | |
Jorge Penadés | 25b05637a6 | |
Ivan Mas | 0a11997250 | |
Jorge Penadés | c8ab5d4344 | |
Ivan Mas | 96a13af02c | |
Guillermo Bonet | 54da1a713a | |
Guillermo Bonet | b3dcaf4cf5 | |
Guillermo Bonet | b7cb420c72 | |
Guillermo Bonet | 534b50f51a | |
Pablo Natek | b4406a69d8 | |
Guillermo Bonet | d387486ea8 | |
Guillermo Bonet | 2f7de633bd | |
Guillermo Bonet | 8449a6c6d3 | |
Guillermo Bonet | 5f50d84213 | |
Carlos Satorres | cd7ed6987a | |
Carlos Satorres | b0812139cb | |
Carlos Satorres | 155616e622 | |
Guillermo Bonet | 97e53b2ef8 | |
Guillermo Bonet | 9c0af7f7c6 | |
Ivan Mas | e1b0fc298c | |
Ivan Mas | 26be6c6920 | |
Ivan Mas | 21693cfd71 | |
Guillermo Bonet | d4a60f63c9 | |
Guillermo Bonet | 018393fa93 | |
Guillermo Bonet | 344427da45 | |
Guillermo Bonet | 72e067ff81 | |
Pablo Natek | 5f3b1ff601 | |
Guillermo Bonet | 782563f67d | |
Guillermo Bonet | aa1c017f22 | |
Guillermo Bonet | 5a134668da | |
Guillermo Bonet | 755312b981 | |
Guillermo Bonet | 9d5ef3eeb0 | |
Guillermo Bonet | b3bf0024e3 | |
Pablo Natek | 274a365ec0 | |
Robert Ferrús | 021bc03ecf | |
Robert Ferrús | 9b079a8bb2 | |
Guillermo Bonet | 2273dc636e | |
Jorge Penadés | 0a92fbbdbc | |
Guillermo Bonet | 172b4d8e05 | |
Guillermo Bonet | 1086981b53 | |
Jorge Penadés | 5d908fd5f9 | |
Jorge Penadés | a91f952778 | |
Jorge Penadés | 968e308ab6 | |
Jorge Penadés | f52041eeff | |
Pablo Natek | b025a8b804 | |
Guillermo Bonet | 779a75cd78 | |
Guillermo Bonet | c2381f0feb | |
Guillermo Bonet | ab2e35b64c | |
Guillermo Bonet | 628b67e1e5 | |
Guillermo Bonet | a426e9c7c6 | |
Pablo Natek | d06be8b5b6 | |
Pako Natek | ebc0420531 | |
Ivan Mas | fbd59de3cd | |
Ivan Mas | 4add10f3dd | |
Jorge Penadés | 9b971fc284 | |
Guillermo Bonet | 3c8ef7cdba | |
Guillermo Bonet | 127c6fced0 | |
Guillermo Bonet | 6427a90c44 | |
Guillermo Bonet | 4891e98109 | |
Guillermo Bonet | 2ece748138 | |
Guillermo Bonet | a67ea6b15f | |
Guillermo Bonet | f45460b0e1 | |
Guillermo Bonet | d52f537f0c | |
Robert Ferrús | d925a5d7fa | |
Pako Natek | 2d70e95996 | |
Pako Natek | a9def89e01 | |
Sergio De la torre | b532691043 | |
Guillermo Bonet | dd3a854ec5 | |
Guillermo Bonet | aec4d0b1a4 | |
Guillermo Bonet | 699675b476 | |
Javier Segarra | ec3f852bde | |
Javier Segarra | 96301f8a0b | |
Guillermo Bonet | f989b72fab | |
Guillermo Bonet | a921e51023 | |
Jorge Penadés | 0f5ca107f0 | |
Pablo Natek | 307179cb9d | |
Pablo Natek | 69999125c7 | |
Pablo Natek | 63425d31ae | |
Alex Moreno | d442593823 | |
Alex Moreno | d28f12a0d1 | |
Alex Moreno | 07e59ccdbf | |
Robert Ferrús | 55fced363e | |
Pako Natek | eb3d0e837f | |
Pako Natek | 76d072e00f | |
Guillermo Bonet | 90e7ab1ec1 | |
Guillermo Bonet | 5bbcf5005f | |
Guillermo Bonet | 3158644032 | |
Alex Moreno | 732dd02a19 | |
Pablo Natek | 82bcb48101 | |
Pablo Natek | ffe947c73d | |
Pablo Natek | 3d3bc0dbaa | |
Pablo Natek | 395e6997dd | |
Pablo Natek | 2dd3ae1c75 | |
Jorge Penadés | 186312702d | |
Jorge Penadés | e38adf4296 | |
Jorge Penadés | 7c016da8f9 | |
Alex Moreno | 180b0b5b3f | |
Alex Moreno | c8d9cfd623 | |
Javi Gallego | eaad989b3a | |
Alex Moreno | a79905f7c2 | |
Alex Moreno | 9f763ebae7 | |
Guillermo Bonet | 0dc77851c0 | |
Pako Natek | b62b33d175 | |
Alex Moreno | f7a29cd9c7 | |
Pako Natek | 35f4f161ab | |
Pablo Natek | c4fc51f4b8 | |
Pablo Natek | 50a73c98a2 | |
Pablo Natek | d6349f113c | |
Robert Ferrús | 94ed23ca07 | |
Guillermo Bonet | a254cb19cd | |
Pablo Natek | 82e62e8ee7 | |
Jorge Penadés | 6ef1f950d1 | |
Pablo Natek | f8c3d69c5d | |
Jorge Penadés | 9b28cf9130 | |
Jorge Penadés | 6927f4b28d | |
Sergio De la torre | fd36f7ecc3 | |
Javi Gallego | dd7c967624 | |
Javi Gallego | d95e455ccf | |
Sergio De la torre | cab2b7c93c | |
Sergio De la torre | 3b87cf0c69 | |
Sergio De la torre | c113d83797 | |
Alex Moreno | c899727bfc | |
Alex Moreno | 85ded59cb3 | |
Sergio De la torre | 37548e5e64 | |
Sergio De la torre | 4c0dec19d4 | |
Guillermo Bonet | 6c40934f74 | |
Guillermo Bonet | 17412c5b84 | |
Robert Ferrús | 6031b1fe3f | |
Carlos Satorres | e498cbd060 | |
Carlos Satorres | f552a3b7e1 | |
Carlos Satorres | 72662b3112 | |
Carlos Satorres | 67714f2dff | |
Carlos Satorres | 7c3d02817e | |
Carlos Satorres | f786996e2c | |
Carlos Satorres | 1927a914e6 | |
Carlos Satorres | 2af4d86c28 | |
Carlos Satorres | 727c18d6ec | |
Carlos Satorres | 392012ef60 | |
Carlos Satorres | 26b28eeb0a | |
Carlos Satorres | 5085921c21 | |
Carlos Satorres | 155597bf85 |
|
@ -73,7 +73,7 @@ module.exports = Self => {
|
||||||
JOIN item i ON i.id = s.itemFk
|
JOIN item i ON i.id = s.itemFk
|
||||||
JOIN itemShelvingSale iss ON iss.saleFk = s.id
|
JOIN itemShelvingSale iss ON iss.saleFk = s.id
|
||||||
LEFT JOIN itemShelving ish ON ish.id = iss.itemShelvingFk
|
LEFT JOIN itemShelving ish ON ish.id = iss.itemShelvingFk
|
||||||
LEFT JOIN shelving sh ON sh.code = ish.shelvingFk
|
LEFT JOIN shelving sh ON sh.id = ish.shelvingFk
|
||||||
LEFT JOIN parking p ON p.id = sh.parkingFk
|
LEFT JOIN parking p ON p.id = sh.parkingFk
|
||||||
LEFT JOIN itemColor ic ON ic.itemFk = s.itemFk
|
LEFT JOIN itemColor ic ON ic.itemFk = s.itemFk
|
||||||
LEFT JOIN origin o ON o.id = i.originFk
|
LEFT JOIN origin o ON o.id = i.originFk
|
||||||
|
@ -114,7 +114,7 @@ module.exports = Self => {
|
||||||
JOIN item i ON i.id = s.itemFk
|
JOIN item i ON i.id = s.itemFk
|
||||||
JOIN itemShelvingSale iss ON iss.saleFk = s.id
|
JOIN itemShelvingSale iss ON iss.saleFk = s.id
|
||||||
LEFT JOIN itemShelving ish ON ish.id = iss.itemShelvingFk
|
LEFT JOIN itemShelving ish ON ish.id = iss.itemShelvingFk
|
||||||
LEFT JOIN shelving sh ON sh.code = ish.shelvingFk
|
LEFT JOIN shelving sh ON sh.id = ish.shelvingFk
|
||||||
LEFT JOIN parking p ON p.id = sh.parkingFk
|
LEFT JOIN parking p ON p.id = sh.parkingFk
|
||||||
LEFT JOIN itemColor ic ON ic.itemFk = s.itemFk
|
LEFT JOIN itemColor ic ON ic.itemFk = s.itemFk
|
||||||
LEFT JOIN origin o ON o.id = i.originFk
|
LEFT JOIN origin o ON o.id = i.originFk
|
||||||
|
|
|
@ -39,6 +39,9 @@ module.exports = Self => {
|
||||||
const xmlString = response.data;
|
const xmlString = response.data;
|
||||||
const parser = new DOMParser();
|
const parser = new DOMParser();
|
||||||
const xmlDoc = parser.parseFromString(xmlString, 'text/xml');
|
const xmlDoc = parser.parseFromString(xmlString, 'text/xml');
|
||||||
|
|
||||||
|
await Self.rawSql('CALL util.debugAdd(?,?);', ['cancelShipment', xmlDoc]);
|
||||||
|
|
||||||
const result = xmlDoc.getElementsByTagName('Mensaje')[0].textContent;
|
const result = xmlDoc.getElementsByTagName('Mensaje')[0].textContent;
|
||||||
return result.toLowerCase().includes('se ha cancelado correctamente');
|
return result.toLowerCase().includes('se ha cancelado correctamente');
|
||||||
};
|
};
|
||||||
|
|
|
@ -139,6 +139,12 @@
|
||||||
"StarredModule": {
|
"StarredModule": {
|
||||||
"dataSource": "vn"
|
"dataSource": "vn"
|
||||||
},
|
},
|
||||||
|
"SaySimpleCountry": {
|
||||||
|
"dataSource": "vn"
|
||||||
|
},
|
||||||
|
"SaySimpleConfig": {
|
||||||
|
"dataSource": "vn"
|
||||||
|
},
|
||||||
"TempContainer": {
|
"TempContainer": {
|
||||||
"dataSource": "tempStorage"
|
"dataSource": "tempStorage"
|
||||||
},
|
},
|
||||||
|
|
|
@ -44,6 +44,11 @@
|
||||||
"type": "belongsTo",
|
"type": "belongsTo",
|
||||||
"model": "Continent",
|
"model": "Continent",
|
||||||
"foreignKey": "continentFk"
|
"foreignKey": "continentFk"
|
||||||
|
},
|
||||||
|
"saySimpleCountry": {
|
||||||
|
"type": "hasOne",
|
||||||
|
"model": "SaySimpleCountry",
|
||||||
|
"foreignKey": "countryFk"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"acls": [
|
"acls": [
|
||||||
|
|
|
@ -0,0 +1,29 @@
|
||||||
|
{
|
||||||
|
"name": "SaySimpleConfig",
|
||||||
|
"base": "VnModel",
|
||||||
|
"options": {
|
||||||
|
"mysql": {
|
||||||
|
"table": "saySimpleConfig"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"properties": {
|
||||||
|
"id": {
|
||||||
|
"type": "number",
|
||||||
|
"id": true
|
||||||
|
},
|
||||||
|
"url": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"defaultChannel": {
|
||||||
|
"type": "number"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"acls": [
|
||||||
|
{
|
||||||
|
"accessType": "READ",
|
||||||
|
"principalType": "ROLE",
|
||||||
|
"principalId": "$authenticated",
|
||||||
|
"permission": "ALLOW"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
|
@ -0,0 +1,26 @@
|
||||||
|
{
|
||||||
|
"name": "SaySimpleCountry",
|
||||||
|
"base": "VnModel",
|
||||||
|
"options": {
|
||||||
|
"mysql": {
|
||||||
|
"table": "saySimpleCountry"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"properties": {
|
||||||
|
"countryFk": {
|
||||||
|
"type": "number",
|
||||||
|
"id": true
|
||||||
|
},
|
||||||
|
"channel": {
|
||||||
|
"type": "number"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"acls": [
|
||||||
|
{
|
||||||
|
"accessType": "READ",
|
||||||
|
"principalType": "ROLE",
|
||||||
|
"principalId": "$authenticated",
|
||||||
|
"permission": "ALLOW"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
|
@ -4,7 +4,7 @@ USE `util`;
|
||||||
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
|
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
|
||||||
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
|
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
|
||||||
|
|
||||||
INSERT INTO `version` VALUES ('vn-database','11278','fe10f03459a153fc213bf64e352804c043f94590','2024-10-03 07:47:47','11281');
|
INSERT INTO `version` VALUES ('vn-database','11311','315864403260623fede9f0471ef3d9036faf23b1','2024-11-12 08:00:59','11336');
|
||||||
|
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','10107','00-firstScript.sql','jenkins@10.0.2.69','2022-04-23 10:53:53',NULL,NULL);
|
INSERT INTO `versionLog` VALUES ('vn-database','10107','00-firstScript.sql','jenkins@10.0.2.69','2022-04-23 10:53:53',NULL,NULL);
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','10112','00-firstScript.sql','jenkins@10.0.2.69','2022-05-09 09:14:53',NULL,NULL);
|
INSERT INTO `versionLog` VALUES ('vn-database','10112','00-firstScript.sql','jenkins@10.0.2.69','2022-05-09 09:14:53',NULL,NULL);
|
||||||
|
@ -988,6 +988,7 @@ INSERT INTO `versionLog` VALUES ('vn-database','11194','00-firstScript.sql','jen
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11195','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-09-03 08:58:01',NULL,NULL);
|
INSERT INTO `versionLog` VALUES ('vn-database','11195','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-09-03 08:58:01',NULL,NULL);
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11196','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-09-18 07:28:14',NULL,NULL);
|
INSERT INTO `versionLog` VALUES ('vn-database','11196','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-09-18 07:28:14',NULL,NULL);
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11197','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-09-03 08:58:01',NULL,NULL);
|
INSERT INTO `versionLog` VALUES ('vn-database','11197','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-09-03 08:58:01',NULL,NULL);
|
||||||
|
INSERT INTO `versionLog` VALUES ('vn-database','11198','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-12 07:42:49',NULL,NULL);
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11201','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-08-27 13:04:26',NULL,NULL);
|
INSERT INTO `versionLog` VALUES ('vn-database','11201','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-08-27 13:04:26',NULL,NULL);
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11204','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-09-03 08:58:01',NULL,NULL);
|
INSERT INTO `versionLog` VALUES ('vn-database','11204','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-09-03 08:58:01',NULL,NULL);
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11205','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-09-04 13:54:55',NULL,NULL);
|
INSERT INTO `versionLog` VALUES ('vn-database','11205','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-09-04 13:54:55',NULL,NULL);
|
||||||
|
@ -1013,6 +1014,7 @@ INSERT INTO `versionLog` VALUES ('vn-database','11225','01-firstScript.sql','jen
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11225','02-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:47:41',NULL,NULL);
|
INSERT INTO `versionLog` VALUES ('vn-database','11225','02-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:47:41',NULL,NULL);
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11227','00-addWorkerTimeControlMailAcl.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:47:41',NULL,NULL);
|
INSERT INTO `versionLog` VALUES ('vn-database','11227','00-addWorkerTimeControlMailAcl.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:47:41',NULL,NULL);
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11229','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-09-16 08:24:17',NULL,NULL);
|
INSERT INTO `versionLog` VALUES ('vn-database','11229','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-09-16 08:24:17',NULL,NULL);
|
||||||
|
INSERT INTO `versionLog` VALUES ('vn-database','11230','00-addClientObservationType.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-12 07:42:52',NULL,NULL);
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11234','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:47:42',NULL,NULL);
|
INSERT INTO `versionLog` VALUES ('vn-database','11234','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:47:42',NULL,NULL);
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11235','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:47:43',NULL,NULL);
|
INSERT INTO `versionLog` VALUES ('vn-database','11235','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:47:43',NULL,NULL);
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11236','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:47:43',NULL,NULL);
|
INSERT INTO `versionLog` VALUES ('vn-database','11236','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:47:43',NULL,NULL);
|
||||||
|
@ -1021,18 +1023,53 @@ INSERT INTO `versionLog` VALUES ('vn-database','11237','00-firstScript.sql','jen
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11239','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-09-17 12:57:06',NULL,NULL);
|
INSERT INTO `versionLog` VALUES ('vn-database','11239','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-09-17 12:57:06',NULL,NULL);
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11240','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:47:43',NULL,NULL);
|
INSERT INTO `versionLog` VALUES ('vn-database','11240','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:47:43',NULL,NULL);
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11241','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-09-20 09:08:25',NULL,NULL);
|
INSERT INTO `versionLog` VALUES ('vn-database','11241','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-09-20 09:08:25',NULL,NULL);
|
||||||
|
INSERT INTO `versionLog` VALUES ('vn-database','11242','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-12 07:42:52',NULL,NULL);
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11246','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-09-18 12:39:53',NULL,NULL);
|
INSERT INTO `versionLog` VALUES ('vn-database','11246','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-09-18 12:39:53',NULL,NULL);
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11247','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-09-19 12:10:08',NULL,NULL);
|
INSERT INTO `versionLog` VALUES ('vn-database','11247','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-09-19 12:10:08',NULL,NULL);
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11248','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-09-23 11:12:17',NULL,NULL);
|
INSERT INTO `versionLog` VALUES ('vn-database','11248','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-09-23 11:12:17',NULL,NULL);
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11249','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:47:43',NULL,NULL);
|
INSERT INTO `versionLog` VALUES ('vn-database','11249','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:47:43',NULL,NULL);
|
||||||
|
INSERT INTO `versionLog` VALUES ('vn-database','11251','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-12 07:43:38',NULL,NULL);
|
||||||
|
INSERT INTO `versionLog` VALUES ('vn-database','11251','01-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-12 07:57:30',NULL,'Connection lost: The server closed the connection.');
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11253','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-09-20 14:41:27',NULL,NULL);
|
INSERT INTO `versionLog` VALUES ('vn-database','11253','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-09-20 14:41:27',NULL,NULL);
|
||||||
|
INSERT INTO `versionLog` VALUES ('vn-database','11254','00-thermographTemperature.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-12 08:00:13',NULL,NULL);
|
||||||
|
INSERT INTO `versionLog` VALUES ('vn-database','11254','01-thermographFk.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-12 08:00:15',NULL,NULL);
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11255','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:47:43',NULL,NULL);
|
INSERT INTO `versionLog` VALUES ('vn-database','11255','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:47:43',NULL,NULL);
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11256','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-09-23 12:18:24',NULL,NULL);
|
INSERT INTO `versionLog` VALUES ('vn-database','11256','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-09-23 12:18:24',NULL,NULL);
|
||||||
|
INSERT INTO `versionLog` VALUES ('vn-database','11258','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-12 08:00:15',NULL,NULL);
|
||||||
|
INSERT INTO `versionLog` VALUES ('vn-database','11260','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-12 08:00:15',NULL,NULL);
|
||||||
|
INSERT INTO `versionLog` VALUES ('vn-database','11261','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-12 08:00:15',NULL,NULL);
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11262','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:47:43',NULL,NULL);
|
INSERT INTO `versionLog` VALUES ('vn-database','11262','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:47:43',NULL,NULL);
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11263','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-09-27 12:05:32',NULL,NULL);
|
INSERT INTO `versionLog` VALUES ('vn-database','11263','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-09-27 12:05:32',NULL,NULL);
|
||||||
|
INSERT INTO `versionLog` VALUES ('vn-database','11264','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-12 08:00:15',NULL,NULL);
|
||||||
|
INSERT INTO `versionLog` VALUES ('vn-database','11271','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-12 08:00:15',NULL,NULL);
|
||||||
|
INSERT INTO `versionLog` VALUES ('vn-database','11272','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-12 08:00:15',NULL,NULL);
|
||||||
|
INSERT INTO `versionLog` VALUES ('vn-database','11273','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 10:50:51',NULL,NULL);
|
||||||
|
INSERT INTO `versionLog` VALUES ('vn-database','11274','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-12 08:00:16',NULL,NULL);
|
||||||
|
INSERT INTO `versionLog` VALUES ('vn-database','11274','00-firstScript2.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-12 08:00:29',NULL,NULL);
|
||||||
|
INSERT INTO `versionLog` VALUES ('vn-database','11274','00-firstScript3.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-12 08:00:30',NULL,NULL);
|
||||||
|
INSERT INTO `versionLog` VALUES ('vn-database','11274','00-firstScript5.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-12 08:00:35',NULL,NULL);
|
||||||
|
INSERT INTO `versionLog` VALUES ('vn-database','11274','00-firstScript6.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-12 08:00:35',NULL,NULL);
|
||||||
|
INSERT INTO `versionLog` VALUES ('vn-database','11274','00-firstScript7.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-12 08:00:36',NULL,NULL);
|
||||||
|
INSERT INTO `versionLog` VALUES ('vn-database','11277','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-12 08:00:36',NULL,NULL);
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11278','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:47:43',NULL,NULL);
|
INSERT INTO `versionLog` VALUES ('vn-database','11278','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:47:43',NULL,NULL);
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11279','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-10-02 08:05:24',NULL,NULL);
|
INSERT INTO `versionLog` VALUES ('vn-database','11279','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-10-02 08:05:24',NULL,NULL);
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11280','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-02 08:46:50',NULL,NULL);
|
INSERT INTO `versionLog` VALUES ('vn-database','11280','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-02 08:46:50',NULL,NULL);
|
||||||
|
INSERT INTO `versionLog` VALUES ('vn-database','11281','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-12 08:00:36',NULL,NULL);
|
||||||
|
INSERT INTO `versionLog` VALUES ('vn-database','11283','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-12 08:00:36',NULL,NULL);
|
||||||
|
INSERT INTO `versionLog` VALUES ('vn-database','11284','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-12 08:00:36',NULL,NULL);
|
||||||
|
INSERT INTO `versionLog` VALUES ('vn-database','11285','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-12 08:00:37',NULL,NULL);
|
||||||
|
INSERT INTO `versionLog` VALUES ('vn-database','11287','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-12 08:00:37',NULL,NULL);
|
||||||
|
INSERT INTO `versionLog` VALUES ('vn-database','11288','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-10 08:26:34',NULL,NULL);
|
||||||
|
INSERT INTO `versionLog` VALUES ('vn-database','11289','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-15 07:01:33',NULL,NULL);
|
||||||
|
INSERT INTO `versionLog` VALUES ('vn-database','11290','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-12 08:00:37',NULL,NULL);
|
||||||
|
INSERT INTO `versionLog` VALUES ('vn-database','11291','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-17 09:10:30',NULL,NULL);
|
||||||
|
INSERT INTO `versionLog` VALUES ('vn-database','11294','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-12 08:00:37',NULL,NULL);
|
||||||
|
INSERT INTO `versionLog` VALUES ('vn-database','11295','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-10 08:45:13',NULL,NULL);
|
||||||
|
INSERT INTO `versionLog` VALUES ('vn-database','11298','00-closure.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-12 08:00:37',NULL,NULL);
|
||||||
|
INSERT INTO `versionLog` VALUES ('vn-database','11300','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-18 08:27:05',NULL,NULL);
|
||||||
|
INSERT INTO `versionLog` VALUES ('vn-database','11302','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-12 08:00:57',NULL,NULL);
|
||||||
|
INSERT INTO `versionLog` VALUES ('vn-database','11308','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-23 12:41:55',NULL,NULL);
|
||||||
|
INSERT INTO `versionLog` VALUES ('vn-database','11311','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-12 08:00:57',NULL,NULL);
|
||||||
|
|
||||||
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
|
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
|
||||||
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
|
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
|
||||||
|
@ -1407,6 +1444,8 @@ INSERT INTO `roleInherit` VALUES (376,124,21,19336);
|
||||||
INSERT INTO `roleInherit` VALUES (377,47,49,19295);
|
INSERT INTO `roleInherit` VALUES (377,47,49,19295);
|
||||||
INSERT INTO `roleInherit` VALUES (378,101,15,19294);
|
INSERT INTO `roleInherit` VALUES (378,101,15,19294);
|
||||||
INSERT INTO `roleInherit` VALUES (379,103,121,19294);
|
INSERT INTO `roleInherit` VALUES (379,103,121,19294);
|
||||||
|
INSERT INTO `roleInherit` VALUES (381,119,123,19295);
|
||||||
|
INSERT INTO `roleInherit` VALUES (382,48,72,783);
|
||||||
|
|
||||||
INSERT INTO `userPassword` VALUES (1,7,1,0,2,1);
|
INSERT INTO `userPassword` VALUES (1,7,1,0,2,1);
|
||||||
|
|
||||||
|
@ -2045,7 +2084,7 @@ INSERT INTO `ACL` VALUES (756,'Route','findOne','READ','ALLOW','ROLE','employee'
|
||||||
INSERT INTO `ACL` VALUES (757,'Route','getRoutesByWorker','READ','ALLOW','ROLE','employee',NULL);
|
INSERT INTO `ACL` VALUES (757,'Route','getRoutesByWorker','READ','ALLOW','ROLE','employee',NULL);
|
||||||
INSERT INTO `ACL` VALUES (758,'Route','canViewAllRoute','READ','ALLOW','ROLE','deliveryAssistant',NULL);
|
INSERT INTO `ACL` VALUES (758,'Route','canViewAllRoute','READ','ALLOW','ROLE','deliveryAssistant',NULL);
|
||||||
INSERT INTO `ACL` VALUES (759,'Route','cmr','READ','ALLOW','ROLE','employee',NULL);
|
INSERT INTO `ACL` VALUES (759,'Route','cmr','READ','ALLOW','ROLE','employee',NULL);
|
||||||
INSERT INTO `ACL` VALUES (760,'Route','downloadCmrsZip','READ','ALLOW','ROLE','employee',NULL);
|
INSERT INTO `ACL` VALUES (760,'Cmr','downloadZip','READ','ALLOW','ROLE','employee',NULL);
|
||||||
INSERT INTO `ACL` VALUES (761,'Route','downloadZip','READ','ALLOW','ROLE','employee',NULL);
|
INSERT INTO `ACL` VALUES (761,'Route','downloadZip','READ','ALLOW','ROLE','employee',NULL);
|
||||||
INSERT INTO `ACL` VALUES (762,'Route','filter','READ','ALLOW','ROLE','employee',NULL);
|
INSERT INTO `ACL` VALUES (762,'Route','filter','READ','ALLOW','ROLE','employee',NULL);
|
||||||
INSERT INTO `ACL` VALUES (763,'Route','getByWorker','READ','ALLOW','ROLE','employee',NULL);
|
INSERT INTO `ACL` VALUES (763,'Route','getByWorker','READ','ALLOW','ROLE','employee',NULL);
|
||||||
|
@ -2174,7 +2213,6 @@ INSERT INTO `ACL` VALUES (892,'WorkerIncome','*','*','ALLOW','ROLE','hr',NULL);
|
||||||
INSERT INTO `ACL` VALUES (893,'PayrollComponent','*','*','ALLOW','ROLE','hr',NULL);
|
INSERT INTO `ACL` VALUES (893,'PayrollComponent','*','*','ALLOW','ROLE','hr',NULL);
|
||||||
INSERT INTO `ACL` VALUES (894,'Worker','__get__incomes','*','ALLOW','ROLE','hr',NULL);
|
INSERT INTO `ACL` VALUES (894,'Worker','__get__incomes','*','ALLOW','ROLE','hr',NULL);
|
||||||
INSERT INTO `ACL` VALUES (895,'ItemShelvingLog','*','READ','ALLOW','ROLE','production',NULL);
|
INSERT INTO `ACL` VALUES (895,'ItemShelvingLog','*','READ','ALLOW','ROLE','production',NULL);
|
||||||
INSERT INTO `ACL` VALUES (897,'WorkerLog','*','READ','ALLOW','ROLE','employee',NULL);
|
|
||||||
INSERT INTO `ACL` VALUES (901,'WorkerTimeControl','sendMail','WRITE','ALLOW','ROLE','system',NULL);
|
INSERT INTO `ACL` VALUES (901,'WorkerTimeControl','sendMail','WRITE','ALLOW','ROLE','system',NULL);
|
||||||
INSERT INTO `ACL` VALUES (902,'Entry','filter','READ','ALLOW','ROLE','supplier',NULL);
|
INSERT INTO `ACL` VALUES (902,'Entry','filter','READ','ALLOW','ROLE','supplier',NULL);
|
||||||
INSERT INTO `ACL` VALUES (903,'Entry','getBuys','READ','ALLOW','ROLE','supplier',NULL);
|
INSERT INTO `ACL` VALUES (903,'Entry','getBuys','READ','ALLOW','ROLE','supplier',NULL);
|
||||||
|
@ -2190,7 +2228,6 @@ INSERT INTO `ACL` VALUES (912,'Worker','__get__medicalReview','*','ALLOW','ROLE'
|
||||||
INSERT INTO `ACL` VALUES (913,'VnToken','*','READ','ALLOW','ROLE','developer',10578);
|
INSERT INTO `ACL` VALUES (913,'VnToken','*','READ','ALLOW','ROLE','developer',10578);
|
||||||
INSERT INTO `ACL` VALUES (914,'VnToken','killSession','*','ALLOW','ROLE','developer',10578);
|
INSERT INTO `ACL` VALUES (914,'VnToken','killSession','*','ALLOW','ROLE','developer',10578);
|
||||||
INSERT INTO `ACL` VALUES (915,'ACL','*','WRITE','ALLOW','ROLE','developerBoss',10578);
|
INSERT INTO `ACL` VALUES (915,'ACL','*','WRITE','ALLOW','ROLE','developerBoss',10578);
|
||||||
INSERT INTO `ACL` VALUES (916,'Entry','getBuysCsv','READ','ALLOW','ROLE','supplier',10578);
|
|
||||||
INSERT INTO `ACL` VALUES (917,'InvoiceOut','refundAndInvoice','WRITE','ALLOW','ROLE','administrative',10578);
|
INSERT INTO `ACL` VALUES (917,'InvoiceOut','refundAndInvoice','WRITE','ALLOW','ROLE','administrative',10578);
|
||||||
INSERT INTO `ACL` VALUES (918,'Worker','__get__descriptor','READ','ALLOW','ROLE','employee',10578);
|
INSERT INTO `ACL` VALUES (918,'Worker','__get__descriptor','READ','ALLOW','ROLE','employee',10578);
|
||||||
INSERT INTO `ACL` VALUES (919,'Worker','findById','READ','ALLOW','ROLE','employee',10578);
|
INSERT INTO `ACL` VALUES (919,'Worker','findById','READ','ALLOW','ROLE','employee',10578);
|
||||||
|
@ -2212,6 +2249,7 @@ INSERT INTO `ACL` VALUES (935,'BankEntity','*','WRITE','ALLOW','ROLE','financial
|
||||||
INSERT INTO `ACL` VALUES (936,'Device','handleUser','*','ALLOW','ROLE','employee',10578);
|
INSERT INTO `ACL` VALUES (936,'Device','handleUser','*','ALLOW','ROLE','employee',10578);
|
||||||
INSERT INTO `ACL` VALUES (937,'WorkerTimeControlMail','count','READ','ALLOW','ROLE','employee',10578);
|
INSERT INTO `ACL` VALUES (937,'WorkerTimeControlMail','count','READ','ALLOW','ROLE','employee',10578);
|
||||||
INSERT INTO `ACL` VALUES (938,'Worker','__get__mail','READ','ALLOW','ROLE','hr',10578);
|
INSERT INTO `ACL` VALUES (938,'Worker','__get__mail','READ','ALLOW','ROLE','hr',10578);
|
||||||
|
INSERT INTO `ACL` VALUES (939,'Machine','*','*','ALLOW','ROLE','productionBoss',10578);
|
||||||
|
|
||||||
INSERT INTO `fieldAcl` VALUES (1,'Client','name','update','employee');
|
INSERT INTO `fieldAcl` VALUES (1,'Client','name','update','employee');
|
||||||
INSERT INTO `fieldAcl` VALUES (2,'Client','contact','update','employee');
|
INSERT INTO `fieldAcl` VALUES (2,'Client','contact','update','employee');
|
||||||
|
@ -2407,6 +2445,8 @@ INSERT INTO `claimResponsible` VALUES (22,'Paletizadores',0,'pal');
|
||||||
INSERT INTO `claimResponsible` VALUES (23,'Preparación Previa',0,'pre');
|
INSERT INTO `claimResponsible` VALUES (23,'Preparación Previa',0,'pre');
|
||||||
INSERT INTO `claimResponsible` VALUES (24,'Almacén PCA',0,'war');
|
INSERT INTO `claimResponsible` VALUES (24,'Almacén PCA',0,'war');
|
||||||
INSERT INTO `claimResponsible` VALUES (25,'Huelga',0,'str');
|
INSERT INTO `claimResponsible` VALUES (25,'Huelga',0,'str');
|
||||||
|
INSERT INTO `claimResponsible` VALUES (27,'Prep. por caja',0,'');
|
||||||
|
INSERT INTO `claimResponsible` VALUES (45,'Negativo',0,'neg');
|
||||||
|
|
||||||
INSERT INTO `claimReason` VALUES (1,'Prisas',0);
|
INSERT INTO `claimReason` VALUES (1,'Prisas',0);
|
||||||
INSERT INTO `claimReason` VALUES (2,'Novato',0);
|
INSERT INTO `claimReason` VALUES (2,'Novato',0);
|
||||||
|
@ -2449,6 +2489,9 @@ INSERT INTO `claimReason` VALUES (52,'Mala gestión comercial',0);
|
||||||
INSERT INTO `claimReason` VALUES (53,'Mala gestión comprador',0);
|
INSERT INTO `claimReason` VALUES (53,'Mala gestión comprador',0);
|
||||||
INSERT INTO `claimReason` VALUES (54,'A2',0);
|
INSERT INTO `claimReason` VALUES (54,'A2',0);
|
||||||
INSERT INTO `claimReason` VALUES (55,'Entrega 48h o más',0);
|
INSERT INTO `claimReason` VALUES (55,'Entrega 48h o más',0);
|
||||||
|
INSERT INTO `claimReason` VALUES (56,'Error cliente',0);
|
||||||
|
INSERT INTO `claimReason` VALUES (57,'A2/B1',0);
|
||||||
|
INSERT INTO `claimReason` VALUES (58,'Seguro',0);
|
||||||
|
|
||||||
INSERT INTO `claimRedelivery` VALUES (1,'Cliente');
|
INSERT INTO `claimRedelivery` VALUES (1,'Cliente');
|
||||||
INSERT INTO `claimRedelivery` VALUES (2,'No dev./No especif.');
|
INSERT INTO `claimRedelivery` VALUES (2,'No dev./No especif.');
|
||||||
|
@ -2456,6 +2499,7 @@ INSERT INTO `claimRedelivery` VALUES (3,'Reparto');
|
||||||
INSERT INTO `claimRedelivery` VALUES (4,'Agencia');
|
INSERT INTO `claimRedelivery` VALUES (4,'Agencia');
|
||||||
INSERT INTO `claimRedelivery` VALUES (5,'Tour');
|
INSERT INTO `claimRedelivery` VALUES (5,'Tour');
|
||||||
INSERT INTO `claimRedelivery` VALUES (6,'Fuera Peninsula');
|
INSERT INTO `claimRedelivery` VALUES (6,'Fuera Peninsula');
|
||||||
|
INSERT INTO `claimRedelivery` VALUES (7,'Francia');
|
||||||
|
|
||||||
INSERT INTO `claimResult` VALUES (1,'Otros daños');
|
INSERT INTO `claimResult` VALUES (1,'Otros daños');
|
||||||
INSERT INTO `claimResult` VALUES (2,'Roces');
|
INSERT INTO `claimResult` VALUES (2,'Roces');
|
||||||
|
@ -2533,39 +2577,39 @@ INSERT INTO `continent` VALUES (3,'África','AF');
|
||||||
INSERT INTO `continent` VALUES (4,'Europa','EU');
|
INSERT INTO `continent` VALUES (4,'Europa','EU');
|
||||||
INSERT INTO `continent` VALUES (5,'Oceanía','OC');
|
INSERT INTO `continent` VALUES (5,'Oceanía','OC');
|
||||||
|
|
||||||
INSERT INTO `department` VALUES (1,'VN','VERDNATURA',1,114,763,0,0,0,0,26,NULL,'/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
INSERT INTO `department` VALUES (1,'VN','VERDNATURA',1,116,763,0,0,0,0,26,NULL,'/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||||
INSERT INTO `department` VALUES (22,'shopping','COMPRAS',2,5,NULL,72,0,0,1,1,1,'/1/',NULL,1,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
INSERT INTO `department` VALUES (22,'shopping','COMPRAS',2,5,NULL,72,0,0,1,1,1,'/1/',NULL,1,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||||
INSERT INTO `department` VALUES (23,'CMA','CAMARA',15,16,NULL,72,1,1,2,0,37,'/1/37/',NULL,0,NULL,0,1,1,1,NULL,NULL,NULL,'PREVIOUS');
|
INSERT INTO `department` VALUES (23,'CMA','CAMARA',15,16,NULL,72,1,1,2,0,37,'/1/37/',NULL,0,NULL,0,1,1,1,NULL,NULL,NULL,'PREVIOUS');
|
||||||
INSERT INTO `department` VALUES (31,'it','INFORMATICA',6,7,NULL,72,0,0,1,0,1,'/1/','informatica-cau',1,NULL,1,0,0,0,NULL,NULL,NULL,NULL);
|
INSERT INTO `department` VALUES (31,'it','INFORMATICA',6,7,NULL,72,0,0,1,0,1,'/1/','informatica-cau',1,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||||
INSERT INTO `department` VALUES (34,'accounting','CONTABILIDAD',8,9,NULL,0,0,0,1,0,1,'/1/',NULL,1,NULL,1,0,0,0,NULL,NULL,NULL,NULL);
|
INSERT INTO `department` VALUES (34,'accounting','CONTABILIDAD',8,9,NULL,0,0,0,1,0,1,'/1/',NULL,1,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||||
INSERT INTO `department` VALUES (35,'finance','FINANZAS',10,11,NULL,0,0,0,1,0,1,'/1/',NULL,1,'begonya@verdnatura.es',1,0,0,0,NULL,NULL,NULL,NULL);
|
INSERT INTO `department` VALUES (35,'finance','FINANZAS',10,11,NULL,0,0,0,1,0,1,'/1/',NULL,1,'begonya@verdnatura.es',0,0,0,0,NULL,NULL,NULL,NULL);
|
||||||
INSERT INTO `department` VALUES (36,'labor','LABORAL',12,13,NULL,0,0,0,1,0,1,'/1/',NULL,1,NULL,1,0,0,0,NULL,NULL,NULL,NULL);
|
INSERT INTO `department` VALUES (36,'labor','LABORAL',12,13,NULL,0,0,0,1,0,1,'/1/',NULL,1,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||||
INSERT INTO `department` VALUES (37,'PROD','PRODUCCION',14,37,NULL,72,1,1,1,11,1,'/1/',NULL,0,NULL,0,1,1,1,NULL,NULL,NULL,NULL);
|
INSERT INTO `department` VALUES (37,'PROD','PRODUCCION',14,37,NULL,72,1,1,1,11,1,'/1/',NULL,0,NULL,0,1,1,1,NULL,NULL,NULL,NULL);
|
||||||
INSERT INTO `department` VALUES (38,'picking','SACADO',17,18,NULL,72,1,0,2,0,37,'/1/37/',NULL,0,NULL,0,0,0,1,NULL,NULL,NULL,'ON_PREPARATION');
|
INSERT INTO `department` VALUES (38,'picking','SACADO',17,18,NULL,72,1,0,2,0,37,'/1/37/',NULL,0,NULL,0,1,0,1,NULL,NULL,NULL,'ON_PREPARATION');
|
||||||
INSERT INTO `department` VALUES (39,'packing','ENCAJADO',19,20,NULL,72,1,0,2,0,37,'/1/37/',NULL,0,NULL,0,0,0,1,NULL,NULL,NULL,'PACKING');
|
INSERT INTO `department` VALUES (39,'packing','ENCAJADO',19,20,NULL,72,1,0,2,0,37,'/1/37/',NULL,0,NULL,0,0,0,1,NULL,NULL,NULL,'PACKING');
|
||||||
INSERT INTO `department` VALUES (41,'administration','ADMINISTRACION',38,39,NULL,72,0,0,1,0,1,'/1/',NULL,1,NULL,1,0,0,0,NULL,NULL,NULL,NULL);
|
INSERT INTO `department` VALUES (41,'administration','ADMINISTRACION',38,39,NULL,72,0,0,1,0,1,'/1/',NULL,1,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||||
INSERT INTO `department` VALUES (43,'VT','VENTAS',40,73,NULL,0,0,0,1,16,1,'/1/',NULL,1,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
INSERT INTO `department` VALUES (43,'VT','VENTAS',40,75,NULL,0,0,0,1,17,1,'/1/',NULL,1,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||||
INSERT INTO `department` VALUES (44,'management','GERENCIA',74,75,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
INSERT INTO `department` VALUES (44,'management','GERENCIA',76,77,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||||
INSERT INTO `department` VALUES (45,'logistic','LOGISTICA',76,77,NULL,72,0,0,1,0,1,'/1/',NULL,1,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
INSERT INTO `department` VALUES (45,'logistic','LOGISTICA',78,79,NULL,72,0,0,1,0,1,'/1/',NULL,1,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||||
INSERT INTO `department` VALUES (46,'delivery','REPARTO',78,79,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,0,1,0,0,NULL,NULL,NULL,'DELIVERY');
|
INSERT INTO `department` VALUES (46,'delivery','REPARTO',80,81,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,0,1,0,0,NULL,NULL,NULL,'DELIVERY');
|
||||||
INSERT INTO `department` VALUES (48,'storage','ALMACENAJE',80,81,NULL,0,1,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,'STORAGE');
|
INSERT INTO `department` VALUES (48,'storage','ALMACENAJE',82,83,NULL,0,1,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,'STORAGE');
|
||||||
INSERT INTO `department` VALUES (49,NULL,'PROPIEDAD',82,83,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
INSERT INTO `department` VALUES (49,NULL,'PROPIEDAD',84,85,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||||
INSERT INTO `department` VALUES (52,NULL,'CARGA AEREA',84,85,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
INSERT INTO `department` VALUES (52,NULL,'CARGA AEREA',86,87,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||||
INSERT INTO `department` VALUES (53,'marketing','MARKETING Y COMUNICACIÓN',41,42,NULL,72,0,0,2,0,43,'/1/43/',NULL,1,NULL,1,0,0,0,NULL,NULL,NULL,NULL);
|
INSERT INTO `department` VALUES (53,'marketing','MARKETING Y COMUNICACIÓN',41,42,NULL,72,0,0,2,0,43,'/1/43/',NULL,1,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||||
INSERT INTO `department` VALUES (54,NULL,'ORNAMENTALES',86,87,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
INSERT INTO `department` VALUES (54,NULL,'ORNAMENTALES',88,89,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||||
INSERT INTO `department` VALUES (55,NULL,'TALLER NATURAL',21,22,14548,72,0,0,2,0,37,'/1/37/',NULL,0,NULL,0,1,1,0,1118,NULL,NULL,NULL);
|
INSERT INTO `department` VALUES (55,NULL,'TALLER NATURAL',21,22,14548,72,0,0,2,0,37,'/1/37/',NULL,0,NULL,0,1,1,0,1118,NULL,NULL,NULL);
|
||||||
INSERT INTO `department` VALUES (56,NULL,'TALLER ARTIFICIAL',23,24,8470,72,0,0,2,0,37,'/1/37/',NULL,0,NULL,0,1,1,0,1927,NULL,NULL,NULL);
|
INSERT INTO `department` VALUES (56,NULL,'TALLER ARTIFICIAL',23,24,8470,72,0,0,2,0,37,'/1/37/',NULL,0,NULL,0,1,1,0,1927,NULL,NULL,NULL);
|
||||||
INSERT INTO `department` VALUES (58,'CMP','CAMPOS',88,91,NULL,72,0,0,1,1,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,'FIELD');
|
INSERT INTO `department` VALUES (58,'CMP','CAMPOS',90,93,NULL,72,0,0,1,1,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,'FIELD');
|
||||||
INSERT INTO `department` VALUES (59,'maintenance','MANTENIMIENTO',92,93,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,0,1,0,0,NULL,NULL,NULL,NULL);
|
INSERT INTO `department` VALUES (59,'maintenance','MANTENIMIENTO',94,95,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,0,1,0,0,NULL,NULL,NULL,NULL);
|
||||||
INSERT INTO `department` VALUES (60,'claims','RECLAMACIONES',43,44,NULL,72,0,0,2,0,43,'/1/43/',NULL,0,NULL,1,1,0,0,NULL,NULL,NULL,'CLAIM');
|
INSERT INTO `department` VALUES (60,'claims','RECLAMACIONES',43,44,NULL,72,0,0,2,0,43,'/1/43/',NULL,0,NULL,0,1,0,0,NULL,NULL,NULL,'CLAIM');
|
||||||
INSERT INTO `department` VALUES (61,NULL,'VNH',94,97,NULL,73,0,0,1,1,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
INSERT INTO `department` VALUES (61,NULL,'VNH',96,99,NULL,73,0,0,1,1,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||||
INSERT INTO `department` VALUES (66,NULL,'VERDNAMADRID',98,99,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
INSERT INTO `department` VALUES (66,NULL,'VERDNAMADRID',100,101,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||||
INSERT INTO `department` VALUES (68,NULL,'COMPLEMENTOS',25,26,NULL,72,1,0,2,0,37,'/1/37/',NULL,0,NULL,0,1,0,0,NULL,NULL,NULL,NULL);
|
INSERT INTO `department` VALUES (68,NULL,'COMPLEMENTOS',25,26,NULL,72,1,0,2,0,37,'/1/37/',NULL,0,NULL,0,1,0,0,NULL,NULL,NULL,NULL);
|
||||||
INSERT INTO `department` VALUES (69,NULL,'VERDNABARNA',100,101,NULL,74,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
INSERT INTO `department` VALUES (69,NULL,'VERDNABARNA',102,103,NULL,74,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||||
INSERT INTO `department` VALUES (80,'spainTeam5','EQUIPO ESPAÑA 5',45,46,4250,0,0,0,2,0,43,'/1/43/','es5_equipo',1,'es5@verdnatura.es',0,0,0,0,NULL,NULL,'5300',NULL);
|
INSERT INTO `department` VALUES (80,'spainTeam5','EQUIPO ESPAÑA 5',45,46,4250,0,0,0,2,0,43,'/1/43/','es5_equipo',1,'es5@verdnatura.es',0,0,0,0,NULL,NULL,'5300',NULL);
|
||||||
INSERT INTO `department` VALUES (86,NULL,'LIMPIEZA',102,103,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
INSERT INTO `department` VALUES (86,NULL,'LIMPIEZA',104,105,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||||
INSERT INTO `department` VALUES (89,NULL,'COORDINACION',104,105,NULL,0,1,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
INSERT INTO `department` VALUES (89,NULL,'COORDINACION',106,107,NULL,0,1,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||||
INSERT INTO `department` VALUES (90,NULL,'TRAILER',95,96,NULL,0,0,0,2,0,61,'/1/61/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
INSERT INTO `department` VALUES (90,NULL,'TRAILER',97,98,NULL,0,0,0,2,0,61,'/1/61/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||||
INSERT INTO `department` VALUES (91,'artificial','ARTIFICIAL',27,28,NULL,0,1,0,2,0,37,'/1/37/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,'PREVIOUS');
|
INSERT INTO `department` VALUES (91,'artificial','ARTIFICIAL',27,28,NULL,0,1,0,2,0,37,'/1/37/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,'PREVIOUS');
|
||||||
INSERT INTO `department` VALUES (92,NULL,'EQUIPO SILVERIO',47,48,1203,0,0,0,2,0,43,'/1/43/','sdc_equipo',0,'gestioncomercial@verdnatura.es',0,0,0,0,NULL,NULL,NULL,NULL);
|
INSERT INTO `department` VALUES (92,NULL,'EQUIPO SILVERIO',47,48,1203,0,0,0,2,0,43,'/1/43/','sdc_equipo',0,'gestioncomercial@verdnatura.es',0,0,0,0,NULL,NULL,NULL,NULL);
|
||||||
INSERT INTO `department` VALUES (94,'spainTeam2','EQUIPO ESPAÑA 2',49,50,3797,0,0,0,2,0,43,'/1/43/','es2_equipo',1,'es2@verdnatura.es',0,0,0,0,NULL,NULL,'5100',NULL);
|
INSERT INTO `department` VALUES (94,'spainTeam2','EQUIPO ESPAÑA 2',49,50,3797,0,0,0,2,0,43,'/1/43/','es2_equipo',1,'es2@verdnatura.es',0,0,0,0,NULL,NULL,'5100',NULL);
|
||||||
|
@ -2573,23 +2617,24 @@ INSERT INTO `department` VALUES (95,'spainTeam1','EQUIPO ESPAÑA 1',51,52,24065,
|
||||||
INSERT INTO `department` VALUES (96,NULL,'EQUIPO C LOPEZ',53,54,4661,0,0,0,2,0,43,'/1/43/','cla_equipo',0,'gestioncomercial@verdnatura.es',0,0,0,0,NULL,NULL,NULL,NULL);
|
INSERT INTO `department` VALUES (96,NULL,'EQUIPO C LOPEZ',53,54,4661,0,0,0,2,0,43,'/1/43/','cla_equipo',0,'gestioncomercial@verdnatura.es',0,0,0,0,NULL,NULL,NULL,NULL);
|
||||||
INSERT INTO `department` VALUES (115,NULL,'EQUIPO CLAUDI',55,56,3810,0,0,0,2,0,43,'/1/43/','csr_equipo',0,'gestioncomercial@verdnatura.es',0,0,0,0,NULL,NULL,NULL,NULL);
|
INSERT INTO `department` VALUES (115,NULL,'EQUIPO CLAUDI',55,56,3810,0,0,0,2,0,43,'/1/43/','csr_equipo',0,'gestioncomercial@verdnatura.es',0,0,0,0,NULL,NULL,NULL,NULL);
|
||||||
INSERT INTO `department` VALUES (123,NULL,'EQUIPO ELENA BASCUÑANA',57,58,7102,0,0,0,2,0,43,'/1/43/','ebt_equipo',0,'gestioncomercial@verdnatura.es',0,0,0,0,NULL,NULL,NULL,NULL);
|
INSERT INTO `department` VALUES (123,NULL,'EQUIPO ELENA BASCUÑANA',57,58,7102,0,0,0,2,0,43,'/1/43/','ebt_equipo',0,'gestioncomercial@verdnatura.es',0,0,0,0,NULL,NULL,NULL,NULL);
|
||||||
INSERT INTO `department` VALUES (124,NULL,'CONTROL INTERNO',106,107,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,1,0,0,0,NULL,NULL,NULL,NULL);
|
INSERT INTO `department` VALUES (124,NULL,'CONTROL INTERNO',108,109,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||||
INSERT INTO `department` VALUES (125,'spainTeam3','EQUIPO ESPAÑA 3',59,60,1118,0,0,0,2,0,43,'/1/43/','es3_equipo',1,'es3@verdnatura.es',0,0,0,0,NULL,NULL,'5200',NULL);
|
INSERT INTO `department` VALUES (125,'spainTeam3','EQUIPO ESPAÑA 3',59,60,1118,0,0,0,2,0,43,'/1/43/','es3_equipo',1,'es3@verdnatura.es',0,0,0,0,NULL,NULL,'5200',NULL);
|
||||||
INSERT INTO `department` VALUES (126,NULL,'PRESERVADO',29,30,NULL,0,0,0,2,0,37,'/1/37/',NULL,0,NULL,0,1,1,0,NULL,NULL,NULL,NULL);
|
INSERT INTO `department` VALUES (126,NULL,'PRESERVADO',29,30,NULL,0,0,0,2,0,37,'/1/37/',NULL,0,NULL,0,1,1,0,NULL,NULL,NULL,NULL);
|
||||||
INSERT INTO `department` VALUES (128,NULL,'PALETIZADO',31,32,NULL,0,1,0,2,0,37,'/1/37/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,'PALLETIZING');
|
INSERT INTO `department` VALUES (128,NULL,'PALETIZADO',31,32,NULL,0,1,0,2,0,37,'/1/37/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,'PALLETIZING');
|
||||||
INSERT INTO `department` VALUES (130,NULL,'REVISION',33,34,NULL,0,1,0,2,0,37,'/1/37/',NULL,0,NULL,0,0,0,1,NULL,NULL,NULL,'ON_CHECKING');
|
INSERT INTO `department` VALUES (130,NULL,'REVISION',33,34,NULL,0,1,0,2,0,37,'/1/37/',NULL,0,NULL,0,0,0,1,NULL,NULL,NULL,'ON_CHECKING');
|
||||||
INSERT INTO `department` VALUES (131,'greenhouse','INVERNADERO',89,90,NULL,0,0,0,2,0,58,'/1/58/',NULL,0,NULL,0,1,0,0,NULL,NULL,NULL,NULL);
|
INSERT INTO `department` VALUES (131,'greenhouse','INVERNADERO',91,92,NULL,0,0,0,2,0,58,'/1/58/',NULL,0,NULL,0,1,0,0,NULL,NULL,NULL,NULL);
|
||||||
INSERT INTO `department` VALUES (132,NULL,'EQUIPO DC',61,62,1731,0,0,0,2,0,43,'/1/43/','dc_equipo',1,'gestioncomercial@verdnatura.es',0,0,0,0,NULL,NULL,NULL,NULL);
|
INSERT INTO `department` VALUES (132,NULL,'EQUIPO DC',61,62,1731,0,0,0,2,0,43,'/1/43/','dc_equipo',1,'gestioncomercial@verdnatura.es',0,0,0,0,NULL,NULL,NULL,NULL);
|
||||||
INSERT INTO `department` VALUES (133,'franceTeam','EQUIPO FRANCIA',63,64,1731,72,0,0,2,0,43,'/1/43/','fr_equipo',1,'gestionfrancia@verdnatura.es',0,0,0,0,NULL,NULL,'3300',NULL);
|
INSERT INTO `department` VALUES (133,'franceTeam','EQUIPO FRANCIA',63,64,1731,72,0,0,2,0,43,'/1/43/','fr_equipo',1,'gestionfrancia@verdnatura.es',0,0,0,0,NULL,NULL,'3300',NULL);
|
||||||
INSERT INTO `department` VALUES (134,'portugalTeam','EQUIPO PORTUGAL',65,66,6264,0,0,0,2,0,43,'/1/43/','pt_equipo',1,'portugal@verdnatura.es',0,0,0,0,NULL,NULL,'3500',NULL);
|
INSERT INTO `department` VALUES (134,'portugalTeam','EQUIPO PORTUGAL',65,66,6264,0,0,0,2,0,43,'/1/43/','pt_equipo',1,'portugal@verdnatura.es',0,0,0,0,NULL,NULL,'3500',NULL);
|
||||||
INSERT INTO `department` VALUES (135,'routers','ENRUTADORES',108,109,NULL,0,0,0,1,0,1,'/1/',NULL,1,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
INSERT INTO `department` VALUES (135,'routers','ENRUTADORES',110,111,NULL,0,0,0,1,0,1,'/1/',NULL,1,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||||
INSERT INTO `department` VALUES (136,'heavyVehicles','VEHICULOS PESADOS',110,111,NULL,0,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
INSERT INTO `department` VALUES (136,'heavyVehicles','VEHICULOS PESADOS',112,113,NULL,0,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||||
INSERT INTO `department` VALUES (137,'sorter','SORTER',112,113,NULL,0,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
INSERT INTO `department` VALUES (137,'sorter','SORTER',114,115,NULL,0,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||||
INSERT INTO `department` VALUES (139,'spainTeam4','EQUIPO ESPAÑA 4',67,68,3803,0,0,0,2,0,43,'/1/43/','es4_equipo',1,'es4@verdnatura.es',0,0,0,0,NULL,NULL,'5400',NULL);
|
INSERT INTO `department` VALUES (139,'spainTeam4','EQUIPO ESPAÑA 4',67,68,3803,0,0,0,2,0,43,'/1/43/','es4_equipo',1,'es4@verdnatura.es',0,0,0,0,NULL,NULL,'5400',NULL);
|
||||||
INSERT INTO `department` VALUES (140,'hollandTeam','EQUIPO HOLANDA',69,70,NULL,0,0,0,2,0,43,'/1/43/','nl_equipo',1,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
INSERT INTO `department` VALUES (140,'internationalTeam','EQUIPO INTERNACIONAL',69,70,33320,0,0,0,2,0,43,'/1/43/','int_equipo',1,'international@verdnatura.es',0,0,0,0,NULL,NULL,NULL,NULL);
|
||||||
INSERT INTO `department` VALUES (141,NULL,'PREVIA',35,36,NULL,0,1,0,2,0,37,'/1/37/',NULL,0,NULL,0,0,0,1,NULL,NULL,NULL,'PREVIOUS');
|
INSERT INTO `department` VALUES (141,NULL,'PREVIA',35,36,NULL,0,1,0,2,0,37,'/1/37/',NULL,0,NULL,0,0,0,1,NULL,NULL,NULL,'PREVIOUS');
|
||||||
INSERT INTO `department` VALUES (146,NULL,'VERDNACOLOMBIA',3,4,NULL,72,0,0,2,0,22,'/1/22/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
INSERT INTO `department` VALUES (146,NULL,'VERDNACOLOMBIA',3,4,NULL,72,0,0,2,0,22,'/1/22/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||||
INSERT INTO `department` VALUES (147,'spainTeamAsia','EQUIPO ESPAÑA ASIA',71,72,40214,0,0,0,2,0,43,'/1/43/','esA_equipo',0,'esA@verdnatura.es',0,0,0,0,NULL,NULL,'5500',NULL);
|
INSERT INTO `department` VALUES (147,'spainTeamAsia','EQUIPO ESPAÑA ASIA',71,72,40214,0,0,0,2,0,43,'/1/43/','esA_equipo',0,'esA@verdnatura.es',0,0,0,0,NULL,NULL,'5500',NULL);
|
||||||
|
INSERT INTO `department` VALUES (148,NULL,'CAPTATION FRANCIA',73,74,NULL,0,0,0,2,0,43,'/1/43/',NULL,0,NULL,0,0,0,0,NULL,NULL,'6000',NULL);
|
||||||
|
|
||||||
INSERT INTO `docuware` VALUES (1,'deliveryNote','Albaranes cliente','find','find','N__ALBAR_N',NULL);
|
INSERT INTO `docuware` VALUES (1,'deliveryNote','Albaranes cliente','find','find','N__ALBAR_N',NULL);
|
||||||
INSERT INTO `docuware` VALUES (2,'deliveryNote','Albaranes cliente','store','Archivar','N__ALBAR_N',NULL);
|
INSERT INTO `docuware` VALUES (2,'deliveryNote','Albaranes cliente','store','Archivar','N__ALBAR_N',NULL);
|
||||||
|
|
|
@ -502,7 +502,7 @@ INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','receipt','alexm@%','0000-
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','hedera','grafana','visitUser','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','hedera','grafana','visitUser','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','referenceRate','alexm@%','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','referenceRate','alexm@%','0000-00-00 00:00:00','Select','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','salesPerson','report','alexm@%','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','salesPerson','report','alexm@%','0000-00-00 00:00:00','Select','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','cache','productionBoss','available','guillermo@10.5.1.2','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyerAssistant','producer','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Insert,Update,Delete','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','time','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','time','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','coolerAssist','role','alexm@%','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','coolerAssist','role','alexm@%','0000-00-00 00:00:00','Select','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','config__','alexm@%','0000-00-00 00:00:00','Select,Insert,Update,Delete','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','config__','alexm@%','0000-00-00 00:00:00','Select,Insert,Update,Delete','');
|
||||||
|
@ -605,7 +605,6 @@ INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','project','jua
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','productionConfig','alexm@%','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','productionConfig','alexm@%','0000-00-00 00:00:00','Select','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','manager','productionConfig','alexm@%','0000-00-00 00:00:00','Update','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','manager','productionConfig','alexm@%','0000-00-00 00:00:00','Update','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','creditInsurance','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','creditInsurance','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','cache','productionBoss','visible','guillermo@10.5.1.2','0000-00-00 00:00:00','Select','');
|
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','errorProduction__','alexm@%','0000-00-00 00:00:00','Select,Insert,Update,Delete','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','errorProduction__','alexm@%','0000-00-00 00:00:00','Select,Insert,Update,Delete','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','invoiceOut','alexm@%','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','invoiceOut','alexm@%','0000-00-00 00:00:00','Select','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','coolerAssist','Tickets','alexm@%','0000-00-00 00:00:00','Update','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','coolerAssist','Tickets','alexm@%','0000-00-00 00:00:00','Update','');
|
||||||
|
@ -792,7 +791,6 @@ INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','hr','Movimientos','alexm@%
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','coolerAssist','buy','alexm@%','0000-00-00 00:00:00','Update','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','coolerAssist','buy','alexm@%','0000-00-00 00:00:00','Update','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','itemMinimumQuantity','jenkins@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','itemMinimumQuantity','jenkins@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','adminOfficer','receipt','guillermo@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Insert','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','adminOfficer','receipt','guillermo@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Insert','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyerBoss','producer','alexm@%','0000-00-00 00:00:00','Update','');
|
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','administrative','link','alexm@%','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','administrative','link','alexm@%','0000-00-00 00:00:00','Select','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','hr','link','alexm@%','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','hr','link','alexm@%','0000-00-00 00:00:00','Select','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','delivery','vehicle','alexm@%','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','delivery','vehicle','alexm@%','0000-00-00 00:00:00','Select','');
|
||||||
|
@ -971,7 +969,7 @@ INSERT IGNORE INTO `tables_priv` VALUES ('','vn','officeBoss','ticketPackagingSt
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','workerRelatives','guillermo@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','workerRelatives','guillermo@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','productionAssi','ticketPackagingStartingStock','alexm@%','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','productionAssi','ticketPackagingStartingStock','alexm@%','0000-00-00 00:00:00','Select','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','supplierPackaging','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','supplierPackaging','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','workerDocument','alexm@%','0000-00-00 00:00:00','Select,Insert','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','supplierContact','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','invoiceCorrection','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Insert,Update,Delete','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','invoiceCorrection','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Insert,Update,Delete','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','ink','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','ink','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','zone','alexm@%','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','zone','alexm@%','0000-00-00 00:00:00','Select','');
|
||||||
|
@ -1471,9 +1469,31 @@ INSERT IGNORE INTO `tables_priv` VALUES ('','vn','productionAssi','tillSerial','
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','stockBuyed','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','stockBuyed','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','alertLevel','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','alertLevel','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','workerActivityType','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','workerActivityType','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','priceDelta','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','priceDelta','jenkins@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','parkingLog','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','parkingLog','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','travelLog','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','travelLog','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||||
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','supplierContact','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||||
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','workerDms','alexm@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete','');
|
||||||
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','itemLog','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||||
|
INSERT IGNORE INTO `tables_priv` VALUES ('','account','developer','user','juan@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||||
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','claimManager','claimReason','alexm@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Delete','');
|
||||||
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','claimManager','claimResponsible','alexm@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Delete','');
|
||||||
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','claimManager','claimResult','alexm@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Delete','');
|
||||||
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','claimManager','claimRedelivery','alexm@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Delete','');
|
||||||
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logisticAssist','producer','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Insert,Update,Delete','');
|
||||||
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logisticAssist','itemStateTag','alexm@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete','');
|
||||||
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logisticAssist','material','alexm@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete','');
|
||||||
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logisticAssist','saleUnit','alexm@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete','');
|
||||||
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logisticAssist','origin','alexm@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Insert,Update,Delete','');
|
||||||
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','itemType','jgallego@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Insert,Update,Delete','');
|
||||||
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','deliveryAssistant','delivery','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||||
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logisticAssist','itemFarmingTag','jenkins@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete','');
|
||||||
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logisticAssist','itemWrappingTag','jenkins@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete','');
|
||||||
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logisticAssist','itemLanguageTag','jenkins@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete','');
|
||||||
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logisticAssist','itemStemTag','jenkins@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete','');
|
||||||
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logisticAssist','itemBaseTag','jenkins@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete','');
|
||||||
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logisticAssist','itemBreederTag','jenkins@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete','');
|
||||||
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','itemShelvingLog','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||||
/*!40000 ALTER TABLE `tables_priv` ENABLE KEYS */;
|
/*!40000 ALTER TABLE `tables_priv` ENABLE KEYS */;
|
||||||
|
|
||||||
/*!40000 ALTER TABLE `columns_priv` DISABLE KEYS */;
|
/*!40000 ALTER TABLE `columns_priv` DISABLE KEYS */;
|
||||||
|
@ -1853,7 +1873,6 @@ INSERT IGNORE INTO `procs_priv` VALUES ('','vn','claimManager','buy_getVolumeByE
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','buyer','buy_getVolumeByEntry','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','buyer','buy_getVolumeByEntry','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00');
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','entry_moveNotPrinted','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','entry_moveNotPrinted','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00');
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','buy_getVolume','FUNCTION','alexm@%','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','buy_getVolume','FUNCTION','alexm@%','Execute','0000-00-00 00:00:00');
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','buyer','stockbuyedbyworker','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00');
|
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','buy_getsplit','PROCEDURE','juan@db-proxy2.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','buy_getsplit','PROCEDURE','juan@db-proxy2.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','salesAssistant','subordinategetlist','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','salesAssistant','subordinategetlist','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00');
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','buyer','buy_afterUpsert','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','buyer','buy_afterUpsert','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00');
|
||||||
|
@ -2001,7 +2020,6 @@ INSERT IGNORE INTO `procs_priv` VALUES ('','vn','hr','logshow','PROCEDURE','alex
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','buyerBoss','supplierpackaging_reportsource','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','buyerBoss','supplierpackaging_reportsource','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00');
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','financialBoss','supplierexpenses','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','financialBoss','supplierexpenses','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00');
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','grafana','firstdayofweek','FUNCTION','juan@db-proxy2.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','grafana','firstdayofweek','FUNCTION','juan@db-proxy2.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','buyer','stockbuyed_add','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00');
|
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','administrative','mail_insert','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','administrative','mail_insert','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00');
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','administrative','duaParcialMake','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','administrative','duaParcialMake','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00');
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','palletizerBoss','packingsite_startcollection','PROCEDURE','alexm@db-proxy2.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','palletizerBoss','packingsite_startcollection','PROCEDURE','alexm@db-proxy2.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||||
|
@ -2211,7 +2229,10 @@ INSERT IGNORE INTO `procs_priv` VALUES ('','vn','guest','ticketCalculatePurge','
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','buyer','buy_getUltimate','PROCEDURE','guillermo@db-proxy2.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','buyer','buy_getUltimate','PROCEDURE','guillermo@db-proxy2.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','cooler','buy_getUltimate','PROCEDURE','guillermo@db-proxy2.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','cooler','buy_getUltimate','PROCEDURE','guillermo@db-proxy2.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','bs','buyerBoss','waste_addSales','PROCEDURE','jenkins@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','bs','buyerBoss','waste_addSales','PROCEDURE','jenkins@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','bs','grafana','waste_addSales','PROCEDURE','guillermo@db-proxy2.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','saletracking_sectorcollectionaddprevok','PROCEDURE','alexm@db-proxy2.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||||
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','salesAssistant','saleSplit','PROCEDURE','carlosap@db-proxy2.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||||
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','itemShelvingSale_deleteAdded','PROCEDURE','guillermo@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||||
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','buy_getUltimate','PROCEDURE','guillermo@db-proxy2.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||||
/*!40000 ALTER TABLE `procs_priv` ENABLE KEYS */;
|
/*!40000 ALTER TABLE `procs_priv` ENABLE KEYS */;
|
||||||
|
|
||||||
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
|
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1128,6 +1128,28 @@ DELIMITER ;
|
||||||
/*!50003 SET character_set_client = @saved_cs_client */ ;
|
/*!50003 SET character_set_client = @saved_cs_client */ ;
|
||||||
/*!50003 SET character_set_results = @saved_cs_results */ ;
|
/*!50003 SET character_set_results = @saved_cs_results */ ;
|
||||||
/*!50003 SET collation_connection = @saved_col_connection */ ;
|
/*!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 `hedera`.`orderRow_afterInsert`
|
||||||
|
AFTER INSERT ON `orderRow`
|
||||||
|
FOR EACH ROW
|
||||||
|
BEGIN
|
||||||
|
UPDATE `order`
|
||||||
|
SET rowUpdated = util.VN_NOW()
|
||||||
|
WHERE id = NEW.orderFk;
|
||||||
|
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 */ ;
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Current Database: `pbx`
|
-- Current Database: `pbx`
|
||||||
|
@ -2432,11 +2454,21 @@ DELIMITER ;;
|
||||||
AFTER UPDATE ON `business`
|
AFTER UPDATE ON `business`
|
||||||
FOR EACH ROW
|
FOR EACH ROW
|
||||||
BEGIN
|
BEGIN
|
||||||
|
DECLARE vIsActive BOOL;
|
||||||
|
DECLARE vExtension VARCHAR(10);
|
||||||
|
|
||||||
CALL worker_updateBusiness(NEW.workerFk);
|
CALL worker_updateBusiness(NEW.workerFk);
|
||||||
|
|
||||||
IF NOT (OLD.workerFk <=> NEW.workerFk) THEN
|
IF NOT (OLD.workerFk <=> NEW.workerFk) THEN
|
||||||
CALL worker_updateBusiness(OLD.workerFk);
|
CALL worker_updateBusiness(OLD.workerFk);
|
||||||
END IF;
|
END IF;
|
||||||
|
|
||||||
|
IF NOT (OLD.departmentFk <=> NEW.departmentFk) THEN
|
||||||
|
SELECT COUNT(*) INTO vIsActive FROM worker WHERE businessFk = NEW.id;
|
||||||
|
IF vIsActive THEN
|
||||||
|
CALL queueMember_updateQueue(NEW.id);
|
||||||
|
END IF;
|
||||||
|
END IF;
|
||||||
END */;;
|
END */;;
|
||||||
DELIMITER ;
|
DELIMITER ;
|
||||||
/*!50003 SET sql_mode = @saved_sql_mode */ ;
|
/*!50003 SET sql_mode = @saved_sql_mode */ ;
|
||||||
|
@ -6554,6 +6586,9 @@ BEGIN
|
||||||
SET NEW.userFk = account.myUser_getId();
|
SET NEW.userFk = account.myUser_getId();
|
||||||
END IF;
|
END IF;
|
||||||
|
|
||||||
|
IF NEW.shelvingFk <> OLD.shelvingFk THEN
|
||||||
|
SET NEW.movingState = NULL;
|
||||||
|
END IF;
|
||||||
END */;;
|
END */;;
|
||||||
DELIMITER ;
|
DELIMITER ;
|
||||||
/*!50003 SET sql_mode = @saved_sql_mode */ ;
|
/*!50003 SET sql_mode = @saved_sql_mode */ ;
|
||||||
|
@ -6654,11 +6689,11 @@ DELIMITER ;;
|
||||||
AFTER INSERT ON `itemShelvingSale`
|
AFTER INSERT ON `itemShelvingSale`
|
||||||
FOR EACH ROW
|
FOR EACH ROW
|
||||||
BEGIN
|
BEGIN
|
||||||
|
|
||||||
UPDATE sale s
|
UPDATE sale s
|
||||||
JOIN operator o ON o.workerFk = account.myUser_getId()
|
JOIN operator o ON o.workerFk = account.myUser_getId()
|
||||||
SET s.isPicked = IF(o.isOnReservationMode, s.isPicked, TRUE)
|
JOIN sector se ON se.id = o.sectorFk
|
||||||
WHERE id = NEW.saleFk;
|
SET s.isPicked = IF(IFNULL(se.isOnReservationMode, o.isOnReservationMode), s.isPicked, TRUE)
|
||||||
|
WHERE s.id = NEW.saleFk;
|
||||||
END */;;
|
END */;;
|
||||||
DELIMITER ;
|
DELIMITER ;
|
||||||
/*!50003 SET sql_mode = @saved_sql_mode */ ;
|
/*!50003 SET sql_mode = @saved_sql_mode */ ;
|
||||||
|
@ -9988,6 +10023,8 @@ DELIMITER ;;
|
||||||
BEFORE INSERT ON `ticketRefund`
|
BEFORE INSERT ON `ticketRefund`
|
||||||
FOR EACH ROW
|
FOR EACH ROW
|
||||||
BEGIN
|
BEGIN
|
||||||
|
CALL ticketRefund_upsert(NEW.refundTicketFk, NEW.originalTicketFk);
|
||||||
|
|
||||||
SET NEW.editorFk = account.myUser_getId();
|
SET NEW.editorFk = account.myUser_getId();
|
||||||
END */;;
|
END */;;
|
||||||
DELIMITER ;
|
DELIMITER ;
|
||||||
|
@ -10008,6 +10045,8 @@ DELIMITER ;;
|
||||||
BEFORE UPDATE ON `ticketRefund`
|
BEFORE UPDATE ON `ticketRefund`
|
||||||
FOR EACH ROW
|
FOR EACH ROW
|
||||||
BEGIN
|
BEGIN
|
||||||
|
CALL ticketRefund_upsert(NEW.refundTicketFk, NEW.originalTicketFk);
|
||||||
|
|
||||||
SET NEW.editorFk = account.myUser_getId();
|
SET NEW.editorFk = account.myUser_getId();
|
||||||
END */;;
|
END */;;
|
||||||
DELIMITER ;
|
DELIMITER ;
|
||||||
|
@ -10678,6 +10717,15 @@ DELIMITER ;;
|
||||||
FOR EACH ROW
|
FOR EACH ROW
|
||||||
BEGIN
|
BEGIN
|
||||||
SET NEW.editorFk = account.myUser_getId();
|
SET NEW.editorFk = account.myUser_getId();
|
||||||
|
|
||||||
|
IF NEW.travelFk IS NULL AND
|
||||||
|
(SELECT COUNT(*) FROM travelThermograph
|
||||||
|
WHERE thermographFk = NEW.thermographFk
|
||||||
|
AND travelFk IS NULL
|
||||||
|
AND id <> NEW.id) > 0
|
||||||
|
THEN
|
||||||
|
CALL util.throw('Duplicate thermographFk without travelFk not allowed.');
|
||||||
|
END IF;
|
||||||
END */;;
|
END */;;
|
||||||
DELIMITER ;
|
DELIMITER ;
|
||||||
/*!50003 SET sql_mode = @saved_sql_mode */ ;
|
/*!50003 SET sql_mode = @saved_sql_mode */ ;
|
||||||
|
@ -10698,6 +10746,15 @@ DELIMITER ;;
|
||||||
FOR EACH ROW
|
FOR EACH ROW
|
||||||
BEGIN
|
BEGIN
|
||||||
SET NEW.editorFk = account.myUser_getId();
|
SET NEW.editorFk = account.myUser_getId();
|
||||||
|
|
||||||
|
IF NEW.travelFk IS NULL AND
|
||||||
|
(SELECT COUNT(*) FROM travelThermograph
|
||||||
|
WHERE thermographFk = NEW.thermographFk
|
||||||
|
AND travelFk IS NULL
|
||||||
|
AND id <> NEW.id) > 0
|
||||||
|
THEN
|
||||||
|
CALL util.throw('Duplicate thermographFk without travelFk not allowed.');
|
||||||
|
END IF;
|
||||||
END */;;
|
END */;;
|
||||||
DELIMITER ;
|
DELIMITER ;
|
||||||
/*!50003 SET sql_mode = @saved_sql_mode */ ;
|
/*!50003 SET sql_mode = @saved_sql_mode */ ;
|
||||||
|
@ -11469,4 +11526,4 @@ USE `vn2008`;
|
||||||
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
|
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
|
||||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||||
|
|
||||||
-- Dump completed on 2024-10-03 7:43:14
|
-- Dump completed on 2024-11-12 7:06:44
|
||||||
|
|
|
@ -400,11 +400,11 @@ INSERT INTO `vn`.`client`(`id`,`name`,`fi`,`socialName`,`contact`,`street`,`city
|
||||||
(1108, 'Charles Xavier', '22641921P', 'PROFESSOR X', 'Beast', '3800 VICTORY PKWY, CINCINNATI, OH 45207, USA', 'Gotham', 46460, 1111111111, 222222222, 1, 'CharlesXavier@mydomain.com', NULL, 0, 1234567890, 0, 5, 1, 300, 13, 1, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 1, NULL, 0, 0, 19, 0, 'florist','normal'),
|
(1108, 'Charles Xavier', '22641921P', 'PROFESSOR X', 'Beast', '3800 VICTORY PKWY, CINCINNATI, OH 45207, USA', 'Gotham', 46460, 1111111111, 222222222, 1, 'CharlesXavier@mydomain.com', NULL, 0, 1234567890, 0, 5, 1, 300, 13, 1, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 1, NULL, 0, 0, 19, 0, 'florist','normal'),
|
||||||
(1109, 'Bruce Banner', '16104829E', 'HULK', 'Black widow', 'SOMEWHERE IN NEW YORK', 'Gotham', 46460, 1111111111, 222222222, 1, 'BruceBanner@mydomain.com', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 0, 0, NULL, 0, 0, 9, 0, 'florist','normal'),
|
(1109, 'Bruce Banner', '16104829E', 'HULK', 'Black widow', 'SOMEWHERE IN NEW YORK', 'Gotham', 46460, 1111111111, 222222222, 1, 'BruceBanner@mydomain.com', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 0, 0, NULL, 0, 0, 9, 0, 'florist','normal'),
|
||||||
(1110, 'Jessica Jones', '58282869H', 'JESSICA JONES', 'Luke Cage', 'NYCC 2015 POSTER', 'Gotham', 46460, 1111111111, 222222222, 1, 'JessicaJones@mydomain.com', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 0, NULL, 0, 0, NULL, 1, 'florist','normal'),
|
(1110, 'Jessica Jones', '58282869H', 'JESSICA JONES', 'Luke Cage', 'NYCC 2015 POSTER', 'Gotham', 46460, 1111111111, 222222222, 1, 'JessicaJones@mydomain.com', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 0, NULL, 0, 0, NULL, 1, 'florist','normal'),
|
||||||
(1111, 'Missing', NULL, 'MISSING MAN', 'Anton', 'THE SPACE, UNIVERSE FAR AWAY', 'Gotham', 46460, 1111111111, 222222222, 1, NULL, NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 0, 1, 0, NULL, 1, 0, NULL, 0, 'others','loses'),
|
(1111, 'Missing', NULL, 'MISSING MAN', 'Anton', 'THE SPACE, UNIVERSE FAR AWAY', 'Gotham', 46460, 1111111111, 222222222, 0, NULL, NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 0, 1, 0, NULL, 1, 0, NULL, 0, 'others','loses'),
|
||||||
(1112, 'Trash', NULL, 'GARBAGE MAN', 'Unknown name', 'NEW YORK CITY, UNDERGROUND', 'Gotham', 46460, 1111111111, 222222222, 1, NULL, NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 0, 1, 0, NULL, 1, 0, NULL, 0, 'others','loses');
|
(1112, 'Trash', NULL, 'GARBAGE MAN', 'Unknown name', 'NEW YORK CITY, UNDERGROUND', 'Gotham', 46460, 1111111111, 222222222, 0, NULL, NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 0, 1, 0, NULL, 1, 0, NULL, 0, 'others','loses');
|
||||||
|
|
||||||
INSERT INTO `vn`.`client`(`id`, `name`, `fi`, `socialName`, `contact`, `street`, `city`, `postcode`, `isRelevant`, `email`, `iban`,`dueDay`,`accountingAccount`, `isEqualizated`, `provinceFk`, `hasToInvoice`, `credit`, `countryFk`, `isActive`, `quality`, `payMethodFk`,`created`, `isTaxDataChecked`)
|
INSERT INTO `vn`.`client`(`id`, `name`, `fi`, `socialName`, `contact`, `street`, `city`, `postcode`, `isRelevant`, `email`, `iban`,`dueDay`,`accountingAccount`, `isEqualizated`, `provinceFk`, `hasToInvoice`, `credit`, `countryFk`, `isActive`, `quality`, `payMethodFk`,`created`, `isTaxDataChecked`)
|
||||||
SELECT id, name, CONCAT(RPAD(CONCAT(id,9),8,id),'A'), UPPER(CONCAT(name, 'Social')), CONCAT(name, 'Contact'), UPPER(CONCAT(name, 'Street')), 'GOTHAM', 46460, 1, CONCAT(name,'@mydomain.com'), NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, 10, 5, util.VN_CURDATE(), 1
|
SELECT id, name, CONCAT(RPAD(CONCAT(id,9),8,id),'A'), UPPER(CONCAT(name, 'Social')), CONCAT(name, 'Contact'), UPPER(CONCAT(name, 'Street')), 'GOTHAM', 46460, 0, CONCAT(name,'@mydomain.com'), NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, 10, 5, util.VN_CURDATE(), 1
|
||||||
FROM `account`.`role` `r`
|
FROM `account`.`role` `r`
|
||||||
WHERE `r`.`hasLogin` = 1;
|
WHERE `r`.`hasLogin` = 1;
|
||||||
|
|
||||||
|
@ -1254,9 +1254,9 @@ INSERT INTO `vn`.`saleComponent`(`saleFk`, `componentFk`, `value`)
|
||||||
|
|
||||||
INSERT INTO `vn`.`itemShelving` (`itemFk`, `shelvingFk`, `visible`, `grouping`, `packing`,`buyFk`, `userFk`)
|
INSERT INTO `vn`.`itemShelving` (`itemFk`, `shelvingFk`, `visible`, `grouping`, `packing`,`buyFk`, `userFk`)
|
||||||
VALUES
|
VALUES
|
||||||
(2, 'GVC', 1, 1, 1, 2,1106),
|
(2, 11, 1, 1, 1, 2,1106),
|
||||||
(4, 'HEJ', 1, 1, 1, NULL,1106),
|
(4, 12, 1, 1, 1, NULL,1106),
|
||||||
(1, 'UXN', 2, 12, 12, NULL,1106);
|
(1, 13, 2, 12, 12, NULL,1106);
|
||||||
|
|
||||||
INSERT INTO `vn`.`itemShelvingSale` (`itemShelvingFk`, `saleFk`, `quantity`, `created`, `userFk`)
|
INSERT INTO `vn`.`itemShelvingSale` (`itemShelvingFk`, `saleFk`, `quantity`, `created`, `userFk`)
|
||||||
VALUES
|
VALUES
|
||||||
|
@ -2454,7 +2454,7 @@ INSERT INTO `vn`.`workerTimeControl`(`userFk`, `timed`, `manual`, `direction`, `
|
||||||
INSERT INTO `vn`.`dmsType`
|
INSERT INTO `vn`.`dmsType`
|
||||||
(`id`, `name`, `readRoleFk`, `writeRoleFk`, `code`)
|
(`id`, `name`, `readRoleFk`, `writeRoleFk`, `code`)
|
||||||
VALUES
|
VALUES
|
||||||
(1, 'Facturas Recibidas', NULL, NULL, 'invoiceIn'),
|
(1, 'Facturas Recibidas', 1, 1, 'invoiceIn'),
|
||||||
(2, 'Doc oficial', NULL, NULL, 'officialDoc'),
|
(2, 'Doc oficial', NULL, NULL, 'officialDoc'),
|
||||||
(3, 'Laboral', 37, 37, 'hhrrData'),
|
(3, 'Laboral', 37, 37, 'hhrrData'),
|
||||||
(4, 'Albaranes recibidos', NULL, NULL, 'deliveryNote'),
|
(4, 'Albaranes recibidos', NULL, NULL, 'deliveryNote'),
|
||||||
|
@ -2476,7 +2476,8 @@ INSERT INTO `vn`.`dmsType`
|
||||||
(20, 'Reclamación', 1, 1, 'claim'),
|
(20, 'Reclamación', 1, 1, 'claim'),
|
||||||
(21, 'Entrada', 1, 1, 'entry'),
|
(21, 'Entrada', 1, 1, 'entry'),
|
||||||
(22, 'Proveedor', 1, 1, 'supplier'),
|
(22, 'Proveedor', 1, 1, 'supplier'),
|
||||||
(23, 'Termografos', 35, 35, 'thermograph');
|
(23, 'Termografos', 35, 35, 'thermograph'),
|
||||||
|
(24, 'Sello de calidad', 1, 1, 'qualitySeal');
|
||||||
|
|
||||||
INSERT INTO `vn`.`dms`(`id`, `dmsTypeFk`, `file`, `contentType`, `workerFk`, `warehouseFk`, `companyFk`, `hardCopyNumber`, `hasFile`, `reference`, `description`, `created`)
|
INSERT INTO `vn`.`dms`(`id`, `dmsTypeFk`, `file`, `contentType`, `workerFk`, `warehouseFk`, `companyFk`, `hardCopyNumber`, `hasFile`, `reference`, `description`, `created`)
|
||||||
VALUES
|
VALUES
|
||||||
|
@ -2954,9 +2955,9 @@ INSERT INTO `vn`.`routeConfig` (`id`, `defaultWorkCenterFk`)
|
||||||
VALUES
|
VALUES
|
||||||
(1, 9);
|
(1, 9);
|
||||||
|
|
||||||
INSERT INTO `vn`.`productionConfig` (`isPreviousPreparationRequired`, `ticketPrintedMax`, `ticketTrolleyMax`, `rookieDays`, `notBuyingMonths`, `id`, `isZoneClosedByExpeditionActivated`, `maxNotReadyCollections`, `minTicketsToCloseZone`, `movingTicketDelRoute`, `defaultZone`, `defautlAgencyMode`, `hasUniqueCollectionTime`, `maxCollectionWithoutUser`, `pendingCollectionsOrder`, `pendingCollectionsAge`, `backupPrinterNotificationDelay`)
|
INSERT INTO `vn`.`productionConfig` (`isPreviousPreparationRequired`, `ticketPrintedMax`, `ticketTrolleyMax`, `rookieDays`, `notBuyingMonths`, `id`, `isZoneClosedByExpeditionActivated`, `maxNotReadyCollections`, `minTicketsToCloseZone`, `movingTicketDelRoute`, `defaultZone`, `defautlAgencyMode`, `hasUniqueCollectionTime`, `maxCollectionWithoutUser`, `pendingCollectionsOrder`, `pendingCollectionsAge`, `backupPrinterNotificationDelay`, `clientSelfConsumptionFk`, `addressSelfConsumptionFk`)
|
||||||
VALUES
|
VALUES
|
||||||
(0, 8, 80, 0, 0, 1, 0, 15, 25, -1, 697, 1328, 0, 1, 8, 6, 3600);
|
(0, 8, 80, 0, 0, 1, 0, 15, 25, -1, 697, 1328, 0, 1, 8, 6, 3600, 1112, 12);
|
||||||
|
|
||||||
INSERT INTO `vn`.`collection` (`id`, `created`, `workerFk`, `stateFk`, `itemPackingTypeFk`, `saleTotalCount`, `salePickedCount`, `trainFk`, `sectorFk`, `wagons`)
|
INSERT INTO `vn`.`collection` (`id`, `created`, `workerFk`, `stateFk`, `itemPackingTypeFk`, `saleTotalCount`, `salePickedCount`, `trainFk`, `sectorFk`, `wagons`)
|
||||||
VALUES
|
VALUES
|
||||||
|
@ -3424,7 +3425,7 @@ INSERT INTO vn.buy
|
||||||
INSERT INTO vn.itemShelving
|
INSERT INTO vn.itemShelving
|
||||||
SET id = 9931,
|
SET id = 9931,
|
||||||
itemFk = 999993,
|
itemFk = 999993,
|
||||||
shelvingFk = 'NCC',
|
shelvingFk = 16,
|
||||||
visible = 10,
|
visible = 10,
|
||||||
`grouping` = 5,
|
`grouping` = 5,
|
||||||
packing = 10;
|
packing = 10;
|
||||||
|
@ -3751,7 +3752,7 @@ INSERT vn.sale
|
||||||
|
|
||||||
USE vn;
|
USE vn;
|
||||||
DELETE ish.* FROM vn.itemShelving ish
|
DELETE ish.* FROM vn.itemShelving ish
|
||||||
JOIN vn.shelving sh ON sh.code = ish.shelvingFk
|
JOIN vn.shelving sh ON sh.id = ish.shelvingFk
|
||||||
JOIN vn.parking p ON p.id = sh.parkingFk
|
JOIN vn.parking p ON p.id = sh.parkingFk
|
||||||
JOIN vn.sector s ON s.id = p.sectorFk
|
JOIN vn.sector s ON s.id = p.sectorFk
|
||||||
JOIN vn.warehouse w ON w.id = s.warehouseFk
|
JOIN vn.warehouse w ON w.id = s.warehouseFk
|
||||||
|
@ -3760,22 +3761,22 @@ DELETE ish.* FROM vn.itemShelving ish
|
||||||
INSERT INTO vn.itemShelving
|
INSERT INTO vn.itemShelving
|
||||||
(itemFk, shelvingFk, visible, created, `grouping`, packing, packagingFk, userFk, isChecked)
|
(itemFk, shelvingFk, visible, created, `grouping`, packing, packagingFk, userFk, isChecked)
|
||||||
VALUES
|
VALUES
|
||||||
(999991, 'NAA', 8, '2023-09-20', 1, 20, NULL, 103, NULL),
|
(999991, 14, 8, '2023-09-20', 1, 20, NULL, 103, NULL),
|
||||||
(999998, 'NAA', 80, '2023-09-20', 10, 30, NULL, 103, NULL),
|
(999998, 14, 80, '2023-09-20', 10, 30, NULL, 103, NULL),
|
||||||
(1000001, 'NAA', 6, '2023-09-20', 3, 50, NULL, 103, NULL),
|
(1000001, 14, 6, '2023-09-20', 3, 50, NULL, 103, NULL),
|
||||||
(1000000, 'NBB', 50, '2023-09-18', 25, 500, NULL, 103, NULL),
|
(1000000, 15, 50, '2023-09-18', 25, 500, NULL, 103, NULL),
|
||||||
(999993, 'NBB', 25, '2023-09-18', NULL, 10, NULL, 103, NULL),
|
(999993, 15, 25, '2023-09-18', NULL, 10, NULL, 103, NULL),
|
||||||
(999999, 'NBB', 30, '2023-09-18', 10, 500, NULL, 103, NULL),
|
(999999, 15, 30, '2023-09-18', 10, 500, NULL, 103, NULL),
|
||||||
(999993, 'NCC', 25, '2023-09-20', 5, 10, NULL, 103, NULL),
|
(999993, 16, 25, '2023-09-20', 5, 10, NULL, 103, NULL),
|
||||||
(999997, 'NCC', 10, '2023-09-20', NULL, 100, NULL, 103, NULL),
|
(999997, 16, 10, '2023-09-20', NULL, 100, NULL, 103, NULL),
|
||||||
(999999, 'NCC', 40, '2023-09-20', 10, 500, NULL, 103, NULL),
|
(999999, 16, 40, '2023-09-20', 10, 500, NULL, 103, NULL),
|
||||||
(999995, 'NDD', 10, '2023-09-19', NULL, 20, NULL, 103, NULL),
|
(999995, 17, 10, '2023-09-19', NULL, 20, NULL, 103, NULL),
|
||||||
(999994, 'NDD', 48, '2023-09-19', 4, 20, NULL, 103, NULL),
|
(999994, 17, 48, '2023-09-19', 4, 20, NULL, 103, NULL),
|
||||||
(1000001, 'NEE', 6, '2023-09-21', 3, 50, NULL, 103, NULL),
|
(1000001, 18, 6, '2023-09-21', 3, 50, NULL, 103, NULL),
|
||||||
(999992, 'NEE', 50, '2023-09-21', NULL, 1, NULL, 103, NULL),
|
(999992, 18, 50, '2023-09-21', NULL, 1, NULL, 103, NULL),
|
||||||
(1000000, 'NEE', 25, '2023-09-21', 25, 500, NULL, 103, NULL),
|
(1000000, 18, 25, '2023-09-21', 25, 500, NULL, 103, NULL),
|
||||||
(999996, 'PAA', 5, '2023-09-27', 1, 5, NULL, 103, NULL),
|
(999996, 19, 5, '2023-09-27', 1, 5, NULL, 103, NULL),
|
||||||
(999997, 'PCC', 10, '2023-09-27', 5, 100, NULL, 103, NULL);
|
(999997, 21, 10, '2023-09-27', 5, 100, NULL, 103, NULL);
|
||||||
|
|
||||||
-- Previous for Bolas de madera
|
-- Previous for Bolas de madera
|
||||||
INSERT IGNORE INTO vn.sectorCollection
|
INSERT IGNORE INTO vn.sectorCollection
|
||||||
|
@ -4007,4 +4008,23 @@ INSERT IGNORE INTO pbx.queueMember
|
||||||
UPDATE vn.department SET pbxQueue = '1000' WHERE name = "CAMARA";
|
UPDATE vn.department SET pbxQueue = '1000' WHERE name = "CAMARA";
|
||||||
UPDATE vn.department SET pbxQueue = '2000' WHERE name = "VENTAS";
|
UPDATE vn.department SET pbxQueue = '2000' WHERE name = "VENTAS";
|
||||||
|
|
||||||
|
INSERT INTO srt.buffer (id, x, y, `size`, `length`, stateFk, typeFk, isActive, code, stratus, hasWorkerWaiting, reserve, routeFk, dayMinute, lastUnloaded, hasStrapper, typeDefaultFk, motors, editorFk)
|
||||||
|
VALUES (0, 0, 0, 0, NULL, 3, 1, 0, 'ENT', 0, 0, NULL, NULL, NULL, NULL, 0, 1, 1, NULL),
|
||||||
|
(1, 0, 9900, 0, NULL, 1, 0, 0, 'NOK', 0, 0, NULL, NULL, NULL, NULL, 0, 1, 1, NULL),
|
||||||
|
(2, 0, 0, 450, 13000, 1, 0, 1, '01A', 1, 1, NULL, NULL, NULL, NULL, 0, 1, 1, NULL),
|
||||||
|
(3, 1400, 0, 450, 13000, 1, 0, 1, '01B', 1, 0, NULL, NULL, NULL, NULL, 0, 1, 1, NULL),
|
||||||
|
(4, 0, 500, 500, 13000, 1, 4, 1, '02A', 2, 1, NULL, NULL, NULL, NULL, 1, 4, 13, NULL),
|
||||||
|
(5, 1400, 500, 500, 13000, 1, 4, 1, '02B', 2, 1, NULL, NULL, NULL, NULL, 1, 4, 13, NULL),
|
||||||
|
(6, 0, 1000, 500, 13000, 1, 1, 1, '03A', 3, 0, NULL, NULL, NULL, NULL, 0, 1, 1, NULL),
|
||||||
|
(7, 1400, 1000, 500, 13000, 1, 1, 1, '03B', 3, 0, NULL, NULL, NULL, NULL, 0, 1, 1, NULL),
|
||||||
|
(8, 0, 1500, 500, 13000, 1, 0, 1, '04A', 4, 0, NULL, NULL, NULL, NULL, 0, 1, 1, NULL),
|
||||||
|
(9, 1400, 1500, 500, 13000, 1, 1, 1, '04B', 4, 0, NULL, NULL, NULL, NULL, 0, 1, 1, NULL),
|
||||||
|
(10, 0, 2000, 500, 13000, 1, 1, 1, '05A', 5, 0, NULL, NULL, NULL, NULL, 0, 1, 1, NULL);
|
||||||
|
|
||||||
|
|
||||||
|
INSERT IGNORE INTO vn.saySimpleCountry (countryFk, channel)
|
||||||
|
VALUES (19, '1169'),
|
||||||
|
(8, '1183');
|
||||||
|
|
||||||
|
INSERT IGNORE INTO vn.saySimpleConfig (url, defaultChannel)
|
||||||
|
VALUES ('saysimle-url-mock', 1320);
|
|
@ -7,8 +7,7 @@ AS SELECT `u`.`id` AS `id`,
|
||||||
`u`.`email` AS `email`,
|
`u`.`email` AS `email`,
|
||||||
`u`.`nickname` AS `nickname`,
|
`u`.`nickname` AS `nickname`,
|
||||||
`u`.`lang` AS `lang`,
|
`u`.`lang` AS `lang`,
|
||||||
`u`.`role` AS `role`,
|
`u`.`role` AS `role`
|
||||||
`u`.`recoverPass` AS `recoverPass`
|
|
||||||
FROM `account`.`user` `u`
|
FROM `account`.`user` `u`
|
||||||
WHERE `u`.`name` = `myUser_getName`()
|
WHERE `u`.`name` = `myUser_getName`()
|
||||||
WITH CASCADED CHECK OPTION
|
WITH CASCADED CHECK OPTION
|
||||||
|
|
|
@ -32,7 +32,7 @@ BEGIN
|
||||||
CREATE OR REPLACE TEMPORARY TABLE tVisible
|
CREATE OR REPLACE TEMPORARY TABLE tVisible
|
||||||
SELECT itemFk, SUM(visible) totalVisible
|
SELECT itemFk, SUM(visible) totalVisible
|
||||||
FROM vn.itemShelving ish
|
FROM vn.itemShelving ish
|
||||||
JOIN vn.shelving sh ON sh.code = ish.shelvingFk
|
JOIN vn.shelving sh ON sh.id = ish.shelvingFk
|
||||||
JOIN vn.parking p ON p.id = sh.parkingFk
|
JOIN vn.parking p ON p.id = sh.parkingFk
|
||||||
JOIN vn.sector sc ON sc.id = p.sectorFk
|
JOIN vn.sector sc ON sc.id = p.sectorFk
|
||||||
WHERE sc.warehouseFk = vWarehouseFk
|
WHERE sc.warehouseFk = vWarehouseFk
|
||||||
|
|
|
@ -9,45 +9,54 @@ BEGIN
|
||||||
* @param vOrder El identificador del pedido
|
* @param vOrder El identificador del pedido
|
||||||
* @return tmp.orderTax Bases imponibles, IVA y recargo de equivalencia
|
* @return tmp.orderTax Bases imponibles, IVA y recargo de equivalencia
|
||||||
*/
|
*/
|
||||||
|
-- No poner create or replace, ya que da problemas
|
||||||
DROP TEMPORARY TABLE IF EXISTS tmp.addressCompany;
|
DROP TEMPORARY TABLE IF EXISTS tmp.addressCompany;
|
||||||
CREATE TEMPORARY TABLE tmp.addressCompany
|
CREATE TEMPORARY TABLE tmp.addressCompany
|
||||||
(INDEX (addressFk, companyFk))
|
(INDEX (addressFk, companyFk))
|
||||||
ENGINE = MEMORY
|
ENGINE = MEMORY
|
||||||
SELECT DISTINCT o.address_id addressFk, o.company_id companyFk
|
SELECT DISTINCT o.address_id addressFk, o.company_id companyFk
|
||||||
FROM tmp.`order` tmpOrder
|
FROM tmp.`order` tmpOrder
|
||||||
JOIN hedera.`order` o ON o.id = tmpOrder.orderFk;
|
JOIN `order` o ON o.id = tmpOrder.orderFk;
|
||||||
|
|
||||||
CALL vn.addressTaxArea;
|
CALL vn.addressTaxArea();
|
||||||
|
|
||||||
-- Calcula el IVA y el recargo desglosado.
|
-- Calcula el IVA y el recargo desglosado.
|
||||||
|
CREATE OR REPLACE TEMPORARY TABLE tmp.orderTax
|
||||||
DROP TEMPORARY TABLE IF EXISTS tmp.orderTax;
|
(PRIMARY KEY (orderFk, code, rate))
|
||||||
CREATE TEMPORARY TABLE tmp.orderTax
|
|
||||||
(INDEX (orderFk))
|
|
||||||
ENGINE = MEMORY
|
ENGINE = MEMORY
|
||||||
SELECT o.id orderFk,
|
WITH orders AS (
|
||||||
tc.code,
|
SELECT tor.orderFk,
|
||||||
SUM(m.amount * m.price) taxableBase,
|
oro.amount * oro.price total,
|
||||||
pgc.rate
|
s.countryFk,
|
||||||
FROM tmp.`order` tmpOrder
|
ata.areaFk,
|
||||||
JOIN `order` o ON o.id = tmpOrder.orderFk
|
itc.taxClassFk
|
||||||
JOIN orderRow m ON m.orderFk = o.id
|
FROM hedera.orderRow oro
|
||||||
JOIN vn.item i ON i.id = m.itemFk
|
JOIN tmp.order tor ON tor.orderFk = oro.orderFk
|
||||||
|
JOIN hedera.`order` o ON o.id = tor.orderFk
|
||||||
|
JOIN vn.item i ON i.id = oro.itemFk
|
||||||
JOIN vn.`client` c ON c.id = o.customer_id
|
JOIN vn.`client` c ON c.id = o.customer_id
|
||||||
JOIN vn.supplier s ON s.id = o.company_id
|
JOIN vn.supplier s ON s.id = o.company_id
|
||||||
JOIN tmp.addressTaxArea ata
|
JOIN tmp.addressTaxArea ata ON ata.addressFk = o.address_id
|
||||||
ON ata.addressFk = o.address_id AND ata.companyFk = o.company_id
|
AND ata.companyFk = o.company_id
|
||||||
JOIN vn.itemTaxCountry itc
|
JOIN vn.itemTaxCountry itc ON itc.itemFk = i.id
|
||||||
ON itc.itemFk = i.id AND itc.countryFk = s.countryFk
|
AND itc.countryFk = s.countryFk
|
||||||
JOIN vn.bookingPlanner bp
|
HAVING total
|
||||||
ON bp.countryFk = s.countryFk
|
)
|
||||||
AND bp.taxAreaFk = ata.areaFk
|
SELECT o.orderFk,
|
||||||
AND bp.taxClassFk = itc.taxClassFk
|
tc.code,
|
||||||
JOIN vn.pgc ON pgc.`code` = bp.pgcFk
|
SUM(o.total) taxableBase,
|
||||||
|
pgc.rate
|
||||||
|
FROM orders o
|
||||||
|
JOIN vn.bookingPlanner bp ON bp.countryFk = o.countryFk
|
||||||
|
AND bp.taxAreaFk = o.areaFk
|
||||||
|
AND bp.taxClassFk = o.taxClassFk
|
||||||
|
JOIN vn.pgc ON pgc.code = bp.pgcFk
|
||||||
JOIN vn.taxClass tc ON tc.id = bp.taxClassFk
|
JOIN vn.taxClass tc ON tc.id = bp.taxClassFk
|
||||||
GROUP BY tmpOrder.orderFk, pgc.`code`, pgc.rate
|
GROUP BY o.orderFk, pgc.code, pgc.rate
|
||||||
HAVING taxableBase != 0;
|
HAVING taxableBase
|
||||||
|
ORDER BY bp.priority;
|
||||||
|
|
||||||
|
-- No poner create or replace, ya que da problemas
|
||||||
DROP TEMPORARY TABLE IF EXISTS tmp.orderAmount;
|
DROP TEMPORARY TABLE IF EXISTS tmp.orderAmount;
|
||||||
CREATE TEMPORARY TABLE tmp.orderAmount
|
CREATE TEMPORARY TABLE tmp.orderAmount
|
||||||
(INDEX (orderFk))
|
(INDEX (orderFk))
|
||||||
|
|
|
@ -9,7 +9,7 @@ BEGIN
|
||||||
SELECT count(*) INTO vItemCount
|
SELECT count(*) INTO vItemCount
|
||||||
FROM vn.sale s
|
FROM vn.sale s
|
||||||
JOIN vn.itemShelving ish ON ish.itemFk = s.itemFk
|
JOIN vn.itemShelving ish ON ish.itemFk = s.itemFk
|
||||||
JOIN vn.shelving sh ON sh.code = ish.shelvingFk
|
JOIN vn.shelving sh ON sh.id = ish.shelvingFk
|
||||||
JOIN vn.parking p ON p.id = sh.parkingFk
|
JOIN vn.parking p ON p.id = sh.parkingFk
|
||||||
WHERE s.ticketFk = vTicketFk
|
WHERE s.ticketFk = vTicketFk
|
||||||
AND p.sectorFk = vSectorFk;
|
AND p.sectorFk = vSectorFk;
|
||||||
|
|
|
@ -10,7 +10,7 @@ BEGIN
|
||||||
SELECT count(*) INTO vItemCount
|
SELECT count(*) INTO vItemCount
|
||||||
FROM vn.sale s
|
FROM vn.sale s
|
||||||
JOIN vn.itemShelving ish ON ish.itemFk = s.itemFk
|
JOIN vn.itemShelving ish ON ish.itemFk = s.itemFk
|
||||||
JOIN vn.shelving sh ON sh.code = ish.shelvingFk
|
JOIN vn.shelving sh ON sh.id = ish.shelvingFk
|
||||||
JOIN vn.parking p ON p.id = sh.parkingFk
|
JOIN vn.parking p ON p.id = sh.parkingFk
|
||||||
WHERE s.ticketFk = vTicketFk
|
WHERE s.ticketFk = vTicketFk
|
||||||
AND p.sectorFk = vSectorFk;
|
AND p.sectorFk = vSectorFk;
|
||||||
|
|
|
@ -56,7 +56,7 @@ BEGIN
|
||||||
AND ts.id IS NULL;
|
AND ts.id IS NULL;
|
||||||
DELETE FROM claim WHERE ticketCreated < v4Years;
|
DELETE FROM claim WHERE ticketCreated < v4Years;
|
||||||
-- Robert ubicacion anterior de travelLog comentario para debug
|
-- Robert ubicacion anterior de travelLog comentario para debug
|
||||||
DELETE FROM zoneEvent WHERE `type` = 'day' AND dated < v3Months;
|
DELETE FROM zoneEvent WHERE dated < v2Months OR ended < v2Months;
|
||||||
DELETE b FROM buy b
|
DELETE b FROM buy b
|
||||||
JOIN entryConfig e ON e.defaultEntry = b.entryFk
|
JOIN entryConfig e ON e.defaultEntry = b.entryFk
|
||||||
WHERE b.created < v2Months;
|
WHERE b.created < v2Months;
|
||||||
|
|
|
@ -83,7 +83,7 @@ BEGIN
|
||||||
AND s.semaphore = 1
|
AND s.semaphore = 1
|
||||||
GROUP BY st.saleFk) st ON st.saleFk = ts.saleFk
|
GROUP BY st.saleFk) st ON st.saleFk = ts.saleFk
|
||||||
JOIN itemShelving ish ON ish.itemFk = ts.itemFk
|
JOIN itemShelving ish ON ish.itemFk = ts.itemFk
|
||||||
JOIN shelving sh ON sh.code = ish.shelvingFk
|
JOIN shelving sh ON sh.id = ish.shelvingFk
|
||||||
JOIN parking p ON p.id = sh.parkingFk
|
JOIN parking p ON p.id = sh.parkingFk
|
||||||
JOIN sector sc ON sc.id = p.sectorFk
|
JOIN sector sc ON sc.id = p.sectorFk
|
||||||
JOIN sectorType st ON st.id = sc.typeFk
|
JOIN sectorType st ON st.id = sc.typeFk
|
||||||
|
|
|
@ -30,7 +30,9 @@ BEGIN
|
||||||
t.warehouseFk,
|
t.warehouseFk,
|
||||||
w.id salesPersonFk,
|
w.id salesPersonFk,
|
||||||
IFNULL(ob.description,'') observaciones,
|
IFNULL(ob.description,'') observaciones,
|
||||||
cc.rgb
|
cc.rgb,
|
||||||
|
p.code parkingCode,
|
||||||
|
IF (ps.ticketFk, TRUE, FALSE) isAdvanced
|
||||||
FROM vn.ticket t
|
FROM vn.ticket t
|
||||||
LEFT JOIN vn.ticketCollection tc ON t.id = tc.ticketFk
|
LEFT JOIN vn.ticketCollection tc ON t.id = tc.ticketFk
|
||||||
LEFT JOIN vn.collection c2 ON c2.id = tc.collectionFk
|
LEFT JOIN vn.collection c2 ON c2.id = tc.collectionFk
|
||||||
|
@ -43,6 +45,9 @@ BEGIN
|
||||||
LEFT JOIN vn.client c ON c.id = t.clientFk
|
LEFT JOIN vn.client c ON c.id = t.clientFk
|
||||||
LEFT JOIN vn.worker w ON w.id = c.salesPersonFk
|
LEFT JOIN vn.worker w ON w.id = c.salesPersonFk
|
||||||
LEFT JOIN observation ob ON ob.ticketFk = t.id
|
LEFT JOIN observation ob ON ob.ticketFk = t.id
|
||||||
|
LEFT JOIN vn.ticketParking tp ON tp.ticketFk = t.id
|
||||||
|
LEFT JOIN vn.parking p ON tp.parkingFk = p.id
|
||||||
|
LEFT JOIN vn.packingSiteAdvanced ps ON ps.ticketFk = t.id
|
||||||
WHERE t.id = vParamFk
|
WHERE t.id = vParamFk
|
||||||
AND t.shipped >= vYesterday
|
AND t.shipped >= vYesterday
|
||||||
UNION
|
UNION
|
||||||
|
@ -52,7 +57,9 @@ BEGIN
|
||||||
t.warehouseFk,
|
t.warehouseFk,
|
||||||
w.id salesPersonFk,
|
w.id salesPersonFk,
|
||||||
ob.description,
|
ob.description,
|
||||||
IF(NOT (vItemPackingTypeFk <=> 'V'), cc.rgb, NULL) `rgb`
|
IF(NOT (vItemPackingTypeFk <=> 'V'), cc.rgb, NULL) `rgb`,
|
||||||
|
p.code parkingCode,
|
||||||
|
IF (ps.ticketFk, TRUE, FALSE) isAdvanced
|
||||||
FROM vn.ticket t
|
FROM vn.ticket t
|
||||||
JOIN vn.ticketCollection tc ON t.id = tc.ticketFk
|
JOIN vn.ticketCollection tc ON t.id = tc.ticketFk
|
||||||
LEFT JOIN vn.collection c2 ON c2.id = tc.collectionFk
|
LEFT JOIN vn.collection c2 ON c2.id = tc.collectionFk
|
||||||
|
@ -65,6 +72,9 @@ BEGIN
|
||||||
LEFT JOIN vn.client c ON c.id = t.clientFk
|
LEFT JOIN vn.client c ON c.id = t.clientFk
|
||||||
LEFT JOIN vn.worker w ON w.id = c.salesPersonFk
|
LEFT JOIN vn.worker w ON w.id = c.salesPersonFk
|
||||||
LEFT JOIN observation ob ON ob.ticketFk = t.id
|
LEFT JOIN observation ob ON ob.ticketFk = t.id
|
||||||
|
LEFT JOIN vn.ticketParking tp ON tp.ticketFk = t.id
|
||||||
|
LEFT JOIN vn.parking p ON tp.parkingFk = p.id
|
||||||
|
LEFT JOIN vn.packingSiteAdvanced ps ON ps.ticketFk = t.id
|
||||||
WHERE tc.collectionFk = vParamFk
|
WHERE tc.collectionFk = vParamFk
|
||||||
UNION
|
UNION
|
||||||
SELECT sg.ticketFk,
|
SELECT sg.ticketFk,
|
||||||
|
@ -73,7 +83,9 @@ BEGIN
|
||||||
t.warehouseFk,
|
t.warehouseFk,
|
||||||
c.salesPersonFk,
|
c.salesPersonFk,
|
||||||
ob.description,
|
ob.description,
|
||||||
NULL `rgb`
|
NULL `rgb`,
|
||||||
|
p.code parkingCode,
|
||||||
|
IF (ps.ticketFk, TRUE, FALSE) isAdvanced
|
||||||
FROM vn.sectorCollection sc
|
FROM vn.sectorCollection sc
|
||||||
JOIN vn.sectorCollectionSaleGroup ss ON ss.sectorCollectionFk = sc.id
|
JOIN vn.sectorCollectionSaleGroup ss ON ss.sectorCollectionFk = sc.id
|
||||||
JOIN vn.saleGroup sg ON sg.id = ss.saleGroupFk
|
JOIN vn.saleGroup sg ON sg.id = ss.saleGroupFk
|
||||||
|
@ -82,6 +94,9 @@ BEGIN
|
||||||
LEFT JOIN vn.agencyMode am ON am.id = z.agencyModeFk
|
LEFT JOIN vn.agencyMode am ON am.id = z.agencyModeFk
|
||||||
LEFT JOIN observation ob ON ob.ticketFk = t.id
|
LEFT JOIN observation ob ON ob.ticketFk = t.id
|
||||||
LEFT JOIN vn.client c ON c.id = t.clientFk
|
LEFT JOIN vn.client c ON c.id = t.clientFk
|
||||||
|
LEFT JOIN vn.ticketParking tp ON tp.ticketFk = t.id
|
||||||
|
LEFT JOIN vn.parking p ON tp.parkingFk = p.id
|
||||||
|
LEFT JOIN vn.packingSiteAdvanced ps ON ps.ticketFk = t.id
|
||||||
WHERE sc.id = vParamFk
|
WHERE sc.id = vParamFk
|
||||||
AND t.shipped >= vYesterday
|
AND t.shipped >= vYesterday
|
||||||
GROUP BY ticketFk;
|
GROUP BY ticketFk;
|
||||||
|
|
|
@ -146,8 +146,6 @@ BEGIN
|
||||||
DELETE pb
|
DELETE pb
|
||||||
FROM tmp.productionBuffer pb
|
FROM tmp.productionBuffer pb
|
||||||
JOIN state s ON s.id = pb.state
|
JOIN state s ON s.id = pb.state
|
||||||
JOIN agencyMode am ON am.id = pb.agencyModeFk
|
|
||||||
JOIN agency a ON a.id = am.agencyFk
|
|
||||||
LEFT JOIN (
|
LEFT JOIN (
|
||||||
SELECT pb.ticketFk, MAX(i.`size`) maxSize
|
SELECT pb.ticketFk, MAX(i.`size`) maxSize
|
||||||
FROM tmp.productionBuffer pb
|
FROM tmp.productionBuffer pb
|
||||||
|
@ -158,7 +156,7 @@ BEGIN
|
||||||
) sub ON sub.ticketFk = pb.ticketFk
|
) sub ON sub.ticketFk = pb.ticketFk
|
||||||
JOIN productionConfig pc
|
JOIN productionConfig pc
|
||||||
WHERE pb.shipped <> util.VN_CURDATE()
|
WHERE pb.shipped <> util.VN_CURDATE()
|
||||||
OR (pb.ubicacion IS NULL AND a.isOwn)
|
OR pb.ubicacion IS NULL
|
||||||
OR (NOT s.isPreparable AND NOT s.isPrintable)
|
OR (NOT s.isPreparable AND NOT s.isPrintable)
|
||||||
OR pb.collectionH IS NOT NULL
|
OR pb.collectionH IS NOT NULL
|
||||||
OR pb.collectionV IS NOT NULL
|
OR pb.collectionV IS NOT NULL
|
||||||
|
|
|
@ -1,10 +1,15 @@
|
||||||
DELIMITER $$
|
DELIMITER $$
|
||||||
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`entry_splitByShelving`(vShelvingFk VARCHAR(3), vFromEntryFk INT, vToEntryFk INT)
|
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`entry_splitByShelving`(
|
||||||
|
vShelvingCode VARCHAR(10),
|
||||||
|
vFromEntryFk INT,
|
||||||
|
vToEntryFk INT
|
||||||
|
)
|
||||||
BEGIN
|
BEGIN
|
||||||
/**
|
/**
|
||||||
* Divide las compras entre dos entradas de acuerdo con lo ubicado en una matr<EFBFBD>cula
|
* Divide las compras entre dos entradas de
|
||||||
|
* acuerdo con lo ubicado en una matricula.
|
||||||
*
|
*
|
||||||
* @param vShelvingFk Identificador de vn.shelving
|
* @param vShelvingCode Código de vn.shelving
|
||||||
* @param vFromEntryFk Entrada origen
|
* @param vFromEntryFk Entrada origen
|
||||||
* @param vToEntryFk Entrada destino
|
* @param vToEntryFk Entrada destino
|
||||||
*/
|
*/
|
||||||
|
@ -23,7 +28,7 @@ BEGIN
|
||||||
WHERE b.entryFk = vFromEntryFk
|
WHERE b.entryFk = vFromEntryFk
|
||||||
ORDER BY b.stickers DESC
|
ORDER BY b.stickers DESC
|
||||||
LIMIT 10000000000000000000) bb ON bb.itemFk = ish.itemFk
|
LIMIT 10000000000000000000) bb ON bb.itemFk = ish.itemFk
|
||||||
WHERE ish.shelvingFk = vShelvingFk COLLATE utf8_general_ci
|
WHERE ish.shelvingFk = vShelvingCode COLLATE utf8_general_ci
|
||||||
AND NOT ish.isSplit
|
AND NOT ish.isSplit
|
||||||
GROUP BY ish.id;
|
GROUP BY ish.id;
|
||||||
|
|
||||||
|
@ -107,9 +112,10 @@ BEGIN
|
||||||
UPDATE buy SET printedStickers = vIshStickers WHERE id = LAST_INSERT_ID();
|
UPDATE buy SET printedStickers = vIshStickers WHERE id = LAST_INSERT_ID();
|
||||||
END IF;
|
END IF;
|
||||||
|
|
||||||
UPDATE itemShelving
|
UPDATE itemShelving ish
|
||||||
SET isSplit = TRUE
|
JOIN shelving sh ON sh.id = ish.shelvingFk
|
||||||
WHERE shelvingFk = vShelvingFk COLLATE utf8_general_ci;
|
SET ish.isSplit = TRUE
|
||||||
|
WHERE sh.code = vShelvingCode COLLATE utf8_general_ci;
|
||||||
END LOOP;
|
END LOOP;
|
||||||
CLOSE cur;
|
CLOSE cur;
|
||||||
END$$
|
END$$
|
||||||
|
|
|
@ -0,0 +1,93 @@
|
||||||
|
DELIMITER $$
|
||||||
|
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`expedition_selfConsumptionPackaging`(
|
||||||
|
vSelf INT,
|
||||||
|
vAction ENUM('add', 'remove')
|
||||||
|
)
|
||||||
|
BEGIN
|
||||||
|
/**
|
||||||
|
* Maneja el consumo de cajas para autoconsumo, permitiendo
|
||||||
|
* añadir o quitar cajas utilizadas según la acción indicada.
|
||||||
|
*
|
||||||
|
* @param vSelf Id de expedición
|
||||||
|
*/
|
||||||
|
DECLARE vClientFk INT;
|
||||||
|
DECLARE vAddressFk INT;
|
||||||
|
DECLARE vItemFk INT;
|
||||||
|
DECLARE vItemName VARCHAR(50);
|
||||||
|
DECLARE vWarehouseFk INT;
|
||||||
|
DECLARE vCreated DATE;
|
||||||
|
DECLARE vTicketFk INT;
|
||||||
|
DECLARE vSaleFk INT;
|
||||||
|
DECLARE vQuantity INT;
|
||||||
|
|
||||||
|
IF vAction NOT IN ('add', 'remove') THEN
|
||||||
|
CALL util.throw('Action not supported');
|
||||||
|
END IF;
|
||||||
|
|
||||||
|
SELECT pc.clientSelfConsumptionFk,
|
||||||
|
pc.addressSelfConsumptionFk,
|
||||||
|
i.id,
|
||||||
|
i.name,
|
||||||
|
t.warehouseFk,
|
||||||
|
e.created
|
||||||
|
INTO vClientFk,
|
||||||
|
vAddressFk,
|
||||||
|
vItemFk,
|
||||||
|
vItemName,
|
||||||
|
vWarehouseFk,
|
||||||
|
vCreated
|
||||||
|
FROM expedition e
|
||||||
|
JOIN packaging p ON p.id = e.packagingFk
|
||||||
|
JOIN item i ON i.id = p.itemFk
|
||||||
|
JOIN ticket t ON t.id = e.ticketFk
|
||||||
|
JOIN productionConfig pc
|
||||||
|
WHERE e.id = vSelf;
|
||||||
|
|
||||||
|
IF vClientFk IS NULL OR vAddressFk IS NULL THEN
|
||||||
|
CALL util.throw('Some config parameters are not set');
|
||||||
|
END IF;
|
||||||
|
|
||||||
|
SET vCreated = DATE(vCreated);
|
||||||
|
|
||||||
|
SELECT id INTO vTicketFk
|
||||||
|
FROM ticket
|
||||||
|
WHERE shipped BETWEEN vCreated AND util.dayEnd(vCreated)
|
||||||
|
AND clientFk = vClientFk
|
||||||
|
AND addressFk = vAddressFk
|
||||||
|
AND warehouseFk = vWarehouseFk;
|
||||||
|
|
||||||
|
IF vTicketFk IS NULL AND vAction = 'add' THEN
|
||||||
|
INSERT INTO ticket(clientFk, warehouseFk, shipped, nickname, addressFk)
|
||||||
|
VALUES (vClientFk, vWarehouseFk, vCreated, 'CAJAS AUTOCONSUMO', vAddressFk);
|
||||||
|
|
||||||
|
SET vTicketFk = LAST_INSERT_ID();
|
||||||
|
END IF;
|
||||||
|
|
||||||
|
SELECT id, quantity INTO vSaleFk, vQuantity
|
||||||
|
FROM sale
|
||||||
|
WHERE itemFk = vItemFk
|
||||||
|
AND ticketFk = vTicketFk
|
||||||
|
LIMIT 1;
|
||||||
|
|
||||||
|
IF vAction = 'add' THEN
|
||||||
|
IF vSaleFk IS NOT NULL THEN
|
||||||
|
UPDATE sale
|
||||||
|
SET quantity = quantity + 1
|
||||||
|
WHERE id = vSaleFk;
|
||||||
|
ELSE
|
||||||
|
INSERT INTO sale(itemFk, ticketFk, concept, quantity)
|
||||||
|
VALUES (vItemFk, vTicketFk, vItemName, 1);
|
||||||
|
END IF;
|
||||||
|
ELSE
|
||||||
|
IF vSaleFk IS NOT NULL THEN
|
||||||
|
IF vQuantity > 1 THEN
|
||||||
|
UPDATE sale
|
||||||
|
SET quantity = quantity - 1
|
||||||
|
WHERE id = vSaleFk;
|
||||||
|
ELSE
|
||||||
|
DELETE FROM sale WHERE id = vSaleFk;
|
||||||
|
END IF;
|
||||||
|
END IF;
|
||||||
|
END IF;
|
||||||
|
END$$
|
||||||
|
DELIMITER ;
|
|
@ -1,5 +1,9 @@
|
||||||
DELIMITER $$
|
DELIMITER $$
|
||||||
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`itemPlacementSupplyAiming`(vShelvingFk VARCHAR(10), quantity INT, vItemFk INT)
|
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`itemPlacementSupplyAiming`(
|
||||||
|
vShelvingCode VARCHAR(10),
|
||||||
|
vQuantity INT,
|
||||||
|
vItemFk INT
|
||||||
|
)
|
||||||
BEGIN
|
BEGIN
|
||||||
|
|
||||||
SELECT ish.itemFk,
|
SELECT ish.itemFk,
|
||||||
|
@ -9,21 +13,21 @@ BEGIN
|
||||||
ish.itemShelvingFk,
|
ish.itemShelvingFk,
|
||||||
ish.shelving,
|
ish.shelving,
|
||||||
ish.stock,
|
ish.stock,
|
||||||
LEAST(ish.stock,quantity) as total,
|
LEAST(ish.stock,vQuantity) total,
|
||||||
CONCAT(
|
CONCAT(
|
||||||
CAST(FLOOR(LEAST(ish.stock,quantity) / ish.packing) AS DECIMAL(10,0)),
|
CAST(FLOOR(LEAST(ish.stock, vQuantity) / ish.packing) AS DECIMAL(10,0)),
|
||||||
' x ',
|
' x ',
|
||||||
ish.packing,
|
ish.packing,
|
||||||
IF (
|
IF (
|
||||||
LEAST(ish.stock,quantity) MOD ish.packing,
|
LEAST(ish.stock, vQuantity) MOD ish.packing,
|
||||||
CONCAT(' + ',CAST(LEAST(ish.stock,quantity) MOD ish.packing AS DECIMAL(10,0))),
|
CONCAT(' + ',CAST(LEAST(ish.stock, vQuantity) MOD ish.packing AS DECIMAL(10,0))),
|
||||||
''
|
''
|
||||||
),
|
),
|
||||||
' = ',
|
' = ',
|
||||||
LEAST(ish.stock,quantity)
|
LEAST(ish.stock, vQuantity)
|
||||||
) as proposal
|
) proposal
|
||||||
FROM vn.itemShelvingPlacementSupplyStock ish
|
FROM itemShelvingPlacementSupplyStock ish
|
||||||
WHERE ish.shelving = vShelvingFk COLLATE utf8_general_ci
|
WHERE ish.shelving = vShelvingCode COLLATE utf8_general_ci
|
||||||
AND ish.itemFk = vItemFk;
|
AND ish.itemFk = vItemFk;
|
||||||
|
|
||||||
END$$
|
END$$
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
DELIMITER $$
|
DELIMITER $$
|
||||||
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`itemPlacementSupplyGetOrder`(vSector INT )
|
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`itemPlacementSupplyGetOrder`(
|
||||||
|
vSectorFk INT
|
||||||
|
)
|
||||||
BEGIN
|
BEGIN
|
||||||
|
|
||||||
DECLARE vId INT;
|
DECLARE vId INT;
|
||||||
|
@ -7,31 +9,35 @@ BEGIN
|
||||||
DECLARE vNextParkingFk INT;
|
DECLARE vNextParkingFk INT;
|
||||||
|
|
||||||
SELECT sh.parkingFk INTO vLastParkingFk
|
SELECT sh.parkingFk INTO vLastParkingFk
|
||||||
FROM vn.itemShelvingPlacementSupply isps
|
FROM itemShelvingPlacementSupply isps
|
||||||
JOIN vn.itemShelving ish ON ish.id = isps.itemShelvingFk
|
JOIN itemShelving ish ON ish.id = isps.itemShelvingFk
|
||||||
JOIN vn.shelving sh ON sh.code = ish.shelvingFk
|
JOIN shelving sh ON sh.id = ish.shelvingFk
|
||||||
WHERE isps.userFk = getUser()
|
WHERE isps.userFk = getUser()
|
||||||
ORDER BY isps.created DESC
|
ORDER BY isps.created DESC
|
||||||
LIMIT 1;
|
LIMIT 1;
|
||||||
|
|
||||||
SET vNextParkingFk = vn.itemShelvingPlacementSupply_ClosestGet(vLastParkingFk);
|
SET vNextParkingFk = itemShelvingPlacementSupply_ClosestGet(vLastParkingFk);
|
||||||
|
|
||||||
SELECT ipsl.id INTO vId
|
SELECT ipsl.id INTO vId
|
||||||
FROM vn.itemPlacementSupplyList ipsl
|
FROM itemPlacementSupplyList ipsl
|
||||||
JOIN vn.itemShelvingPlacementSupplyStock ispss ON ispss.itemFk = ipsl.itemFk
|
JOIN itemShelvingPlacementSupplyStock ispss ON ispss.itemFk = ipsl.itemFk
|
||||||
WHERE ipsl.saldo > 0
|
WHERE ipsl.saldo > 0
|
||||||
AND (ipsl.repoUserFk is NULL OR ipsl.repoUserFk = getUser())
|
AND (ipsl.repoUserFk is NULL OR ipsl.repoUserFk = getUser())
|
||||||
AND ipsl.sectorFk = vSector
|
AND ipsl.sectorFk = vSectorFk
|
||||||
ORDER BY ipsl.repoUserFk DESC, ipsl.priority DESC, (ispss.parkingFk = vNextParkingFk) DESC, ispss.parking DESC, ipsl.created
|
ORDER BY ipsl.repoUserFk DESC,
|
||||||
|
ipsl.priority DESC,
|
||||||
|
(ispss.parkingFk = vNextParkingFk) DESC,
|
||||||
|
ispss.parking DESC,
|
||||||
|
ipsl.created
|
||||||
LIMIT 1;
|
LIMIT 1;
|
||||||
|
|
||||||
UPDATE vn.itemPlacementSupply
|
UPDATE itemPlacementSupply
|
||||||
SET repoUserFk = getUser()
|
SET repoUserFk = getUser()
|
||||||
WHERE id = vId;
|
WHERE id = vId;
|
||||||
|
|
||||||
SELECT * FROM vn.itemPlacementSupplyList
|
SELECT * FROM itemPlacementSupplyList
|
||||||
WHERE id = vId
|
WHERE id = vId
|
||||||
AND sectorFk = vSector;
|
AND sectorFk = vSectorFk;
|
||||||
|
|
||||||
END$$
|
END$$
|
||||||
DELIMITER ;
|
DELIMITER ;
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
DELIMITER $$
|
DELIMITER $$
|
||||||
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`itemPlacementSupplyStockGetTargetList`(vItemFk INT,vSectorFk INT)
|
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`itemPlacementSupplyStockGetTargetList`(
|
||||||
|
vItemFk INT,
|
||||||
|
vSectorFk INT
|
||||||
|
)
|
||||||
BEGIN
|
BEGIN
|
||||||
/**
|
/**
|
||||||
* Devuelve la lista de ubicaciones para itemFk en ese sector. Se utiliza en la preparación previa.
|
* Devuelve la lista de ubicaciones para itemFk en ese sector. Se utiliza en la preparación previa.
|
||||||
|
@ -13,11 +16,11 @@ BEGIN
|
||||||
SUM(ish.visible) stockTotal,
|
SUM(ish.visible) stockTotal,
|
||||||
ish.created,
|
ish.created,
|
||||||
p.pickingOrder
|
p.pickingOrder
|
||||||
FROM vn.itemShelving ish
|
FROM itemShelving ish
|
||||||
JOIN vn.shelving sh ON sh.code = ish.shelvingFk
|
JOIN shelving sh ON sh.id = ish.shelvingFk
|
||||||
JOIN vn.parking p ON p.id = sh.parkingFk
|
JOIN parking p ON p.id = sh.parkingFk
|
||||||
JOIN vn.sector sc ON sc.id = p.sectorFk
|
JOIN sector sc ON sc.id = p.sectorFk
|
||||||
JOIN vn.warehouse w ON w.id = sc.warehouseFk
|
JOIN warehouse w ON w.id = sc.warehouseFk
|
||||||
WHERE ish.visible > 0
|
WHERE ish.visible > 0
|
||||||
AND ish.itemFk = vItemFk
|
AND ish.itemFk = vItemFk
|
||||||
GROUP BY ish.id
|
GROUP BY ish.id
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
DELIMITER $$
|
DELIMITER $$
|
||||||
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`itemShelvingLog_get`(vShelvingFk VARCHAR(10) )
|
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`itemShelvingLog_get`(
|
||||||
|
vShelvingCode VARCHAR(10)
|
||||||
|
)
|
||||||
BEGIN
|
BEGIN
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Devuelve el log de los item en cada carro
|
* Devuelve el log de los item en cada carro
|
||||||
*
|
*
|
||||||
* @param vShelvingFk Matrícula del carro
|
* @param vShelvingCode Matrícula del carro
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
SELECT isl.itemShelvingFk,
|
SELECT isl.itemShelvingFk,
|
||||||
isl.created,
|
isl.created,
|
||||||
isl.accion,
|
isl.accion,
|
||||||
|
@ -28,8 +28,9 @@ BEGIN
|
||||||
FROM item
|
FROM item
|
||||||
JOIN itemShelvingLog isl ON item.id = isl.itemFk
|
JOIN itemShelvingLog isl ON item.id = isl.itemFk
|
||||||
JOIN worker ON isl.workerFk = worker.id
|
JOIN worker ON isl.workerFk = worker.id
|
||||||
WHERE shelvingFk = vShelvingFk OR isl.itemFk = vShelvingFk
|
JOIN shelving sh ON sh.id = isl.shelvingFk
|
||||||
|
WHERE sh.code = vShelvingCode COLLATE utf8mb3_unicode_ci
|
||||||
|
OR isl.itemFk = vShelvingCode -- ?? Respeto porque ya estaba
|
||||||
ORDER BY isl.created DESC;
|
ORDER BY isl.created DESC;
|
||||||
|
|
||||||
END$$
|
END$$
|
||||||
DELIMITER ;
|
DELIMITER ;
|
||||||
|
|
|
@ -20,7 +20,7 @@ BEGIN
|
||||||
LEFT JOIN (
|
LEFT JOIN (
|
||||||
SELECT itemFk, sum(cast(visible / packing AS DECIMAL(10,0))) AS etiquetas
|
SELECT itemFk, sum(cast(visible / packing AS DECIMAL(10,0))) AS etiquetas
|
||||||
FROM itemShelving ish
|
FROM itemShelving ish
|
||||||
JOIN shelving sh ON sh.code = ish.shelvingFk
|
JOIN shelving sh ON sh.id = ish.shelvingFk
|
||||||
LEFT JOIN parking pk ON pk.id = sh.parkingFk
|
LEFT JOIN parking pk ON pk.id = sh.parkingFk
|
||||||
WHERE ish.created BETWEEN vFromTimed AND vToTimed
|
WHERE ish.created BETWEEN vFromTimed AND vToTimed
|
||||||
GROUP BY itemFk
|
GROUP BY itemFk
|
||||||
|
|
|
@ -27,7 +27,7 @@ proc: BEGIN
|
||||||
ish.available
|
ish.available
|
||||||
FROM sale s
|
FROM sale s
|
||||||
JOIN itemShelving ish ON ish.itemFk = s.itemFk
|
JOIN itemShelving ish ON ish.itemFk = s.itemFk
|
||||||
JOIN shelving sh ON sh.code = ish.shelvingFk
|
JOIN shelving sh ON sh.id = ish.shelvingFk
|
||||||
JOIN parking p ON p.id = sh.parkingFk
|
JOIN parking p ON p.id = sh.parkingFk
|
||||||
JOIN sector sc ON sc.id = p.sectorFk
|
JOIN sector sc ON sc.id = p.sectorFk
|
||||||
JOIN productionConfig pc
|
JOIN productionConfig pc
|
||||||
|
@ -61,7 +61,7 @@ proc: BEGIN
|
||||||
FROM sale s
|
FROM sale s
|
||||||
LEFT JOIN itemShelvingSale iss ON iss.saleFk = s.id
|
LEFT JOIN itemShelvingSale iss ON iss.saleFk = s.id
|
||||||
LEFT JOIN itemShelving ish ON ish.id = iss.itemShelvingFk
|
LEFT JOIN itemShelving ish ON ish.id = iss.itemShelvingFk
|
||||||
LEFT JOIN shelving sh ON sh.code = ish.shelvingFk
|
LEFT JOIN shelving sh ON sh.id = ish.shelvingFk
|
||||||
LEFT JOIN parking p ON p.id = sh.parkingFk
|
LEFT JOIN parking p ON p.id = sh.parkingFk
|
||||||
WHERE s.id = vSaleFk;
|
WHERE s.id = vSaleFk;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
DELIMITER $$
|
DELIMITER $$
|
||||||
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`itemShelving_add`(
|
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`itemShelving_add`(
|
||||||
vShelvingFk VARCHAR(8),
|
vShelvingCode VARCHAR(10),
|
||||||
vBarcode VARCHAR(22),
|
vBarcode VARCHAR(22),
|
||||||
vQuantity INT,
|
vQuantity INT,
|
||||||
vPackagingFk VARCHAR(10),
|
vPackagingFk VARCHAR(10),
|
||||||
|
@ -12,7 +12,7 @@ BEGIN
|
||||||
/**
|
/**
|
||||||
* Añade registro o lo actualiza si ya existe.
|
* Añade registro o lo actualiza si ya existe.
|
||||||
*
|
*
|
||||||
* @param vShelvingFk matrícula del carro
|
* @param vShelvingCode matrícula del carro
|
||||||
* @param vBarcode el id del registro
|
* @param vBarcode el id del registro
|
||||||
* @param vQuantity indica la cantidad del producto
|
* @param vQuantity indica la cantidad del producto
|
||||||
* @param vPackagingFk el packaging del producto en itemShelving, NULL para coger el de la ultima compra
|
* @param vPackagingFk el packaging del producto en itemShelving, NULL para coger el de la ultima compra
|
||||||
|
@ -23,10 +23,15 @@ BEGIN
|
||||||
**/
|
**/
|
||||||
DECLARE vItemFk INT;
|
DECLARE vItemFk INT;
|
||||||
DECLARE vBuyFk INT;
|
DECLARE vBuyFk INT;
|
||||||
|
DECLARE vShelvingFk INT;
|
||||||
|
|
||||||
SELECT id INTO vBuyFk
|
SELECT id INTO vBuyFk
|
||||||
FROM buy WHERE id = vBarcode;
|
FROM buy WHERE id = vBarcode;
|
||||||
|
|
||||||
|
SELECT id INTO vShelvingFk
|
||||||
|
FROM shelving
|
||||||
|
WHERE code COLLATE utf8_unicode_ci = vShelvingCode;
|
||||||
|
|
||||||
SELECT barcodeToItem(vBarcode) INTO vItemFk;
|
SELECT barcodeToItem(vBarcode) INTO vItemFk;
|
||||||
|
|
||||||
IF vBuyFk IS NULL THEN
|
IF vBuyFk IS NULL THEN
|
||||||
|
@ -40,7 +45,7 @@ BEGIN
|
||||||
END IF;
|
END IF;
|
||||||
|
|
||||||
IF (SELECT COUNT(*) FROM itemShelving
|
IF (SELECT COUNT(*) FROM itemShelving
|
||||||
WHERE shelvingFk COLLATE utf8_unicode_ci = vShelvingFk
|
WHERE shelvingFk = vShelvingFk
|
||||||
AND itemFk = vItemFk
|
AND itemFk = vItemFk
|
||||||
AND packing = vPacking
|
AND packing = vPacking
|
||||||
AND buyFk = vBuyFk) THEN
|
AND buyFk = vBuyFk) THEN
|
||||||
|
@ -48,7 +53,9 @@ BEGIN
|
||||||
UPDATE itemShelving
|
UPDATE itemShelving
|
||||||
SET visible = visible + vQuantity,
|
SET visible = visible + vQuantity,
|
||||||
available = available + vQuantity
|
available = available + vQuantity
|
||||||
WHERE shelvingFk COLLATE utf8_unicode_ci = vShelvingFk AND itemFk = vItemFk AND packing = vPacking;
|
WHERE shelvingFk = vShelvingFk
|
||||||
|
AND itemFk = vItemFk
|
||||||
|
AND packing = vPacking;
|
||||||
|
|
||||||
ELSE
|
ELSE
|
||||||
|
|
||||||
|
|
|
@ -1,29 +1,38 @@
|
||||||
DELIMITER $$
|
DELIMITER $$
|
||||||
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`itemShelving_addByClaim`(vClaimFk INT, vShelvingFk VARCHAR(3))
|
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`itemShelving_addByClaim`(
|
||||||
|
vClaimFk INT,
|
||||||
|
vShelvingCode VARCHAR(10)
|
||||||
|
)
|
||||||
BEGIN
|
BEGIN
|
||||||
/**
|
/**
|
||||||
* Insert items of claim into itemShelving.
|
* Insert items of claim into itemShelving.
|
||||||
*
|
*
|
||||||
* @param vClaimFk The claim
|
* @param vClaimFk The claim
|
||||||
* @param vShelvingFk The shelving
|
* @param vShelvingCode The shelving code
|
||||||
* @table tmp.buyUltimate
|
* @table tmp.buyUltimate
|
||||||
*/
|
*/
|
||||||
DECLARE vWarehouseFk INT;
|
DECLARE vWarehouseFk INT;
|
||||||
|
DECLARE vShelvingFk INT;
|
||||||
|
|
||||||
SELECT t.warehouseFk INTO vWarehouseFk
|
SELECT t.warehouseFk INTO vWarehouseFk
|
||||||
FROM claim c
|
FROM claim c
|
||||||
JOIN ticket t ON t.id = c.ticketFk
|
JOIN ticket t ON t.id = c.ticketFk
|
||||||
WHERE c.id = vClaimFk;
|
WHERE c.id = vClaimFk;
|
||||||
|
|
||||||
|
SELECT id INTO vShelvingFk
|
||||||
|
FROM shelving
|
||||||
|
WHERE code COLLATE utf8_unicode_ci = vShelvingCode;
|
||||||
|
|
||||||
CALL buy_getUltimate(NULL, vWarehouseFk, util.VN_CURDATE());
|
CALL buy_getUltimate(NULL, vWarehouseFk, util.VN_CURDATE());
|
||||||
|
|
||||||
INSERT INTO itemShelving (itemFk, shelvingFk, packing, `grouping`, visible)
|
INSERT INTO itemShelving (itemFk, shelvingFk, packing, `grouping`, visible)
|
||||||
SELECT s.itemFk, vShelvingFk, b.packing, b.`grouping`, cb.quantity AS visible
|
SELECT s.itemFk, vShelvingFk, b.packing, b.`grouping`, cb.quantity visible
|
||||||
FROM claim c
|
FROM claim c
|
||||||
JOIN claimBeginning cb ON c.id = cb.claimFk
|
JOIN claimBeginning cb ON c.id = cb.claimFk
|
||||||
JOIN sale s ON s.id = cb.saleFk
|
JOIN sale s ON s.id = cb.saleFk
|
||||||
JOIN ticket t ON t.id = s.ticketFk
|
JOIN ticket t ON t.id = s.ticketFk
|
||||||
JOIN tmp.buyUltimate bu ON bu.itemFk = s.itemFk AND bu.warehouseFk = t.warehouseFk
|
JOIN tmp.buyUltimate bu ON bu.itemFk = s.itemFk
|
||||||
|
AND bu.warehouseFk = t.warehouseFk
|
||||||
JOIN buy b ON b.id = bu.buyFk
|
JOIN buy b ON b.id = bu.buyFk
|
||||||
WHERE c.id = vClaimFk;
|
WHERE c.id = vClaimFk;
|
||||||
END$$
|
END$$
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
DELIMITER $$
|
DELIMITER $$
|
||||||
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`itemShelving_addList`(
|
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`itemShelving_addList`(
|
||||||
vShelvingFk VARCHAR(3),
|
vShelvingCode VARCHAR(10),
|
||||||
vList TEXT,
|
vList TEXT,
|
||||||
vIsChecking BOOL,
|
vIsChecking BOOL,
|
||||||
vWarehouseFk INT
|
vWarehouseFk INT
|
||||||
|
@ -13,7 +13,7 @@ BEGIN
|
||||||
* Cuando es TRUE sólo inserta los elementos de la colección que no están ya en
|
* Cuando es TRUE sólo inserta los elementos de la colección que no están ya en
|
||||||
* ese shelving, actualizando los valores del campo itemShelving.isChecked
|
* ese shelving, actualizando los valores del campo itemShelving.isChecked
|
||||||
*
|
*
|
||||||
* @param vShelvingFk Identificador de shelving
|
* @param vShelvingCode Código de shelving
|
||||||
* @param vList JSON array con esta estructura: '[value1, value2, ...]'
|
* @param vList JSON array con esta estructura: '[value1, value2, ...]'
|
||||||
* @param vIsChecking Define si hay que añadir o comprobar los items
|
* @param vIsChecking Define si hay que añadir o comprobar los items
|
||||||
* @param vWarehouseFk Identificador de warehouse
|
* @param vWarehouseFk Identificador de warehouse
|
||||||
|
@ -24,6 +24,11 @@ BEGIN
|
||||||
DECLARE vPath VARCHAR(6);
|
DECLARE vPath VARCHAR(6);
|
||||||
DECLARE vItemFk INT;
|
DECLARE vItemFk INT;
|
||||||
DECLARE vIsChecked BOOL;
|
DECLARE vIsChecked BOOL;
|
||||||
|
DECLARE vShelvingFk INT;
|
||||||
|
|
||||||
|
SELECT id INTO vShelvingFk
|
||||||
|
FROM shelving
|
||||||
|
WHERE code COLLATE utf8_unicode_ci = vShelvingCode;
|
||||||
|
|
||||||
WHILE vCounter < vListLength DO
|
WHILE vCounter < vListLength DO
|
||||||
SET vPath = CONCAT('$[', vCounter, ']');
|
SET vPath = CONCAT('$[', vCounter, ']');
|
||||||
|
@ -34,17 +39,17 @@ BEGIN
|
||||||
|
|
||||||
SELECT IF(COUNT(*), TRUE, FALSE) INTO vIsChecked
|
SELECT IF(COUNT(*), TRUE, FALSE) INTO vIsChecked
|
||||||
FROM itemShelving
|
FROM itemShelving
|
||||||
WHERE shelvingFk COLLATE utf8_unicode_ci = vShelvingFk
|
WHERE shelvingFk = vShelvingFk
|
||||||
AND itemFk = vItemFk;
|
AND itemFk = vItemFk;
|
||||||
END IF;
|
END IF;
|
||||||
|
|
||||||
IF NOT vIsChecking OR NOT vIsChecked THEN
|
IF NOT vIsChecking OR NOT vIsChecked THEN
|
||||||
CALL itemShelving_add(vShelvingFk, vBarcode, 1, NULL, NULL, NULL, vWarehouseFk);
|
CALL itemShelving_add(vShelvingCode, vBarcode, 1, NULL, NULL, NULL, vWarehouseFk);
|
||||||
END IF;
|
END IF;
|
||||||
|
|
||||||
UPDATE itemShelving
|
UPDATE itemShelving
|
||||||
SET isChecked = vIsChecked
|
SET isChecked = vIsChecked
|
||||||
WHERE shelvingFk COLLATE utf8_unicode_ci = vShelvingFk
|
WHERE shelvingFk = vShelvingFk
|
||||||
AND itemFk = vItemFk
|
AND itemFk = vItemFk
|
||||||
AND isChecked IS NULL;
|
AND isChecked IS NULL;
|
||||||
|
|
||||||
|
|
|
@ -1,15 +1,18 @@
|
||||||
DELIMITER $$
|
DELIMITER $$
|
||||||
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`itemShelving_get`(IN vSelf VARCHAR(8))
|
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`itemShelving_get`(
|
||||||
|
vShelvingCode VARCHAR(10)
|
||||||
|
)
|
||||||
BEGIN
|
BEGIN
|
||||||
/**
|
/**
|
||||||
* Lista artículos de itemshelving
|
* Lista artículos de itemShelving.
|
||||||
*
|
*
|
||||||
* @param vSelf matrícula del carro
|
* @param vShelvingCode Matrícula del carro
|
||||||
**/
|
**/
|
||||||
SELECT ish.itemFk item,
|
SELECT ish.itemFk item,
|
||||||
IFNULL(i.longName, CONCAT(i.name, ' ', i.size)) description,
|
i.name,
|
||||||
|
i.longName,
|
||||||
|
i.size,
|
||||||
ish.visible,
|
ish.visible,
|
||||||
CEIL(ish.visible/ish.packing) stickers,
|
|
||||||
ish.packing,
|
ish.packing,
|
||||||
ish.grouping,
|
ish.grouping,
|
||||||
p.code,
|
p.code,
|
||||||
|
@ -17,12 +20,13 @@ BEGIN
|
||||||
s.priority,
|
s.priority,
|
||||||
ish.isChecked,
|
ish.isChecked,
|
||||||
ic.url,
|
ic.url,
|
||||||
ish.available
|
ish.available,
|
||||||
|
ish.buyFk
|
||||||
FROM itemShelving ish
|
FROM itemShelving ish
|
||||||
JOIN item i ON i.id = ish.itemFk
|
JOIN item i ON i.id = ish.itemFk
|
||||||
JOIN shelving s ON vSelf = s.code COLLATE utf8_unicode_ci
|
JOIN shelving s ON s.id = ish.shelvingFk
|
||||||
LEFT JOIN parking p ON s.parkingFk = p.id
|
LEFT JOIN parking p ON p.id = s.parkingFk
|
||||||
JOIN hedera.imageConfig ic
|
JOIN hedera.imageConfig ic
|
||||||
WHERE ish.shelvingFk COLLATE utf8_unicode_ci = vSelf;
|
WHERE s.code COLLATE utf8_unicode_ci = vShelvingCode;
|
||||||
END$$
|
END$$
|
||||||
DELIMITER ;
|
DELIMITER ;
|
||||||
|
|
|
@ -1,21 +1,31 @@
|
||||||
DELIMITER $$
|
DELIMITER $$
|
||||||
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`itemShelving_getAlternatives`(vShelvingFk VARCHAR(10))
|
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`itemShelving_getAlternatives`(
|
||||||
|
vShelvingCode VARCHAR(10)
|
||||||
|
)
|
||||||
BEGIN
|
BEGIN
|
||||||
/**
|
/**
|
||||||
* Devuelve un listado de posibles ubicaciones alternativas a ubicar los item de la matricula
|
* Devuelve un listado de posibles ubicaciones alternativas a ubicar
|
||||||
* del carro que se le ha pasado.
|
* los item de la matricula del carro que se le ha pasado.
|
||||||
*
|
*
|
||||||
* @param vShelvingFk matricula del carro
|
* @param vShelvingCode Matricula del carro
|
||||||
*/
|
*/
|
||||||
|
DECLARE vShelvingFk INT;
|
||||||
|
|
||||||
|
SELECT id INTO vShelvingFk
|
||||||
|
FROM shelving
|
||||||
|
WHERE code COLLATE utf8_unicode_ci = vShelvingCode;
|
||||||
|
|
||||||
SELECT is2.id,is2.shelvingFk, p.code, is2.itemFk , is2.visible, p.pickingOrder
|
SELECT is2.id,is2.shelvingFk, p.code, is2.itemFk , is2.visible, p.pickingOrder
|
||||||
FROM itemShelving is2
|
FROM itemShelving is2
|
||||||
JOIN shelving sh ON sh.code = is2.shelvingFk
|
JOIN shelving sh ON sh.id = is2.shelvingFk
|
||||||
JOIN parking p ON p.id = sh.parkingFk
|
JOIN parking p ON p.id = sh.parkingFk
|
||||||
JOIN sector s ON s.id = p.sectorFk
|
JOIN sector s ON s.id = p.sectorFk
|
||||||
LEFT JOIN operator o ON o.sectorFk = s.id AND o.workerFk = 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 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
|
||||||
WHERE is2.shelvingFk <> vShelvingFk COLLATE utf8_unicode_ci
|
AND is3.shelvingFk = vShelvingFk
|
||||||
|
WHERE is2.shelvingFk <> vShelvingFk
|
||||||
GROUP BY is2.id
|
GROUP BY is2.id
|
||||||
ORDER BY p.pickingOrder DESC;
|
ORDER BY p.pickingOrder DESC;
|
||||||
END$$
|
END$$
|
||||||
|
|
|
@ -16,7 +16,7 @@ BEGIN
|
||||||
ish.itemFk itemFk,
|
ish.itemFk itemFk,
|
||||||
sh.priority
|
sh.priority
|
||||||
FROM vn.itemShelving ish
|
FROM vn.itemShelving ish
|
||||||
JOIN vn.shelving sh ON sh.`code` = ish.shelvingFk
|
JOIN vn.shelving sh ON sh.id = ish.shelvingFk
|
||||||
JOIN vn.parking pk ON pk.id = sh.parkingFk
|
JOIN vn.parking pk ON pk.id = sh.parkingFk
|
||||||
WHERE ish.itemFk = vItemFk
|
WHERE ish.itemFk = vItemFk
|
||||||
ORDER BY sh.priority DESC, created ASC;
|
ORDER BY sh.priority DESC, created ASC;
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
DELIMITER $$
|
DELIMITER $$
|
||||||
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`itemShelving_getItemDetails`(
|
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`itemShelving_getItemDetails`(
|
||||||
vBarcodeItem INT,
|
vBarcodeItem INT,
|
||||||
vShelvingFK VARCHAR(10)
|
vShelvingCode VARCHAR(10)
|
||||||
)
|
)
|
||||||
BEGIN
|
BEGIN
|
||||||
/**
|
/**
|
||||||
* Obtiene el precio y visible de un item
|
* Obtiene el precio y visible de un item
|
||||||
*
|
*
|
||||||
* @param vBarcodeItem barcode de artículo
|
* @param vBarcodeItem barcode de artículo
|
||||||
* @param vShelvingFK Ubicación actual del artículo
|
* @param vShelvingCode Ubicación actual del artículo
|
||||||
*/
|
*/
|
||||||
DECLARE vIsItem BOOL;
|
DECLARE vIsItem BOOL;
|
||||||
DECLARE vBuyFk INT;
|
DECLARE vBuyFk INT;
|
||||||
|
@ -44,12 +44,13 @@ BEGIN
|
||||||
FROM vn.buy b
|
FROM vn.buy b
|
||||||
WHERE b.id = vBuyFk
|
WHERE b.id = vBuyFk
|
||||||
) SELECT v.itemFk,
|
) SELECT v.itemFk,
|
||||||
vShelvingFK,
|
vShelvingCode,
|
||||||
v.itemCost,
|
v.itemCost,
|
||||||
SUM(ish.visible) visible
|
SUM(ish.visible) visible
|
||||||
FROM vn.itemShelving ish
|
FROM vn.itemShelving ish
|
||||||
|
JOIN vn.shelving sh ON sh.id = ish.shelvingFK
|
||||||
JOIN visible v
|
JOIN visible v
|
||||||
WHERE ish.shelvingFK = vShelvingFK COLLATE utf8mb3_general_ci
|
WHERE sh.code = vShelvingCode COLLATE utf8mb3_general_ci
|
||||||
AND ish.itemFk = v.itemFk;
|
AND ish.itemFk = v.itemFk;
|
||||||
END$$
|
END$$
|
||||||
DELIMITER ;
|
DELIMITER ;
|
|
@ -1,14 +1,20 @@
|
||||||
DELIMITER $$
|
DELIMITER $$
|
||||||
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`itemShelving_getSaleDate`(vShelvingFk VARCHAR(3))
|
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`itemShelving_getSaleDate`(
|
||||||
|
vShelvingCode VARCHAR(10)
|
||||||
|
)
|
||||||
BEGIN
|
BEGIN
|
||||||
|
/**
|
||||||
/* Devuelve la mínima fecha en que se necesita cada producto en esa matrícula.
|
* Devuelve la mínima fecha en que se necesita cada producto en esa matrícula.
|
||||||
*
|
*
|
||||||
* @param vShelvingFk Matrícula del carro o pallet
|
* @param vShelvingCode Matrícula del carro o pallet
|
||||||
*/
|
*/
|
||||||
|
|
||||||
DECLARE vWarehouseFk INT;
|
DECLARE vWarehouseFk INT;
|
||||||
DECLARE vStockScopeDays INT;
|
DECLARE vStockScopeDays INT;
|
||||||
|
DECLARE vShelvingFk INT;
|
||||||
|
|
||||||
|
SELECT id INTO vShelvingFk
|
||||||
|
FROM shelving
|
||||||
|
WHERE code COLLATE utf8_unicode_ci = vShelvingCode;
|
||||||
|
|
||||||
SELECT s.warehouseFk, stockScopeDays
|
SELECT s.warehouseFk, stockScopeDays
|
||||||
INTO vWarehouseFk, vStockScopeDays
|
INTO vWarehouseFk, vStockScopeDays
|
||||||
|
@ -30,7 +36,7 @@ BEGIN
|
||||||
ENGINE = MEMORY
|
ENGINE = MEMORY
|
||||||
SELECT itemFk, SUM(visible) visible
|
SELECT itemFk, SUM(visible) visible
|
||||||
FROM itemShelving
|
FROM itemShelving
|
||||||
WHERE shelvingFk = vShelvingFk COLLATE utf8_unicode_ci
|
WHERE shelvingFk = vShelvingFk
|
||||||
GROUP BY itemFk;
|
GROUP BY itemFk;
|
||||||
|
|
||||||
CREATE OR REPLACE TEMPORARY TABLE tmp.tStockByDay
|
CREATE OR REPLACE TEMPORARY TABLE tmp.tStockByDay
|
||||||
|
@ -52,7 +58,7 @@ BEGIN
|
||||||
SELECT ish.itemFk, - SUM(ish.visible), util.VN_CURDATE()
|
SELECT ish.itemFk, - SUM(ish.visible), util.VN_CURDATE()
|
||||||
FROM itemShelving ish
|
FROM itemShelving ish
|
||||||
JOIN tmp.tItems i ON i.itemFk = ish.itemFk
|
JOIN tmp.tItems i ON i.itemFk = ish.itemFk
|
||||||
JOIN shelving sh ON sh.code = ish.shelvingFk
|
JOIN shelving sh ON sh.id = ish.shelvingFk
|
||||||
JOIN parking p ON sh.parkingFk = p.id
|
JOIN parking p ON sh.parkingFk = p.id
|
||||||
JOIN sector s ON s.id = p.sectorFk
|
JOIN sector s ON s.id = p.sectorFk
|
||||||
WHERE s.isReserve
|
WHERE s.isReserve
|
||||||
|
@ -110,7 +116,7 @@ BEGIN
|
||||||
UPDATE tmp.tStockByDay sbd
|
UPDATE tmp.tStockByDay sbd
|
||||||
JOIN (SELECT ish.itemFK, SUM(ish.visible) amount
|
JOIN (SELECT ish.itemFK, SUM(ish.visible) amount
|
||||||
FROM itemShelving ish
|
FROM itemShelving ish
|
||||||
JOIN shelving sh ON sh.code = ish.shelvingFk
|
JOIN shelving sh ON sh.id = ish.shelvingFk
|
||||||
JOIN parking p ON p.id = sh.parkingFk
|
JOIN parking p ON p.id = sh.parkingFk
|
||||||
JOIN sector s ON s.id = p.sectorFk
|
JOIN sector s ON s.id = p.sectorFk
|
||||||
WHERE s.warehouseFk = vWarehouseFk
|
WHERE s.warehouseFk = vWarehouseFk
|
||||||
|
@ -150,10 +156,10 @@ BEGIN
|
||||||
p.sectorFk,
|
p.sectorFk,
|
||||||
ish.shelvingFk
|
ish.shelvingFk
|
||||||
FROM itemShelving ish
|
FROM itemShelving ish
|
||||||
JOIN vn.shelving sh ON sh.code = ish.shelvingFk
|
JOIN vn.shelving sh ON sh.id = ish.shelvingFk
|
||||||
LEFT JOIN parking p ON p.id = parkingFk
|
LEFT JOIN parking p ON p.id = parkingFk
|
||||||
LEFT JOIN vn.sector s ON s.id = p.sectorFk
|
LEFT JOIN vn.sector s ON s.id = p.sectorFk
|
||||||
WHERE ish.shelvingFk = vShelvingFk COLLATE utf8_unicode_ci
|
WHERE ish.shelvingFk = vShelvingFk
|
||||||
) sub4 ON sub4.itemFk = ts.itemFk
|
) sub4 ON sub4.itemFk = ts.itemFk
|
||||||
LEFT JOIN sector s ON s.id = sub4.sectorFk
|
LEFT JOIN sector s ON s.id = sub4.sectorFk
|
||||||
LEFT JOIN item i ON i.id = ts.itemFk
|
LEFT JOIN item i ON i.id = ts.itemFk
|
||||||
|
|
|
@ -42,7 +42,7 @@ BEGIN
|
||||||
JOIN item i ON i.id = ish.itemFk
|
JOIN item i ON i.id = ish.itemFk
|
||||||
JOIN itemType it ON it.id = i.typeFk
|
JOIN itemType it ON it.id = i.typeFk
|
||||||
JOIN tmp.stockMisfit sm ON sm.itemFk = ish.itemFk
|
JOIN tmp.stockMisfit sm ON sm.itemFk = ish.itemFk
|
||||||
JOIN shelving sh ON sh.code = ish.shelvingFk
|
JOIN shelving sh ON sh.id = ish.shelvingFk
|
||||||
JOIN parking p ON p.id = sh.parkingFk
|
JOIN parking p ON p.id = sh.parkingFk
|
||||||
LEFT JOIN (
|
LEFT JOIN (
|
||||||
SELECT s.itemFk, sum(s.quantity) notPrepared
|
SELECT s.itemFk, sum(s.quantity) notPrepared
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
DELIMITER $$
|
DELIMITER $$
|
||||||
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`itemShelving_selfConsumption`(
|
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`itemShelving_selfConsumption`(
|
||||||
vShelvingFk VARCHAR(10) COLLATE utf8_general_ci,
|
vShelvingCode VARCHAR(10) COLLATE utf8_general_ci,
|
||||||
vItemFk INT,
|
vItemFk INT,
|
||||||
vQuantity INT
|
vQuantity INT
|
||||||
)
|
)
|
||||||
|
@ -9,9 +9,9 @@ BEGIN
|
||||||
* Leave the indicated amount on the shelve
|
* Leave the indicated amount on the shelve
|
||||||
* and create a ticket with the difference.
|
* and create a ticket with the difference.
|
||||||
*
|
*
|
||||||
* @param vShelvingFk id of the shelve where the item is located.
|
* @param vShelvingCode Code of the shelve where the item is located
|
||||||
* @param vItemFk article of which the self-consumption ticket is to be created.
|
* @param vItemFk Item of which the self-consumption ticket is to be created
|
||||||
* @param vQuantity amount that will stay on the shelve
|
* @param vQuantity Amount that will stay on the shelve
|
||||||
*/
|
*/
|
||||||
DECLARE vVisible INT;
|
DECLARE vVisible INT;
|
||||||
DECLARE vClientFk INT;
|
DECLARE vClientFk INT;
|
||||||
|
@ -21,6 +21,11 @@ BEGIN
|
||||||
DECLARE vAgencyModeFk INT;
|
DECLARE vAgencyModeFk INT;
|
||||||
DECLARE vItemShelvingFk INT;
|
DECLARE vItemShelvingFk INT;
|
||||||
DECLARE vAddressFk INT;
|
DECLARE vAddressFk INT;
|
||||||
|
DECLARE vShelvingFk INT;
|
||||||
|
|
||||||
|
SELECT id INTO vShelvingFk
|
||||||
|
FROM shelving
|
||||||
|
WHERE code = vShelvingCode;
|
||||||
|
|
||||||
SELECT c.id,
|
SELECT c.id,
|
||||||
pc.clientSelfConsumptionFk,
|
pc.clientSelfConsumptionFk,
|
||||||
|
@ -37,7 +42,7 @@ BEGIN
|
||||||
JOIN parking p ON p.sectorFk = s.id
|
JOIN parking p ON p.sectorFk = s.id
|
||||||
JOIN shelving s2 ON s2.parkingFk = p.id
|
JOIN shelving s2 ON s2.parkingFk = p.id
|
||||||
JOIN productionConfig pc
|
JOIN productionConfig pc
|
||||||
WHERE s2.code = vShelvingFk;
|
WHERE s2.id = vShelvingFk;
|
||||||
|
|
||||||
IF vClientFk IS NULL THEN
|
IF vClientFk IS NULL THEN
|
||||||
CALL util.throw('The company does not have a customer assigned');
|
CALL util.throw('The company does not have a customer assigned');
|
||||||
|
@ -47,7 +52,7 @@ BEGIN
|
||||||
CALL util.throw('The shelf cannot have NULL or negative quantities');
|
CALL util.throw('The shelf cannot have NULL or negative quantities');
|
||||||
END IF;
|
END IF;
|
||||||
|
|
||||||
IF vShelvingFk IS NULL THEN
|
IF vShelvingCode IS NULL THEN
|
||||||
CALL util.throw('The shelf is necessary');
|
CALL util.throw('The shelf is necessary');
|
||||||
END IF;
|
END IF;
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
DELIMITER $$
|
DELIMITER $$
|
||||||
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`itemShelving_transfer`(
|
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`itemShelving_transfer`(
|
||||||
vItemShelvingFk INT,
|
vItemShelvingFk INT,
|
||||||
vShelvingFk VARCHAR(10)
|
vShelvingCode VARCHAR(10)
|
||||||
)
|
)
|
||||||
BEGIN
|
BEGIN
|
||||||
/**
|
/**
|
||||||
|
@ -9,9 +9,14 @@ BEGIN
|
||||||
* fusionando si coincide el packing y la fecha.
|
* fusionando si coincide el packing y la fecha.
|
||||||
*
|
*
|
||||||
* @param vItemShelvingFk Identificador de itemShelving
|
* @param vItemShelvingFk Identificador de itemShelving
|
||||||
* @param vShelvingFk Identificador de shelving
|
* @param vShelvingCode Código de shelving
|
||||||
*/
|
*/
|
||||||
DECLARE vNewItemShelvingFk INT;
|
DECLARE vNewItemShelvingFk INT;
|
||||||
|
DECLARE vShelvingFk INT;
|
||||||
|
|
||||||
|
SELECT id INTO vShelvingFk
|
||||||
|
FROM shelving
|
||||||
|
WHERE code COLLATE utf8_unicode_ci = vShelvingCode;
|
||||||
|
|
||||||
SELECT MAX(ish.id) INTO vNewItemShelvingFk
|
SELECT MAX(ish.id) INTO vNewItemShelvingFk
|
||||||
FROM itemShelving ish
|
FROM itemShelving ish
|
||||||
|
@ -26,7 +31,7 @@ BEGIN
|
||||||
AND ish2.packing = ish.packing
|
AND ish2.packing = ish.packing
|
||||||
AND DATE(ish2.created) = DATE(ish.created)
|
AND DATE(ish2.created) = DATE(ish.created)
|
||||||
AND ish2.buyFk = ish.buyFk
|
AND ish2.buyFk = ish.buyFk
|
||||||
WHERE ish.shelvingFk = vShelvingFk COLLATE utf8_unicode_ci;
|
WHERE ish.shelvingFk = vShelvingFk;
|
||||||
|
|
||||||
IF vNewItemShelvingFk THEN
|
IF vNewItemShelvingFk THEN
|
||||||
UPDATE itemShelving ish
|
UPDATE itemShelving ish
|
||||||
|
@ -38,9 +43,7 @@ BEGIN
|
||||||
DELETE FROM itemShelving
|
DELETE FROM itemShelving
|
||||||
WHERE id = vItemShelvingFk;
|
WHERE id = vItemShelvingFk;
|
||||||
ELSE
|
ELSE
|
||||||
IF (SELECT EXISTS(SELECT id FROM shelving
|
IF (SELECT EXISTS(SELECT id FROM shelving WHERE id = vShelvingFk)) THEN
|
||||||
WHERE code = vShelvingFk COLLATE utf8_unicode_ci)) THEN
|
|
||||||
|
|
||||||
UPDATE itemShelving
|
UPDATE itemShelving
|
||||||
SET shelvingFk = vShelvingFk
|
SET shelvingFk = vShelvingFk
|
||||||
WHERE id = vItemShelvingFk;
|
WHERE id = vItemShelvingFk;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
DELIMITER $$
|
DELIMITER $$
|
||||||
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`item_devalueA2`(
|
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`item_devalueA2`(
|
||||||
vSelf INT,
|
vSelf INT,
|
||||||
vShelvingFK VARCHAR(10),
|
vShelvingCode VARCHAR(10) COLLATE utf8mb3_general_ci,
|
||||||
vBuyingValue DECIMAL(10,4),
|
vBuyingValue DECIMAL(10,4),
|
||||||
vQuantity INT
|
vQuantity INT
|
||||||
)
|
)
|
||||||
|
@ -12,7 +12,7 @@ BEGIN
|
||||||
* de almacén y shelvings correspondientes
|
* de almacén y shelvings correspondientes
|
||||||
*
|
*
|
||||||
* @param vSelf Id de artículo a devaluar
|
* @param vSelf Id de artículo a devaluar
|
||||||
* @param vShelvingFK Ubicación actual del artículo
|
* @param vShelvingCode Código de shelving / ubicación
|
||||||
* @param vBuyingValue Nuevo precio de coste
|
* @param vBuyingValue Nuevo precio de coste
|
||||||
* @param vQuantity Cantidad del ítem a pasar a A2
|
* @param vQuantity Cantidad del ítem a pasar a A2
|
||||||
*/
|
*/
|
||||||
|
@ -109,10 +109,11 @@ BEGIN
|
||||||
CALL util.throw ('The item has not a buy');
|
CALL util.throw ('The item has not a buy');
|
||||||
END IF;
|
END IF;
|
||||||
|
|
||||||
SELECT id,visible INTO vTargetItemShelvingFk, vCurrentVisible
|
SELECT ish.id, ish.visible INTO vTargetItemShelvingFk, vCurrentVisible
|
||||||
FROM itemShelving
|
FROM itemShelving ish
|
||||||
WHERE shelvingFk = vShelvingFK COLLATE utf8mb3_general_ci
|
JOIN shelving sh ON sh.id = ish.shelvingFk
|
||||||
AND itemFk = vSelf
|
WHERE sh.code = vShelvingCode
|
||||||
|
AND ish.itemFk = vSelf
|
||||||
LIMIT 1;
|
LIMIT 1;
|
||||||
|
|
||||||
IF vCurrentVisible IS NULL THEN
|
IF vCurrentVisible IS NULL THEN
|
||||||
|
@ -388,16 +389,17 @@ BEGIN
|
||||||
userFk,
|
userFk,
|
||||||
isChecked)
|
isChecked)
|
||||||
SELECT vItemA2Fk,
|
SELECT vItemA2Fk,
|
||||||
shelvingFk,
|
ish.shelvingFk,
|
||||||
vQuantity ,
|
vQuantity ,
|
||||||
`grouping`,
|
ish.`grouping`,
|
||||||
packing,
|
ish.packing,
|
||||||
packagingFk,
|
ish.packagingFk,
|
||||||
account.myUser_getId(),
|
account.myUser_getId(),
|
||||||
isChecked
|
ish.isChecked
|
||||||
FROM itemShelving
|
FROM itemShelving ish
|
||||||
WHERE itemFK = vSelf
|
JOIN shelving sh ON sh.id = ish.shelvingFk
|
||||||
AND shelvingFk = vShelvingFK COLLATE utf8mb3_general_ci
|
WHERE ish.itemFK = vSelf
|
||||||
|
AND sh.code = vShelvingCode
|
||||||
ON DUPLICATE KEY UPDATE
|
ON DUPLICATE KEY UPDATE
|
||||||
visible = vQuantity + VALUES(visible);
|
visible = vQuantity + VALUES(visible);
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,6 @@ BEGIN
|
||||||
i.minimum `min`,
|
i.minimum `min`,
|
||||||
p.name producer,
|
p.name producer,
|
||||||
o.code origin,
|
o.code origin,
|
||||||
v.visible - IFNULL(vVisibleItemShelving, 0) unlocated,
|
|
||||||
a.available,
|
a.available,
|
||||||
vVisibleItemShelving,
|
vVisibleItemShelving,
|
||||||
v.visible,
|
v.visible,
|
||||||
|
|
|
@ -217,7 +217,7 @@ proc: BEGIN
|
||||||
st.code = 'previousPrepared' isPreviousPrepared,
|
st.code = 'previousPrepared' isPreviousPrepared,
|
||||||
sc.itemPackingTypeFk
|
sc.itemPackingTypeFk
|
||||||
FROM itemShelving ish
|
FROM itemShelving ish
|
||||||
JOIN shelving sh ON sh.code = ish.shelvingFk
|
JOIN shelving sh ON sh.id = ish.shelvingFk
|
||||||
JOIN parking p ON p.id = sh.parkingFk
|
JOIN parking p ON p.id = sh.parkingFk
|
||||||
JOIN sector sc ON sc.id = p.sectorFk
|
JOIN sector sc ON sc.id = p.sectorFk
|
||||||
JOIN sectorType st ON st.id = sc.typeFk
|
JOIN sectorType st ON st.id = sc.typeFk
|
||||||
|
|
|
@ -27,7 +27,7 @@ BEGIN
|
||||||
DECLARE vQuantity INT;
|
DECLARE vQuantity INT;
|
||||||
DECLARE vRemainder INT DEFAULT 0;
|
DECLARE vRemainder INT DEFAULT 0;
|
||||||
DECLARE vRemainderSaleFk INT;
|
DECLARE vRemainderSaleFk INT;
|
||||||
DECLARE vShelving VARCHAR(10);
|
DECLARE vShelvingFk VARCHAR(10);
|
||||||
DECLARE vTicketFk INT;
|
DECLARE vTicketFk INT;
|
||||||
|
|
||||||
SELECT s.quantity,
|
SELECT s.quantity,
|
||||||
|
@ -74,7 +74,7 @@ w1: WHILE vQuantity >= vPacking DO
|
||||||
p.pickingOrder,
|
p.pickingOrder,
|
||||||
ish.created
|
ish.created
|
||||||
FROM itemShelving ish
|
FROM itemShelving ish
|
||||||
JOIN shelving sh ON sh.code = ish.shelvingFk
|
JOIN shelving sh ON sh.id = ish.shelvingFk
|
||||||
JOIN parking p ON p.id = sh.parkingFk
|
JOIN parking p ON p.id = sh.parkingFk
|
||||||
LEFT JOIN itemShelvingSale iss
|
LEFT JOIN itemShelvingSale iss
|
||||||
ON iss.itemShelvingFk = ish.id
|
ON iss.itemShelvingFk = ish.id
|
||||||
|
@ -262,9 +262,9 @@ w1: WHILE vQuantity >= vPacking DO
|
||||||
CALL dipole.expedition_Add(vExpeditionFk,vPrinterFk, TRUE);
|
CALL dipole.expedition_Add(vExpeditionFk,vPrinterFk, TRUE);
|
||||||
|
|
||||||
SELECT shelvingFk, p.code
|
SELECT shelvingFk, p.code
|
||||||
INTO vShelving, vParkingCode
|
INTO vShelvingFk, vParkingCode
|
||||||
FROM itemShelving ish
|
FROM itemShelving ish
|
||||||
JOIN shelving sh ON sh.code = ish.shelvingFk
|
JOIN shelving sh ON sh.id = ish.shelvingFk
|
||||||
JOIN parking p ON p.id = sh.parkingFk
|
JOIN parking p ON p.id = sh.parkingFk
|
||||||
WHERE ish.id = vItemShelvingFk;
|
WHERE ish.id = vItemShelvingFk;
|
||||||
|
|
||||||
|
@ -273,7 +273,7 @@ w1: WHILE vQuantity >= vPacking DO
|
||||||
itemFk = vItemFk,
|
itemFk = vItemFk,
|
||||||
quantity = vPacking,
|
quantity = vPacking,
|
||||||
longName = vConcept,
|
longName = vConcept,
|
||||||
shelvingFk = vShelving,
|
shelvingFk = vShelvingFk,
|
||||||
parkingCode = vParkingCode,
|
parkingCode = vParkingCode,
|
||||||
phone = RIGHT(phone,vMaxPhoneLength),
|
phone = RIGHT(phone,vMaxPhoneLength),
|
||||||
street = RIGHT(street, vMAxStreetLength)
|
street = RIGHT(street, vMAxStreetLength)
|
||||||
|
|
|
@ -41,7 +41,7 @@ BEGIN
|
||||||
AND iss.created >= vDated
|
AND iss.created >= vDated
|
||||||
GROUP BY iss.itemShelvingFk, s.itemFk) tISS
|
GROUP BY iss.itemShelvingFk, s.itemFk) tISS
|
||||||
ON tISS.itemFk = ish.itemFk AND tISS.itemShelvingFk = ish.id
|
ON tISS.itemFk = ish.itemFk AND tISS.itemShelvingFk = ish.id
|
||||||
JOIN shelving sh ON sh.code = ish.shelvingFk
|
JOIN shelving sh ON sh.id = ish.shelvingFk
|
||||||
JOIN parking p ON p.id = sh.parkingFk
|
JOIN parking p ON p.id = sh.parkingFk
|
||||||
JOIN tmp.productionBuffer pb ON pb.ticketFk = s.ticketFk
|
JOIN tmp.productionBuffer pb ON pb.ticketFk = s.ticketFk
|
||||||
JOIN agencyMode am ON am.id = pb.agencyModeFk
|
JOIN agencyMode am ON am.id = pb.agencyModeFk
|
||||||
|
|
|
@ -87,7 +87,7 @@ BEGIN
|
||||||
SUM(ish.visible) visible,
|
SUM(ish.visible) visible,
|
||||||
s.warehouseFk warehouseFk
|
s.warehouseFk warehouseFk
|
||||||
FROM itemShelving ish
|
FROM itemShelving ish
|
||||||
JOIN shelving sh ON sh.code = ish.shelvingFk
|
JOIN shelving sh ON sh.id = ish.shelvingFk
|
||||||
JOIN parking p ON p.id = sh.parkingFk
|
JOIN parking p ON p.id = sh.parkingFk
|
||||||
JOIN sector s ON s.id = p.sectorFk
|
JOIN sector s ON s.id = p.sectorFk
|
||||||
GROUP BY ish.itemFk, s.warehouseFk;
|
GROUP BY ish.itemFk, s.warehouseFk;
|
||||||
|
@ -127,7 +127,7 @@ BEGIN
|
||||||
LEFT JOIN tItemShelvingStock_byWarehouse issw ON issw.itemFk = i.id
|
LEFT JOIN tItemShelvingStock_byWarehouse issw ON issw.itemFk = i.id
|
||||||
AND issw.warehouseFk = t.warehouseFk
|
AND issw.warehouseFk = t.warehouseFk
|
||||||
WHERE IFNULL(v.visible, 0) < s.quantity
|
WHERE IFNULL(v.visible, 0) < s.quantity
|
||||||
AND IFNULL(av.available, 0) < s.quantity
|
AND IFNULL(av.available, 0) < 0
|
||||||
AND IFNULL(issw.visible, 0) < s.quantity
|
AND IFNULL(issw.visible, 0) < s.quantity
|
||||||
AND NOT s.isPicked
|
AND NOT s.isPicked
|
||||||
AND NOT s.reserved
|
AND NOT s.reserved
|
||||||
|
@ -190,7 +190,7 @@ BEGIN
|
||||||
LEFT JOIN tItemShelvingStock_byWarehouse issw ON issw.itemFk = i.id
|
LEFT JOIN tItemShelvingStock_byWarehouse issw ON issw.itemFk = i.id
|
||||||
AND issw.warehouseFk = t.warehouseFk
|
AND issw.warehouseFk = t.warehouseFk
|
||||||
WHERE IFNULL(v.visible, 0) < s.quantity
|
WHERE IFNULL(v.visible, 0) < s.quantity
|
||||||
AND IFNULL(av.available, 0) >= s.quantity
|
AND IFNULL(av.available, 0) >= 0
|
||||||
AND IFNULL(issw.visible, 0) < s.quantity
|
AND IFNULL(issw.visible, 0) < s.quantity
|
||||||
AND s.quantity > 0
|
AND s.quantity > 0
|
||||||
AND NOT s.isPicked
|
AND NOT s.isPicked
|
||||||
|
|
|
@ -1,11 +1,13 @@
|
||||||
DELIMITER $$
|
DELIMITER $$
|
||||||
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`shelvingChange`(IN `vShelvingO` VARCHAR(8), IN `vShelvingD` VARCHAR(8))
|
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`shelvingChange`(
|
||||||
|
`vShelvingO` VARCHAR(10),
|
||||||
|
`vShelvingD` VARCHAR(10)
|
||||||
|
)
|
||||||
BEGIN
|
BEGIN
|
||||||
|
UPDATE itemShelving ish
|
||||||
UPDATE vn.itemShelving
|
JOIN shelving sh1 ON sh1.code = vShelvingD COLLATE utf8_unicode_ci
|
||||||
SET shelvingFk = vShelvingD COLLATE utf8_unicode_ci
|
JOIN shelving sh2 ON sh2.code = vShelvingO COLLATE utf8_unicode_ci
|
||||||
WHERE shelvingFk = vShelvingO COLLATE utf8_unicode_ci;
|
SET ish.shelvingFk = sh1.id
|
||||||
|
WHERE ish.shelvingFk = sh2.id;
|
||||||
|
|
||||||
END$$
|
END$$
|
||||||
DELIMITER ;
|
DELIMITER ;
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
DELIMITER $$
|
DELIMITER $$
|
||||||
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`shelvingParking_get`(vShelvingFk VARCHAR(10), vWarehouseFk INT, vDayRange INT)
|
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`shelvingParking_get`(
|
||||||
|
vShelvingCode VARCHAR(10),
|
||||||
|
vWarehouseFk INT,
|
||||||
|
vDayRange INT
|
||||||
|
)
|
||||||
BEGIN
|
BEGIN
|
||||||
|
|
||||||
|
|
||||||
SELECT s.itemFk,
|
SELECT s.itemFk,
|
||||||
s.concept,
|
s.concept,
|
||||||
CAST(SUM(s.quantity) AS DECIMAL(10,0)) as sinServir,
|
CAST(SUM(s.quantity) AS DECIMAL(10,0)) as sinServir,
|
||||||
|
@ -10,14 +12,15 @@ SELECT s.itemFk,
|
||||||
FROM vn.sale s
|
FROM vn.sale s
|
||||||
LEFT JOIN vn.itemShelvingSale iss ON iss.saleFk = s.id
|
LEFT JOIN vn.itemShelvingSale iss ON iss.saleFk = s.id
|
||||||
JOIN vn.ticket t ON t.id = s.ticketFk
|
JOIN vn.ticket t ON t.id = s.ticketFk
|
||||||
LEFT JOIN vn.itemShelvingStock ist ON ist.itemFk = s.itemFk AND ist.warehouseFk = vWarehouseFk
|
LEFT JOIN vn.itemShelvingStock ist ON ist.itemFk = s.itemFk
|
||||||
JOIN vn.itemShelving ish ON ish.itemFk = s.itemFk AND ish.shelvingFk = vShelvingFk COLLATE utf8_general_ci
|
AND ist.warehouseFk = vWarehouseFk
|
||||||
|
JOIN vn.itemShelving ish ON ish.itemFk = s.itemFk
|
||||||
|
JOIN shelving sh ON sh.id = ish.shelvingFk
|
||||||
|
AND sh.code = vShelvingCode COLLATE utf8_general_ci
|
||||||
WHERE t.shipped BETWEEN util.VN_CURDATE() AND util.dayend(TIMESTAMPADD(DAY, GREATEST(0,vDayRange), util.VN_CURDATE()))
|
WHERE t.shipped BETWEEN util.VN_CURDATE() AND util.dayend(TIMESTAMPADD(DAY, GREATEST(0,vDayRange), util.VN_CURDATE()))
|
||||||
AND iss.saleFk IS NULL
|
AND iss.saleFk IS NULL
|
||||||
AND t.warehouseFk = vWarehouseFk
|
AND t.warehouseFk = vWarehouseFk
|
||||||
GROUP BY s.itemFk
|
GROUP BY s.itemFk
|
||||||
HAVING sinServir > aparcado;
|
HAVING sinServir > aparcado;
|
||||||
|
|
||||||
|
|
||||||
END$$
|
END$$
|
||||||
DELIMITER ;
|
DELIMITER ;
|
||||||
|
|
|
@ -12,12 +12,12 @@ BEGIN
|
||||||
|
|
||||||
DELETE ish.*
|
DELETE ish.*
|
||||||
FROM itemShelving ish
|
FROM itemShelving ish
|
||||||
JOIN vn.shelving sh ON sh.code = ish.shelvingFk
|
JOIN vn.shelving sh ON sh.id = ish.shelvingFk
|
||||||
WHERE sh.parkingFk IS NULL
|
WHERE sh.parkingFk IS NULL
|
||||||
AND ish.created < TIMESTAMPADD(WEEK,-1,util.VN_CURDATE());
|
AND ish.created < TIMESTAMPADD(WEEK,-1,util.VN_CURDATE());
|
||||||
|
|
||||||
UPDATE shelving sh
|
UPDATE shelving sh
|
||||||
LEFT JOIN itemShelving its ON its.shelvingFk = sh.`code`
|
LEFT JOIN itemShelving its ON its.shelvingFk = sh.id
|
||||||
SET isPrinted = 0,
|
SET isPrinted = 0,
|
||||||
parkingFk = NULL
|
parkingFk = NULL
|
||||||
WHERE its.id IS NULL
|
WHERE its.id IS NULL
|
||||||
|
@ -27,11 +27,11 @@ UPDATE shelving sh
|
||||||
OR
|
OR
|
||||||
sh.parked < util.VN_CURDATE() - INTERVAL 2 WEEK
|
sh.parked < util.VN_CURDATE() - INTERVAL 2 WEEK
|
||||||
)
|
)
|
||||||
|
|
||||||
AND IF(code REGEXP '^[A-Za-z]{2}[0-9]', LEFT (code, 2) NOT IN (
|
AND IF(code REGEXP '^[A-Za-z]{2}[0-9]', LEFT (code, 2) NOT IN (
|
||||||
SELECT DISTINCT LEFT(its.shelvingFk, 2)
|
SELECT DISTINCT LEFT(sh.code, 2)
|
||||||
FROM itemShelving its
|
FROM itemShelving its
|
||||||
WHERE its.shelvingFk REGEXP '^[A-Za-z]{2}[0-9]'
|
JOIN shelving sh ON sh.id = its.shelvingFk
|
||||||
|
WHERE sh.code REGEXP '^[A-Za-z]{2}[0-9]'
|
||||||
), TRUE);
|
), TRUE);
|
||||||
|
|
||||||
END$$
|
END$$
|
||||||
|
|
|
@ -25,7 +25,7 @@ BEGIN
|
||||||
LEFT JOIN (
|
LEFT JOIN (
|
||||||
SELECT ish.itemFk, CAST(SUM(ish.visible) AS DECIMAL(10,0)) AS reserva
|
SELECT ish.itemFk, CAST(SUM(ish.visible) AS DECIMAL(10,0)) AS reserva
|
||||||
FROM vn.itemShelving ish
|
FROM vn.itemShelving ish
|
||||||
JOIN vn.shelving sh ON sh.code = ish.shelvingFk
|
JOIN vn.shelving sh ON sh.id = ish.shelvingFk
|
||||||
JOIN vn.parking p ON p.id = sh.parkingFk
|
JOIN vn.parking p ON p.id = sh.parkingFk
|
||||||
JOIN vn.sector s ON s.id = p.sectorFk
|
JOIN vn.sector s ON s.id = p.sectorFk
|
||||||
WHERE s.code = 'FUENTES_PICASSE'
|
WHERE s.code = 'FUENTES_PICASSE'
|
||||||
|
@ -68,7 +68,7 @@ BEGIN
|
||||||
sh.isSpam
|
sh.isSpam
|
||||||
FROM vn.itemShelving ish
|
FROM vn.itemShelving ish
|
||||||
JOIN vn.item i ON i.id = ish.itemFk
|
JOIN vn.item i ON i.id = ish.itemFk
|
||||||
JOIN vn.shelving sh ON sh.code = ish.shelvingFk
|
JOIN vn.shelving sh ON sh.id = ish.shelvingFk
|
||||||
JOIN vn.parking p ON p.id = sh.parkingFk
|
JOIN vn.parking p ON p.id = sh.parkingFk
|
||||||
JOIN vn.sector s ON s.id = p.sectorFk
|
JOIN vn.sector s ON s.id = p.sectorFk
|
||||||
JOIN vn.warehouse w ON w.id = s.warehouseFk
|
JOIN vn.warehouse w ON w.id = s.warehouseFk
|
||||||
|
|
|
@ -7,13 +7,13 @@ proc: BEGIN
|
||||||
* Calculate the stock of the auction warehouse from the inventory date to vDated
|
* Calculate the stock of the auction warehouse from the inventory date to vDated
|
||||||
* without taking into account the outputs of the same day vDated
|
* without taking into account the outputs of the same day vDated
|
||||||
*
|
*
|
||||||
* @param vDated Date to calculate the stock.
|
* @param vDated Date to calculate the stock
|
||||||
*/
|
*/
|
||||||
IF vDated < util.VN_CURDATE() THEN
|
IF vDated < util.VN_CURDATE() THEN
|
||||||
LEAVE proc;
|
LEAVE proc;
|
||||||
END IF;
|
END IF;
|
||||||
|
|
||||||
CREATE OR REPLACE TEMPORARY TABLE tStockBought
|
CREATE OR REPLACE TEMPORARY TABLE tCurrentData
|
||||||
SELECT workerFk, reserve
|
SELECT workerFk, reserve
|
||||||
FROM stockBought
|
FROM stockBought
|
||||||
WHERE dated = vDated
|
WHERE dated = vDated
|
||||||
|
@ -21,15 +21,28 @@ proc: BEGIN
|
||||||
|
|
||||||
DELETE FROM stockBought WHERE dated = vDated;
|
DELETE FROM stockBought WHERE dated = vDated;
|
||||||
|
|
||||||
|
CREATE OR REPLACE TEMPORARY TABLE tStockSold
|
||||||
|
SELECT it.workerFk,
|
||||||
|
SUM(ic.cm3 * ito.quantity / vc.palletM3 / 1000000) sold
|
||||||
|
FROM itemTicketOut ito
|
||||||
|
JOIN item i ON i.id = ito.itemFk
|
||||||
|
JOIN itemType it ON it.id = i.typeFk
|
||||||
|
JOIN ticket t ON t.id = ito.ticketFk
|
||||||
|
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 it.workerFk;
|
||||||
|
|
||||||
CALL item_calculateStock(vDated);
|
CALL item_calculateStock(vDated);
|
||||||
|
|
||||||
INSERT INTO stockBought(workerFk, bought, dated)
|
CREATE OR REPLACE TEMPORARY TABLE tStockBought
|
||||||
SELECT it.workerFk,
|
SELECT it.workerFk,
|
||||||
ROUND(SUM(
|
SUM((ti.quantity / b.packing) *
|
||||||
(ti.quantity / b.packing) *
|
|
||||||
buy_getVolume(b.id)
|
buy_getVolume(b.id)
|
||||||
) / vc.palletM3 / 1000000, 1) bought,
|
) / vc.palletM3 / 1000000 bought
|
||||||
vDated
|
|
||||||
FROM itemType it
|
FROM itemType it
|
||||||
JOIN item i ON i.typeFk = it.id
|
JOIN item i ON i.typeFk = it.id
|
||||||
LEFT JOIN tmp.item ti ON ti.itemFk = i.id
|
LEFT JOIN tmp.item ti ON ti.itemFk = i.id
|
||||||
|
@ -43,20 +56,33 @@ proc: BEGIN
|
||||||
GROUP BY it.workerFk
|
GROUP BY it.workerFk
|
||||||
HAVING bought;
|
HAVING bought;
|
||||||
|
|
||||||
|
|
||||||
|
INSERT INTO stockBought(workerFk, bought, dated)
|
||||||
|
SELECT tb.workerFk,
|
||||||
|
ROUND(GREATEST(tb.bought - IFNULL(ts.sold, 0), 0), 2),
|
||||||
|
vDated
|
||||||
|
FROM tStockBought tb
|
||||||
|
LEFT JOIN tStockSold ts ON ts.workerFk = tb.workerFk;
|
||||||
|
|
||||||
UPDATE stockBought s
|
UPDATE stockBought s
|
||||||
JOIN tStockBought ts ON ts.workerFk = s.workerFk
|
JOIN tCurrentData ts ON ts.workerFk = s.workerFk
|
||||||
SET s.reserve = ts.reserve
|
SET s.reserve = ts.reserve
|
||||||
WHERE s.dated = vDated;
|
WHERE s.dated = vDated;
|
||||||
|
|
||||||
INSERT INTO stockBought (workerFk, reserve, dated)
|
INSERT INTO stockBought (workerFk, reserve, dated)
|
||||||
SELECT ts.workerFk, ts.reserve, vDated
|
SELECT ts.workerFk, ts.reserve, vDated
|
||||||
FROM tStockBought ts
|
FROM tCurrentData ts
|
||||||
WHERE ts.workerFk NOT IN (
|
WHERE ts.workerFk NOT IN (
|
||||||
SELECT workerFk
|
SELECT workerFk
|
||||||
FROM stockBought
|
FROM stockBought
|
||||||
WHERE dated = vDated
|
WHERE dated = vDated
|
||||||
);
|
);
|
||||||
|
|
||||||
DROP TEMPORARY TABLE tStockBought, tmp.item, tmp.buyUltimate;
|
UPDATE stockBought s
|
||||||
|
JOIN tStockSold ts ON ts.workerFk = s.workerFk
|
||||||
|
SET s.bought = IF(s.bought < ts.sold, ROUND(s.bought - ts.sold, 1), 0)
|
||||||
|
WHERE s.dated = vDated;
|
||||||
|
|
||||||
|
DROP TEMPORARY TABLE tCurrentData, tmp.item, tmp.buyUltimate, tStockSold;
|
||||||
END$$
|
END$$
|
||||||
DELIMITER ;
|
DELIMITER ;
|
||||||
|
|
|
@ -0,0 +1,74 @@
|
||||||
|
DELIMITER $$
|
||||||
|
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`stockBuyedByWorker`(
|
||||||
|
vDated DATE,
|
||||||
|
vWorker INT
|
||||||
|
)
|
||||||
|
BEGIN
|
||||||
|
/**
|
||||||
|
* Inserta el volumen de compra de un comprador
|
||||||
|
* en stockBuyed de acuerdo con la fecha.
|
||||||
|
*
|
||||||
|
* @param vDated Fecha de compra
|
||||||
|
* @param vWorker Id de trabajador
|
||||||
|
*/
|
||||||
|
CREATE OR REPLACE TEMPORARY TABLE tStockBuyed
|
||||||
|
(INDEX (userFk))
|
||||||
|
ENGINE = MEMORY
|
||||||
|
SELECT requested, reserved, userFk
|
||||||
|
FROM stockBuyed
|
||||||
|
WHERE dated = vDated
|
||||||
|
AND userFk = vWorker;
|
||||||
|
|
||||||
|
DELETE FROM stockBuyed
|
||||||
|
WHERE dated = vDated
|
||||||
|
AND userFk = vWorker;
|
||||||
|
|
||||||
|
CALL item_calculateStock(vDated);
|
||||||
|
|
||||||
|
INSERT INTO stockBuyed(userFk, buyed, `dated`, reserved, requested, description)
|
||||||
|
SELECT it.workerFk,
|
||||||
|
SUM((ti.quantity / b.packing) * buy_getVolume(b.id)) / vc.palletM3 / 1000000,
|
||||||
|
vDated,
|
||||||
|
sb.reserved,
|
||||||
|
sb.requested,
|
||||||
|
u.name
|
||||||
|
FROM itemType it
|
||||||
|
JOIN item i ON i.typeFk = it.id
|
||||||
|
LEFT JOIN tmp.item ti ON ti.itemFk = i.id
|
||||||
|
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 buy b ON b.id = bu.buyFk
|
||||||
|
JOIN volumeConfig vc
|
||||||
|
JOIN account.`user` u ON u.id = it.workerFk
|
||||||
|
LEFT JOIN tStockBuyed sb ON sb.userFk = it.workerFk
|
||||||
|
WHERE ic.display
|
||||||
|
AND it.workerFk = vWorker;
|
||||||
|
|
||||||
|
SELECT b.entryFk Id_Entrada,
|
||||||
|
i.id Id_Article,
|
||||||
|
i.name Article,
|
||||||
|
ti.quantity Cantidad,
|
||||||
|
(ac.conversionCoefficient * (ti.quantity / b.packing) * buy_getVolume(b.id))
|
||||||
|
/ (vc.trolleyM3 * 1000000) buyed,
|
||||||
|
b.packagingFk id_cubo,
|
||||||
|
b.packing
|
||||||
|
FROM tmp.item ti
|
||||||
|
JOIN item i ON i.id = ti.itemFk
|
||||||
|
JOIN itemType it ON i.typeFk = it.id
|
||||||
|
JOIN itemCategory ic ON ic.id = it.categoryFk
|
||||||
|
JOIN worker w ON w.id = it.workerFk
|
||||||
|
JOIN auctionConfig ac
|
||||||
|
JOIN tmp.buyUltimate bu ON bu.itemFk = i.id
|
||||||
|
AND bu.warehouseFk = ac.warehouseFk
|
||||||
|
JOIN buy b ON b.id = bu.buyFk
|
||||||
|
JOIN volumeConfig vc
|
||||||
|
WHERE ic.display
|
||||||
|
AND w.id = vWorker;
|
||||||
|
|
||||||
|
DROP TEMPORARY TABLE tmp.buyUltimate,
|
||||||
|
tmp.item,
|
||||||
|
tStockBuyed;
|
||||||
|
END$$
|
||||||
|
DELIMITER ;
|
|
@ -0,0 +1,70 @@
|
||||||
|
DELIMITER $$
|
||||||
|
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`stockBuyed_add`(
|
||||||
|
vDated DATE
|
||||||
|
)
|
||||||
|
BEGIN
|
||||||
|
/**
|
||||||
|
* Inserta el volumen de compra por comprador
|
||||||
|
* en stockBuyed de acuerdo con la fecha.
|
||||||
|
*
|
||||||
|
* @param vDated Fecha de compra
|
||||||
|
*/
|
||||||
|
CREATE OR REPLACE TEMPORARY TABLE tStockBuyed
|
||||||
|
(INDEX (userFk))
|
||||||
|
ENGINE = MEMORY
|
||||||
|
SELECT requested, reserved, userFk
|
||||||
|
FROM stockBuyed
|
||||||
|
WHERE dated = vDated;
|
||||||
|
|
||||||
|
DELETE FROM stockBuyed WHERE dated = vDated;
|
||||||
|
|
||||||
|
CALL item_calculateStock(vDated);
|
||||||
|
|
||||||
|
INSERT INTO stockBuyed(userFk, buyed, `dated`, description)
|
||||||
|
SELECT it.workerFk,
|
||||||
|
SUM((ti.quantity / b.packing) * buy_getVolume(b.id)) / vc.palletM3 / 1000000,
|
||||||
|
vDated,
|
||||||
|
u.name
|
||||||
|
FROM itemType it
|
||||||
|
JOIN item i ON i.typeFk = it.id
|
||||||
|
LEFT JOIN tmp.item ti ON ti.itemFk = i.id
|
||||||
|
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 buy b ON b.id = bu.buyFk
|
||||||
|
JOIN volumeConfig vc
|
||||||
|
JOIN account.`user` u ON u.id = it.workerFk
|
||||||
|
JOIN workerDepartment wd ON wd.workerFk = u.id
|
||||||
|
JOIN department d ON d.id = wd.departmentFk
|
||||||
|
WHERE ic.display
|
||||||
|
AND d.code IN ('shopping', 'logistic', 'franceTeam')
|
||||||
|
GROUP BY it.workerFk;
|
||||||
|
|
||||||
|
INSERT INTO stockBuyed(buyed, dated, description)
|
||||||
|
SELECT SUM(ic.cm3 * ito.quantity / vc.palletM3 / 1000000),
|
||||||
|
vDated,
|
||||||
|
IF(c.code = 'ES', p.name, c.name) 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,
|
||||||
|
tStockBuyed;
|
||||||
|
END$$
|
||||||
|
DELIMITER ;
|
|
@ -9,7 +9,7 @@ BEGIN
|
||||||
JOIN vn.sale s ON s.ticketFk = t.id
|
JOIN vn.sale s ON s.ticketFk = t.id
|
||||||
JOIN vn.itemShelvingSale iss ON iss.saleFk = s.id
|
JOIN vn.itemShelvingSale iss ON iss.saleFk = s.id
|
||||||
JOIN vn.itemShelving ish ON ish.id = iss.itemShelvingFk
|
JOIN vn.itemShelving ish ON ish.id = iss.itemShelvingFk
|
||||||
JOIN vn.shelving sh ON sh.code = ish.shelvingFk
|
JOIN vn.shelving sh ON sh.id = ish.shelvingFk
|
||||||
JOIN vn.parking p ON p.id = sh.parkingFk
|
JOIN vn.parking p ON p.id = sh.parkingFk
|
||||||
WHERE p.sectorFk = vSectorFk
|
WHERE p.sectorFk = vSectorFk
|
||||||
) sub ON sub.id = td.ticketFk
|
) sub ON sub.id = td.ticketFk
|
||||||
|
|
|
@ -27,7 +27,7 @@ BEGIN
|
||||||
SUM(ish.visible) visible,
|
SUM(ish.visible) visible,
|
||||||
s.warehouseFk warehouseFk
|
s.warehouseFk warehouseFk
|
||||||
FROM itemShelving ish
|
FROM itemShelving ish
|
||||||
JOIN shelving sh ON sh.code = ish.shelvingFk
|
JOIN shelving sh ON sh.id = ish.shelvingFk
|
||||||
JOIN parking p ON p.id = sh.parkingFk
|
JOIN parking p ON p.id = sh.parkingFk
|
||||||
JOIN sector s ON s.id = p.sectorFk
|
JOIN sector s ON s.id = p.sectorFk
|
||||||
GROUP BY ish.itemFk,
|
GROUP BY ish.itemFk,
|
||||||
|
|
|
@ -28,7 +28,7 @@ BEGIN
|
||||||
SUM(ish.visible) visible,
|
SUM(ish.visible) visible,
|
||||||
s.warehouseFk warehouseFk
|
s.warehouseFk warehouseFk
|
||||||
FROM itemShelving ish
|
FROM itemShelving ish
|
||||||
JOIN shelving sh ON sh.code = ish.shelvingFk
|
JOIN shelving sh ON sh.id = ish.shelvingFk
|
||||||
JOIN parking p ON p.id = sh.parkingFk
|
JOIN parking p ON p.id = sh.parkingFk
|
||||||
JOIN sector s ON s.id = p.sectorFk
|
JOIN sector s ON s.id = p.sectorFk
|
||||||
GROUP BY ish.itemFk,
|
GROUP BY ish.itemFk,
|
||||||
|
|
|
@ -3,62 +3,83 @@ CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`ticket_splitItemPacki
|
||||||
vSelf INT,
|
vSelf INT,
|
||||||
vOriginalItemPackingTypeFk VARCHAR(1)
|
vOriginalItemPackingTypeFk VARCHAR(1)
|
||||||
)
|
)
|
||||||
proc:BEGIN
|
BEGIN
|
||||||
/**
|
/**
|
||||||
* Clona y reparte las líneas de ventas de un ticket en funcion del tipo de empaquetado.
|
* Clona y reparte las ventas de un ticket en funcion del tipo de empaquetado.
|
||||||
* Respeta el id de ticket original para el tipo de empaquetado propuesto.
|
* Respeta el id inicial para el tipo propuesto.
|
||||||
*
|
*
|
||||||
* @param vSelf Id ticket
|
* @param vSelf Id ticket
|
||||||
* @param vOriginalItemPackingTypeFk Tipo empaquetado que se mantiene el ticket original
|
* @param vOriginalItemPackingTypeFk Tipo para el que se reserva el número de ticket original
|
||||||
* @return table tmp.ticketIPT(ticketFk, itemPackingTypeFk)
|
* @return table tmp.ticketIPT(ticketFk, itemPackingTypeFk)
|
||||||
*/
|
*/
|
||||||
DECLARE vDone INT DEFAULT FALSE;
|
DECLARE vItemPackingTypeFk VARCHAR(1) DEFAULT 'H';
|
||||||
DECLARE vHasItemPackingType BOOL;
|
|
||||||
DECLARE vItemPackingTypeFk INT;
|
|
||||||
DECLARE vNewTicketFk INT;
|
DECLARE vNewTicketFk INT;
|
||||||
|
DECLARE vPackingTypesToSplit INT;
|
||||||
|
DECLARE vDone INT DEFAULT FALSE;
|
||||||
|
|
||||||
DECLARE vItemPackingTypes CURSOR FOR
|
DECLARE vSaleGroup CURSOR FOR
|
||||||
SELECT DISTINCT itemPackingTypeFk
|
SELECT itemPackingTypeFk
|
||||||
FROM tSalesToMove;
|
FROM tSaleGroup
|
||||||
|
WHERE itemPackingTypeFk IS NOT NULL
|
||||||
|
ORDER BY (itemPackingTypeFk = vOriginalItemPackingTypeFk) DESC;
|
||||||
|
|
||||||
DECLARE CONTINUE HANDLER FOR NOT FOUND SET vDone = TRUE;
|
DECLARE CONTINUE HANDLER FOR NOT FOUND SET vDone = TRUE;
|
||||||
|
|
||||||
SELECT COUNT(*) INTO vHasItemPackingType
|
START TRANSACTION;
|
||||||
FROM ticket t
|
|
||||||
JOIN sale s ON s.ticketFk = t.id
|
SELECT id
|
||||||
|
FROM sale
|
||||||
|
WHERE ticketFk = vSelf
|
||||||
|
AND NOT quantity
|
||||||
|
FOR UPDATE;
|
||||||
|
|
||||||
|
DELETE FROM sale
|
||||||
|
WHERE NOT quantity
|
||||||
|
AND ticketFk = vSelf;
|
||||||
|
|
||||||
|
CREATE OR REPLACE TEMPORARY TABLE tSale
|
||||||
|
(PRIMARY KEY (id))
|
||||||
|
ENGINE = MEMORY
|
||||||
|
SELECT s.id, i.itemPackingTypeFk, IFNULL(sv.litros, 0) litros
|
||||||
|
FROM sale s
|
||||||
JOIN item i ON i.id = s.itemFk
|
JOIN item i ON i.id = s.itemFk
|
||||||
WHERE t.id = vSelf
|
LEFT JOIN saleVolume sv ON sv.saleFk = s.id
|
||||||
AND i.itemPackingTypeFk = vOriginalItemPackingTypeFk;
|
WHERE s.ticketFk = vSelf;
|
||||||
|
|
||||||
|
CREATE OR REPLACE TEMPORARY TABLE tSaleGroup
|
||||||
|
ENGINE = MEMORY
|
||||||
|
SELECT itemPackingTypeFk, SUM(litros) totalLitros
|
||||||
|
FROM tSale
|
||||||
|
GROUP BY itemPackingTypeFk;
|
||||||
|
|
||||||
|
SELECT COUNT(*) INTO vPackingTypesToSplit
|
||||||
|
FROM tSaleGroup
|
||||||
|
WHERE itemPackingTypeFk IS NOT NULL;
|
||||||
|
|
||||||
CREATE OR REPLACE TEMPORARY TABLE tmp.ticketIPT(
|
CREATE OR REPLACE TEMPORARY TABLE tmp.ticketIPT(
|
||||||
ticketFk INT,
|
ticketFk INT,
|
||||||
itemPackingTypeFk VARCHAR(1)
|
itemPackingTypeFk VARCHAR(1)
|
||||||
) ENGINE=MEMORY
|
|
||||||
SELECT vSelf ticketFk, vOriginalItemPackingTypeFk itemPackingTypeFk;
|
|
||||||
|
|
||||||
IF NOT vHasItemPackingType THEN
|
|
||||||
LEAVE proc;
|
|
||||||
END IF;
|
|
||||||
|
|
||||||
CREATE OR REPLACE TEMPORARY TABLE tSalesToMove (
|
|
||||||
ticketFk INT,
|
|
||||||
saleFk INT,
|
|
||||||
itemPackingTypeFk INT
|
|
||||||
) ENGINE = MEMORY;
|
) ENGINE = MEMORY;
|
||||||
|
|
||||||
INSERT INTO tSalesToMove (saleFk, itemPackingTypeFk)
|
CASE vPackingTypesToSplit
|
||||||
SELECT s.id, i.itemPackingTypeFk
|
WHEN 0 THEN
|
||||||
FROM ticket t
|
INSERT INTO tmp.ticketIPT(ticketFk, itemPackingTypeFk)
|
||||||
JOIN sale s ON s.ticketFk = t.id
|
VALUES(vSelf, vItemPackingTypeFk);
|
||||||
JOIN item i ON i.id = s.itemFk
|
WHEN 1 THEN
|
||||||
WHERE t.id = vSelf
|
INSERT INTO tmp.ticketIPT(ticketFk, itemPackingTypeFk)
|
||||||
AND i.itemPackingTypeFk <> vOriginalItemPackingTypeFk;
|
SELECT vSelf, itemPackingTypeFk
|
||||||
|
FROM tSaleGroup
|
||||||
|
WHERE itemPackingTypeFk IS NOT NULL;
|
||||||
|
ELSE
|
||||||
|
OPEN vSaleGroup;
|
||||||
|
FETCH vSaleGroup INTO vItemPackingTypeFk;
|
||||||
|
|
||||||
OPEN vItemPackingTypes;
|
INSERT INTO tmp.ticketIPT(ticketFk, itemPackingTypeFk)
|
||||||
|
VALUES(vSelf, vItemPackingTypeFk);
|
||||||
|
|
||||||
l: LOOP
|
l: LOOP
|
||||||
SET vDone = FALSE;
|
SET vDone = FALSE;
|
||||||
FETCH vItemPackingTypes INTO vItemPackingTypeFk;
|
FETCH vSaleGroup INTO vItemPackingTypeFk;
|
||||||
|
|
||||||
IF vDone THEN
|
IF vDone THEN
|
||||||
LEAVE l;
|
LEAVE l;
|
||||||
|
@ -66,24 +87,40 @@ proc:BEGIN
|
||||||
|
|
||||||
CALL ticket_Clone(vSelf, vNewTicketFk);
|
CALL ticket_Clone(vSelf, vNewTicketFk);
|
||||||
|
|
||||||
UPDATE tSalesToMove
|
INSERT INTO tmp.ticketIPT(ticketFk, itemPackingTypeFk)
|
||||||
SET ticketFk = vNewTicketFk
|
VALUES(vNewTicketFk, vItemPackingTypeFk);
|
||||||
WHERE itemPackingTypeFk = vItemPackingTypeFk;
|
|
||||||
|
|
||||||
END LOOP;
|
END LOOP;
|
||||||
|
|
||||||
CLOSE vItemPackingTypes;
|
CLOSE vSaleGroup;
|
||||||
|
|
||||||
|
SELECT s.id
|
||||||
|
FROM sale s
|
||||||
|
JOIN tSale ts ON ts.id = s.id
|
||||||
|
JOIN tmp.ticketIPT t ON t.itemPackingTypeFk = ts.itemPackingTypeFk
|
||||||
|
FOR UPDATE;
|
||||||
|
|
||||||
UPDATE sale s
|
UPDATE sale s
|
||||||
JOIN tSalesToMove stm ON stm.saleFk = s.id
|
JOIN tSale ts ON ts.id = s.id
|
||||||
SET s.ticketFk = stm.ticketFk
|
JOIN tmp.ticketIPT t ON t.itemPackingTypeFk = ts.itemPackingTypeFk
|
||||||
WHERE stm.ticketFk;
|
SET s.ticketFk = t.ticketFk;
|
||||||
|
|
||||||
INSERT INTO tmp.ticketIPT (ticketFk, itemPackingTypeFk)
|
SELECT itemPackingTypeFk INTO vItemPackingTypeFk
|
||||||
SELECT ticketFk, itemPackingTypeFk
|
FROM tSaleGroup sg
|
||||||
FROM tSalesToMove
|
WHERE sg.itemPackingTypeFk IS NOT NULL
|
||||||
GROUP BY ticketFk;
|
ORDER BY sg.itemPackingTypeFk
|
||||||
|
LIMIT 1;
|
||||||
|
|
||||||
DROP TEMPORARY TABLE tSalesToMove;
|
UPDATE sale s
|
||||||
|
JOIN tSale ts ON ts.id = s.id
|
||||||
|
JOIN tmp.ticketIPT t ON t.itemPackingTypeFk = vItemPackingTypeFk
|
||||||
|
SET s.ticketFk = t.ticketFk
|
||||||
|
WHERE ts.itemPackingTypeFk IS NULL;
|
||||||
|
END CASE;
|
||||||
|
|
||||||
|
COMMIT;
|
||||||
|
|
||||||
|
DROP TEMPORARY TABLE
|
||||||
|
tSale,
|
||||||
|
tSaleGroup;
|
||||||
END$$
|
END$$
|
||||||
DELIMITER ;
|
DELIMITER ;
|
||||||
|
|
|
@ -8,5 +8,6 @@ BEGIN
|
||||||
FROM expedition e WHERE e.ticketFk = OLD.ticketFk and e.freightItemFk)
|
FROM expedition e WHERE e.ticketFk = OLD.ticketFk and e.freightItemFk)
|
||||||
WHERE t.id = OLD.ticketFk;
|
WHERE t.id = OLD.ticketFk;
|
||||||
|
|
||||||
|
CALL expedition_selfConsumptionPackaging(OLD.id, 'remove');
|
||||||
END$$
|
END$$
|
||||||
DELIMITER ;
|
DELIMITER ;
|
||||||
|
|
|
@ -15,7 +15,7 @@ FROM (
|
||||||
(
|
(
|
||||||
(
|
(
|
||||||
`vn`.`itemShelving` `ish`
|
`vn`.`itemShelving` `ish`
|
||||||
JOIN `vn`.`shelving` `sh` ON(`sh`.`code` = `ish`.`shelvingFk`)
|
JOIN `vn`.`shelving` `sh` ON(`sh`.`id` = `ish`.`shelvingFk`)
|
||||||
)
|
)
|
||||||
JOIN `vn`.`item` `i` ON(`i`.`id` = `ish`.`itemFk`)
|
JOIN `vn`.`item` `i` ON(`i`.`id` = `ish`.`itemFk`)
|
||||||
)
|
)
|
||||||
|
|
|
@ -18,7 +18,7 @@ FROM (
|
||||||
(
|
(
|
||||||
(
|
(
|
||||||
`vn`.`itemShelving` `ish`
|
`vn`.`itemShelving` `ish`
|
||||||
JOIN `vn`.`shelving` `sh` ON(`sh`.`code` = `ish`.`shelvingFk`)
|
JOIN `vn`.`shelving` `sh` ON(`sh`.`id` = `ish`.`shelvingFk`)
|
||||||
)
|
)
|
||||||
LEFT JOIN `vn`.`parking` `p` ON(`p`.`id` = `sh`.`parkingFk`)
|
LEFT JOIN `vn`.`parking` `p` ON(`p`.`id` = `sh`.`parkingFk`)
|
||||||
)
|
)
|
||||||
|
|
|
@ -13,7 +13,7 @@ FROM (
|
||||||
`vn`.`itemShelvingSale` `iss`
|
`vn`.`itemShelvingSale` `iss`
|
||||||
JOIN `vn`.`itemShelving` `ish` ON(`ish`.`id` = `iss`.`itemShelvingFk`)
|
JOIN `vn`.`itemShelving` `ish` ON(`ish`.`id` = `iss`.`itemShelvingFk`)
|
||||||
)
|
)
|
||||||
JOIN `vn`.`shelving` `sh` ON(`sh`.`code` = `ish`.`shelvingFk`)
|
JOIN `vn`.`shelving` `sh` ON(`sh`.`id` = `ish`.`shelvingFk`)
|
||||||
)
|
)
|
||||||
JOIN `vn`.`parking` `p` ON(`p`.`id` = `sh`.`parkingFk`)
|
JOIN `vn`.`parking` `p` ON(`p`.`id` = `sh`.`parkingFk`)
|
||||||
)
|
)
|
||||||
|
|
|
@ -21,7 +21,7 @@ FROM (
|
||||||
(
|
(
|
||||||
(
|
(
|
||||||
`vn`.`itemShelving` `ish`
|
`vn`.`itemShelving` `ish`
|
||||||
LEFT JOIN `vn`.`shelving` `sh` ON(`sh`.`code` = `ish`.`shelvingFk`)
|
LEFT JOIN `vn`.`shelving` `sh` ON(`sh`.`id` = `ish`.`shelvingFk`)
|
||||||
)
|
)
|
||||||
LEFT JOIN `vn`.`parking` `p` ON(`p`.`id` = `sh`.`parkingFk`)
|
LEFT JOIN `vn`.`parking` `p` ON(`p`.`id` = `sh`.`parkingFk`)
|
||||||
)
|
)
|
||||||
|
|
|
@ -19,7 +19,7 @@ FROM (
|
||||||
(
|
(
|
||||||
(
|
(
|
||||||
`vn`.`itemShelving` `ish`
|
`vn`.`itemShelving` `ish`
|
||||||
JOIN `vn`.`shelving` `sh` ON(`sh`.`code` = `ish`.`shelvingFk`)
|
JOIN `vn`.`shelving` `sh` ON(`sh`.`id` = `ish`.`shelvingFk`)
|
||||||
)
|
)
|
||||||
JOIN `vn`.`parking` `p` ON(`p`.`id` = `sh`.`parkingFk`)
|
JOIN `vn`.`parking` `p` ON(`p`.`id` = `sh`.`parkingFk`)
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,3 +1,2 @@
|
||||||
UPDATE vn.sale
|
-- Debido a que tardaba mucho en la subida a master, se ha creado una nueva versión para que el proceso no se vea afectado y se ejecute por la noche.
|
||||||
SET originalQuantity = quantity
|
-- Se crea de nuevo en la versión 11344-grayBamboo
|
||||||
WHERE originalQuantity IS NULL
|
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
ALTER TABLE vn.autonomy MODIFY COLUMN isUeeMember tinyint(1) DEFAULT FALSE NOT NULL;
|
|
|
@ -0,0 +1,71 @@
|
||||||
|
CREATE TABLE IF NOT EXISTS `vn`.`itemTextureTag` (
|
||||||
|
`id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||||
|
`name` varchar(50) DEFAULT NULL,
|
||||||
|
PRIMARY KEY (`id`),
|
||||||
|
UNIQUE KEY `name_UNIQUE` (`name`)
|
||||||
|
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT
|
||||||
|
CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;
|
||||||
|
|
||||||
|
INSERT IGNORE INTO `vn`.`itemTextureTag` (`name`) VALUES ('Natural y encerado');
|
||||||
|
INSERT IGNORE INTO `vn`.`itemTextureTag` (`name`) VALUES ('Natural y esponjoso');
|
||||||
|
INSERT IGNORE INTO `vn`.`itemTextureTag` (`name`) VALUES ('Natural y foam');
|
||||||
|
INSERT IGNORE INTO `vn`.`itemTextureTag` (`name`) VALUES ('Natural y látex');
|
||||||
|
INSERT IGNORE INTO `vn`.`itemTextureTag` (`name`) VALUES ('Arenosa');
|
||||||
|
INSERT IGNORE INTO `vn`.`itemTextureTag` (`name`) VALUES ('Aterciopelado');
|
||||||
|
INSERT IGNORE INTO `vn`.`itemTextureTag` (`name`) VALUES ('Engomado');
|
||||||
|
INSERT IGNORE INTO `vn`.`itemTextureTag` (`name`) VALUES ('Flocado');
|
||||||
|
INSERT IGNORE INTO `vn`.`itemTextureTag` (`name`) VALUES ('Foam');
|
||||||
|
INSERT IGNORE INTO `vn`.`itemTextureTag` (`name`) VALUES ('Gasa');
|
||||||
|
INSERT IGNORE INTO `vn`.`itemTextureTag` (`name`) VALUES ('Goma');
|
||||||
|
INSERT IGNORE INTO `vn`.`itemTextureTag` (`name`) VALUES ('Látex');
|
||||||
|
INSERT IGNORE INTO `vn`.`itemTextureTag` (`name`) VALUES ('Latón');
|
||||||
|
INSERT IGNORE INTO `vn`.`itemTextureTag` (`name`) VALUES ('Mate');
|
||||||
|
INSERT IGNORE INTO `vn`.`itemTextureTag` (`name`) VALUES ('Metálico');
|
||||||
|
INSERT IGNORE INTO `vn`.`itemTextureTag` (`name`) VALUES ('Natural');
|
||||||
|
INSERT IGNORE INTO `vn`.`itemTextureTag` (`name`) VALUES ('Natural y engomado');
|
||||||
|
INSERT IGNORE INTO `vn`.`itemTextureTag` (`name`) VALUES ('Plastificado');
|
||||||
|
INSERT IGNORE INTO `vn`.`itemTextureTag` (`name`) VALUES ('Plastificado y engomado');
|
||||||
|
INSERT IGNORE INTO `vn`.`itemTextureTag` (`name`) VALUES ('Plastificado y rugoso');
|
||||||
|
INSERT IGNORE INTO `vn`.`itemTextureTag` (`name`) VALUES ('Pluma');
|
||||||
|
INSERT IGNORE INTO `vn`.`itemTextureTag` (`name`) VALUES ('Plástico');
|
||||||
|
INSERT IGNORE INTO `vn`.`itemTextureTag` (`name`) VALUES ('Plástico engomado');
|
||||||
|
INSERT IGNORE INTO `vn`.`itemTextureTag` (`name`) VALUES ('Poliéster');
|
||||||
|
INSERT IGNORE INTO `vn`.`itemTextureTag` (`name`) VALUES ('Poliéster texturizado');
|
||||||
|
INSERT IGNORE INTO `vn`.`itemTextureTag` (`name`) VALUES ('Rugoso');
|
||||||
|
INSERT IGNORE INTO `vn`.`itemTextureTag` (`name`) VALUES ('Rígido');
|
||||||
|
INSERT IGNORE INTO `vn`.`itemTextureTag` (`name`) VALUES ('Seminatural');
|
||||||
|
INSERT IGNORE INTO `vn`.`itemTextureTag` (`name`) VALUES ('Silicona');
|
||||||
|
INSERT IGNORE INTO `vn`.`itemTextureTag` (`name`) VALUES ('Suave');
|
||||||
|
INSERT IGNORE INTO `vn`.`itemTextureTag` (`name`) VALUES ('Tela');
|
||||||
|
INSERT IGNORE INTO `vn`.`itemTextureTag` (`name`) VALUES ('Tela con brillo');
|
||||||
|
INSERT IGNORE INTO `vn`.`itemTextureTag` (`name`) VALUES ('Tela con texturas');
|
||||||
|
INSERT IGNORE INTO `vn`.`itemTextureTag` (`name`) VALUES ('Tela dura');
|
||||||
|
INSERT IGNORE INTO `vn`.`itemTextureTag` (`name`) VALUES ('Tela engomada');
|
||||||
|
INSERT IGNORE INTO `vn`.`itemTextureTag` (`name`) VALUES ('Tela escarchada');
|
||||||
|
INSERT IGNORE INTO `vn`.`itemTextureTag` (`name`) VALUES ('Tela flocada');
|
||||||
|
INSERT IGNORE INTO `vn`.`itemTextureTag` (`name`) VALUES ('Tela flocada engomada');
|
||||||
|
INSERT IGNORE INTO `vn`.`itemTextureTag` (`name`) VALUES ('Tela foam');
|
||||||
|
INSERT IGNORE INTO `vn`.`itemTextureTag` (`name`) VALUES ('Tela micro peach');
|
||||||
|
INSERT IGNORE INTO `vn`.`itemTextureTag` (`name`) VALUES ('Tela plastificada');
|
||||||
|
INSERT IGNORE INTO `vn`.`itemTextureTag` (`name`) VALUES ('Tela plástico engomado');
|
||||||
|
INSERT IGNORE INTO `vn`.`itemTextureTag` (`name`) VALUES ('Tela poliéster');
|
||||||
|
INSERT IGNORE INTO `vn`.`itemTextureTag` (`name`) VALUES ('Tela PVC');
|
||||||
|
INSERT IGNORE INTO `vn`.`itemTextureTag` (`name`) VALUES ('Tela ratan');
|
||||||
|
INSERT IGNORE INTO `vn`.`itemTextureTag` (`name`) VALUES ('Tela rigida');
|
||||||
|
INSERT IGNORE INTO `vn`.`itemTextureTag` (`name`) VALUES ('Tela rugosa');
|
||||||
|
INSERT IGNORE INTO `vn`.`itemTextureTag` (`name`) VALUES ('Tela rústica');
|
||||||
|
INSERT IGNORE INTO `vn`.`itemTextureTag` (`name`) VALUES ('Tela sintética');
|
||||||
|
INSERT IGNORE INTO `vn`.`itemTextureTag` (`name`) VALUES ('Tela y cristal');
|
||||||
|
INSERT IGNORE INTO `vn`.`itemTextureTag` (`name`) VALUES ('Tela y foam');
|
||||||
|
INSERT IGNORE INTO `vn`.`itemTextureTag` (`name`) VALUES ('Tela y goma');
|
||||||
|
INSERT IGNORE INTO `vn`.`itemTextureTag` (`name`) VALUES ('Tela y látex');
|
||||||
|
INSERT IGNORE INTO `vn`.`itemTextureTag` (`name`) VALUES ('Tela y madera');
|
||||||
|
INSERT IGNORE INTO `vn`.`itemTextureTag` (`name`) VALUES ('Tela y plástico');
|
||||||
|
INSERT IGNORE INTO `vn`.`itemTextureTag` (`name`) VALUES ('Tela y seco');
|
||||||
|
|
||||||
|
UPDATE vn.tag
|
||||||
|
SET isFree=0,
|
||||||
|
sourceTable='itemTextureTag'
|
||||||
|
WHERE name= 'Textura';
|
||||||
|
|
||||||
|
GRANT SELECT, UPDATE, INSERT, DELETE ON TABLE vn.itemTextureTag TO logisticAssist;
|
|
@ -2,6 +2,6 @@ DELETE FROM vn.report
|
||||||
WHERE `name` = 'LabelItemQr';
|
WHERE `name` = 'LabelItemQr';
|
||||||
|
|
||||||
UPDATE vn.report
|
UPDATE vn.report
|
||||||
SET `method` = 'Entries/{id}/{itemType}/buy-label',
|
SET `method` = 'Entries/{id}/{labelType}/buy-label',
|
||||||
`name` = 'LabelBuy'
|
`name` = 'LabelBuy'
|
||||||
WHERE `name` = 'LabelItemBarcode';
|
WHERE `name` = 'LabelItemBarcode';
|
||||||
|
|
|
@ -0,0 +1,16 @@
|
||||||
|
CREATE TABLE IF NOT EXISTS vn.saySimpleCountry(
|
||||||
|
countryFk MEDIUMINT(8) UNSIGNED,
|
||||||
|
channel INT(4) COMMENT 'channel de whatsapp de saySimple',
|
||||||
|
PRIMARY KEY (countryFk),
|
||||||
|
CONSTRAINT `saySimpleCountry_FK` FOREIGN KEY (`countryFk`) REFERENCES vn.country (`id`) ON UPDATE CASCADE
|
||||||
|
);
|
||||||
|
|
||||||
|
CREATE TABLE IF NOT EXISTS vn.saySimpleConfig(
|
||||||
|
id INT AUTO_INCREMENT PRIMARY KEY,
|
||||||
|
url VARCHAR(255) NOT NULL
|
||||||
|
);
|
||||||
|
|
||||||
|
INSERT IGNORE INTO vn.saySimpleCountry (countryFk, channel)
|
||||||
|
VALUES (19, 1169),
|
||||||
|
(8, 1183),
|
||||||
|
(NULL, 1320);
|
|
@ -0,0 +1,2 @@
|
||||||
|
ALTER TABLE vn.supplier ADD companySize ENUM('small', 'medium', 'big') NULL;
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
DELETE FROM salix.ACL
|
||||||
|
WHERE property IN ('cmrs', 'cmr', 'downloadCmrsZip')
|
||||||
|
AND model = 'Route';
|
||||||
|
|
||||||
|
INSERT INTO salix.ACL (model,property,principalId)
|
||||||
|
VALUES ('Cmr','filter','production'),
|
||||||
|
('Cmr','downloadZip','production'),
|
||||||
|
('Cmr','print','production')
|
|
@ -0,0 +1 @@
|
||||||
|
ALTER TABLE vn.productionConfig DROP COLUMN hasNewLabelMrwMethod;
|
|
@ -0,0 +1,2 @@
|
||||||
|
-- Place your SQL code here
|
||||||
|
RENAME TABLE vn.stockBuyed__ TO vn.stockBuyed;
|
|
@ -0,0 +1 @@
|
||||||
|
ALTER TABLE vn.dua ADD comment TEXT DEFAULT NULL NULL;
|
|
@ -0,0 +1,6 @@
|
||||||
|
CREATE OR REPLACE TEMPORARY TABLE tmp.tItemShelving
|
||||||
|
(PRIMARY KEY (id))
|
||||||
|
ENGINE = MEMORY
|
||||||
|
SELECT ish.id, s.id shelvingFk
|
||||||
|
FROM vn.itemShelving ish
|
||||||
|
JOIN vn.shelving s ON s.code = ish.shelvingFk COLLATE utf8mb3_unicode_ci;
|
|
@ -0,0 +1,2 @@
|
||||||
|
ALTER TABLE vn.itemShelving DROP FOREIGN KEY itemShelving_fk2,
|
||||||
|
MODIFY COLUMN shelvingFk int(11) NOT NULL;
|
|
@ -0,0 +1,3 @@
|
||||||
|
UPDATE vn.itemShelving ish
|
||||||
|
JOIN tmp.tItemShelving tish ON tish.id = ish.id
|
||||||
|
SET ish.shelvingFk = tish.shelvingFk;
|
|
@ -0,0 +1,4 @@
|
||||||
|
ALTER TABLE vn.itemShelving
|
||||||
|
ADD CONSTRAINT itemShelving_shelving_FK FOREIGN KEY (shelvingFk) REFERENCES vn.shelving(id)
|
||||||
|
ON DELETE RESTRICT
|
||||||
|
ON UPDATE CASCADE;
|
|
@ -0,0 +1,8 @@
|
||||||
|
/*
|
||||||
|
CREATE OR REPLACE TEMPORARY TABLE tmp.tItemShelvingLog
|
||||||
|
(PRIMARY KEY (id))
|
||||||
|
ENGINE = MEMORY
|
||||||
|
SELECT ishl.id, s.id shelvingFk
|
||||||
|
FROM vn.itemShelvingLog ishl
|
||||||
|
JOIN vn.shelving s ON s.code = ishl.shelvingFk COLLATE utf8mb3_unicode_ci;
|
||||||
|
*/
|
|
@ -0,0 +1 @@
|
||||||
|
-- ALTER TABLE vn.itemShelvingLog MODIFY COLUMN shelvingFk int(11) NOT NULL;
|
|
@ -0,0 +1,7 @@
|
||||||
|
/*
|
||||||
|
UPDATE vn.itemShelvingLog ishl
|
||||||
|
JOIN tmp.tItemShelvingLog tishl ON tishl.id = ishl.id
|
||||||
|
SET ishl.shelvingFk = tishl.shelvingFk;
|
||||||
|
|
||||||
|
DROP TEMPORARY TABLE tmp.tItemShelvingLog;
|
||||||
|
*/
|
|
@ -0,0 +1,9 @@
|
||||||
|
INSERT INTO salix.ACL (model, property, accessType, principalId)
|
||||||
|
VALUES ('Collection', 'create', 'WRITE', 'productionBoss'),
|
||||||
|
('Collection', 'upsert', 'WRITE', 'productionBoss'),
|
||||||
|
('Collection', 'replaceById', 'WRITE', 'productionBoss'),
|
||||||
|
('Collection', 'updateAll', 'WRITE', 'productionBoss'),
|
||||||
|
('Collection', 'updateAttributes', 'WRITE', 'productionBoss'),
|
||||||
|
('Collection', 'deleteById', 'WRITE', 'productionBoss'),
|
||||||
|
('Collection', 'destroyAll', 'WRITE', 'productionBoss'),
|
||||||
|
('Collection', 'destroyById', 'WRITE', 'productionBoss');
|
|
@ -0,0 +1,3 @@
|
||||||
|
UPDATE vn.sale
|
||||||
|
SET originalQuantity = quantity
|
||||||
|
WHERE originalQuantity IS NULL
|
|
@ -0,0 +1,2 @@
|
||||||
|
ALTER TABLE account.user CHANGE recoverPass recoverPass__ tinyint(3) unsigned NOT NULL DEFAULT 1 COMMENT '@deprecated 2024-11-13';
|
||||||
|
ALTER TABLE account.user CHANGE sync sync__ tinyint(4) NOT NULL DEFAULT 0 COMMENT '@deprecated 2024-11-13';
|
|
@ -0,0 +1,9 @@
|
||||||
|
DROP TABLE IF EXISTS vn.saySimpleConfig;
|
||||||
|
|
||||||
|
CREATE TABLE vn.saySimpleConfig(
|
||||||
|
id INT AUTO_INCREMENT PRIMARY KEY,
|
||||||
|
url VARCHAR(255) NOT NULL,
|
||||||
|
defaultChannel VARCHAR(128)
|
||||||
|
);
|
||||||
|
|
||||||
|
ALTER TABLE vn.saySimpleCountry MODIFY COLUMN channel VARCHAR(128);
|
|
@ -0,0 +1,2 @@
|
||||||
|
ALTER TABLE vn.clientObservation MODIFY COLUMN observationTypeFk tinyint(3) unsigned DEFAULT 4 NOT NULL;
|
||||||
|
UPDATE vn.clientObservation SET observationTypeFk=4 WHERE observationTypeFk=0;
|
|
@ -0,0 +1,2 @@
|
||||||
|
ALTER TABLE vn.shelvingLog
|
||||||
|
MODIFY COLUMN changedModel enum('Shelving', 'ItemShelving') CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT 'Shelving' NOT NULL;
|
|
@ -1,133 +0,0 @@
|
||||||
import selectors from '../../helpers/selectors.js';
|
|
||||||
import getBrowser from '../../helpers/puppeteer';
|
|
||||||
|
|
||||||
describe('Item summary path', () => {
|
|
||||||
let browser;
|
|
||||||
let page;
|
|
||||||
beforeAll(async() => {
|
|
||||||
browser = await getBrowser();
|
|
||||||
page = browser.page;
|
|
||||||
await page.loginAndModule('employee', 'item');
|
|
||||||
});
|
|
||||||
|
|
||||||
afterAll(async() => {
|
|
||||||
await browser.close();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should search for an item', async() => {
|
|
||||||
await page.doSearch('Ranged weapon');
|
|
||||||
const resultsCount = await page.countElement(selectors.itemsIndex.searchResult);
|
|
||||||
|
|
||||||
await page.waitForTextInElement(selectors.itemsIndex.firstSearchResult, 'Ranged weapon');
|
|
||||||
await page.waitToClick(selectors.itemsIndex.firstResultPreviewButton);
|
|
||||||
const isVisible = await page.isVisible(selectors.itemSummary.basicData);
|
|
||||||
|
|
||||||
expect(resultsCount).toBe(4);
|
|
||||||
expect(isVisible).toBeTruthy();
|
|
||||||
});
|
|
||||||
|
|
||||||
it(`should check the item summary preview shows fields from basic data`, async() => {
|
|
||||||
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 200cm');
|
|
||||||
});
|
|
||||||
|
|
||||||
it(`should check the item summary preview shows fields from tags`, async() => {
|
|
||||||
await page.waitForTextInElement(selectors.itemSummary.tags, 'Brown');
|
|
||||||
const result = await page.waitToGetProperty(selectors.itemSummary.tags, 'innerText');
|
|
||||||
|
|
||||||
expect(result).toContain('Brown');
|
|
||||||
});
|
|
||||||
|
|
||||||
it(`should check the item summary preview shows fields from botanical`, async() => {
|
|
||||||
await page.waitForTextInElement(selectors.itemSummary.botanical, 'Abelia');
|
|
||||||
const result = await page.waitToGetProperty(selectors.itemSummary.botanical, 'innerText');
|
|
||||||
|
|
||||||
expect(result).toContain('Abelia');
|
|
||||||
});
|
|
||||||
|
|
||||||
it(`should check the item summary preview shows fields from barcode`, async() => {
|
|
||||||
await page.waitForTextInElement(selectors.itemSummary.barcode, '1');
|
|
||||||
const result = await page.waitToGetProperty(selectors.itemSummary.barcode, 'innerText');
|
|
||||||
|
|
||||||
expect(result).toContain('1');
|
|
||||||
});
|
|
||||||
|
|
||||||
it(`should close the summary popup`, async() => {
|
|
||||||
await page.closePopup();
|
|
||||||
await page.waitForSelector(selectors.itemSummary.basicData, {hidden: true});
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should search for other item', async() => {
|
|
||||||
await page.doSearch('Melee Reinforced');
|
|
||||||
const resultsCount = await page.countElement(selectors.itemsIndex.searchResult);
|
|
||||||
|
|
||||||
await page.waitToClick(selectors.itemsIndex.firstResultPreviewButton);
|
|
||||||
await page.waitForSelector(selectors.itemSummary.basicData, {visible: true});
|
|
||||||
|
|
||||||
expect(resultsCount).toBe(3);
|
|
||||||
});
|
|
||||||
|
|
||||||
it(`should now check the item summary preview shows fields from basic data`, async() => {
|
|
||||||
await page.waitForTextInElement(selectors.itemSummary.basicData, 'Melee Reinforced weapon combat fist 15cm');
|
|
||||||
const result = await page.waitToGetProperty(selectors.itemSummary.basicData, 'innerText');
|
|
||||||
|
|
||||||
expect(result).toContain('Melee Reinforced weapon combat fist 15cm');
|
|
||||||
});
|
|
||||||
|
|
||||||
it(`should now check the item summary preview shows fields from tags`, async() => {
|
|
||||||
await page.waitForTextInElement(selectors.itemSummary.tags, 'Silver');
|
|
||||||
const result = await page.waitToGetProperty(selectors.itemSummary.tags, 'innerText');
|
|
||||||
|
|
||||||
expect(result).toContain('Silver');
|
|
||||||
});
|
|
||||||
|
|
||||||
it(`should now check the item summary preview shows fields from botanical`, async() => {
|
|
||||||
await page.waitForTextInElement(selectors.itemSummary.botanical, '-');
|
|
||||||
const result = await page.waitToGetProperty(selectors.itemSummary.botanical, 'innerText');
|
|
||||||
|
|
||||||
expect(result).toContain('-');
|
|
||||||
});
|
|
||||||
|
|
||||||
it(`should now close the summary popup`, async() => {
|
|
||||||
await page.closePopup();
|
|
||||||
await page.waitForSelector(selectors.itemSummary.basicData, {hidden: true});
|
|
||||||
});
|
|
||||||
|
|
||||||
it(`should navigate to one of the items detailed section`, async() => {
|
|
||||||
await page.accessToSearchResult('Melee weapon combat fist 15cm');
|
|
||||||
await page.waitForState('item.card.summary');
|
|
||||||
});
|
|
||||||
|
|
||||||
it(`should check the descritor edit button is not visible for employee`, async() => {
|
|
||||||
const visibleButton = await page.isVisible(selectors.itemDescriptor.editButton);
|
|
||||||
|
|
||||||
expect(visibleButton).toBeFalsy();
|
|
||||||
});
|
|
||||||
|
|
||||||
it(`should check the item summary shows fields from basic data section`, async() => {
|
|
||||||
await page.waitForTextInElement(selectors.itemSummary.basicData, 'Melee weapon combat fist 15cm');
|
|
||||||
const result = await page.waitToGetProperty(selectors.itemSummary.basicData, 'innerText');
|
|
||||||
|
|
||||||
expect(result).toContain('Melee weapon combat fist 15cm');
|
|
||||||
});
|
|
||||||
|
|
||||||
it(`should check the item summary shows fields from tags section`, async() => {
|
|
||||||
const result = await page.waitToGetProperty(selectors.itemSummary.tags, 'innerText');
|
|
||||||
|
|
||||||
expect(result).toContain('Silver');
|
|
||||||
});
|
|
||||||
|
|
||||||
it(`should check the item summary shows fields from botanical section`, async() => {
|
|
||||||
const result = await page.waitToGetProperty(selectors.itemSummary.botanical, 'innerText');
|
|
||||||
|
|
||||||
expect(result).toContain('procera');
|
|
||||||
});
|
|
||||||
|
|
||||||
it(`should check the item summary shows fields from barcodes section`, async() => {
|
|
||||||
const result = await page.waitToGetProperty(selectors.itemSummary.barcode, 'innerText');
|
|
||||||
|
|
||||||
expect(result).toContain('4');
|
|
||||||
});
|
|
||||||
});
|
|
|
@ -1,64 +0,0 @@
|
||||||
import getBrowser from '../../helpers/puppeteer';
|
|
||||||
|
|
||||||
const $ = {
|
|
||||||
form: 'vn-item-basic-data form',
|
|
||||||
intrastatForm: '.vn-dialog.shown form',
|
|
||||||
newIntrastatButton: 'vn-item-basic-data vn-icon-button[vn-tooltip="New intrastat"] > button'
|
|
||||||
};
|
|
||||||
|
|
||||||
describe('Item Edit basic data path', () => {
|
|
||||||
let browser;
|
|
||||||
let page;
|
|
||||||
|
|
||||||
beforeAll(async() => {
|
|
||||||
browser = await getBrowser();
|
|
||||||
page = browser.page;
|
|
||||||
await page.loginAndModule('buyer', 'item');
|
|
||||||
await page.accessToSearchResult('Melee weapon combat fist 15cm');
|
|
||||||
});
|
|
||||||
|
|
||||||
beforeEach(async() => {
|
|
||||||
await page.accessToSection('item.card.basicData');
|
|
||||||
});
|
|
||||||
|
|
||||||
afterAll(async() => {
|
|
||||||
await browser.close();
|
|
||||||
});
|
|
||||||
|
|
||||||
it(`should edit the item basic data and confirm the item data was edited`, async() => {
|
|
||||||
const values = {
|
|
||||||
type: 'Anthurium',
|
|
||||||
intrastat: 'Coral y materiales similares',
|
|
||||||
relevancy: 1,
|
|
||||||
generic: 'Pallet',
|
|
||||||
isActive: false,
|
|
||||||
priceInKg: true,
|
|
||||||
isFragile: true,
|
|
||||||
packingOut: 5
|
|
||||||
};
|
|
||||||
|
|
||||||
const message = await page.sendForm($.form, values);
|
|
||||||
await page.reloadSection('item.card.basicData');
|
|
||||||
const formValues = await page.fetchForm($.form, Object.keys(values));
|
|
||||||
|
|
||||||
expect(message.isSuccess).toBeTrue();
|
|
||||||
expect(formValues).toEqual(values);
|
|
||||||
});
|
|
||||||
|
|
||||||
it(`should create a new intrastat and save it`, async() => {
|
|
||||||
await page.click($.newIntrastatButton);
|
|
||||||
await page.waitForSelector($.intrastatForm);
|
|
||||||
await page.fillForm($.intrastatForm, {
|
|
||||||
id: '588420239',
|
|
||||||
description: 'Tropical Flowers'
|
|
||||||
});
|
|
||||||
await page.respondToDialog('accept');
|
|
||||||
|
|
||||||
const message = await page.sendForm($.form);
|
|
||||||
await page.reloadSection('item.card.basicData');
|
|
||||||
const formValues = await page.fetchForm($.form, ['intrastat']);
|
|
||||||
|
|
||||||
expect(message.isSuccess).toBeTrue();
|
|
||||||
expect(formValues).toEqual({intrastat: 'Tropical Flowers'});
|
|
||||||
});
|
|
||||||
});
|
|
|
@ -1,48 +0,0 @@
|
||||||
import selectors from '../../helpers/selectors.js';
|
|
||||||
import getBrowser from '../../helpers/puppeteer';
|
|
||||||
|
|
||||||
describe('Item edit tax path', () => {
|
|
||||||
let browser;
|
|
||||||
let page;
|
|
||||||
beforeAll(async() => {
|
|
||||||
browser = await getBrowser();
|
|
||||||
page = browser.page;
|
|
||||||
await page.loginAndModule('buyer', 'item');
|
|
||||||
await page.accessToSearchResult('Ranged weapon longbow 200cm');
|
|
||||||
await page.accessToSection('item.card.tax');
|
|
||||||
});
|
|
||||||
|
|
||||||
afterAll(async() => {
|
|
||||||
await browser.close();
|
|
||||||
});
|
|
||||||
|
|
||||||
it(`should add the item tax to all countries`, async() => {
|
|
||||||
await page.autocompleteSearch(selectors.itemTax.firstClass, 'General VAT');
|
|
||||||
await page.autocompleteSearch(selectors.itemTax.secondClass, 'General VAT');
|
|
||||||
await page.waitToClick(selectors.itemTax.submitTaxButton);
|
|
||||||
const message = await page.waitForSnackbar();
|
|
||||||
|
|
||||||
expect(message.text).toContain('Data saved!');
|
|
||||||
});
|
|
||||||
|
|
||||||
it(`should confirm the first item tax class was edited`, async() => {
|
|
||||||
await page.reloadSection('item.card.tax');
|
|
||||||
const firstVatType = await page.waitToGetProperty(selectors.itemTax.firstClass, 'value');
|
|
||||||
|
|
||||||
expect(firstVatType).toEqual('General VAT');
|
|
||||||
});
|
|
||||||
|
|
||||||
it(`should confirm the second item tax class was edited`, async() => {
|
|
||||||
const secondVatType = await page
|
|
||||||
.waitToGetProperty(selectors.itemTax.secondClass, 'value');
|
|
||||||
|
|
||||||
expect(secondVatType).toEqual('General VAT');
|
|
||||||
});
|
|
||||||
|
|
||||||
it(`should edit the first class without saving the form`, async() => {
|
|
||||||
await page.autocompleteSearch(selectors.itemTax.firstClass, 'Reduced VAT');
|
|
||||||
const firstVatType = await page.waitToGetProperty(selectors.itemTax.firstClass, 'value');
|
|
||||||
|
|
||||||
expect(firstVatType).toEqual('Reduced VAT');
|
|
||||||
});
|
|
||||||
});
|
|
|
@ -1,79 +0,0 @@
|
||||||
import selectors from '../../helpers/selectors.js';
|
|
||||||
import getBrowser from '../../helpers/puppeteer';
|
|
||||||
|
|
||||||
describe('Item create tags path', () => {
|
|
||||||
let browser;
|
|
||||||
let page;
|
|
||||||
beforeAll(async() => {
|
|
||||||
browser = await getBrowser();
|
|
||||||
page = browser.page;
|
|
||||||
await page.loginAndModule('buyer', 'item');
|
|
||||||
await page.accessToSearchResult('Ranged weapon longbow 200cm');
|
|
||||||
await page.accessToSection('item.card.tags');
|
|
||||||
});
|
|
||||||
|
|
||||||
afterAll(async() => {
|
|
||||||
await browser.close();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should create a new tag and delete a former one', async() => {
|
|
||||||
await page.waitToClick(selectors.itemTags.fourthRemoveTagButton);
|
|
||||||
await page.waitToClick(selectors.itemTags.addItemTagButton);
|
|
||||||
await page.autocompleteSearch(selectors.itemTags.seventhTag, 'Ancho de la base');
|
|
||||||
await page.write(selectors.itemTags.seventhValue, '50');
|
|
||||||
await page.clearInput(selectors.itemTags.seventhRelevancy);
|
|
||||||
await page.write(selectors.itemTags.seventhRelevancy, '4');
|
|
||||||
await page.waitToClick(selectors.itemTags.submitItemTagsButton);
|
|
||||||
const message = await page.waitForSnackbar();
|
|
||||||
|
|
||||||
expect(message.text).toContain('Data saved!');
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should confirm the fourth row data is the expected one', async() => {
|
|
||||||
await page.reloadSection('item.card.tags');
|
|
||||||
await page.waitForSelector('vn-item-tags');
|
|
||||||
let result = await page.waitToGetProperty(selectors.itemTags.fourthTag, 'value');
|
|
||||||
|
|
||||||
expect(result).toEqual('Ancho de la base');
|
|
||||||
|
|
||||||
result = await page
|
|
||||||
.waitToGetProperty(selectors.itemTags.fourthValue, 'value');
|
|
||||||
|
|
||||||
expect(result).toEqual('50');
|
|
||||||
|
|
||||||
result = await page
|
|
||||||
.waitToGetProperty(selectors.itemTags.fourthRelevancy, 'value');
|
|
||||||
|
|
||||||
expect(result).toEqual('4');
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should confirm the fifth row data is the expected one', async() => {
|
|
||||||
let tag = await page
|
|
||||||
.waitToGetProperty(selectors.itemTags.fifthTag, 'value');
|
|
||||||
|
|
||||||
let value = await page
|
|
||||||
.waitToGetProperty(selectors.itemTags.fifthValue, 'value');
|
|
||||||
|
|
||||||
let relevancy = await page
|
|
||||||
.waitToGetProperty(selectors.itemTags.fifthRelevancy, 'value');
|
|
||||||
|
|
||||||
expect(tag).toEqual('Color');
|
|
||||||
expect(value).toEqual('Brown');
|
|
||||||
expect(relevancy).toEqual('5');
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should confirm the sixth row data is the expected one', async() => {
|
|
||||||
let tag = await page
|
|
||||||
.waitToGetProperty(selectors.itemTags.sixthTag, 'value');
|
|
||||||
|
|
||||||
let value = await page
|
|
||||||
.waitToGetProperty(selectors.itemTags.sixthValue, 'value');
|
|
||||||
|
|
||||||
let relevancy = await page
|
|
||||||
.waitToGetProperty(selectors.itemTags.sixthRelevancy, 'value');
|
|
||||||
|
|
||||||
expect(tag).toEqual('Categoria');
|
|
||||||
expect(value).toEqual('+1 precission');
|
|
||||||
expect(relevancy).toEqual('6');
|
|
||||||
});
|
|
||||||
});
|
|
|
@ -1,66 +0,0 @@
|
||||||
import selectors from '../../helpers/selectors.js';
|
|
||||||
import getBrowser from '../../helpers/puppeteer';
|
|
||||||
|
|
||||||
describe('Item Create botanical path', () => {
|
|
||||||
let browser;
|
|
||||||
let page;
|
|
||||||
beforeAll(async() => {
|
|
||||||
browser = await getBrowser();
|
|
||||||
page = browser.page;
|
|
||||||
await page.loginAndModule('buyer', 'item');
|
|
||||||
await page.accessToSearchResult('Ranged weapon pistol 9mm');
|
|
||||||
await page.accessToSection('item.card.botanical');
|
|
||||||
});
|
|
||||||
|
|
||||||
afterAll(async() => {
|
|
||||||
await browser.close();
|
|
||||||
});
|
|
||||||
|
|
||||||
it(`should create a new botanical for the item`, async() => {
|
|
||||||
await page.autocompleteSearch(selectors.itemBotanical.genus, 'Abelia');
|
|
||||||
await page.autocompleteSearch(selectors.itemBotanical.species, 'dealbata');
|
|
||||||
await page.waitToClick(selectors.itemBotanical.submitBotanicalButton);
|
|
||||||
const message = await page.waitForSnackbar();
|
|
||||||
|
|
||||||
expect(message.text).toContain('Data saved!');
|
|
||||||
});
|
|
||||||
|
|
||||||
it(`should confirm the Genus for the item was created`, async() => {
|
|
||||||
await page.waitForTextInField(selectors.itemBotanical.genus, 'Abelia');
|
|
||||||
const result = await page
|
|
||||||
.waitToGetProperty(selectors.itemBotanical.genus, 'value');
|
|
||||||
|
|
||||||
expect(result).toEqual('Abelia');
|
|
||||||
});
|
|
||||||
|
|
||||||
it(`should confirm the Species for the item was created`, async() => {
|
|
||||||
const result = await page
|
|
||||||
.waitToGetProperty(selectors.itemBotanical.species, 'value');
|
|
||||||
|
|
||||||
expect(result).toEqual('dealbata');
|
|
||||||
});
|
|
||||||
|
|
||||||
it(`should edit botanical for the item`, async() => {
|
|
||||||
await page.autocompleteSearch(selectors.itemBotanical.genus, 'Abies');
|
|
||||||
await page.autocompleteSearch(selectors.itemBotanical.species, 'decurrens');
|
|
||||||
await page.waitToClick(selectors.itemBotanical.submitBotanicalButton);
|
|
||||||
const message = await page.waitForSnackbar();
|
|
||||||
|
|
||||||
expect(message.text).toContain('Data saved!');
|
|
||||||
});
|
|
||||||
|
|
||||||
it(`should confirm the Genus for the item was edited`, async() => {
|
|
||||||
await page.waitForTextInField(selectors.itemBotanical.genus, 'Abies');
|
|
||||||
const result = await page
|
|
||||||
.waitToGetProperty(selectors.itemBotanical.genus, 'value');
|
|
||||||
|
|
||||||
expect(result).toEqual('Abies');
|
|
||||||
});
|
|
||||||
|
|
||||||
it(`should confirm the Species for the item was edited`, async() => {
|
|
||||||
const result = await page
|
|
||||||
.waitToGetProperty(selectors.itemBotanical.species, 'value');
|
|
||||||
|
|
||||||
expect(result).toEqual('decurrens');
|
|
||||||
});
|
|
||||||
});
|
|
|
@ -1,37 +0,0 @@
|
||||||
import selectors from '../../helpers/selectors.js';
|
|
||||||
import getBrowser from '../../helpers/puppeteer';
|
|
||||||
|
|
||||||
describe('Item Create barcodes path', () => {
|
|
||||||
let browser;
|
|
||||||
let page;
|
|
||||||
beforeAll(async() => {
|
|
||||||
browser = await getBrowser();
|
|
||||||
page = browser.page;
|
|
||||||
await page.loginAndModule('buyer', 'item');
|
|
||||||
await page.accessToSearchResult('Ranged weapon longbow 200cm');
|
|
||||||
await page.accessToSection('item.card.itemBarcode');
|
|
||||||
});
|
|
||||||
|
|
||||||
afterAll(async() => {
|
|
||||||
await browser.close();
|
|
||||||
});
|
|
||||||
|
|
||||||
it(`should click create a new code and delete a former one`, async() => {
|
|
||||||
await page.waitToClick(selectors.itemBarcodes.firstCodeRemoveButton);
|
|
||||||
await page.waitToClick(selectors.itemBarcodes.addBarcodeButton);
|
|
||||||
await page.write(selectors.itemBarcodes.thirdCode, '5');
|
|
||||||
await page.waitToClick(selectors.itemBarcodes.submitBarcodesButton);
|
|
||||||
const message = await page.waitForSnackbar();
|
|
||||||
|
|
||||||
expect(message.text).toContain('Data saved!');
|
|
||||||
});
|
|
||||||
|
|
||||||
it(`should confirm the barcode 5 is created and it is now the third barcode as the first was deleted`, async() => {
|
|
||||||
await page.reloadSection('item.card.itemBarcode');
|
|
||||||
await page.waitForTextInField(selectors.itemBarcodes.thirdCode, '5');
|
|
||||||
const result = await page
|
|
||||||
.waitToGetProperty(selectors.itemBarcodes.thirdCode, 'value');
|
|
||||||
|
|
||||||
expect(result).toEqual('5');
|
|
||||||
});
|
|
||||||
});
|
|
|
@ -1,65 +0,0 @@
|
||||||
import selectors from '../../helpers/selectors.js';
|
|
||||||
import getBrowser from '../../helpers/puppeteer';
|
|
||||||
|
|
||||||
const $ = {
|
|
||||||
form: 'vn-item-create form'
|
|
||||||
};
|
|
||||||
|
|
||||||
describe('Item Create', () => {
|
|
||||||
let browser;
|
|
||||||
let page;
|
|
||||||
beforeAll(async() => {
|
|
||||||
browser = await getBrowser();
|
|
||||||
page = browser.page;
|
|
||||||
await page.loginAndModule('buyer', 'item');
|
|
||||||
});
|
|
||||||
|
|
||||||
afterAll(async() => {
|
|
||||||
await browser.close();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should access to the create item view by clicking the create floating button', async() => {
|
|
||||||
await page.waitToClick(selectors.itemsIndex.createItemButton);
|
|
||||||
await page.waitForState('item.create');
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should return to the item index by clickig the cancel button', async() => {
|
|
||||||
await page.waitToClick(selectors.itemCreateView.cancelButton);
|
|
||||||
await page.waitForState('item.index');
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should now access to the create item view by clicking the create floating button', async() => {
|
|
||||||
await page.waitToClick(selectors.itemsIndex.createItemButton);
|
|
||||||
await page.waitForState('item.create');
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should throw an error when insert an invalid priority', async() => {
|
|
||||||
const values = {
|
|
||||||
name: 'Infinity Gauntlet',
|
|
||||||
type: 'Crisantemo',
|
|
||||||
intrastat: 'Coral y materiales similares',
|
|
||||||
origin: 'Holand',
|
|
||||||
priority: null
|
|
||||||
};
|
|
||||||
const message = await page.sendForm($.form, values);
|
|
||||||
|
|
||||||
expect(message.text).toContain('Valid priorities');
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should create the Infinity Gauntlet item', async() => {
|
|
||||||
const values = {
|
|
||||||
name: 'Infinity Gauntlet',
|
|
||||||
type: 'Crisantemo',
|
|
||||||
intrastat: 'Coral y materiales similares',
|
|
||||||
origin: 'Holand',
|
|
||||||
priority: '2'
|
|
||||||
};
|
|
||||||
|
|
||||||
await page.fillForm($.form, values);
|
|
||||||
const formValues = await page.fetchForm($.form, Object.keys(values));
|
|
||||||
const message = await page.sendForm($.form);
|
|
||||||
|
|
||||||
expect(message.isSuccess).toBeTrue();
|
|
||||||
expect(formValues).toEqual(values);
|
|
||||||
});
|
|
||||||
});
|
|
|
@ -1,141 +0,0 @@
|
||||||
import selectors from '../../helpers/selectors.js';
|
|
||||||
import getBrowser from '../../helpers/puppeteer';
|
|
||||||
|
|
||||||
describe('Item regularize path', () => {
|
|
||||||
let browser;
|
|
||||||
let page;
|
|
||||||
beforeAll(async() => {
|
|
||||||
browser = await getBrowser();
|
|
||||||
page = browser.page;
|
|
||||||
await page.loginAndModule('employee', 'item');
|
|
||||||
});
|
|
||||||
|
|
||||||
afterAll(async() => {
|
|
||||||
await browser.close();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should edit the user local warehouse', async() => {
|
|
||||||
await page.waitForSpinnerLoad();
|
|
||||||
await page.waitToClick(selectors.globalItems.userMenuButton);
|
|
||||||
await page.autocompleteSearch(selectors.globalItems.userLocalWarehouse, 'Warehouse Four');
|
|
||||||
const message = await page.waitForSnackbar();
|
|
||||||
|
|
||||||
expect(message.text).toContain('Data saved!');
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should check the local settings were saved', async() => {
|
|
||||||
const userLocalWarehouse = await page
|
|
||||||
.waitToGetProperty(selectors.globalItems.userLocalWarehouse, 'value');
|
|
||||||
|
|
||||||
await page.closePopup();
|
|
||||||
|
|
||||||
expect(userLocalWarehouse).toContain('Warehouse Four');
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should search for a specific item', async() => {
|
|
||||||
await page.accessToSearchResult('Ranged weapon pistol 9mm');
|
|
||||||
await page.waitForState('item.card.summary');
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should open the regularize dialog and check the warehouse matches the local user settings', async() => {
|
|
||||||
await page.waitToClick(selectors.itemDescriptor.moreMenu);
|
|
||||||
await page.waitToClick(selectors.itemDescriptor.moreMenuRegularizeButton);
|
|
||||||
const result = await page.waitToGetProperty(selectors.itemDescriptor.regularizeWarehouse, 'value');
|
|
||||||
|
|
||||||
expect(result).toEqual('Warehouse Four');
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should regularize the item', async() => {
|
|
||||||
await page.write(selectors.itemDescriptor.regularizeQuantity, '100');
|
|
||||||
await page.autocompleteSearch(selectors.itemDescriptor.regularizeWarehouse, 'Warehouse One');
|
|
||||||
await page.waitToClick(selectors.itemDescriptor.regularizeSaveButton);
|
|
||||||
const message = await page.waitForSnackbar();
|
|
||||||
|
|
||||||
expect(message.text).toContain('Data saved!');
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should click on the Tickets button of the top bar menu', async() => {
|
|
||||||
await page.waitToClick(selectors.globalItems.applicationsMenuButton);
|
|
||||||
await page.waitForSelector(selectors.globalItems.applicationsMenuVisible);
|
|
||||||
await Promise.all([
|
|
||||||
page.waitForNavigation({waitUntil: ['load', 'networkidle0', 'domcontentloaded']}),
|
|
||||||
page.waitToClick(selectors.globalItems.ticketsButton)
|
|
||||||
]);
|
|
||||||
await page.waitForState('ticket.index');
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should clear the user local settings now', async() => {
|
|
||||||
await page.waitToClick(selectors.globalItems.userMenuButton);
|
|
||||||
await page.waitForContentLoaded();
|
|
||||||
await page.clearInput(selectors.globalItems.userConfigFirstAutocomplete);
|
|
||||||
const message = await page.waitForSnackbar();
|
|
||||||
|
|
||||||
expect(message.text).toContain('Data saved!');
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should search for the ticket with alias missing', async() => {
|
|
||||||
await page.keyboard.press('Escape');
|
|
||||||
await page.accessToSearchResult('missing');
|
|
||||||
await page.waitForState('ticket.card.summary');
|
|
||||||
});
|
|
||||||
|
|
||||||
it(`should check the ticket sale quantity is showing a negative value`, async() => {
|
|
||||||
await page.waitForTextInElement(selectors.ticketSummary.firstSaleQuantity, '-100');
|
|
||||||
const result = await page
|
|
||||||
.waitToGetProperty(selectors.ticketSummary.firstSaleQuantity, 'innerText');
|
|
||||||
|
|
||||||
expect(result).toContain('-100');
|
|
||||||
});
|
|
||||||
|
|
||||||
it(`should check the ticket sale discount is 100%`, async() => {
|
|
||||||
const result = await page
|
|
||||||
.waitToGetProperty(selectors.ticketSummary.firstSaleDiscount, 'innerText');
|
|
||||||
|
|
||||||
expect(result).toContain('100 %');
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should now click on the Items button of the top bar menu', async() => {
|
|
||||||
await page.waitToClick(selectors.globalItems.applicationsMenuButton);
|
|
||||||
await page.waitForSelector(selectors.globalItems.applicationsMenuVisible);
|
|
||||||
await page.waitToClick(selectors.globalItems.itemsButton);
|
|
||||||
await page.waitForState('item.index');
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should search for the item once again', async() => {
|
|
||||||
await page.accessToSearchResult('Ranged weapon pistol 9mm');
|
|
||||||
await page.waitForState('item.card.summary');
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should regularize the item once more', async() => {
|
|
||||||
await page.waitToClick(selectors.itemDescriptor.moreMenu);
|
|
||||||
await page.waitToClick(selectors.itemDescriptor.moreMenuRegularizeButton);
|
|
||||||
await page.write(selectors.itemDescriptor.regularizeQuantity, '100');
|
|
||||||
await page.autocompleteSearch(selectors.itemDescriptor.regularizeWarehouse, 'Warehouse One');
|
|
||||||
await page.waitToClick(selectors.itemDescriptor.regularizeSaveButton);
|
|
||||||
const message = await page.waitForSnackbar();
|
|
||||||
|
|
||||||
expect(message.text).toContain('Data saved!');
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should again click on the Tickets button of the top bar menu', async() => {
|
|
||||||
await page.waitToClick(selectors.globalItems.applicationsMenuButton);
|
|
||||||
await page.waitForSelector(selectors.globalItems.applicationsMenuVisible);
|
|
||||||
await Promise.all([
|
|
||||||
page.waitForNavigation({waitUntil: ['load', 'networkidle0', 'domcontentloaded']}),
|
|
||||||
page.waitToClick(selectors.globalItems.ticketsButton)
|
|
||||||
]);
|
|
||||||
await page.waitForState('ticket.index');
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should search for the ticket missing once again', async() => {
|
|
||||||
await page.accessToSearchResult('Missing');
|
|
||||||
await page.waitForState('ticket.card.summary');
|
|
||||||
});
|
|
||||||
|
|
||||||
it(`should check the ticket contains now two sales`, async() => {
|
|
||||||
await page.waitForTextInElement(selectors.ticketSummary.firstSaleQuantity, '-100');
|
|
||||||
const result = await page.countElement(selectors.ticketSummary.sale);
|
|
||||||
|
|
||||||
expect(result).toEqual(2);
|
|
||||||
});
|
|
||||||
});
|
|
|
@ -1,84 +0,0 @@
|
||||||
import selectors from '../../helpers/selectors.js';
|
|
||||||
import getBrowser from '../../helpers/puppeteer';
|
|
||||||
|
|
||||||
describe('Item index path', () => {
|
|
||||||
let browser;
|
|
||||||
let page;
|
|
||||||
beforeAll(async() => {
|
|
||||||
browser = await getBrowser();
|
|
||||||
page = browser.page;
|
|
||||||
await page.loginAndModule('salesPerson', 'item');
|
|
||||||
await page.waitToClick(selectors.globalItems.searchButton);
|
|
||||||
});
|
|
||||||
|
|
||||||
afterAll(async() => {
|
|
||||||
await browser.close();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should click on the fields to show button to open the list of columns to show', async() => {
|
|
||||||
await page.waitToClick(selectors.itemsIndex.shownColumns);
|
|
||||||
const visible = await page.isVisible(selectors.itemsIndex.shownColumnsList);
|
|
||||||
|
|
||||||
expect(visible).toBeTruthy();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should unmark all checkboxes except the first and the last ones', async() => {
|
|
||||||
await page.waitToClick(selectors.itemsIndex.idCheckbox);
|
|
||||||
await page.waitToClick(selectors.itemsIndex.stemsCheckbox);
|
|
||||||
await page.waitToClick(selectors.itemsIndex.sizeCheckbox);
|
|
||||||
await page.waitToClick(selectors.itemsIndex.typeCheckbox);
|
|
||||||
await page.waitToClick(selectors.itemsIndex.categoryCheckbox);
|
|
||||||
await page.waitToClick(selectors.itemsIndex.intrastadCheckbox);
|
|
||||||
await page.waitToClick(selectors.itemsIndex.originCheckbox);
|
|
||||||
await page.waitToClick(selectors.itemsIndex.buyerCheckbox);
|
|
||||||
await page.waitToClick(selectors.itemsIndex.weightByPieceCheckbox);
|
|
||||||
await page.waitToClick(selectors.itemsIndex.saveFieldsButton);
|
|
||||||
const message = await page.waitForSnackbar();
|
|
||||||
|
|
||||||
expect(message.text).toContain('Data saved!');
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should navigate forth and back to see the images column is still visible', async() => {
|
|
||||||
await page.closePopup();
|
|
||||||
await page.waitToClick(selectors.itemsIndex.firstSearchResult);
|
|
||||||
await page.waitToClick(selectors.itemDescriptor.goBackToModuleIndexButton);
|
|
||||||
await page.waitToClick(selectors.globalItems.searchButton);
|
|
||||||
await page.waitForSelector(selectors.itemsIndex.searchResult);
|
|
||||||
await page.waitImgLoad(selectors.itemsIndex.firstItemImage);
|
|
||||||
const imageVisible = await page.isVisible(selectors.itemsIndex.firstItemImageTd);
|
|
||||||
|
|
||||||
expect(imageVisible).toBeTruthy();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should check the ids column is not visible', async() => {
|
|
||||||
await page.waitForSelector(selectors.itemsIndex.firstItemId, {hidden: true});
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should mark all unchecked boxes to leave the index as it was', async() => {
|
|
||||||
await page.waitToClick(selectors.itemsIndex.shownColumns);
|
|
||||||
await page.waitToClick(selectors.itemsIndex.idCheckbox);
|
|
||||||
await page.waitToClick(selectors.itemsIndex.stemsCheckbox);
|
|
||||||
await page.waitToClick(selectors.itemsIndex.sizeCheckbox);
|
|
||||||
await page.waitToClick(selectors.itemsIndex.typeCheckbox);
|
|
||||||
await page.waitToClick(selectors.itemsIndex.categoryCheckbox);
|
|
||||||
await page.waitToClick(selectors.itemsIndex.intrastadCheckbox);
|
|
||||||
await page.waitToClick(selectors.itemsIndex.originCheckbox);
|
|
||||||
await page.waitToClick(selectors.itemsIndex.buyerCheckbox);
|
|
||||||
await page.waitToClick(selectors.itemsIndex.weightByPieceCheckbox);
|
|
||||||
await page.waitToClick(selectors.itemsIndex.saveFieldsButton);
|
|
||||||
const message = await page.waitForSnackbar();
|
|
||||||
|
|
||||||
expect(message.text).toContain('Data saved!');
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should now navigate forth and back to see the ids column is now visible', async() => {
|
|
||||||
await page.closePopup();
|
|
||||||
await page.waitToClick(selectors.itemsIndex.firstSearchResult);
|
|
||||||
await page.waitToClick(selectors.itemDescriptor.goBackToModuleIndexButton);
|
|
||||||
await page.waitToClick(selectors.globalItems.searchButton);
|
|
||||||
await page.waitForSelector(selectors.itemsIndex.searchResult);
|
|
||||||
const idVisible = await page.isVisible(selectors.itemsIndex.firstItemId);
|
|
||||||
|
|
||||||
expect(idVisible).toBeTruthy();
|
|
||||||
});
|
|
||||||
});
|
|
|
@ -1,45 +0,0 @@
|
||||||
import selectors from '../../helpers/selectors.js';
|
|
||||||
import getBrowser from '../../helpers/puppeteer';
|
|
||||||
|
|
||||||
describe('Item log path', () => {
|
|
||||||
let browser;
|
|
||||||
let page;
|
|
||||||
beforeAll(async() => {
|
|
||||||
browser = await getBrowser();
|
|
||||||
page = browser.page;
|
|
||||||
await page.loginAndModule('developer', 'item');
|
|
||||||
});
|
|
||||||
|
|
||||||
afterAll(async() => {
|
|
||||||
await browser.close();
|
|
||||||
});
|
|
||||||
|
|
||||||
it(`should search for the Knowledge artifact to confirm it isn't created yet`, async() => {
|
|
||||||
await page.doSearch('Knowledge artifact');
|
|
||||||
const nResults = await page.countElement(selectors.itemsIndex.searchResult);
|
|
||||||
|
|
||||||
expect(nResults).toEqual(1);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should access to the create item view by clicking the create floating button', async() => {
|
|
||||||
await page.waitToClick(selectors.itemsIndex.createItemButton);
|
|
||||||
await page.waitForState('item.create');
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should create the Knowledge artifact item', async() => {
|
|
||||||
await page.write(selectors.itemCreateView.temporalName, 'Knowledge artifact');
|
|
||||||
await page.autocompleteSearch(selectors.itemCreateView.type, 'Crisantemo');
|
|
||||||
await page.autocompleteSearch(selectors.itemCreateView.intrastat, 'Coral y materiales similares');
|
|
||||||
await page.autocompleteSearch(selectors.itemCreateView.origin, 'Holand');
|
|
||||||
await page.waitToClick(selectors.itemCreateView.createButton);
|
|
||||||
const message = await page.waitForSnackbar();
|
|
||||||
|
|
||||||
expect(message.text).toContain('Data saved!');
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should return to the items index by clicking the return to items button', async() => {
|
|
||||||
await page.waitToClick(selectors.itemBasicData.goToItemIndexButton);
|
|
||||||
await page.waitForSelector(selectors.itemsIndex.createItemButton);
|
|
||||||
await page.waitForState('item.index');
|
|
||||||
});
|
|
||||||
});
|
|
|
@ -1,41 +0,0 @@
|
||||||
import selectors from '../../helpers/selectors.js';
|
|
||||||
import getBrowser from '../../helpers/puppeteer';
|
|
||||||
|
|
||||||
describe('Item descriptor path', () => {
|
|
||||||
let browser;
|
|
||||||
let page;
|
|
||||||
beforeAll(async() => {
|
|
||||||
browser = await getBrowser();
|
|
||||||
page = browser.page;
|
|
||||||
await page.loginAndModule('buyer', 'item');
|
|
||||||
await page.accessToSearchResult('1');
|
|
||||||
await page.accessToSection('item.card.basicData');
|
|
||||||
});
|
|
||||||
|
|
||||||
afterAll(async() => {
|
|
||||||
await browser.close();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should set the item to inactive', async() => {
|
|
||||||
await page.waitToClick(selectors.itemBasicData.isActiveCheckbox);
|
|
||||||
await page.waitToClick(selectors.itemBasicData.submitBasicDataButton);
|
|
||||||
const message = await page.waitForSnackbar();
|
|
||||||
|
|
||||||
expect(message.text).toContain('Data saved!');
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should reload the section and check the inactive icon is visible', async() => {
|
|
||||||
await page.reloadSection('item.card.basicData');
|
|
||||||
const visibleIcon = await page.isVisible(selectors.itemDescriptor.inactiveIcon);
|
|
||||||
|
|
||||||
expect(visibleIcon).toBeTruthy();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should set the item back to active', async() => {
|
|
||||||
await page.waitToClick(selectors.itemBasicData.isActiveCheckbox);
|
|
||||||
await page.waitToClick(selectors.itemBasicData.submitBasicDataButton);
|
|
||||||
const message = await page.waitForSnackbar();
|
|
||||||
|
|
||||||
expect(message.text).toContain('Data saved!');
|
|
||||||
});
|
|
||||||
});
|
|
|
@ -1,45 +0,0 @@
|
||||||
import selectors from '../../helpers/selectors.js';
|
|
||||||
import getBrowser from '../../helpers/puppeteer';
|
|
||||||
|
|
||||||
describe('Item request path', () => {
|
|
||||||
let browser;
|
|
||||||
let page;
|
|
||||||
beforeAll(async() => {
|
|
||||||
browser = await getBrowser();
|
|
||||||
page = browser.page;
|
|
||||||
await page.loginAndModule('buyer', 'item');
|
|
||||||
await page.accessToSection('item.request');
|
|
||||||
});
|
|
||||||
|
|
||||||
afterAll(async() => {
|
|
||||||
await browser.close();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should reach the item request section', async() => {
|
|
||||||
await page.waitForState('item.request');
|
|
||||||
});
|
|
||||||
|
|
||||||
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 100cm');
|
|
||||||
let filledConcept = await page.waitToGetProperty(selectors.itemRequest.firstRequestConcept, 'innerText');
|
|
||||||
|
|
||||||
expect(filledConcept).toContain('Melee weapon heavy shield 100cm');
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should check the status of the request should now be accepted', async() => {
|
|
||||||
let status = await page.waitToGetProperty(selectors.itemRequest.firstRequestStatus, 'innerText');
|
|
||||||
|
|
||||||
expect(status).toContain('Accepted');
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should now click on the second declain request icon then type the reason', async() => {
|
|
||||||
await page.waitToClick(selectors.itemRequest.secondRequestDecline);
|
|
||||||
await page.write(selectors.itemRequest.declineReason, 'Not quite as expected');
|
|
||||||
await page.respondToDialog('accept');
|
|
||||||
let status = await page.waitToGetProperty(selectors.itemRequest.secondRequestStatus, 'innerText');
|
|
||||||
|
|
||||||
expect(status).toContain('Denied');
|
|
||||||
});
|
|
||||||
});
|
|
|
@ -1,97 +0,0 @@
|
||||||
import selectors from '../../helpers/selectors.js';
|
|
||||||
import getBrowser from '../../helpers/puppeteer';
|
|
||||||
|
|
||||||
const $ = selectors.itemFixedPrice;
|
|
||||||
|
|
||||||
describe('Item fixed prices path', () => {
|
|
||||||
let browser;
|
|
||||||
let page;
|
|
||||||
let httpRequest;
|
|
||||||
|
|
||||||
beforeAll(async() => {
|
|
||||||
browser = await getBrowser();
|
|
||||||
page = browser.page;
|
|
||||||
await page.loginAndModule('buyer', 'item');
|
|
||||||
await page.accessToSection('item.fixedPrice');
|
|
||||||
page.on('request', req => {
|
|
||||||
if (req.url().includes(`FixedPrices/filter`))
|
|
||||||
httpRequest = req.url();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
afterAll(async() => {
|
|
||||||
await browser.close();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should filter using all the fields', async() => {
|
|
||||||
await page.write($.generalSearchFilter, 'item');
|
|
||||||
await page.keyboard.press('Enter');
|
|
||||||
|
|
||||||
expect(httpRequest).toContain('search=item');
|
|
||||||
|
|
||||||
await page.click($.chip);
|
|
||||||
await page.click($.reignFilter);
|
|
||||||
|
|
||||||
expect(httpRequest).toContain('categoryFk');
|
|
||||||
|
|
||||||
await page.autocompleteSearch($.typeFilter, 'Alstroemeria');
|
|
||||||
|
|
||||||
expect(httpRequest).toContain('typeFk');
|
|
||||||
|
|
||||||
await page.click($.chip);
|
|
||||||
await page.autocompleteSearch($.buyerFilter, 'buyerNick');
|
|
||||||
|
|
||||||
expect(httpRequest).toContain('buyerFk');
|
|
||||||
|
|
||||||
await page.click($.chip);
|
|
||||||
await page.autocompleteSearch($.warehouseFilter, 'Algemesi');
|
|
||||||
|
|
||||||
expect(httpRequest).toContain('warehouseFk');
|
|
||||||
|
|
||||||
await page.click($.chip);
|
|
||||||
await page.click($.mineFilter);
|
|
||||||
|
|
||||||
expect(httpRequest).toContain('mine=true');
|
|
||||||
|
|
||||||
await page.click($.chip);
|
|
||||||
await page.click($.hasMinPriceFilter);
|
|
||||||
|
|
||||||
expect(httpRequest).toContain('hasMinPrice=true');
|
|
||||||
|
|
||||||
await page.click($.chip);
|
|
||||||
await page.click($.addTag);
|
|
||||||
await page.autocompleteSearch($.tagFilter, 'Color');
|
|
||||||
await page.autocompleteSearch($.tagValueFilter, 'Brown');
|
|
||||||
|
|
||||||
expect(httpRequest).toContain('tags');
|
|
||||||
|
|
||||||
await page.click($.chip);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should click on the add new fixed price button', async() => {
|
|
||||||
await page.waitToClick($.add);
|
|
||||||
await page.waitForSelector($.fourthFixedPrice);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should fill the fixed price data', async() => {
|
|
||||||
const now = Date.vnNew();
|
|
||||||
await page.autocompleteSearch($.fourthWarehouse, 'Warehouse one');
|
|
||||||
await page.writeOnEditableTD($.fourthGroupingPrice, '1');
|
|
||||||
await page.writeOnEditableTD($.fourthPackingPrice, '1');
|
|
||||||
await page.write($.fourthMinPrice, '1');
|
|
||||||
await page.pickDate($.fourthStarted, now);
|
|
||||||
await page.pickDate($.fourthEnded, now);
|
|
||||||
const message = await page.waitForSnackbar();
|
|
||||||
|
|
||||||
expect(message.text).toContain('Data saved!');
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should reload the section and check the created price has the expected ID', async() => {
|
|
||||||
await page.goto(`http://localhost:5000/#!/item/fixed-price`);
|
|
||||||
await page.autocompleteSearch($.warehouseFilter, 'Warehouse one');
|
|
||||||
await page.click($.chip);
|
|
||||||
const result = await page.waitToGetProperty($.fourthItemID, 'value');
|
|
||||||
|
|
||||||
expect(result).toContain('13');
|
|
||||||
});
|
|
||||||
});
|
|
|
@ -1,99 +0,0 @@
|
||||||
import selectors from '../../../helpers/selectors.js';
|
|
||||||
import getBrowser from '../../../helpers/puppeteer';
|
|
||||||
|
|
||||||
describe('Ticket List sale path', () => {
|
|
||||||
let browser;
|
|
||||||
let page;
|
|
||||||
|
|
||||||
beforeAll(async() => {
|
|
||||||
browser = await getBrowser();
|
|
||||||
page = browser.page;
|
|
||||||
await page.loginAndModule('employee', 'ticket');
|
|
||||||
await page.accessToSearchResult('13');
|
|
||||||
await page.accessToSection('ticket.card.sale');
|
|
||||||
});
|
|
||||||
|
|
||||||
afterAll(async() => {
|
|
||||||
await browser.close();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should confirm the first ticket sale contains the colour tag', async() => {
|
|
||||||
const value = await page
|
|
||||||
.waitToGetProperty(selectors.ticketSales.firstSaleColour, 'innerText');
|
|
||||||
|
|
||||||
expect(value).toContain('Black');
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should confirm the first sale contains the price', async() => {
|
|
||||||
const value = await page
|
|
||||||
.waitToGetProperty(selectors.ticketSales.firstSalePrice, 'innerText');
|
|
||||||
|
|
||||||
expect(value).toContain('1.72');
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should confirm the first sale contains the discount', async() => {
|
|
||||||
const value = await page
|
|
||||||
.waitToGetProperty(selectors.ticketSales.firstSaleDiscount, 'innerText');
|
|
||||||
|
|
||||||
expect(value).toContain('0.00%');
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should confirm the first sale contains the total import', async() => {
|
|
||||||
const value = await page
|
|
||||||
.waitToGetProperty(selectors.ticketSales.firstSaleImport, 'innerText');
|
|
||||||
|
|
||||||
expect(value).toContain('34.40');
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should add an empty item to the sale list', async() => {
|
|
||||||
await page.waitToClick(selectors.ticketSales.newItemButton);
|
|
||||||
const sales = await page
|
|
||||||
.countElement(selectors.ticketSales.saleLine);
|
|
||||||
|
|
||||||
expect(sales).toEqual(2);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should select a valid item to be added as the second item in the sales list', async() => {
|
|
||||||
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, '8');
|
|
||||||
await page.keyboard.press('Enter');
|
|
||||||
const message = await page.waitForSnackbar();
|
|
||||||
|
|
||||||
expect(message.text).toContain('Data saved!');
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should update the description of the new sale', async() => {
|
|
||||||
await page.click(selectors.ticketSales.secondSaleConceptCell);
|
|
||||||
await page.write(selectors.ticketSales.secondSaleConceptInput, 'Aegis of Valor');
|
|
||||||
await page.keyboard.press('Enter');
|
|
||||||
const message = await page.waitForSnackbar();
|
|
||||||
|
|
||||||
expect(message.text).toContain('Data saved!');
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should add a third empty item to the sale list', async() => {
|
|
||||||
await page.waitToClick(selectors.ticketSales.newItemButton);
|
|
||||||
await page.waitForNumberOfElements(selectors.ticketSales.saleLine, 3);
|
|
||||||
const sales = await page.countElement(selectors.ticketSales.saleLine);
|
|
||||||
|
|
||||||
expect(sales).toEqual(3);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should select the 2nd and 3th item and delete both', async() => {
|
|
||||||
await page.waitToClick(selectors.ticketSales.secondSaleCheckbox);
|
|
||||||
await page.waitToClick(selectors.ticketSales.thirdSaleCheckbox);
|
|
||||||
await page.waitToClick(selectors.ticketSales.deleteSaleButton);
|
|
||||||
await page.waitToClick(selectors.globalItems.acceptButton);
|
|
||||||
const message = await page.waitForSnackbar();
|
|
||||||
|
|
||||||
expect(message.text).toContain('Data saved!');
|
|
||||||
});
|
|
||||||
|
|
||||||
it(`should verify there's only 1 single line remaining`, async() => {
|
|
||||||
const sales = await page.countElement(selectors.ticketSales.saleLine);
|
|
||||||
|
|
||||||
expect(sales).toEqual(1);
|
|
||||||
});
|
|
||||||
});
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue