Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 4774-translationsVn
gitea/salix/pipeline/pr-dev There was a failure building this commit
Details
gitea/salix/pipeline/pr-dev There was a failure building this commit
Details
This commit is contained in:
commit
3df0508c8d
|
@ -24,12 +24,13 @@ module.exports = Self => {
|
|||
|
||||
Self.cancelShipment = async expeditionFk => {
|
||||
const models = Self.app.models;
|
||||
|
||||
const mrw = await models.MrwConfig.findOne();
|
||||
const {externalId} = await models.Expedition.findById(expeditionFk);
|
||||
const clientType = await models.MrwConfig.getClientType(expeditionFk);
|
||||
const template = fs.readFileSync(__dirname + '/cancelShipment.ejs', 'utf-8');
|
||||
const renderedXml = ejs.render(template, {mrw, externalId, clientType});
|
||||
|
||||
await Self.rawSql('CALL util.debugAdd(?,?);', ['cancelShipment', renderedXml]);
|
||||
const response = await axios.post(mrw.url, renderedXml, {
|
||||
headers: {
|
||||
'Content-Type': 'application/soap+xml; charset=utf-8'
|
||||
|
@ -37,12 +38,11 @@ module.exports = Self => {
|
|||
});
|
||||
|
||||
const xmlString = response.data;
|
||||
await Self.rawSql('CALL util.debugAdd(?,?);', ['cancelShipmentResponse', xmlString]);
|
||||
const parser = new DOMParser();
|
||||
const xmlDoc = parser.parseFromString(xmlString, 'text/xml');
|
||||
|
||||
await Self.rawSql('CALL util.debugAdd(?,?);', ['cancelShipment', xmlDoc]);
|
||||
|
||||
const result = xmlDoc.getElementsByTagName('Mensaje')[0].textContent;
|
||||
return result.toLowerCase().includes('se ha cancelado correctamente');
|
||||
return ['no se ha encontrado', 'se ha cancelado correctamente'].some(res => result.toLowerCase().includes(res));
|
||||
};
|
||||
};
|
||||
|
|
|
@ -130,9 +130,15 @@
|
|||
"Payment": {
|
||||
"dataSource": "vn"
|
||||
},
|
||||
"PbxConfig": {
|
||||
"dataSource": "vn"
|
||||
},
|
||||
"Postcode": {
|
||||
"dataSource": "vn"
|
||||
},
|
||||
"Prefix": {
|
||||
"dataSource": "vn"
|
||||
},
|
||||
"ReferenceRate": {
|
||||
"dataSource": "vn"
|
||||
},
|
||||
|
|
|
@ -0,0 +1,27 @@
|
|||
{
|
||||
"name": "PbxConfig",
|
||||
"base": "VnModel",
|
||||
"options": {
|
||||
"mysql": {
|
||||
"table": "pbx.config"
|
||||
}
|
||||
},
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "number",
|
||||
"id": true
|
||||
},
|
||||
"defaultPrefix": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"acls": [
|
||||
{
|
||||
"property": "*",
|
||||
"accessType": "READ",
|
||||
"principalType": "ROLE",
|
||||
"principalId": "employee",
|
||||
"permission": "ALLOW"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
{
|
||||
"name": "Prefix",
|
||||
"base": "VnModel",
|
||||
"options": {
|
||||
"mysql": {
|
||||
"table": "pbx.prefix"
|
||||
}
|
||||
},
|
||||
"properties": {
|
||||
"country": {
|
||||
"type": "string",
|
||||
"id": true
|
||||
},
|
||||
"prefix": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"acls": [
|
||||
{
|
||||
"property": "*",
|
||||
"accessType": "READ",
|
||||
"principalType": "ROLE",
|
||||
"principalId": "employee",
|
||||
"permission": "ALLOW"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -9,7 +9,7 @@
|
|||
},
|
||||
"vn": {
|
||||
"view": {
|
||||
"expeditionPallet_Print": "99f75145ac2e7b612a6d71e74b6e55f194a465780fd9875a15eb01e6596b447e"
|
||||
"expeditionPallet_Print": "04fc5f2967ce53bfbb85f7f48b9a3dca4a4f7111ac41e1775f4cc7d6538774b2"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@ USE `util`;
|
|||
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
|
||||
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
|
||||
|
||||
INSERT INTO `version` VALUES ('vn-database','11311','315864403260623fede9f0471ef3d9036faf23b1','2024-11-12 08:00:59','11336');
|
||||
INSERT INTO `version` VALUES ('vn-database','11358','45f7b60f1b43b24505a3e9abc6738dc484ad4fd5','2024-11-26 12:27:58','11365');
|
||||
|
||||
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);
|
||||
|
@ -1065,11 +1065,50 @@ INSERT INTO `versionLog` VALUES ('vn-database','11290','00-firstScript.sql','jen
|
|||
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','11297','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-26 07:05:29',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11297','01-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-26 07:05:30',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);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11314','00-restrictedAsterisk.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-26 07:05:30',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11315','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-26 07:05:30',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11316','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-26 07:05:30',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11317','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-26 07:05:30',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11319','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-26 07:05:30',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11321','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-26 07:05:30',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11324','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-13 10:49:47',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11325','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-26 07:05:30',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11326','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-26 07:05:30',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11330','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-26 07:05:30',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11331','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-26 07:05:30',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11336','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-26 07:05:30',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11337','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-26 07:05:30',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11338','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-12 09:14:12',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11339','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-26 07:05:30',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11342','00-itemShelving.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-26 07:06:34',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11342','01-itemShelving.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-26 07:06:35',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11342','02-itemShelving.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-26 07:06:37',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11342','03-itemShelving.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-26 07:11:07',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11342','04-itemShelvingLog.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-26 07:11:07',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11342','05-itemShelvingLog.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-26 07:11:07',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11342','06-itemShelvingLog.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-26 07:11:07',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11343','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-26 07:11:07',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11344','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-13 17:36:45',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11344','01-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-13 17:46:26',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11345','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-26 07:11:08',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11346','00-address.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-26 07:15:02',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11346','01-client.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-26 07:16:29',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11346','02-supplier.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-26 07:27:57',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11347','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-26 07:27:57',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11348','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-26 07:28:14',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11349','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-26 07:28:14',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11350','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-26 07:28:14',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11353','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-26 07:28:14',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11355','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-26 07:28:14',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11357','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-26 07:28:16',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11358','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-26 07:28:21',NULL,NULL);
|
||||
|
||||
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
|
||||
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
|
||||
|
@ -1973,13 +2012,11 @@ INSERT INTO `ACL` VALUES (605,'Ticket','sendSms','WRITE','ALLOW','ROLE','employe
|
|||
INSERT INTO `ACL` VALUES (606,'Ticket','isLocked','READ','ALLOW','ROLE','employee',NULL);
|
||||
INSERT INTO `ACL` VALUES (607,'Ticket','freightCost','READ','ALLOW','ROLE','employee',NULL);
|
||||
INSERT INTO `ACL` VALUES (608,'Ticket','getComponentsSum','READ','ALLOW','ROLE','employee',NULL);
|
||||
INSERT INTO `ACL` VALUES (609,'Ticket','updateAttributes','WRITE','ALLOW','ROLE','delivery',NULL);
|
||||
INSERT INTO `ACL` VALUES (609,'Ticket','updateAttributes','WRITE','ALLOW','ROLE','deliveryAssistant',10578);
|
||||
INSERT INTO `ACL` VALUES (610,'Ticket','deliveryNoteCsv','READ','ALLOW','ROLE','employee',NULL);
|
||||
INSERT INTO `ACL` VALUES (611,'State','find','READ','ALLOW','ROLE','employee',NULL);
|
||||
INSERT INTO `ACL` VALUES (612,'State','findById','READ','ALLOW','ROLE','employee',NULL);
|
||||
INSERT INTO `ACL` VALUES (613,'State','findOne','READ','ALLOW','ROLE','employee',NULL);
|
||||
INSERT INTO `ACL` VALUES (614,'Worker','find','READ','ALLOW','ROLE','employee',NULL);
|
||||
INSERT INTO `ACL` VALUES (616,'Worker','findOne','READ','ALLOW','ROLE','employee',NULL);
|
||||
INSERT INTO `ACL` VALUES (617,'Worker','filter','READ','ALLOW','ROLE','employee',NULL);
|
||||
INSERT INTO `ACL` VALUES (618,'Worker','getWorkedHours','READ','ALLOW','ROLE','employee',NULL);
|
||||
INSERT INTO `ACL` VALUES (619,'Worker','active','READ','ALLOW','ROLE','employee',NULL);
|
||||
|
@ -2045,7 +2082,6 @@ INSERT INTO `ACL` VALUES (716,'ExpeditionMistake','*','WRITE','ALLOW','ROLE','em
|
|||
INSERT INTO `ACL` VALUES (717,'WorkerMistake','*','WRITE','ALLOW','ROLE','coolerAssist',NULL);
|
||||
INSERT INTO `ACL` VALUES (718,'MistakesTypes','*','WRITE','ALLOW','ROLE','coolerAssist',NULL);
|
||||
INSERT INTO `ACL` VALUES (719,'MistakeType','*','READ','ALLOW','ROLE','employee',NULL);
|
||||
INSERT INTO `ACL` VALUES (720,'MachineWorker','*','READ','ALLOW','ROLE','coolerAssist',NULL);
|
||||
INSERT INTO `ACL` VALUES (721,'Printer','*','READ','ALLOW','ROLE','employee',NULL);
|
||||
INSERT INTO `ACL` VALUES (722,'SaleMistake','*','WRITE','ALLOW','ROLE','production',NULL);
|
||||
INSERT INTO `ACL` VALUES (723,'Item','setVisibleDiscard','WRITE','ALLOW','ROLE','employee',NULL);
|
||||
|
@ -2083,13 +2119,10 @@ INSERT INTO `ACL` VALUES (755,'Route','findById','READ','ALLOW','ROLE','employee
|
|||
INSERT INTO `ACL` VALUES (756,'Route','findOne','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 (759,'Route','cmr','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 (762,'Route','filter','READ','ALLOW','ROLE','employee',NULL);
|
||||
INSERT INTO `ACL` VALUES (763,'Route','getByWorker','READ','ALLOW','ROLE','employee',NULL);
|
||||
INSERT INTO `ACL` VALUES (764,'Route','getDeliveryPoint','READ','ALLOW','ROLE','employee',NULL);
|
||||
INSERT INTO `ACL` VALUES (765,'Route','cmrs','READ','ALLOW','ROLE','employee',NULL);
|
||||
INSERT INTO `ACL` VALUES (766,'Route','getSuggestedTickets','READ','ALLOW','ROLE','employee',NULL);
|
||||
INSERT INTO `ACL` VALUES (767,'Route','getTickets','READ','ALLOW','ROLE','employee',NULL);
|
||||
INSERT INTO `ACL` VALUES (768,'Route','guessPriority','WRITE','ALLOW','ROLE','employee',NULL);
|
||||
|
@ -2130,7 +2163,6 @@ INSERT INTO `ACL` VALUES (802,'MailAliasAccount','deleteById','WRITE','ALLOW','R
|
|||
INSERT INTO `ACL` VALUES (804,'DeviceProduction','*','READ','ALLOW','ROLE','employee',NULL);
|
||||
INSERT INTO `ACL` VALUES (805,'Collection','assign','WRITE','ALLOW','ROLE','production',NULL);
|
||||
INSERT INTO `ACL` VALUES (806,'ExpeditionPallet','getPallet','READ','ALLOW','ROLE','production',NULL);
|
||||
INSERT INTO `ACL` VALUES (807,'MachineWorker','updateInTime','WRITE','ALLOW','ROLE','production',NULL);
|
||||
INSERT INTO `ACL` VALUES (808,'MobileAppVersionControl','getVersion','READ','ALLOW','ROLE','employee',NULL);
|
||||
INSERT INTO `ACL` VALUES (809,'SaleTracking','delete','WRITE','ALLOW','ROLE','production',NULL);
|
||||
INSERT INTO `ACL` VALUES (810,'SaleTracking','updateTracking','WRITE','ALLOW','ROLE','production',NULL);
|
||||
|
@ -2216,7 +2248,7 @@ INSERT INTO `ACL` VALUES (895,'ItemShelvingLog','*','READ','ALLOW','ROLE','produ
|
|||
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 (903,'Entry','getBuys','READ','ALLOW','ROLE','supplier',NULL);
|
||||
INSERT INTO `ACL` VALUES (904,'Entry','buyLabel','READ','ALLOW','ROLE','supplier',NULL);
|
||||
INSERT INTO `ACL` VALUES (904,'Entry','buyLabelSupplier','READ','ALLOW','ROLE','supplier',10578);
|
||||
INSERT INTO `ACL` VALUES (905,'AddressWaste','*','READ','ALLOW','ROLE','production',NULL);
|
||||
INSERT INTO `ACL` VALUES (906,'Entry','print','READ','ALLOW','ROLE','supplier',NULL);
|
||||
INSERT INTO `ACL` VALUES (907,'Expedition_PrintOut','*','*','ALLOW','ROLE','production',NULL);
|
||||
|
@ -2230,7 +2262,6 @@ INSERT INTO `ACL` VALUES (914,'VnToken','killSession','*','ALLOW','ROLE','develo
|
|||
INSERT INTO `ACL` VALUES (915,'ACL','*','WRITE','ALLOW','ROLE','developerBoss',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 (919,'Worker','findById','READ','ALLOW','ROLE','employee',10578);
|
||||
INSERT INTO `ACL` VALUES (920,'QuadmindsApiConfig','*','*','ALLOW','ROLE','delivery',19295);
|
||||
INSERT INTO `ACL` VALUES (922,'SaleGroup','*','WRITE','ALLOW','ROLE','production',19294);
|
||||
INSERT INTO `ACL` VALUES (923,'Worker','__get__advancedSummary','READ','ALLOW','ROLE','hr',10578);
|
||||
|
@ -2250,6 +2281,23 @@ INSERT INTO `ACL` VALUES (936,'Device','handleUser','*','ALLOW','ROLE','employee
|
|||
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 (939,'Machine','*','*','ALLOW','ROLE','productionBoss',10578);
|
||||
INSERT INTO `ACL` VALUES (940,'ItemTypeLog','find','READ','ALLOW','ROLE','employee',10578);
|
||||
INSERT INTO `ACL` VALUES (941,'Entry','buyLabel','READ','ALLOW','ROLE','employee',10578);
|
||||
INSERT INTO `ACL` VALUES (942,'Cmr','filter','READ','ALLOW','ROLE','production',10578);
|
||||
INSERT INTO `ACL` VALUES (943,'Cmr','downloadZip','READ','ALLOW','ROLE','production',10578);
|
||||
INSERT INTO `ACL` VALUES (944,'Cmr','print','READ','ALLOW','ROLE','production',10578);
|
||||
INSERT INTO `ACL` VALUES (945,'Collection','create','WRITE','ALLOW','ROLE','productionBoss',10578);
|
||||
INSERT INTO `ACL` VALUES (946,'Collection','upsert','WRITE','ALLOW','ROLE','productionBoss',10578);
|
||||
INSERT INTO `ACL` VALUES (947,'Collection','replaceById','WRITE','ALLOW','ROLE','productionBoss',10578);
|
||||
INSERT INTO `ACL` VALUES (948,'Collection','updateAll','WRITE','ALLOW','ROLE','productionBoss',10578);
|
||||
INSERT INTO `ACL` VALUES (949,'Collection','updateAttributes','WRITE','ALLOW','ROLE','productionBoss',10578);
|
||||
INSERT INTO `ACL` VALUES (950,'Collection','deleteById','WRITE','ALLOW','ROLE','productionBoss',10578);
|
||||
INSERT INTO `ACL` VALUES (951,'Collection','destroyAll','WRITE','ALLOW','ROLE','productionBoss',10578);
|
||||
INSERT INTO `ACL` VALUES (952,'Collection','destroyById','WRITE','ALLOW','ROLE','productionBoss',10578);
|
||||
INSERT INTO `ACL` VALUES (953,'RouteAction','find','READ','ALLOW','ROLE','delivery',10578);
|
||||
INSERT INTO `ACL` VALUES (954,'RouteComplement','find','READ','ALLOW','ROLE','delivery',10578);
|
||||
INSERT INTO `ACL` VALUES (955,'RouteComplement','create','WRITE','ALLOW','ROLE','delivery',10578);
|
||||
INSERT INTO `ACL` VALUES (956,'RouteComplement','deleteById','WRITE','ALLOW','ROLE','delivery',10578);
|
||||
|
||||
INSERT INTO `fieldAcl` VALUES (1,'Client','name','update','employee');
|
||||
INSERT INTO `fieldAcl` VALUES (2,'Client','contact','update','employee');
|
||||
|
@ -2581,13 +2629,13 @@ INSERT INTO `department` VALUES (1,'VN','VERDNATURA',1,116,763,0,0,0,0,26,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 (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,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 (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,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 (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 (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 (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 (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',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',78,79,NULL,72,0,0,1,0,1,'/1/',NULL,1,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||
|
@ -2630,7 +2678,7 @@ INSERT INTO `department` VALUES (135,'routers','ENRUTADORES',110,111,NULL,0,0,0,
|
|||
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',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 (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 (140,'internationalTeam','EQUIPO INTERNACIONAL',69,70,24065,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 (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);
|
||||
|
|
|
@ -49,6 +49,7 @@ INSERT IGNORE INTO `db` VALUES ('','geo','developerBoss','Y','Y','Y','Y','N','N'
|
|||
INSERT IGNORE INTO `db` VALUES ('','floranet','developer','Y','Y','Y','Y','N','N','N','N','N','N','N','N','N','N','N','N','Y','N','N','N');
|
||||
INSERT IGNORE INTO `db` VALUES ('','tmp','guest','Y','Y','Y','Y','N','Y','N','N','N','N','Y','N','N','N','N','N','N','N','N','N');
|
||||
INSERT IGNORE INTO `db` VALUES ('','util','salix','Y','Y','Y','Y','N','N','N','N','N','N','Y','N','N','N','N','N','Y','N','N','N');
|
||||
INSERT IGNORE INTO `db` VALUES ('','srt','maintenanceBoss','Y','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N');
|
||||
INSERT IGNORE INTO `db` VALUES ('','dipole','developerBoss','Y','Y','Y','Y','N','N','Y','N','N','N','N','N','N','N','N','N','Y','N','N','N');
|
||||
INSERT IGNORE INTO `db` VALUES ('','bi','developerBoss','Y','Y','Y','Y','N','N','Y','N','N','N','N','N','N','N','N','N','Y','N','N','N');
|
||||
INSERT IGNORE INTO `db` VALUES ('','sage','developerBoss','Y','Y','Y','Y','N','N','Y','N','N','N','N','N','N','N','N','N','Y','N','N','N');
|
||||
|
@ -941,7 +942,6 @@ INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','volumeConfig','alex
|
|||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','coolerBoss','ticketTrackingState','alexm@%','0000-00-00 00:00:00','Select,Insert,Update','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','warehouse','alexm@%','0000-00-00 00:00:00','Select','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','role','alexm@%','0000-00-00 00:00:00','Select','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','workCenter','alexm@%','0000-00-00 00:00:00','Select','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','clientCredit','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','worker','alexm@%','0000-00-00 00:00:00','Select','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','coolerAssist','workerAppTester','alexm@%','0000-00-00 00:00:00','Select','');
|
||||
|
@ -1246,7 +1246,6 @@ INSERT IGNORE INTO `tables_priv` VALUES ('','bs','deliveryAssistant','m3','alexm
|
|||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','deliveryAssistant','ticketDms','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','deliveryAssistant','time','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','deliveryAssistant','v_Articles_botanical','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','deliveryAssistant','workCenter','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','deliveryAssistant','workerDepartment','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','deliveryAssistant','zoneEvent','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Delete','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','bi','deliveryAssistant','rotacion','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||
|
@ -1388,7 +1387,7 @@ INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','entry','jenki
|
|||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyer','Cubos_Retorno','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','claimDestination','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','entryConfig','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','farmingDeliveryNote','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','farmingDeliveryNote','carlosap@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','sage','grafana','TiposIva','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','bs','buyer','waste','alexm@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','clientObservation','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||
|
@ -1419,13 +1418,9 @@ INSERT IGNORE INTO `tables_priv` VALUES ('','vn','financialBoss','accountDetail'
|
|||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','adminOfficer','accountDetail','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Update','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','maintenanceBoss','project','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','maintenanceBoss','machineDetail','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','srt','maintenanceBoss','antenna','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','srt','maintenanceBoss','bufferPool','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','srt','maintenanceBoss','enteringLog','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','srt','maintenanceBoss','expeditionLoading','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','srt','maintenanceBoss','failureLog','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','srt','maintenanceBoss','movingLog','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','srt','maintenanceBoss','sorterLog','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyerSalesAssistant','route','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Update','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','workCenter','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyerSalesAssistant','Rutas','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Update','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','genericAllocation','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','businessReasonEnd','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyer','buy_edi','alexm@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||
|
@ -1463,7 +1458,7 @@ INSERT IGNORE INTO `tables_priv` VALUES ('','vn','deliveryBoss','vehicleDms','gu
|
|||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','deliveryBoss','vehicleInvoiceIn','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','deliveryBoss','vehicleNotes','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','production','saleGroup','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Insert,Update,Delete','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','srt','maintenanceBoss','bufferLog','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','shelvingLog','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','financialBoss','supplierAccount','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Insert,Update,Delete','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','productionAssi','tillSerial','alexm@db-proxy2.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','');
|
||||
|
@ -1494,6 +1489,7 @@ INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logisticAssist','itemStemTag',
|
|||
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','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logisticAssist','itemTextureTag','jenkins@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete','');
|
||||
/*!40000 ALTER TABLE `tables_priv` ENABLE KEYS */;
|
||||
|
||||
/*!40000 ALTER TABLE `columns_priv` DISABLE KEYS */;
|
||||
|
@ -1873,6 +1869,7 @@ 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','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','buyer','stockBuyedByWorker','PROCEDURE','guillermo@db-proxy2.servers.dc.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','buyer','buy_afterUpsert','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00');
|
||||
|
@ -1925,7 +1922,7 @@ INSERT IGNORE INTO `procs_priv` VALUES ('','util','grafana','firstdayofyear','FU
|
|||
INSERT IGNORE INTO `procs_priv` VALUES ('','util','claimManager','dayend','FUNCTION','alexm@%','Execute','0000-00-00 00:00:00');
|
||||
INSERT IGNORE INTO `procs_priv` VALUES ('','util','employee','log_add','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00');
|
||||
INSERT IGNORE INTO `procs_priv` VALUES ('','srt','employee','moving_between','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00');
|
||||
INSERT IGNORE INTO `procs_priv` VALUES ('','bi','financial','defaultersfromdate','PROCEDURE','juan@db-proxy2.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||
INSERT IGNORE INTO `procs_priv` VALUES ('','bi','financial','defaultersfromdate','PROCEDURE','guillermo@db-proxy2.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','getuser','FUNCTION','alexm@%','Execute','0000-00-00 00:00:00');
|
||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','administrative','hasanynegativebase','FUNCTION','alexm@%','Execute','0000-00-00 00:00:00');
|
||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','marketingBoss','hasanynegativebase','FUNCTION','alexm@%','Execute','0000-00-00 00:00:00');
|
||||
|
@ -2020,6 +2017,7 @@ 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','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','buyer','stockBuyed_add','PROCEDURE','guillermo@db-proxy2.servers.dc.verdnatura.es','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','palletizerBoss','packingsite_startcollection','PROCEDURE','alexm@db-proxy2.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||
|
@ -2099,7 +2097,6 @@ INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','collection_printst
|
|||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','deviceproductionuser_getworker','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','ticket_printlabelprevious','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','ticket_isoutclosurezone','FUNCTION','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','workermachinery_isregistered','FUNCTION','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','ticketstatetoday_setstate','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','device_checklogin','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','worker_getfromhasmistake','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||
|
@ -2107,7 +2104,7 @@ INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','sectorcollection_n
|
|||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','sectorcollection_get','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','setparking','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','shelvingparking_get','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','machine_getworkerplate','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','report_print','PROCEDURE','guillermo@db-proxy2.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','saletracking_addprevok','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','sectorcollectionsalegroup_add','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','saletracking_updateischecked','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||
|
@ -2116,7 +2113,7 @@ INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','travel_updatepacki
|
|||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','freelance_getinfo','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','company_getfiscaldata','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','expedition_getfromroute','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','machineworker_gethistorical','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','buy_getUltimate','FUNCTION','guillermo@db-proxy2.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','itemplacementsupplyaiming','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','expeditionstate_addbypallet','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||
INSERT IGNORE INTO `procs_priv` VALUES ('','srt','production','expeditionloading_add','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||
|
@ -2150,7 +2147,6 @@ INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','collection_printstic
|
|||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','deviceproductionuser_getworker','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','ticket_printlabelprevious','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','ticket_isoutclosurezone','FUNCTION','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','workermachinery_isregistered','FUNCTION','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','ticketstatetoday_setstate','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','device_checklogin','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','worker_getfromhasmistake','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||
|
@ -2158,7 +2154,6 @@ INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','sectorcollection_new
|
|||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','sectorcollection_get','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','setparking','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','shelvingparking_get','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','machine_getworkerplate','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','saletracking_addprevok','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','sectorcollectionsalegroup_add','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','saletracking_updateischecked','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||
|
@ -2167,7 +2162,6 @@ INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','travel_updatepacking
|
|||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','freelance_getinfo','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','company_getfiscaldata','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','expedition_getfromroute','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','machineworker_gethistorical','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','itemplacementsupplyaiming','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','expeditionstate_addbypallet','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||
INSERT IGNORE INTO `procs_priv` VALUES ('','srt','delivery','expeditionloading_add','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||
|
@ -2257,6 +2251,7 @@ INSERT IGNORE INTO `global_priv` VALUES ('','assetManager','{\"access\":0,\"vers
|
|||
INSERT IGNORE INTO `global_priv` VALUES ('','buyer','{\"access\": 0, \"version_id\": 101106, \"is_role\": true}');
|
||||
INSERT IGNORE INTO `global_priv` VALUES ('','buyerAssistant','{\"access\":0,\"version_id\":101106,\"is_role\":true}');
|
||||
INSERT IGNORE INTO `global_priv` VALUES ('','buyerBoss','{\"access\": 0, \"version_id\": 101106, \"is_role\": true}');
|
||||
INSERT IGNORE INTO `global_priv` VALUES ('','buyerSalesAssistant','{\"access\":0,\"version_id\":101106,\"is_role\":true}');
|
||||
INSERT IGNORE INTO `global_priv` VALUES ('','claimManager','{\"access\":0,\"version_id\":101106,\"is_role\":true}');
|
||||
INSERT IGNORE INTO `global_priv` VALUES ('','cooler','{\"access\":0,\"version_id\":101106,\"is_role\":true}');
|
||||
INSERT IGNORE INTO `global_priv` VALUES ('','coolerAssist','{\"access\":0,\"version_id\":100707,\"is_role\":true}');
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -867,17 +867,17 @@ BEGIN
|
|||
|
||||
UPDATE vn.buy b
|
||||
JOIN vn.entry e ON e.id = b.entryFk
|
||||
JOIN vn.travel tr ON tr.id = e.travelFk
|
||||
JOIN vn.agencyMode am ON am.id = tr.agencyModeFk
|
||||
JOIN vn.travel tr ON tr.id = e.travelFk
|
||||
JOIN vn.agencyMode am ON am.id = tr.agencyModeFk
|
||||
JOIN vn.item i ON i.id = b.itemFk
|
||||
JOIN edi.supplyResponse sr ON i.supplyResponseFk = sr.ID
|
||||
SET b.quantity = NEW.NumberOfItemsPerCask * NEW.NumberOfUnits,
|
||||
b.stickers = NEW.NumberOfUnits
|
||||
WHERE i.supplyResponseFk = NEW.ID
|
||||
AND am.name = 'LOGIFLORA'
|
||||
AND e.isRaid
|
||||
AND tr.isRaid
|
||||
AND tr.landed >= util.VN_CURDATE();
|
||||
|
||||
|
||||
END */;;
|
||||
DELIMITER ;
|
||||
/*!50003 SET sql_mode = @saved_sql_mode */ ;
|
||||
|
@ -1460,6 +1460,9 @@ DELIMITER ;;
|
|||
FOR EACH ROW
|
||||
BEGIN
|
||||
SET NEW.editorFk = account.myUser_getId();
|
||||
IF NEW.`property` = '*' THEN
|
||||
CALL util.throw('The property field cannot be *');
|
||||
END IF;
|
||||
END */;;
|
||||
DELIMITER ;
|
||||
/*!50003 SET sql_mode = @saved_sql_mode */ ;
|
||||
|
@ -2000,6 +2003,7 @@ BEGIN
|
|||
DECLARE vIsEqualizated BOOL;
|
||||
|
||||
SET NEW.editorFk = account.myUser_getId();
|
||||
SET NEW.geoFk = address_getGeo(NEW.id);
|
||||
|
||||
IF (NEW.phone <> '') THEN
|
||||
CALL pbx.phone_isValid(NEW.phone);
|
||||
|
@ -2036,7 +2040,6 @@ DELIMITER ;;
|
|||
BEFORE UPDATE ON `address`
|
||||
FOR EACH ROW
|
||||
BEGIN
|
||||
|
||||
SET NEW.editorFk = account.myUser_getId();
|
||||
|
||||
IF !(NEW.phone <=> OLD.phone) AND (NEW.phone <> '') THEN
|
||||
|
@ -2047,6 +2050,11 @@ BEGIN
|
|||
CALL pbx.phone_isValid(NEW.mobile);
|
||||
END IF;
|
||||
|
||||
IF NOT (NEW.provinceFk <=> OLD.provinceFk)
|
||||
OR (NEW.postalCode <=> OLD.postalCode) THEN
|
||||
|
||||
SET NEW.geoFk = address_getGeo(NEW.id);
|
||||
END IF;
|
||||
END */;;
|
||||
DELIMITER ;
|
||||
/*!50003 SET sql_mode = @saved_sql_mode */ ;
|
||||
|
@ -3423,8 +3431,10 @@ DELIMITER ;;
|
|||
BEFORE INSERT ON `client`
|
||||
FOR EACH ROW
|
||||
BEGIN
|
||||
|
||||
SET NEW.editorFk = account.myUser_getId();
|
||||
SET NEW.accountingAccount = 4300000000 + NEW.id;
|
||||
SET NEW.lastSalesPersonFk = NEW.salesPersonFk;
|
||||
SET NEW.geoFk = client_getGeo(NEW.id);
|
||||
|
||||
IF (NEW.phone <> '') THEN
|
||||
CALL pbx.phone_isValid(NEW.phone);
|
||||
|
@ -3433,10 +3443,6 @@ BEGIN
|
|||
IF (NEW.mobile <> '') THEN
|
||||
CALL pbx.phone_isValid(NEW.mobile);
|
||||
END IF;
|
||||
|
||||
SET NEW.accountingAccount = 4300000000 + NEW.id;
|
||||
|
||||
SET NEW.lastSalesPersonFk = NEW.salesPersonFk;
|
||||
END */;;
|
||||
DELIMITER ;
|
||||
/*!50003 SET sql_mode = @saved_sql_mode */ ;
|
||||
|
@ -3550,6 +3556,12 @@ BEGIN
|
|||
IF NOT (NEW.businessTypeFk <=> OLD.businessTypeFk) AND (NEW.businessTypeFk = 'individual' OR OLD.businessTypeFk = 'individual') THEN
|
||||
SET NEW.isTaxDataChecked = 0;
|
||||
END IF;
|
||||
|
||||
IF NOT (NEW.provinceFk <=> OLD.provinceFk)
|
||||
OR (NEW.postcode <=> OLD.postcode) THEN
|
||||
|
||||
SET NEW.geoFk = client_getGeo(NEW.id);
|
||||
END IF;
|
||||
END */;;
|
||||
DELIMITER ;
|
||||
/*!50003 SET sql_mode = @saved_sql_mode */ ;
|
||||
|
@ -4960,7 +4972,7 @@ DELIMITER ;;
|
|||
BEFORE UPDATE ON `entry`
|
||||
FOR EACH ROW
|
||||
BEGIN
|
||||
DECLARE vIsVirtual BOOL;
|
||||
DECLARE vIsRaid BOOL;
|
||||
DECLARE vPrintedCount INT;
|
||||
DECLARE vHasDistinctWarehouses BOOL;
|
||||
DECLARE vTotalBuy INT;
|
||||
|
@ -4994,18 +5006,20 @@ BEGIN
|
|||
IF NEW.travelFk IS NOT NULL THEN
|
||||
CALL travel_throwAwb(NEW.travelFk);
|
||||
END IF;
|
||||
|
||||
SELECT COUNT(*) > 0 INTO vIsVirtual
|
||||
FROM entryVirtual WHERE entryFk = NEW.id;
|
||||
|
||||
SELECT t.isRaid INTO vIsRaid
|
||||
FROM travel t
|
||||
JOIN entry e ON e.travelFk = t.id
|
||||
WHERE e.id = NEW.id;
|
||||
|
||||
SELECT NOT (o.warehouseInFk <=> n.warehouseInFk)
|
||||
OR NOT (o.warehouseOutFk <=> n.warehouseOutFk)
|
||||
OR NOT (o.warehouseOutFk <=> n.warehouseOutFk)
|
||||
INTO vHasDistinctWarehouses
|
||||
FROM travel o, travel n
|
||||
WHERE o.id = OLD.travelFk
|
||||
AND n.id = NEW.travelFk;
|
||||
|
||||
IF vIsVirtual AND vHasDistinctWarehouses THEN
|
||||
IF vIsRaid AND vHasDistinctWarehouses THEN
|
||||
SIGNAL SQLSTATE '45000'
|
||||
SET MESSAGE_TEXT = 'A cloned entry cannot be moved to a travel with different warehouses';
|
||||
END IF;
|
||||
|
@ -5028,7 +5042,7 @@ BEGIN
|
|||
SET NEW.currencyFk = entry_getCurrency(NEW.currencyFk, NEW.supplierFk);
|
||||
END IF;
|
||||
|
||||
IF NOT (NEW.travelFk <=> OLD.travelFk)
|
||||
IF NOT (NEW.travelFk <=> OLD.travelFk)
|
||||
OR NOT (NEW.currencyFk <=> OLD.currencyFk)
|
||||
OR NOT (NEW.supplierFk <=> OLD.supplierFk) THEN
|
||||
|
||||
|
@ -5325,7 +5339,8 @@ BEGIN
|
|||
SET packages = (SELECT COUNT(counter)-1
|
||||
FROM expedition e WHERE e.ticketFk = OLD.ticketFk and e.freightItemFk)
|
||||
WHERE t.id = OLD.ticketFk;
|
||||
|
||||
|
||||
CALL expedition_selfConsumptionPackaging(OLD.id, 'remove');
|
||||
END */;;
|
||||
DELIMITER ;
|
||||
/*!50003 SET sql_mode = @saved_sql_mode */ ;
|
||||
|
@ -6909,10 +6924,31 @@ DELIMITER ;
|
|||
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
|
||||
/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
|
||||
DELIMITER ;;
|
||||
/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`itemType_beforeInsert`
|
||||
BEFORE INSERT ON `itemType`
|
||||
FOR EACH ROW
|
||||
BEGIN
|
||||
SET NEW.editorFk = account.myUser_getId();
|
||||
END */;;
|
||||
DELIMITER ;
|
||||
/*!50003 SET sql_mode = @saved_sql_mode */ ;
|
||||
/*!50003 SET character_set_client = @saved_cs_client */ ;
|
||||
/*!50003 SET character_set_results = @saved_cs_results */ ;
|
||||
/*!50003 SET collation_connection = @saved_col_connection */ ;
|
||||
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
||||
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
||||
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
|
||||
/*!50003 SET character_set_client = utf8mb4 */ ;
|
||||
/*!50003 SET character_set_results = utf8mb4 */ ;
|
||||
/*!50003 SET collation_connection = utf8mb4_unicode_ci */ ;
|
||||
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
|
||||
/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
|
||||
DELIMITER ;;
|
||||
/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`itemType_beforeUpdate`
|
||||
BEFORE UPDATE ON `itemType`
|
||||
FOR EACH ROW
|
||||
BEGIN
|
||||
SET NEW.editorFk = account.myUser_getId();
|
||||
IF NEW.itemPackingTypeFk = '' THEN
|
||||
|
||||
SET NEW.itemPackingTypeFk = NULL;
|
||||
|
@ -6939,6 +6975,30 @@ DELIMITER ;
|
|||
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
|
||||
/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
|
||||
DELIMITER ;;
|
||||
/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`itemType_afterDelete`
|
||||
AFTER DELETE ON `itemType`
|
||||
FOR EACH ROW
|
||||
BEGIN
|
||||
INSERT INTO itemTypeLog
|
||||
SET `action` = 'delete',
|
||||
`changedModel` = 'ItemType',
|
||||
`changedModelId` = OLD.id,
|
||||
`userFk` = account.myUser_getId();
|
||||
END */;;
|
||||
DELIMITER ;
|
||||
/*!50003 SET sql_mode = @saved_sql_mode */ ;
|
||||
/*!50003 SET character_set_client = @saved_cs_client */ ;
|
||||
/*!50003 SET character_set_results = @saved_cs_results */ ;
|
||||
/*!50003 SET collation_connection = @saved_col_connection */ ;
|
||||
/*!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=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`machine_beforeInsert`
|
||||
BEFORE INSERT ON `machine`
|
||||
FOR EACH ROW
|
||||
|
@ -7584,7 +7644,7 @@ DELIMITER ;;
|
|||
AFTER DELETE ON `productionConfig`
|
||||
FOR EACH ROW
|
||||
BEGIN
|
||||
INSERT INTO productionConfig
|
||||
INSERT INTO productionConfigLog
|
||||
SET `action` = 'delete',
|
||||
`changedModel` = 'ProductionConfig',
|
||||
`changedModelId` = OLD.id,
|
||||
|
@ -8168,18 +8228,18 @@ DELIMITER ;;
|
|||
/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`route_afterUpdate`
|
||||
AFTER UPDATE ON `route`
|
||||
FOR EACH ROW
|
||||
BEGIN
|
||||
BEGIN
|
||||
IF IFNULL(NEW.gestdocFk,0) <> IFNULL(OLD.gestdocFk,0) AND NEW.gestdocFk > 0 THEN
|
||||
-- JGF 09/09/14 cuando se añade un gestdoc a una ruta, se le asigna automagicamente a todos sus Tickets
|
||||
|
||||
|
||||
-- Inserta el gestdoc en todos los tickets de la ruta
|
||||
INSERT INTO ticketDms(ticketFk,dmsFk)
|
||||
SELECT id, NEW.gestdocFk FROM ticket WHERE routeFk = NEW.id
|
||||
ON DUPLICATE KEY UPDATE dmsFk = NEW.gestdocFk;
|
||||
|
||||
-- Update del firmado
|
||||
UPDATE ticket t
|
||||
JOIN ticketDms tg ON t.id = tg.ticketFk
|
||||
-- Update del firmado
|
||||
UPDATE ticket t
|
||||
JOIN ticketDms tg ON t.id = tg.ticketFk
|
||||
SET isSigned = 1 WHERE t.routeFk = NEW.id;
|
||||
END IF;
|
||||
|
||||
|
@ -8187,7 +8247,8 @@ BEGIN
|
|||
OR !(NEW.kmEnd <=> OLD.kmEnd)
|
||||
OR !(NEW.workerFk <=> OLD.workerFk)
|
||||
OR !(NEW.m3 <=> OLD.m3)
|
||||
OR !(NEW.agencyModeFk <=> OLD.agencyModeFk)THEN
|
||||
OR !(NEW.agencyModeFk <=> OLD.agencyModeFk)
|
||||
OR !(NEW.vehicleFk <=> OLD.vehicleFk)THEN
|
||||
CALL route_calcCommission(NEW.id);
|
||||
END IF;
|
||||
|
||||
|
@ -9086,6 +9147,7 @@ DELIMITER ;;
|
|||
FOR EACH ROW
|
||||
BEGIN
|
||||
SET NEW.editorFk = account.myUser_getId();
|
||||
SET NEW.geoFk = supplier_getGeo(NEW.id);
|
||||
END */;;
|
||||
DELIMITER ;
|
||||
/*!50003 SET sql_mode = @saved_sql_mode */ ;
|
||||
|
@ -9180,6 +9242,11 @@ BEGIN
|
|||
SET NEW.isPayMethodChecked = FALSE;
|
||||
END IF;
|
||||
|
||||
IF NOT (NEW.provinceFk <=> OLD.provinceFk)
|
||||
OR (NEW.postCode <=> OLD.postCode) THEN
|
||||
|
||||
SET NEW.geoFk = supplier_getGeo(NEW.id);
|
||||
END IF;
|
||||
END */;;
|
||||
DELIMITER ;
|
||||
/*!50003 SET sql_mode = @saved_sql_mode */ ;
|
||||
|
@ -10501,28 +10568,6 @@ DELIMITER ;
|
|||
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
|
||||
/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
|
||||
DELIMITER ;;
|
||||
/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`town_beforeUpdate`
|
||||
BEFORE UPDATE ON `town`
|
||||
FOR EACH ROW
|
||||
BEGIN
|
||||
-- IF !(OLD.geoFk <=> NEW.geoFk) THEN
|
||||
-- CALL zoneGeo_throwNotEditable;
|
||||
-- END IF;
|
||||
END */;;
|
||||
DELIMITER ;
|
||||
/*!50003 SET sql_mode = @saved_sql_mode */ ;
|
||||
/*!50003 SET character_set_client = @saved_cs_client */ ;
|
||||
/*!50003 SET character_set_results = @saved_cs_results */ ;
|
||||
/*!50003 SET collation_connection = @saved_col_connection */ ;
|
||||
/*!50003 SET @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=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`town_afterUpdate`
|
||||
AFTER UPDATE ON `town`
|
||||
FOR EACH ROW
|
||||
|
@ -10580,7 +10625,11 @@ BEGIN
|
|||
CALL travel_checkDates(NEW.shipped, NEW.landed);
|
||||
|
||||
CALL travel_checkWarehouseIsFeedStock(NEW.warehouseInFk);
|
||||
|
||||
|
||||
IF NEW.isRaid IS NOT NULL OR NEW.daysInForward IS NOT NULL THEN
|
||||
CALL travel_checkRaid(NEW.isRaid, NEW.daysInForward);
|
||||
END IF;
|
||||
|
||||
IF NEW.awbFk IS NOT NULL THEN
|
||||
CALL travel_throwAwb(NEW.id);
|
||||
END IF;
|
||||
|
@ -10607,7 +10656,7 @@ BEGIN
|
|||
|
||||
SET NEW.editorFk = account.myUser_getId();
|
||||
|
||||
IF NOT (NEW.landed <=> OLD.landed)
|
||||
IF NOT (NEW.landed <=> OLD.landed)
|
||||
OR NOT (NEW.shipped <=> OLD.shipped) THEN
|
||||
CALL travel_checkDates(NEW.shipped, NEW.landed);
|
||||
END IF;
|
||||
|
@ -10620,19 +10669,23 @@ BEGIN
|
|||
CALL travel_checkWarehouseIsFeedStock(NEW.warehouseInFk);
|
||||
END IF;
|
||||
|
||||
IF NOT (NEW.isRaid <=> OLD.isRaid) OR NOT (NEW.daysInForward <=> OLD.daysInForward) THEN
|
||||
CALL travel_checkRaid(NEW.isRaid, NEW.daysInForward);
|
||||
END IF;
|
||||
|
||||
IF NOT (NEW.awbFk <=> OLD.awbFk)THEN
|
||||
SELECT COUNT(*) INTO vHasAnyInvoiceBooked
|
||||
SELECT COUNT(*) INTO vHasAnyInvoiceBooked
|
||||
FROM travel t
|
||||
JOIN entry e ON e.travelFk = t.id
|
||||
JOIN invoiceIn ii ON ii.id = e.invoiceInFk
|
||||
JOIN entry e ON e.travelFk = t.id
|
||||
JOIN invoiceIn ii ON ii.id = e.invoiceInFk
|
||||
WHERE t.id = NEW.id
|
||||
AND ii.isBooked;
|
||||
|
||||
AND ii.isBooked;
|
||||
|
||||
IF vHasAnyInvoiceBooked THEN
|
||||
CALL util.throw('The travel has entries with booked invoices');
|
||||
END IF;
|
||||
END IF;
|
||||
|
||||
END IF;
|
||||
|
||||
IF (NOT(NEW.awbFk <=> OLD.awbFk)) AND NEW.awbFk IS NOT NULL THEN
|
||||
CALL travel_throwAwb(NEW.id);
|
||||
END IF;
|
||||
|
@ -11526,4 +11579,4 @@ USE `vn2008`;
|
|||
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
|
||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||
|
||||
-- Dump completed on 2024-11-12 7:06:44
|
||||
-- Dump completed on 2024-11-26 12:09:13
|
||||
|
|
|
@ -745,15 +745,15 @@ INSERT INTO `vn`.`zoneClosure` (`zoneFk`, `dated`, `hour`)
|
|||
|
||||
INSERT INTO `vn`.`zoneConfig` (`id`, `scope`) VALUES (1, '1');
|
||||
|
||||
INSERT INTO `vn`.`route`(`id`, `time`, `workerFk`, `created`, `vehicleFk`, `agencyModeFk`, `description`, `m3`, `cost`, `started`, `finished`, `zoneFk`)
|
||||
INSERT INTO `vn`.`route`(`id`, `time`, `workerFk`, `created`, `vehicleFk`, `agencyModeFk`, `description`, `m3`, `cost`, `started`, `finished`, `zoneFk`, `dated`)
|
||||
VALUES
|
||||
(1, '1899-12-30 12:15:00', 56, util.VN_CURDATE(), 1, 1, 'first route', 1.8, 10, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1),
|
||||
(2, '1899-12-30 13:20:00', 56, util.VN_CURDATE(), 1, 2, 'second route', 0.2, 20, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 9),
|
||||
(3, '1899-12-30 14:30:00', 56, util.VN_CURDATE(), 2, 3, 'third route', 0.5, 30, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 10),
|
||||
(4, '1899-12-30 15:45:00', 56, util.VN_CURDATE(), 3, 4, 'fourth route', 0, 40, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 12),
|
||||
(5, '1899-12-30 16:00:00', 56, util.VN_CURDATE(), 4, 5, 'fifth route', 0.1, 50, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 13),
|
||||
(6, NULL, 57, util.VN_CURDATE(), 5, 7, 'sixth route', 1.7, 60, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 3),
|
||||
(7, NULL, 57, util.VN_CURDATE(), 6, 8, 'seventh route', 0, 70, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 5);
|
||||
(1, '1899-12-30 12:15:00', 56, util.VN_CURDATE(), 1, 1, 'first route', 1.8, 10, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1, util.VN_CURDATE()),
|
||||
(2, '1899-12-30 13:20:00', 56, util.VN_CURDATE(), 1, 2, 'second route', 0.2, 20, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 9, util.VN_CURDATE()),
|
||||
(3, '1899-12-30 14:30:00', 56, util.VN_CURDATE(), 2, 3, 'third route', 0.5, 30, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 10, util.VN_CURDATE()),
|
||||
(4, '1899-12-30 15:45:00', 56, util.VN_CURDATE(), 3, 4, 'fourth route', 0, 40, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 12, util.VN_CURDATE()),
|
||||
(5, '1899-12-30 16:00:00', 56, util.VN_CURDATE(), 4, 5, 'fifth route', 0.1, 50, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 13, util.VN_CURDATE()),
|
||||
(6, NULL, 57, util.VN_CURDATE(), 5, 7, 'sixth route', 1.7, 60, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 3, util.VN_CURDATE()),
|
||||
(7, NULL, 57, util.VN_CURDATE(), 6, 8, 'seventh route', 0, 70, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 5, util.VN_CURDATE());
|
||||
|
||||
INSERT INTO `vn`.`ticket`(`id`, `priority`, `agencyModeFk`,`warehouseFk`,`routeFk`, `shipped`, `landed`, `clientFk`,`nickname`, `addressFk`, `refFk`, `isDeleted`, `zoneFk`, `zonePrice`, `zoneBonus`, `created`, `weight`, `cmrFk`, `problem`, `risk`)
|
||||
VALUES
|
||||
|
@ -2040,7 +2040,7 @@ INSERT INTO `vn`.`ticketService`(`id`, `description`, `quantity`, `price`, `taxC
|
|||
INSERT INTO `pbx`.`config` (id,defaultPrefix)
|
||||
VALUES (1,'0034');
|
||||
|
||||
INSERT INTO `pbx`.`prefix` (country, prefix)
|
||||
INSERT IGNORE INTO `pbx`.`prefix` (country, prefix)
|
||||
VALUES
|
||||
('es', '0034'),
|
||||
('fr', '0033'),
|
||||
|
@ -4026,7 +4026,8 @@ INSERT INTO srt.buffer (id, x, y, `size`, `length`, stateFk, typeFk, isActive, c
|
|||
|
||||
INSERT IGNORE INTO vn.saySimpleCountry (countryFk, channel)
|
||||
VALUES (19, '1169'),
|
||||
(8, '1183');
|
||||
(8, '1183'),
|
||||
(1, '1320');
|
||||
|
||||
INSERT IGNORE INTO vn.saySimpleCountry (countryFk, channel)
|
||||
VALUES (19, 1169),
|
||||
|
@ -4172,7 +4173,7 @@ VALUES
|
|||
|
||||
|
||||
INSERT IGNORE INTO vn.saySimpleConfig (url, defaultChannel)
|
||||
VALUES ('saysimle-url-mock', 1320);
|
||||
VALUES ('saysimle-url-mock', '1819');
|
||||
|
||||
INSERT INTO vn.workerIrpf (workerFk,spouseNif, geographicMobilityDate)
|
||||
VALUES (1106,'26493101E','2019-09-20');
|
||||
|
|
|
@ -19,14 +19,14 @@ BEGIN
|
|||
bultos)
|
||||
SELECT r.id,
|
||||
r.agencyModeFk,
|
||||
r.created,
|
||||
r.dated,
|
||||
SUM(sv.volume / ebv.m3)
|
||||
FROM vn.route r
|
||||
JOIN vn.ticket t ON t.routeFk = r.id
|
||||
LEFT JOIN vn.`zone` z ON z.id = t.zoneFk
|
||||
JOIN vn.saleVolume sv ON sv.ticketFk = t.id
|
||||
JOIN vn.expeditionBoxVol ebv ON ebv.code = 'transportBox'
|
||||
WHERE r.created BETWEEN vDatedFrom AND vDatedTo
|
||||
WHERE r.dated BETWEEN vDatedFrom AND vDatedTo
|
||||
AND z.isVolumetric
|
||||
GROUP BY r.id;
|
||||
|
||||
|
@ -38,12 +38,12 @@ BEGIN
|
|||
Bultos)
|
||||
SELECT r.id,
|
||||
r.agencyModeFk,
|
||||
r.created,
|
||||
r.dated,
|
||||
SUM(t.packages)
|
||||
FROM vn.route r
|
||||
JOIN vn.ticket t ON t.routeFk = r.id
|
||||
LEFT JOIN vn.`zone` z ON z.id = t.zoneFk
|
||||
WHERE r.created BETWEEN vDatedFrom AND vDatedTo
|
||||
WHERE r.dated BETWEEN vDatedFrom AND vDatedTo
|
||||
AND NOT z.isVolumetric
|
||||
GROUP BY r.id
|
||||
ON DUPLICATE KEY UPDATE Bultos = Bultos + VALUES(Bultos);
|
||||
|
@ -60,7 +60,7 @@ BEGIN
|
|||
JOIN vn.component c ON c.id = sc.componentFk
|
||||
JOIN vn.componentType ct ON ct.id = c.typeFk
|
||||
WHERE ct.code = 'freight'
|
||||
AND r.created BETWEEN vDatedFrom AND vDatedTo
|
||||
AND r.dated BETWEEN vDatedFrom AND vDatedTo
|
||||
GROUP BY r.id
|
||||
) sub ON sub.routeFk = r.Id_Ruta
|
||||
SET r.practico = IFNULL(sub.totalPractice / r.Bultos, 0);
|
||||
|
@ -77,7 +77,7 @@ BEGIN
|
|||
JOIN vn.address ad ON ad.id = t.addressFk
|
||||
JOIN vn.client c ON c.id = ad.clientFk
|
||||
LEFT JOIN vn.`zone` z ON z.id = t.zoneFk
|
||||
WHERE r.created BETWEEN vDatedFrom AND vDatedTo
|
||||
WHERE r.dated BETWEEN vDatedFrom AND vDatedTo
|
||||
AND NOT z.isVolumetric
|
||||
GROUP BY t.routeFk
|
||||
) sub ON r.Id_Ruta = sub.routeFk
|
||||
|
@ -93,7 +93,7 @@ BEGIN
|
|||
JOIN vn.saleVolume sf ON sf.ticketFk = t.id
|
||||
JOIN vn.client c ON c.id = t.clientFk
|
||||
JOIN vn.`zone` z ON z.id = t.zoneFk
|
||||
WHERE r.created BETWEEN vDatedFrom AND vDatedTo
|
||||
WHERE r.dated BETWEEN vDatedFrom AND vDatedTo
|
||||
AND z.isVolumetric
|
||||
GROUP BY t.routeFk
|
||||
) sub ON r.Id_Ruta = sub.routeFk
|
||||
|
@ -108,7 +108,7 @@ BEGIN
|
|||
JOIN vn.route r ON r.id = t.routeFk
|
||||
JOIN vn.greuge g ON g.ticketFk = t.id
|
||||
JOIN vn.greugeType gt ON gt.id = g.greugeTypeFk
|
||||
WHERE r.created BETWEEN vDatedFrom AND vDatedTo
|
||||
WHERE r.dated BETWEEN vDatedFrom AND vDatedTo
|
||||
AND gt.code = 'freightDifference'
|
||||
GROUP BY t.routeFk
|
||||
) sub ON r.Id_Ruta = sub.routeFk
|
||||
|
|
|
@ -0,0 +1,32 @@
|
|||
DELIMITER $$
|
||||
CREATE OR REPLACE DEFINER=`vn`@`localhost` FUNCTION `vn`.`buy_getLastWithoutInventory`(
|
||||
vItemFk INT,
|
||||
vWarehouseFk INT
|
||||
)
|
||||
RETURNS int(11)
|
||||
DETERMINISTIC
|
||||
BEGIN
|
||||
/**
|
||||
* Retorna la última compra que no sea inventario.
|
||||
*
|
||||
* @param vItemFk Id del artículo
|
||||
* @param vWarehouseFk Id del almacén
|
||||
* @return Id de compra
|
||||
*/
|
||||
DECLARE vBuyFk INT;
|
||||
|
||||
SELECT b.id INTO vBuyFk
|
||||
FROM buy b
|
||||
JOIN entry e ON e.id = b.entryFk
|
||||
JOIN travel t ON t.id = e.travelFk
|
||||
WHERE e.id <> (SELECT defaultEntry FROM entryConfig)
|
||||
AND e.supplierFk <> (SELECT supplierFk FROM inventoryConfig)
|
||||
AND e.typeFk <> 'inventory'
|
||||
AND b.itemFk = vItemFk
|
||||
AND (t.warehouseInFk = vWarehouseFk OR t.warehouseInFk IS NULL)
|
||||
ORDER BY ABS(DATEDIFF(util.VN_CURDATE(), t.landed)), e.created DESC
|
||||
LIMIT 1;
|
||||
|
||||
RETURN vBuyFk;
|
||||
END$$
|
||||
DELIMITER ;
|
|
@ -26,7 +26,7 @@ BEGIN
|
|||
JOIN cache.zoneAgencyFriendship zf ON zf.agencyModeFk = r.agencyModeFk
|
||||
WHERE friendship >= vSignificativeFriendship
|
||||
AND zf.zoneFk = vZoneFk
|
||||
AND r.created = vLanded
|
||||
AND r.dated = vLanded
|
||||
ORDER BY friendship;
|
||||
|
||||
-- Se eliminan aquellas que superan el volumen máximo
|
||||
|
|
|
@ -26,7 +26,7 @@ BEGIN
|
|||
JOIN cache.zoneAgencyFriendship zf ON zf.agencyModeFk = r.agencyModeFk
|
||||
WHERE friendship >= vSignificativeFriendship
|
||||
AND zf.zoneFk = vZoneFk
|
||||
AND r.created = vLanded
|
||||
AND r.dated = vLanded
|
||||
ORDER BY friendship;
|
||||
|
||||
-- Se eliminan aquellas que superan el volumen máximo
|
||||
|
|
|
@ -23,12 +23,13 @@ BEGIN
|
|||
LEAST(bb.stickers, FLOOR(ish.visible / ish.packing)) ishStickers,
|
||||
bb.stickers buyStickers
|
||||
FROM itemShelving ish
|
||||
JOIN shelving sh ON sh.id = ish.shelvingFk
|
||||
JOIN (SELECT b.id, b.itemFk, b.stickers
|
||||
FROM buy b
|
||||
WHERE b.entryFk = vFromEntryFk
|
||||
ORDER BY b.stickers DESC
|
||||
LIMIT 10000000000000000000) bb ON bb.itemFk = ish.itemFk
|
||||
WHERE ish.shelvingFk = vShelvingCode COLLATE utf8_general_ci
|
||||
WHERE sh.code = vShelvingCode COLLATE utf8_general_ci
|
||||
AND NOT ish.isSplit
|
||||
GROUP BY ish.id;
|
||||
|
||||
|
|
|
@ -41,6 +41,6 @@ BEGIN
|
|||
WHERE expeditionFk = e.id)
|
||||
LEFT JOIN expeditionState es2 ON es2.id = es.id
|
||||
WHERE t.routeFk = vRouteFk AND e.freightItemFk <> FALSE
|
||||
ORDER BY r.created, t.priority DESC;
|
||||
ORDER BY r.dated, t.priority DESC;
|
||||
END$$
|
||||
DELIMITER ;
|
||||
|
|
|
@ -1,36 +0,0 @@
|
|||
DELIMITER $$
|
||||
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`itemShelvingLog_get`(
|
||||
vShelvingCode VARCHAR(10)
|
||||
)
|
||||
BEGIN
|
||||
/**
|
||||
* Devuelve el log de los item en cada carro
|
||||
*
|
||||
* @param vShelvingCode Matrícula del carro
|
||||
*
|
||||
*/
|
||||
SELECT isl.itemShelvingFk,
|
||||
isl.created,
|
||||
isl.accion,
|
||||
isl.itemFk,
|
||||
isl.shelvingFk,
|
||||
isl.quantity,
|
||||
isl.visible,
|
||||
isl.available,
|
||||
isl.grouping,
|
||||
isl.packing,
|
||||
isl.stars,
|
||||
item.longName,
|
||||
item.size,
|
||||
item.subName,
|
||||
worker.code,
|
||||
isl.accion
|
||||
FROM item
|
||||
JOIN itemShelvingLog isl ON item.id = isl.itemFk
|
||||
JOIN worker ON isl.workerFk = worker.id
|
||||
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;
|
||||
END$$
|
||||
DELIMITER ;
|
|
@ -27,7 +27,7 @@ BEGIN
|
|||
rm.ticketFree = 0,
|
||||
rm.ticketProduction = 0,
|
||||
rm.ticketPacked = 0,
|
||||
rm.dated = r.created;
|
||||
rm.dated = r.dated;
|
||||
|
||||
UPDATE routesMonitor rm
|
||||
JOIN (
|
||||
|
|
|
@ -14,7 +14,7 @@ BEGIN
|
|||
DECLARE vIsKmTruckRate BOOL;
|
||||
DECLARE vCountryFk INT;
|
||||
|
||||
SELECT r.created >= rc.cutoffDated INTO vIsUpdatable
|
||||
SELECT r.dated >= rc.cutoffDated INTO vIsUpdatable
|
||||
FROM route r
|
||||
JOIN routeConfig rc
|
||||
WHERE r.id = vSelf;
|
||||
|
|
|
@ -16,7 +16,7 @@ BEGIN
|
|||
JOIN vn.route r ON r.id = t.routeFk
|
||||
WHERE r.isOk = FALSE
|
||||
AND ic.itemFk = NEW.itemFk
|
||||
AND r.created >= util.VN_CURDATE()
|
||||
AND r.dated >= util.VN_CURDATE()
|
||||
GROUP BY r.id;
|
||||
IF NEW.cm3Delivery = 0 AND NEW.warehouseFk = 60 THEN
|
||||
CALL mail_insert(
|
||||
|
|
|
@ -1,18 +0,0 @@
|
|||
DELIMITER $$
|
||||
CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`itemShelving_afterInsert`
|
||||
AFTER INSERT ON `itemShelving`
|
||||
FOR EACH ROW
|
||||
BEGIN
|
||||
INSERT INTO itemShelvingLog
|
||||
SET itemShelvingFk = NEW.id,
|
||||
workerFk = account.myUser_getId(),
|
||||
accion = 'CREA REGISTRO',
|
||||
itemFk = NEW.itemFk,
|
||||
shelvingFk = NEW.shelvingFk,
|
||||
visible = NEW.visible,
|
||||
`grouping` = NEW.`grouping`,
|
||||
packing = NEW.packing,
|
||||
available = NEW.available;
|
||||
|
||||
END$$
|
||||
DELIMITER ;
|
|
@ -1,18 +0,0 @@
|
|||
DELIMITER $$
|
||||
CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`itemShelving_afterUpdate`
|
||||
AFTER UPDATE ON `itemShelving`
|
||||
FOR EACH ROW
|
||||
BEGIN
|
||||
INSERT INTO itemShelvingLog
|
||||
SET itemShelvingFk = NEW.id,
|
||||
workerFk = account.myUser_getId(),
|
||||
accion = 'CAMBIO',
|
||||
itemFk = NEW.itemFk,
|
||||
shelvingFk = NEW.shelvingFk,
|
||||
visible = NEW.visible,
|
||||
`grouping` = NEW.`grouping`,
|
||||
packing = NEW.packing,
|
||||
available = NEW.available;
|
||||
|
||||
END$$
|
||||
DELIMITER ;
|
|
@ -1,15 +0,0 @@
|
|||
DELIMITER $$
|
||||
CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`itemShelving_beforeDelete`
|
||||
BEFORE DELETE ON `itemShelving`
|
||||
FOR EACH ROW
|
||||
INSERT INTO vn.itemShelvingLog(itemShelvingFk,
|
||||
workerFk,
|
||||
accion,
|
||||
shelvingFk,
|
||||
itemFk)
|
||||
VALUES( OLD.id,
|
||||
account.myUser_getId(),
|
||||
'ELIMINADO',
|
||||
OLD.shelvingFk,
|
||||
OLD.itemFk)$$
|
||||
DELIMITER ;
|
|
@ -14,7 +14,7 @@ BEGIN
|
|||
SELECT IFNULL(b.workCenterFK, r.defaultWorkCenterFk)
|
||||
FROM vn.routeConfig r
|
||||
LEFT JOIN vn.business b ON b.workerFk = vUserFk
|
||||
AND NEW.created BETWEEN b.started AND IFNULL(b.ended, NEW.created));
|
||||
AND NEW.dated BETWEEN b.started AND IFNULL(b.ended, NEW.dated));
|
||||
|
||||
IF ISNULL(NEW.agencyModeFk) THEN
|
||||
SELECT r.agencyModeFk INTO vDefaultAgencyModeFk
|
||||
|
|
|
@ -23,7 +23,7 @@ BEGIN
|
|||
JOIN vn.route r ON r.id = t.routeFk
|
||||
WHERE r.isOk = FALSE
|
||||
AND s.id = NEW.id
|
||||
AND r.created >= util.VN_CURDATE()
|
||||
AND r.dated >= util.VN_CURDATE()
|
||||
GROUP BY r.id;
|
||||
END IF;
|
||||
END$$
|
||||
|
|
|
@ -54,7 +54,7 @@ BEGIN
|
|||
JOIN vn.route r ON r.id = t.routeFk
|
||||
WHERE r.isOk = FALSE
|
||||
AND s.id = NEW.id
|
||||
AND r.created >= util.VN_CURDATE()
|
||||
AND r.dated >= util.VN_CURDATE()
|
||||
GROUP BY r.id;
|
||||
END IF;
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ BEGIN
|
|||
JOIN vn.route r ON r.id = t.routeFk
|
||||
WHERE r.isOk = FALSE
|
||||
AND s.id = OLD.id
|
||||
AND r.created >= util.VN_CURDATE()
|
||||
AND r.dated >= util.VN_CURDATE()
|
||||
GROUP BY r.id;
|
||||
END IF;
|
||||
END$$
|
||||
|
|
|
@ -8,7 +8,7 @@ BEGIN
|
|||
FROM vn.route r
|
||||
WHERE r.isOk = FALSE
|
||||
AND r.id = OLD.routeFk
|
||||
AND r.created >= util.VN_CURDATE()
|
||||
AND r.dated >= util.VN_CURDATE()
|
||||
GROUP BY r.id;
|
||||
|
||||
DELETE FROM sale WHERE ticketFk = OLD.id;
|
||||
|
|
|
@ -22,7 +22,7 @@ BEGIN
|
|||
FROM `route`
|
||||
WHERE NOT isOk
|
||||
AND id IN (OLD.routeFk, NEW.routeFk)
|
||||
AND created >= util.VN_CURDATE()
|
||||
AND dated >= util.VN_CURDATE()
|
||||
GROUP BY id;
|
||||
END IF;
|
||||
|
||||
|
@ -45,7 +45,7 @@ BEGIN
|
|||
JOIN vn.route r ON r.id = t.routeFk
|
||||
WHERE r.isOk = FALSE
|
||||
AND t.id = NEW.id
|
||||
AND r.created >= util.VN_CURDATE()
|
||||
AND r.dated >= util.VN_CURDATE()
|
||||
GROUP BY r.id;
|
||||
SET NEW.shipped = DATE_FORMAT(NEW.shipped, '2000-%m-%d %T');
|
||||
SET NEW.landed = DATE_FORMAT(NEW.landed, '2000-%m-%d %T');
|
||||
|
|
|
@ -20,10 +20,6 @@ BEGIN
|
|||
CALL travel_checkWarehouseIsFeedStock(NEW.warehouseInFk);
|
||||
END IF;
|
||||
|
||||
IF NOT (NEW.isRaid <=> OLD.isRaid) OR NOT (NEW.daysInForward <=> OLD.daysInForward) THEN
|
||||
CALL travel_checkRaid(NEW.isRaid, NEW.daysInForward);
|
||||
END IF;
|
||||
|
||||
IF NOT (NEW.awbFk <=> OLD.awbFk)THEN
|
||||
SELECT COUNT(*) INTO vHasAnyInvoiceBooked
|
||||
FROM travel t
|
||||
|
|
|
@ -9,8 +9,8 @@ AS SELECT `rs2`.`description` AS `truck`,
|
|||
`rs`.`id` <=> `rm`.`roadmapStopFk` AS `isMatch`,
|
||||
`t`.`warehouseFk` AS `warehouseFk`,
|
||||
IF(
|
||||
`r`.`created` > `util`.`VN_CURDATE`() + INTERVAL 1 DAY,
|
||||
ucase(dayname(`r`.`created`)),
|
||||
`r`.`dated` > `util`.`VN_CURDATE`() + INTERVAL 1 DAY,
|
||||
ucase(dayname(`r`.`dated`)),
|
||||
NULL
|
||||
) AS `nombreDia`
|
||||
FROM (
|
||||
|
|
|
@ -6,7 +6,7 @@ AS SELECT `r`.`id` AS `routeFk`,
|
|||
COUNT(DISTINCT `e`.`id`) AS `expeditions`,
|
||||
COUNT(DISTINCT `es`.`id`) AS `scanned`,
|
||||
max(`e`.`created`) AS `lastPacked`,
|
||||
`r`.`created` AS `created`
|
||||
`r`.`dated` AS `created`
|
||||
FROM (
|
||||
(
|
||||
(
|
||||
|
@ -23,5 +23,5 @@ FROM (
|
|||
)
|
||||
LEFT JOIN `vn`.`expeditionScan` `es` ON(`es`.`expeditionFk` = `e`.`id`)
|
||||
)
|
||||
WHERE `r`.`created` >= `util`.`yesterday`()
|
||||
WHERE `r`.`dated` >= `util`.`yesterday`()
|
||||
GROUP BY `r`.`id`
|
||||
|
|
|
@ -3,7 +3,7 @@ CREATE OR REPLACE DEFINER=`root`@`localhost`
|
|||
VIEW `vn2008`.`Rutas`
|
||||
AS SELECT `r`.`id` AS `Id_Ruta`,
|
||||
`r`.`workerFk` AS `Id_Trabajador`,
|
||||
`r`.`created` AS `Fecha`,
|
||||
`r`.`dated` AS `Fecha`,
|
||||
`r`.`vehicleFk` AS `Id_Vehiculo`,
|
||||
`r`.`agencyModeFk` AS `Id_Agencia`,
|
||||
`r`.`time` AS `Hora`,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
ALTER TABLE vn.travel ADD isRaid tinyint(1) DEFAULT 0 NOT NULL COMMENT 'Redada';
|
||||
ALTER TABLE vn.travel ADD IF NOT EXISTS isRaid tinyint(1) DEFAULT 0 NOT NULL COMMENT 'Redada';
|
||||
|
||||
ALTER TABLE vn.travel MODIFY COLUMN daysInForward int(10) unsigned DEFAULT NULL
|
||||
COMMENT 'Cuando es una redada, indica el número de días que se añadirán a la fecha de hoy para establecer el landed. NULL si no es una redada';
|
||||
COMMENT 'Cuando es una redada, indica el número de días que se añadirán a la fecha de hoy para establecer el landed. NULL si no es una redada';
|
|
@ -0,0 +1,8 @@
|
|||
DELETE FROM vn.stateI18n
|
||||
WHERE `name` IN ('Billed', 'Facturado', 'Assisted preparation', 'Preparación asistida', 'Shipped', 'Embarcado', 'Stowaway OK', 'Polizón OK');
|
||||
|
||||
UPDATE vn.`state` SET nextStateFk = 43
|
||||
WHERE nextStateFk IN (11, 27, 30, 32, 41);
|
||||
|
||||
DELETE FROM vn.`state`
|
||||
WHERE code IN ('INVOICED', 'ASSISTED_PREPARATION', 'BOARD', 'OK STOWAWAY', 'PARTIAL_PREPARATION');
|
|
@ -0,0 +1,2 @@
|
|||
RENAME TABLE vn.itemShelvingLog TO vn.itemShelvingLog__;
|
||||
ALTER TABLE vn.itemShelvingLog__ COMMENT='@deprecated 2024-11-26';
|
|
@ -0,0 +1,7 @@
|
|||
ALTER TABLE `vn`.`creditInsurance` DROP COLUMN `creditClassification__`;
|
||||
ALTER TABLE `vn`.`worker` DROP COLUMN `isF11Allowed__`;
|
||||
ALTER TABLE `util`.`config` DROP COLUMN `dbVersion__`;
|
||||
ALTER TABLE `util`.`config` DROP COLUMN `hasTriggersDisabled__`;
|
||||
ALTER TABLE `vn`.`agencyMode` DROP COLUMN `showAgencyName__`;
|
||||
DROP TABLE `account`.`accountLog__`;
|
||||
DROP TABLE `vn`.`silexACL__`;
|
|
@ -0,0 +1,5 @@
|
|||
ALTER TABLE vn.duaInvoiceIn DROP KEY IF EXISTS duaFk_UNIQUE;
|
||||
ALTER TABLE vn.duaInvoiceIn DROP KEY IF EXISTS duaInvoiceIn_unique;
|
||||
ALTER TABLE vn.duaInvoiceIn ADD CONSTRAINT duaInvoiceIn_unique
|
||||
UNIQUE KEY (invoiceInFk);
|
||||
|
|
@ -0,0 +1 @@
|
|||
ALTER TABLE vn.route ADD dated DATE;
|
|
@ -0,0 +1 @@
|
|||
UPDATE vn.route SET dated = created;
|
|
@ -0,0 +1,2 @@
|
|||
ALTER TABLE vn.route
|
||||
MODIFY COLUMN dated DATE NOT NULL;
|
|
@ -0,0 +1,2 @@
|
|||
ALTER TABLE vn.route
|
||||
MODIFY COLUMN created TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP;
|
|
@ -0,0 +1,107 @@
|
|||
INSERT IGNORE INTO vn.saySimpleCountry
|
||||
SET countryFk = 1,
|
||||
channel = '1320';
|
||||
|
||||
UPDATE vn.saySimpleConfig
|
||||
SET defaultChannel = '1819';
|
||||
|
||||
INSERT IGNORE INTO pbx.prefix (country, prefix) VALUES
|
||||
('ES', '0034'),
|
||||
('IT', '0039'),
|
||||
('DE', '0049'),
|
||||
('RO', '0040'),
|
||||
('NL', '0031'),
|
||||
('BE', '0032'),
|
||||
('RU', '007'),
|
||||
('PT', '00351'),
|
||||
('LT', '00370'),
|
||||
('UA', '00380'),
|
||||
('CO', '0057'),
|
||||
('FI', '00358'),
|
||||
('EC', '00593'),
|
||||
('LB', '00961'),
|
||||
('IL', '00972'),
|
||||
('TH', '0066'),
|
||||
('PA', '00507'),
|
||||
('GB', '0044'),
|
||||
('FR', '0033'),
|
||||
('PL', '0048'),
|
||||
('MX', '0052'),
|
||||
('MA', '00212'),
|
||||
('AI', '001268'),
|
||||
('GH', '00233'),
|
||||
('SE', '0046'),
|
||||
('AE', '00971'),
|
||||
('KE', '00254'),
|
||||
('AD', '00376'),
|
||||
('AO', '00244'),
|
||||
('LU', '00352'),
|
||||
('BY', '00375'),
|
||||
('MD', '00373'),
|
||||
('DK', '0045'),
|
||||
('ET', '00251'),
|
||||
('AU', '0061'),
|
||||
('CA', '0001'),
|
||||
('CL', '0056'),
|
||||
('CN', '0086'),
|
||||
('CR', '00506'),
|
||||
('GT', '00502'),
|
||||
('CI', '00225'),
|
||||
('PE', '0051'),
|
||||
('LK', '0094'),
|
||||
('ZA', '0027'),
|
||||
('TR', '0090'),
|
||||
('ZW', '00263'),
|
||||
('MY', '0060'),
|
||||
('NZ', '0064'),
|
||||
('IE', '00353'),
|
||||
('MN', '00976'),
|
||||
('SV', '00503'),
|
||||
('ZM', '00260'),
|
||||
('JP', '0081'),
|
||||
('RW', '00250'),
|
||||
('AL', '00355'),
|
||||
('KW', '00965'),
|
||||
('SG', '0065'),
|
||||
('SR', '00597'),
|
||||
('KR', '0082'),
|
||||
('US', '0001'),
|
||||
('RS', '00381'),
|
||||
('AT', '0043'),
|
||||
('EG', '0020'),
|
||||
('LV', '00371'),
|
||||
('CY', '00357'),
|
||||
('CZ', '00420'),
|
||||
('BB', '001246'),
|
||||
('SK', '00421'),
|
||||
('IN', '0091'),
|
||||
('DZ', '00213'),
|
||||
('BR', '0055'),
|
||||
('GR', '0030'),
|
||||
('MC', '00377'),
|
||||
('SI', '00386'),
|
||||
('GP', '00590'),
|
||||
('NO', '0047'),
|
||||
('CH', '0041'),
|
||||
('AR', '0054'),
|
||||
('CU', '0053'),
|
||||
('GQ', '00240'),
|
||||
('GN', '00224'),
|
||||
('HN', '00504'),
|
||||
('ML', '00223'),
|
||||
('NI', '00505'),
|
||||
('PK', '0092'),
|
||||
('PY', '00595'),
|
||||
('SN', '00221'),
|
||||
('UY', '00598'),
|
||||
('VE', '0058'),
|
||||
('BG', '00359'),
|
||||
('GE', '00995'),
|
||||
('EE', '00372'),
|
||||
('SA', '00966'),
|
||||
('RN', '00234'),
|
||||
('HK', '00852'),
|
||||
('GI', '00350'),
|
||||
('CM', '00237'),
|
||||
('HU', '0036'),
|
||||
('AM', '00374');
|
|
@ -791,7 +791,7 @@ export default {
|
|||
},
|
||||
createRouteView: {
|
||||
worker: 'vn-route-create vn-worker-autocomplete[ng-model="$ctrl.route.workerFk"]',
|
||||
createdDatePicker: 'vn-route-create vn-date-picker[ng-model="$ctrl.route.created"]',
|
||||
createdDatePicker: 'vn-route-create vn-date-picker[ng-model="$ctrl.route.dated"]',
|
||||
vehicleAuto: 'vn-route-create vn-autocomplete[ng-model="$ctrl.route.vehicleFk"]',
|
||||
agency: 'vn-route-create vn-autocomplete[ng-model="$ctrl.route.agencyModeFk"]',
|
||||
description: 'vn-route-create [ng-model="$ctrl.route.description"]',
|
||||
|
|
|
@ -246,5 +246,6 @@
|
|||
"ticketLostExpedition": "The ticket [{{ticketId}}]({{{ticketUrl}}}) has the following lost expedition:{{ expeditionId }}",
|
||||
"The raid information is not correct": "The raid information is not correct",
|
||||
"Payment method is required": "Payment method is required",
|
||||
"Sales already moved": "Sales already moved"
|
||||
"Sales already moved": "Sales already moved",
|
||||
"There are tickets to be invoiced": "There are tickets to be invoiced for this zone, please delete them first"
|
||||
}
|
||||
|
|
|
@ -389,6 +389,7 @@
|
|||
"ticketLostExpedition": "El ticket [{{ticketId}}]({{{ticketUrl}}}) tiene la siguiente expedición perdida:{{ expeditionId }}",
|
||||
"The web user's email already exists": "El correo del usuario web ya existe",
|
||||
"Sales already moved": "Ya han sido transferidas",
|
||||
"The raid information is not correct": "La información de la redada no es correcta"
|
||||
"The raid information is not correct": "La información de la redada no es correcta",
|
||||
"There are tickets to be invoiced": "Hay tickets para esta zona, borralos primero"
|
||||
}
|
||||
|
||||
|
|
|
@ -54,7 +54,7 @@ module.exports = Self => {
|
|||
{
|
||||
relation: 'country',
|
||||
scope: {
|
||||
fields: ['id', 'name'],
|
||||
fields: ['id', 'name', 'code'],
|
||||
include: {
|
||||
relation: 'saySimpleCountry',
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
const UserError = require('vn-loopback/util/user-error');
|
||||
module.exports = Self => {
|
||||
Self.remoteMethodCtx('print', {
|
||||
Self.remoteMethodCtx('labelSupplier', {
|
||||
description: 'Print stickers of all entries',
|
||||
accessType: 'READ',
|
||||
accepts: [
|
||||
|
@ -28,13 +28,13 @@ module.exports = Self => {
|
|||
}
|
||||
],
|
||||
http: {
|
||||
path: '/:id/print',
|
||||
path: '/:id/labelSupplier',
|
||||
verb: 'GET'
|
||||
},
|
||||
accessScopes: ['DEFAULT', 'read:multimedia']
|
||||
});
|
||||
|
||||
Self.print = async function(ctx, id, options) {
|
||||
Self.labelSupplier = async function(ctx, id, options) {
|
||||
const models = Self.app.models;
|
||||
const myOptions = {};
|
||||
if (typeof options == 'object')
|
||||
|
@ -48,7 +48,8 @@ module.exports = Self => {
|
|||
for (const buy of buys) {
|
||||
if (buy.stickers < 1) continue;
|
||||
ctx.args.id = buy.id;
|
||||
const pdfBuffer = await models.Entry.buyLabel(ctx, myOptions);
|
||||
ctx.args.copies = buy.stickers;
|
||||
const pdfBuffer = await models.Entry.buyLabelSupplier(ctx, myOptions);
|
||||
await merger.add(new Uint8Array(pdfBuffer[0]));
|
||||
}
|
||||
|
|
@ -12,7 +12,8 @@ module.exports = Self => {
|
|||
require('../methods/entry/addFromPackaging')(Self);
|
||||
require('../methods/entry/addFromBuy')(Self);
|
||||
require('../methods/entry/buyLabel')(Self);
|
||||
require('../methods/entry/print')(Self);
|
||||
require('../methods/entry/labelSupplier')(Self);
|
||||
require('../methods/entry/buyLabelSupplier')(Self);
|
||||
|
||||
Self.observe('before save', async function(ctx, options) {
|
||||
if (ctx.isNewInstance) return;
|
||||
|
|
|
@ -51,7 +51,7 @@ module.exports = Self => {
|
|||
JOIN vn.productionConfig pc
|
||||
WHERE sh.code = ? AND s.code = pc.sectorFromCode
|
||||
), tItemInSector AS (
|
||||
SELECT is2.itemFk, is2.created, is2.shelvingFk
|
||||
SELECT is2.itemFk, is2.created, sh.code
|
||||
FROM vn.itemShelving is2
|
||||
JOIN vn.shelving sh ON sh.id = is2.shelvingFk
|
||||
JOIN vn.parking p ON p.id = sh.parkingFk
|
||||
|
@ -59,7 +59,7 @@ module.exports = Self => {
|
|||
JOIN vn.productionConfig pc
|
||||
WHERE sh.code <> ?
|
||||
AND s.code = pc.sectorFromCode)
|
||||
SELECT ti.itemFK, tis.shelvingFk
|
||||
SELECT ti.itemFK, tis.code shelvingFk
|
||||
FROM tItemShelving ti
|
||||
JOIN tItemInSector tis ON tis.itemFk = ti.itemFk
|
||||
JOIN vn.productionConfig pc
|
||||
|
|
|
@ -56,9 +56,6 @@
|
|||
"ItemShelving": {
|
||||
"dataSource": "vn"
|
||||
},
|
||||
"ItemShelvingLog": {
|
||||
"dataSource": "vn"
|
||||
},
|
||||
"ItemShelvingSale": {
|
||||
"dataSource": "vn"
|
||||
},
|
||||
|
|
|
@ -1,52 +0,0 @@
|
|||
{
|
||||
"name": "ItemShelvingLog",
|
||||
"base": "VnModel",
|
||||
"mixins": {
|
||||
"Loggable": true
|
||||
},
|
||||
"options": {
|
||||
"mysql": {
|
||||
"table": "itemShelvingLog"
|
||||
}
|
||||
},
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "number",
|
||||
"id": true,
|
||||
"description": "Identifier"
|
||||
},
|
||||
"created": {
|
||||
"type": "date"
|
||||
},
|
||||
"shelvingFk": {
|
||||
"type": "string"
|
||||
},
|
||||
"itemFk": {
|
||||
"type": "number"
|
||||
},
|
||||
"visible": {
|
||||
"type": "number"
|
||||
},
|
||||
"accion": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"relations": {
|
||||
"item": {
|
||||
"type": "belongsTo",
|
||||
"model": "Item",
|
||||
"foreignKey": "itemFk"
|
||||
},
|
||||
"worker": {
|
||||
"type": "belongsTo",
|
||||
"model": "Worker",
|
||||
"foreignKey": "workerFk"
|
||||
},
|
||||
"shelving": {
|
||||
"type": "belongsTo",
|
||||
"model": "Shelving",
|
||||
"foreignKey": "shelvingFk",
|
||||
"primaryKey": "code"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -342,7 +342,6 @@ module.exports = Self => {
|
|||
'CHECKED',
|
||||
'PACKING',
|
||||
'PACKED',
|
||||
'INVOICED',
|
||||
'ON_DELIVERY',
|
||||
'PREPARED',
|
||||
'WAITING_FOR_PICKUP',
|
||||
|
@ -350,10 +349,7 @@ module.exports = Self => {
|
|||
'PRINTED_BACK',
|
||||
'LAST_CALL',
|
||||
'PREVIOUS_PREPARATION',
|
||||
'ASSISTED_PREPARATION',
|
||||
'BOARD',
|
||||
'PRINTED STOWAWAY',
|
||||
'OK STOWAWAY',
|
||||
'HALF_PACKED',
|
||||
'COOLER_PREPARATION'
|
||||
]}};
|
||||
|
|
|
@ -66,9 +66,9 @@ module.exports = Self => {
|
|||
case 'agencyFk':
|
||||
return {'agencyFk': value};
|
||||
case 'from':
|
||||
return {'created': {gte: value}};
|
||||
return {'dated': {gte: value}};
|
||||
case 'to':
|
||||
return {'created': {lte: value}};
|
||||
return {'dated': {lte: value}};
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -81,7 +81,7 @@ module.exports = Self => {
|
|||
`SELECT *
|
||||
FROM (
|
||||
SELECT r.id routeFk,
|
||||
r.created,
|
||||
r.dated,
|
||||
r.agencyModeFk,
|
||||
am.name agencyModeName,
|
||||
am.agencyFk,
|
||||
|
@ -103,7 +103,7 @@ module.exports = Self => {
|
|||
LEFT JOIN vn.ticket t ON t.routeFk = r.id
|
||||
LEFT JOIN vn.supplierAgencyTerm sat ON sat.agencyFk = a.id
|
||||
LEFT JOIN vn.supplier s ON s.id = sat.supplierFk
|
||||
WHERE r.created > DATE_ADD(?, INTERVAL -2 MONTH) AND sat.supplierFk IS NOT NULL
|
||||
WHERE r.dated > DATE_ADD(?, INTERVAL -2 MONTH) AND sat.supplierFk IS NOT NULL
|
||||
GROUP BY r.id
|
||||
) a`
|
||||
, [date]);
|
||||
|
|
|
@ -10,10 +10,10 @@ module.exports = Self => {
|
|||
description: 'The routes ids to clone'
|
||||
},
|
||||
{
|
||||
arg: 'created',
|
||||
arg: 'dated',
|
||||
type: 'date',
|
||||
required: true,
|
||||
description: 'The created date for all routes'
|
||||
description: 'The date for all routes'
|
||||
}
|
||||
],
|
||||
returns: {
|
||||
|
@ -26,7 +26,7 @@ module.exports = Self => {
|
|||
}
|
||||
});
|
||||
|
||||
Self.clone = async(ids, created) => {
|
||||
Self.clone = async(ids, dated) => {
|
||||
const tx = await Self.beginTransaction({});
|
||||
try {
|
||||
const options = {transaction: tx};
|
||||
|
@ -39,7 +39,7 @@ module.exports = Self => {
|
|||
throw new Error(`The amount of routes found don't match`);
|
||||
|
||||
const routes = originalRoutes.map(route => {
|
||||
route.created = created;
|
||||
route.dated = dated;
|
||||
return route;
|
||||
});
|
||||
|
||||
|
|
|
@ -93,9 +93,9 @@ module.exports = Self => {
|
|||
case 'search':
|
||||
return {'id': value};
|
||||
case 'from':
|
||||
return {'created': {gte: value}};
|
||||
return {'dated': {gte: value}};
|
||||
case 'to':
|
||||
return {'created': {lte: value}};
|
||||
return {'dated': {lte: value}};
|
||||
case 'description':
|
||||
return {'description': {like: `%${value}%`}};
|
||||
case 'isOk':
|
||||
|
@ -119,7 +119,7 @@ module.exports = Self => {
|
|||
SELECT
|
||||
r.id,
|
||||
r.workerFk,
|
||||
r.created,
|
||||
r.dated,
|
||||
r.vehicleFk,
|
||||
r.agencyModeFk,
|
||||
r.time,
|
||||
|
|
|
@ -46,14 +46,14 @@ module.exports = Self => {
|
|||
and: [
|
||||
{
|
||||
or: [
|
||||
{'created': currentDate},
|
||||
{'created': nextDay}
|
||||
{'dated': currentDate},
|
||||
{'dated': nextDay}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
order: [
|
||||
'created ASC',
|
||||
'dated ASC',
|
||||
'time ASC',
|
||||
'agencyName ASC'
|
||||
]
|
||||
|
|
|
@ -43,10 +43,10 @@ module.exports = Self => {
|
|||
for (let zoneAgencyMode of zoneAgencyModes)
|
||||
zoneIds.push(zoneAgencyMode.zoneFk);
|
||||
|
||||
const minDate = new Date(route.created);
|
||||
const minDate = new Date(route.dated);
|
||||
minDate.setHours(0, 0, 0, 0);
|
||||
|
||||
const maxDate = new Date(route.created);
|
||||
const maxDate = new Date(route.dated);
|
||||
maxDate.setHours(23, 59, 59, 59);
|
||||
|
||||
let tickets = await Self.app.models.Ticket.find({
|
||||
|
|
|
@ -42,10 +42,10 @@ module.exports = Self => {
|
|||
|
||||
try {
|
||||
const route = await models.Route.findById(routeId, null, myOptions);
|
||||
const minDate = new Date(route.created);
|
||||
const minDate = new Date(route.dated);
|
||||
minDate.setHours(0, 0, 0, 0);
|
||||
|
||||
const maxDate = new Date(route.created);
|
||||
const maxDate = new Date(route.dated);
|
||||
maxDate.setHours(23, 59, 59, 59);
|
||||
const ticket = await models.Ticket.findOne({
|
||||
where: {
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
"id": true,
|
||||
"description": "Identifier"
|
||||
},
|
||||
"created": {
|
||||
"dated": {
|
||||
"type": "date"
|
||||
},
|
||||
"time": {
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
<div class="attributes">
|
||||
<vn-label-value
|
||||
label="Date"
|
||||
value="{{$ctrl.route.created | date: 'dd/MM/yyyy'}}">
|
||||
value="{{$ctrl.route.dated | date: 'dd/MM/yyyy'}}">
|
||||
</vn-label-value>
|
||||
<vn-label-value
|
||||
label="Agency"
|
||||
|
|
|
@ -48,7 +48,7 @@ class Controller extends Descriptor {
|
|||
'id',
|
||||
'workerFk',
|
||||
'agencyModeFk',
|
||||
'created',
|
||||
'dated',
|
||||
'm3',
|
||||
'warehouseFk',
|
||||
'description',
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
value="{{$ctrl.summary.route.id}}">
|
||||
</vn-label-value>
|
||||
<vn-label-value label="Date"
|
||||
value="{{$ctrl.summary.route.created | date: 'dd/MM/yyyy'}}">
|
||||
value="{{$ctrl.summary.route.dated | date: 'dd/MM/yyyy'}}">
|
||||
</vn-label-value>
|
||||
<vn-label-value label="Agency"
|
||||
value="{{$ctrl.summary.route.agencyMode.name}}">
|
||||
|
|
|
@ -52,7 +52,8 @@ module.exports = Self => {
|
|||
|
||||
const deletedExpedition = await models.Expedition.destroyById(expeditionId);
|
||||
deletedExpeditions.push(deletedExpedition);
|
||||
} catch (e) {
|
||||
} catch (error) {
|
||||
console.error('error: ', error);
|
||||
notDeletedExpeditions.push(expeditionId);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -387,10 +387,10 @@ class Controller extends Section {
|
|||
}
|
||||
|
||||
newOrderFromTicket() {
|
||||
this.$http.post(`Orders/newFromTicket`, {ticketFk: this.ticket.id}).then(res => {
|
||||
const path = this.$state.href('order.card.catalog', {id: res.data});
|
||||
window.open(path, '_blank');
|
||||
this.$http.post(`Orders/newFromTicket`, {ticketFk: this.ticket.id}).then(async res => {
|
||||
const path = await this.vnApp.getUrl(`order/${res.data}/catalog`);
|
||||
|
||||
window.open(path, '_blank');
|
||||
this.vnApp.showSuccess(this.$t('Order created'));
|
||||
});
|
||||
}
|
||||
|
|
|
@ -567,14 +567,10 @@ describe('Ticket', () => {
|
|||
const expectedResponse = {id: 123};
|
||||
|
||||
window.open = jasmine.createSpy('open');
|
||||
controller.$state.href = jasmine.createSpy('href')
|
||||
.and.returnValue('/somePath');
|
||||
|
||||
$httpBackend.expect('POST', `Orders/newFromTicket`, expectedParams).respond(expectedResponse);
|
||||
controller.newOrderFromTicket();
|
||||
$httpBackend.flush();
|
||||
|
||||
expect(window.open).toHaveBeenCalledWith('/somePath', '_blank');
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -51,9 +51,9 @@ module.exports = Self => {
|
|||
};
|
||||
|
||||
const ticketList = await models.Ticket.find(filter, myOptions);
|
||||
|
||||
if (ticketList.length > 0)
|
||||
throw new UserError('There are tickets for this area, delete them first');
|
||||
const hasRefFk = ticketList.some(ticket => ticket.refFk);
|
||||
if (hasRefFk)
|
||||
throw new UserError('There are tickets to be invoiced');
|
||||
|
||||
await models.Zone.destroyById(id, myOptions);
|
||||
|
||||
|
|
|
@ -8,14 +8,14 @@ describe('zone deletezone()', () => {
|
|||
__: value => value
|
||||
};
|
||||
const ctx = {req: activeCtx};
|
||||
const zoneId = 4;
|
||||
const zoneId2 = 3;
|
||||
let ticketIDs;
|
||||
|
||||
beforeAll(async() => {
|
||||
spyOn(LoopBackContext, 'getCurrentContext').and.returnValue({
|
||||
active: activeCtx
|
||||
});
|
||||
|
||||
const zoneId = 4;
|
||||
const originalTickets = await models.Ticket.find({
|
||||
where: {
|
||||
zoneFk: zoneId
|
||||
|
@ -29,7 +29,7 @@ describe('zone deletezone()', () => {
|
|||
|
||||
it('should delete a zone and update their tickets', async() => {
|
||||
const tx = await models.Zone.beginTransaction({});
|
||||
|
||||
const zoneId = 4;
|
||||
try {
|
||||
const options = {transaction: tx};
|
||||
await models.Zone.deleteZone(ctx, zoneId, options);
|
||||
|
@ -47,17 +47,18 @@ describe('zone deletezone()', () => {
|
|||
|
||||
it('should not delete the zone if it has tickets', async() => {
|
||||
const tx = await models.Zone.beginTransaction({});
|
||||
const zoneId = 1;
|
||||
|
||||
let error;
|
||||
try {
|
||||
const options = {transaction: tx};
|
||||
await models.Zone.deleteZone(ctx, zoneId2, options);
|
||||
await models.Zone.deleteZone(ctx, zoneId, options);
|
||||
await tx.rollback();
|
||||
} catch (e) {
|
||||
error = e.message;
|
||||
await tx.rollback();
|
||||
}
|
||||
|
||||
expect(error).toEqual('There are tickets for this area, delete them first');
|
||||
expect(error).toEqual('There are tickets to be invoiced');
|
||||
});
|
||||
});
|
||||
|
|
|
@ -258,7 +258,6 @@ localFixtures:
|
|||
- itemFamily
|
||||
- itemLog
|
||||
- itemShelving
|
||||
- itemShelvingLog
|
||||
- itemShelvingSale
|
||||
- itemTag
|
||||
- itemTaxCountry
|
||||
|
|
|
@ -32,6 +32,11 @@ td {
|
|||
.md-txt {
|
||||
font-size: 26px;
|
||||
}
|
||||
.lg-txt {
|
||||
font-size: 40px;
|
||||
padding: 0px;
|
||||
line-height: 1;
|
||||
}
|
||||
.xl-txt {
|
||||
font-size: 50px;
|
||||
}
|
||||
|
|
|
@ -36,12 +36,12 @@
|
|||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="md-txt xl-width bold center">
|
||||
<td class="bold center lg-txt xl-width">
|
||||
<div class="overflow-line">
|
||||
{{buy.itemFk}}
|
||||
{{formatNumber(buy.itemFk)}}
|
||||
</div>
|
||||
</td>
|
||||
<td colspan="2" class="md-txt md-width center">
|
||||
<td colspan="2" class="center md-txt md-width">
|
||||
<div class="overflow-line">
|
||||
{{`${(packing || buy.packing)} x ${buy.stems || ''}`}}
|
||||
</div>
|
||||
|
@ -56,7 +56,7 @@
|
|||
{{'LAID'}}
|
||||
</div>
|
||||
<div v-else class="overflow-line">
|
||||
{{buy.entryFk}}
|
||||
{{formatNumber(buy.entryFk)}}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -73,17 +73,17 @@
|
|||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="center xl-width">
|
||||
<td class="center xs-txt xl-width">
|
||||
<div class="overflow-line">
|
||||
{{buy.buyFk}}
|
||||
{{formatNumber(buy.buyFk)}}
|
||||
</div>
|
||||
</td>
|
||||
<td class="xs-txt sm-width center">
|
||||
<td class="center xs-txt sm-width">
|
||||
<div class="overflow-line">
|
||||
{{date}}
|
||||
</div>
|
||||
</td>
|
||||
<td class="xs-txt sm-width cursive center bold">
|
||||
<td class="cursive center bold xs-txt sm-width">
|
||||
<div class="overflow-line">
|
||||
{{`${buy.labelNum}/${buy.quantity / (packing || buy.packing)}`}}
|
||||
</div>
|
||||
|
|
|
@ -9,7 +9,7 @@ module.exports = {
|
|||
this.date = Date.vnNew();
|
||||
this.buys = await this.rawSqlFromDef('buy', [this.copies || 1, this.id]);
|
||||
if (!this.buys.length) throw new UserError(`Empty data source`);
|
||||
this.date = moment(this.date).format('WW/E');
|
||||
this.date = moment(this.date).format('WW/DD');
|
||||
},
|
||||
methods: {
|
||||
getBarcode(data) {
|
||||
|
@ -20,11 +20,14 @@ module.exports = {
|
|||
xmlDocument: document,
|
||||
format: 'code128',
|
||||
displayValue: false,
|
||||
width: 3.8,
|
||||
height: 85,
|
||||
width: 3.5,
|
||||
height: 75,
|
||||
margin: 0
|
||||
});
|
||||
return new XMLSerializer().serializeToString(svgNode);
|
||||
},
|
||||
formatNumber(number) {
|
||||
return new Intl.NumberFormat('es-ES', {maximumFractionDigits: 0}).format(number);
|
||||
}
|
||||
},
|
||||
props: {
|
||||
|
|
|
@ -34,6 +34,9 @@ html {
|
|||
background-color: black;
|
||||
color: white;
|
||||
}
|
||||
.sm-txt {
|
||||
font-size: 18px;
|
||||
}
|
||||
.md-txt {
|
||||
font-size: 20px;
|
||||
}
|
||||
|
|
|
@ -11,8 +11,8 @@
|
|||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
{{buy.buyFk}}
|
||||
<td colspan="2" class="sm-txt">
|
||||
{{formatNumber(buy.buyFk)}}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -28,7 +28,7 @@
|
|||
<tr>
|
||||
<td colspan="3" class="lg-width black-bg center bold xl-txt padding">
|
||||
<div class="overflow-line">
|
||||
{{buy.itemFk}}
|
||||
{{formatNumber(buy.itemFk)}}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -78,8 +78,7 @@
|
|||
<div v-if="buy.isLaid && typeId === 'buy'" class="overflow-line black-bg bold">
|
||||
{{'LAID'}}
|
||||
</div>
|
||||
<div v-else class="overflow-line">
|
||||
{{buy.entryFk}}
|
||||
<div v-else class="overflow-line xs-txt">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -103,7 +102,7 @@
|
|||
<tr>
|
||||
<td class="sm-width">
|
||||
<div class="overflow-line">
|
||||
<i>Entrada:</i> {{buy.entryFk}}
|
||||
<i>Entrada:</i> {{formatNumber(buy.entryFk)}}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
@ -9,7 +9,7 @@ module.exports = {
|
|||
this.buys = await this.rawSqlFromDef('buy', [this.copies || 1, this.id]);
|
||||
if (!this.buys.length) throw new UserError(`Empty data source`);
|
||||
this.qr = await this.getQr(this.buys[0].buyFk);
|
||||
this.date = moment(this.date).format('WW/E');
|
||||
this.date = moment(this.date).format('WW/DD');
|
||||
},
|
||||
methods: {
|
||||
getQr(data) {
|
||||
|
@ -24,6 +24,9 @@ module.exports = {
|
|||
margin: 0,
|
||||
errorCorrectionLevel: 'L'
|
||||
});
|
||||
},
|
||||
formatNumber(number) {
|
||||
return new Intl.NumberFormat('es-ES', {maximumFractionDigits: 0}).format(number);
|
||||
}
|
||||
},
|
||||
props: {
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<th class="font gray align-right">{{$t('date')}}</th>
|
||||
<td>{{formatDate(route.created, '%d-%m-%Y')}}</td>
|
||||
<td>{{formatDate(route.dated, '%d-%m-%Y')}}</td>
|
||||
<th class="font gray align-right">{{$t('vehicle')}}</th>
|
||||
<td>{{route.vehicleTradeMark}} {{route.vehicleModel}}</td>
|
||||
</tr>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
SELECT r.id,
|
||||
r.m3,
|
||||
r.created,
|
||||
r.dated,
|
||||
r.time,
|
||||
u.nickName userNickName,
|
||||
v.tradeMark vehicleTradeMark,
|
||||
|
|
|
@ -62,7 +62,7 @@
|
|||
<td width="1px" class="number">x</td>
|
||||
<td class="number align-left">{{buy.packing}}</td>
|
||||
<td width="5%" class="nowrap">{{buy.name}}</td>
|
||||
<td width="20%">referencia de prueba</td>
|
||||
<td width="20%">{{buy.comment}}</td>
|
||||
<td width="20%" class="font light-gray tags" row>
|
||||
<div>
|
||||
<div class="nowrap" v-if="buy.value5">{{buy.tag5}}<strong>→ {{buy.value5}}</strong></div>
|
||||
|
|
|
@ -4,7 +4,7 @@ SELECT ep.id palletFk,
|
|||
r.description `zone`,
|
||||
COUNT(es.id) labels,
|
||||
t.warehouseFk warehouseFk,
|
||||
dayname(r.created) `dayName`,
|
||||
dayname(r.dated) `dayName`,
|
||||
rs.id <=> rm.roadmapStopFk isMatch
|
||||
FROM vn.roadmapStop rs
|
||||
JOIN vn.expeditionPallet ep ON ep.truckFk = rs.id
|
||||
|
|
Loading…
Reference in New Issue