nuevo enfoque recipe y manejo de errores en order_confirm #2523
|
@ -24,6 +24,7 @@ node {
|
||||||
FROM_GIT = env.JOB_NAME.startsWith('gitea/')
|
FROM_GIT = env.JOB_NAME.startsWith('gitea/')
|
||||||
RUN_TESTS = !PROTECTED_BRANCH && FROM_GIT
|
RUN_TESTS = !PROTECTED_BRANCH && FROM_GIT
|
||||||
RUN_BUILD = PROTECTED_BRANCH && FROM_GIT
|
RUN_BUILD = PROTECTED_BRANCH && FROM_GIT
|
||||||
|
|
||||||
// https://www.jenkins.io/doc/book/pipeline/jenkinsfile/#using-environment-variables
|
// https://www.jenkins.io/doc/book/pipeline/jenkinsfile/#using-environment-variables
|
||||||
echo "NODE_NAME: ${env.NODE_NAME}"
|
echo "NODE_NAME: ${env.NODE_NAME}"
|
||||||
echo "WORKSPACE: ${env.WORKSPACE}"
|
echo "WORKSPACE: ${env.WORKSPACE}"
|
||||||
|
@ -59,7 +60,6 @@ pipeline {
|
||||||
}
|
}
|
||||||
environment {
|
environment {
|
||||||
PROJECT_NAME = 'salix'
|
PROJECT_NAME = 'salix'
|
||||||
STACK_NAME = "${env.PROJECT_NAME}-${env.BRANCH_NAME}"
|
|
||||||
}
|
}
|
||||||
stages {
|
stages {
|
||||||
stage('Install') {
|
stage('Install') {
|
||||||
|
@ -203,19 +203,23 @@ pipeline {
|
||||||
sh 'npx myt push $NODE_ENV --force --commit'
|
sh 'npx myt push $NODE_ENV --force --commit'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('Docker') {
|
stage('Kubernetes') {
|
||||||
when {
|
when {
|
||||||
expression { FROM_GIT }
|
expression { FROM_GIT }
|
||||||
}
|
}
|
||||||
environment {
|
|
||||||
DOCKER_HOST = "${env.SWARM_HOST}"
|
|
||||||
}
|
|
||||||
steps {
|
steps {
|
||||||
script {
|
script {
|
||||||
def packageJson = readJSON file: 'package.json'
|
def packageJson = readJSON file: 'package.json'
|
||||||
env.VERSION = packageJson.version
|
env.VERSION = packageJson.version
|
||||||
}
|
}
|
||||||
sh "docker stack deploy --with-registry-auth --compose-file docker-compose.yml ${env.STACK_NAME}"
|
withKubeConfig([
|
||||||
|
serverUrl: "$KUBERNETES_API",
|
||||||
|
credentialsId: 'kubernetes',
|
||||||
|
namespace: 'salix'
|
||||||
|
]) {
|
||||||
|
sh 'kubectl set image deployment/salix-back-$BRANCH_NAME salix-back-$BRANCH_NAME=$REGISTRY/salix-back:$VERSION'
|
||||||
|
sh 'kubectl set image deployment/salix-front-$BRANCH_NAME salix-front-$BRANCH_NAME=$REGISTRY/salix-front:$VERSION'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,9 +33,16 @@
|
||||||
<mrw:CodigoServicio><%= expeditionData.serviceType %></mrw:CodigoServicio>
|
<mrw:CodigoServicio><%= expeditionData.serviceType %></mrw:CodigoServicio>
|
||||||
<mrw:NumeroBultos>1</mrw:NumeroBultos>
|
<mrw:NumeroBultos>1</mrw:NumeroBultos>
|
||||||
<mrw:EntregaSabado><%= expeditionData.weekDays %></mrw:EntregaSabado>
|
<mrw:EntregaSabado><%= expeditionData.weekDays %></mrw:EntregaSabado>
|
||||||
<mrw:Peso><%= expeditionData.kg %></mrw:Peso>
|
|
||||||
<mrw:Reembolso/>
|
<mrw:Reembolso/>
|
||||||
<mrw:ImporteReembolso/>
|
<mrw:ImporteReembolso/>
|
||||||
|
<mrw:Bultos>
|
||||||
|
<mrw:BultoRequest>
|
||||||
|
<mrw:Alto><%= mrw.defaultHeight %></mrw:Alto>
|
||||||
|
<mrw:Largo><%= mrw.defaultLength %></mrw:Largo>
|
||||||
|
<mrw:Ancho><%= mrw.defaultWidth %></mrw:Ancho>
|
||||||
|
<mrw:Peso><%= mrw.defaultWeight %></mrw:Peso>
|
||||||
|
</mrw:BultoRequest>
|
||||||
|
</mrw:Bultos>
|
||||||
</mrw:DatosServicio>
|
</mrw:DatosServicio>
|
||||||
</mrw:request>
|
</mrw:request>
|
||||||
</mrw:TransmEnvio>
|
</mrw:TransmEnvio>
|
||||||
|
|
|
@ -18,15 +18,10 @@ module.exports = Self => {
|
||||||
Self.renewToken = async function(ctx) {
|
Self.renewToken = async function(ctx) {
|
||||||
const {accessToken: token} = ctx.req;
|
const {accessToken: token} = ctx.req;
|
||||||
|
|
||||||
// Check if current token is valid
|
const {courtesyTime} = await models.AccessTokenConfig.findOne({
|
||||||
|
fields: ['courtesyTime']
|
||||||
const {renewPeriod, courtesyTime} = await models.AccessTokenConfig.findOne({
|
|
||||||
fields: ['renewPeriod', 'courtesyTime']
|
|
||||||
});
|
});
|
||||||
const now = Date.now();
|
const isNotExceeded = await Self.validateToken(ctx);
|
||||||
const differenceMilliseconds = now - token.created;
|
|
||||||
const differenceSeconds = Math.floor(differenceMilliseconds / 1000);
|
|
||||||
const isNotExceeded = differenceSeconds < renewPeriod - courtesyTime;
|
|
||||||
if (isNotExceeded)
|
if (isNotExceeded)
|
||||||
return token;
|
return token;
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,30 @@
|
||||||
|
const {models} = require('vn-loopback/server/server');
|
||||||
|
module.exports = Self => {
|
||||||
|
Self.remoteMethodCtx('validateToken', {
|
||||||
|
description: 'Validates the current logged user token',
|
||||||
|
accepts: [],
|
||||||
|
accessType: 'READ',
|
||||||
|
returns: {
|
||||||
|
type: 'Boolean',
|
||||||
|
root: true
|
||||||
|
},
|
||||||
|
http: {
|
||||||
|
path: `/validateToken`,
|
||||||
|
verb: 'GET'
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
Self.validateToken = async function(ctx) {
|
||||||
|
const {accessToken: token} = ctx.req;
|
||||||
|
|
||||||
|
// Check if current token is valid
|
||||||
|
const {renewPeriod, courtesyTime} = await models.AccessTokenConfig.findOne({
|
||||||
|
fields: ['renewPeriod', 'courtesyTime']
|
||||||
|
});
|
||||||
|
const now = Date.now();
|
||||||
|
const differenceMilliseconds = now - token.created;
|
||||||
|
const differenceSeconds = Math.floor(differenceMilliseconds / 1000);
|
||||||
|
const isNotExceeded = differenceSeconds < renewPeriod - courtesyTime;
|
||||||
|
return isNotExceeded;
|
||||||
|
};
|
||||||
|
};
|
|
@ -27,6 +27,18 @@
|
||||||
},
|
},
|
||||||
"subscriberCode": {
|
"subscriberCode": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
|
},
|
||||||
|
"defaultHeight": {
|
||||||
|
"type": "number"
|
||||||
|
},
|
||||||
|
"defaultLength": {
|
||||||
|
"type": "number"
|
||||||
|
},
|
||||||
|
"defaultWidth": {
|
||||||
|
"type": "number"
|
||||||
|
},
|
||||||
|
"defaultWeight": {
|
||||||
|
"type": "number"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,6 +15,7 @@ module.exports = function(Self) {
|
||||||
require('../methods/vn-user/renew-token')(Self);
|
require('../methods/vn-user/renew-token')(Self);
|
||||||
require('../methods/vn-user/share-token')(Self);
|
require('../methods/vn-user/share-token')(Self);
|
||||||
require('../methods/vn-user/update-user')(Self);
|
require('../methods/vn-user/update-user')(Self);
|
||||||
|
require('../methods/vn-user/validate-token')(Self);
|
||||||
|
|
||||||
Self.definition.settings.acls = Self.definition.settings.acls.filter(acl => acl.property !== 'create');
|
Self.definition.settings.acls = Self.definition.settings.acls.filter(acl => acl.property !== 'create');
|
||||||
|
|
||||||
|
|
|
@ -113,6 +113,13 @@
|
||||||
"principalId": "$everyone",
|
"principalId": "$everyone",
|
||||||
"permission": "ALLOW"
|
"permission": "ALLOW"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"property": "validateToken",
|
||||||
|
"accessType": "EXECUTE",
|
||||||
|
"principalType": "ROLE",
|
||||||
|
"principalId": "$authenticated",
|
||||||
|
"permission": "ALLOW"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"property": "privileges",
|
"property": "privileges",
|
||||||
"accessType": "*",
|
"accessType": "*",
|
||||||
|
|
|
@ -3,7 +3,7 @@ USE `util`;
|
||||||
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
|
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
|
||||||
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
|
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
|
||||||
|
|
||||||
INSERT INTO `version` VALUES ('vn-database','11031','12f36dc825b6660062e2c86fde9c6b451cb58f0d','2024-05-14 08:25:58','11048');
|
INSERT INTO `version` VALUES ('vn-database','11071','60ac8cf6fc77b99b199b27866011b1efe8c961e8','2024-05-28 07:32:50','11074');
|
||||||
|
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','10107','00-firstScript.sql','jenkins@10.0.2.69','2022-04-23 10:53:53',NULL,NULL);
|
INSERT INTO `versionLog` VALUES ('vn-database','10107','00-firstScript.sql','jenkins@10.0.2.69','2022-04-23 10:53:53',NULL,NULL);
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','10112','00-firstScript.sql','jenkins@10.0.2.69','2022-05-09 09:14:53',NULL,NULL);
|
INSERT INTO `versionLog` VALUES ('vn-database','10112','00-firstScript.sql','jenkins@10.0.2.69','2022-05-09 09:14:53',NULL,NULL);
|
||||||
|
@ -759,6 +759,7 @@ INSERT INTO `versionLog` VALUES ('vn-database','10953','06-srt.sql','jenkins@db-
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','10953','07-util.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-04-04 07:34:55',NULL,NULL);
|
INSERT INTO `versionLog` VALUES ('vn-database','10953','07-util.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-04-04 07:34:55',NULL,NULL);
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','10953','08-vn.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-04-04 07:34:56',NULL,NULL);
|
INSERT INTO `versionLog` VALUES ('vn-database','10953','08-vn.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-04-04 07:34:56',NULL,NULL);
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','10953','08-vn2.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-04-04 07:34:58',NULL,NULL);
|
INSERT INTO `versionLog` VALUES ('vn-database','10953','08-vn2.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-04-04 07:34:58',NULL,NULL);
|
||||||
|
INSERT INTO `versionLog` VALUES ('vn-database','10955','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-05-28 07:32:16',NULL,NULL);
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','10956','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-04-04 07:34:58',NULL,NULL);
|
INSERT INTO `versionLog` VALUES ('vn-database','10956','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-04-04 07:34:58',NULL,NULL);
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','10957','00-aclTicketClone.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-04-04 07:34:58',NULL,NULL);
|
INSERT INTO `versionLog` VALUES ('vn-database','10957','00-aclTicketClone.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-04-04 07:34:58',NULL,NULL);
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','10959','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-03-18 13:32:25',NULL,NULL);
|
INSERT INTO `versionLog` VALUES ('vn-database','10959','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-03-18 13:32:25',NULL,NULL);
|
||||||
|
@ -788,22 +789,46 @@ INSERT INTO `versionLog` VALUES ('vn-database','10996','00-dropOrderRecalc.sql',
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','10996','01-dropTicketRecalc.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-05-07 07:31:59',NULL,NULL);
|
INSERT INTO `versionLog` VALUES ('vn-database','10996','01-dropTicketRecalc.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-05-07 07:31:59',NULL,NULL);
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','10996','02-dropTravelRecalc.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-05-07 07:31:59',NULL,NULL);
|
INSERT INTO `versionLog` VALUES ('vn-database','10996','02-dropTravelRecalc.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-05-07 07:31:59',NULL,NULL);
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','10997','00-groupingMode.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-05-07 07:34:21',NULL,NULL);
|
INSERT INTO `versionLog` VALUES ('vn-database','10997','00-groupingMode.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-05-07 07:34:21',NULL,NULL);
|
||||||
|
INSERT INTO `versionLog` VALUES ('vn-database','11000','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-05-28 07:32:16',NULL,NULL);
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11001','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-05-14 07:45:26',NULL,NULL);
|
INSERT INTO `versionLog` VALUES ('vn-database','11001','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-05-14 07:45:26',NULL,NULL);
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11002','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-05-14 07:45:26',NULL,NULL);
|
INSERT INTO `versionLog` VALUES ('vn-database','11002','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-05-14 07:45:26',NULL,NULL);
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11003','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-05-07 07:34:21',NULL,NULL);
|
INSERT INTO `versionLog` VALUES ('vn-database','11003','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-05-07 07:34:21',NULL,NULL);
|
||||||
|
INSERT INTO `versionLog` VALUES ('vn-database','11006','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-05-28 07:32:16',NULL,NULL);
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11007','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-05-07 07:34:21',NULL,NULL);
|
INSERT INTO `versionLog` VALUES ('vn-database','11007','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-05-07 07:34:21',NULL,NULL);
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11008','00-alter.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-05-14 07:45:27',NULL,NULL);
|
INSERT INTO `versionLog` VALUES ('vn-database','11008','00-alter.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-05-14 07:45:27',NULL,NULL);
|
||||||
|
INSERT INTO `versionLog` VALUES ('vn-database','11010','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-05-28 07:32:17',NULL,NULL);
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11012','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-05-14 07:45:27',NULL,NULL);
|
INSERT INTO `versionLog` VALUES ('vn-database','11012','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-05-14 07:45:27',NULL,NULL);
|
||||||
|
INSERT INTO `versionLog` VALUES ('vn-database','11013','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-05-28 07:32:17',NULL,NULL);
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11014','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-05-14 07:45:27',NULL,NULL);
|
INSERT INTO `versionLog` VALUES ('vn-database','11014','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-05-14 07:45:27',NULL,NULL);
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11016','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-04-27 13:16:09',NULL,NULL);
|
INSERT INTO `versionLog` VALUES ('vn-database','11016','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-04-27 13:16:09',NULL,NULL);
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11018','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-05-07 07:34:21',NULL,NULL);
|
INSERT INTO `versionLog` VALUES ('vn-database','11018','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-05-07 07:34:21',NULL,NULL);
|
||||||
|
INSERT INTO `versionLog` VALUES ('vn-database','11019','00-locker.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-05-28 07:32:17',NULL,NULL);
|
||||||
|
INSERT INTO `versionLog` VALUES ('vn-database','11019','01-aclLocker.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-05-28 07:32:17',NULL,NULL);
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11021','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-04-30 09:07:56',NULL,NULL);
|
INSERT INTO `versionLog` VALUES ('vn-database','11021','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-04-30 09:07:56',NULL,NULL);
|
||||||
|
INSERT INTO `versionLog` VALUES ('vn-database','11022','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-05-28 07:32:17',NULL,NULL);
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11026','00-entryAlter.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-05-14 07:45:27',NULL,NULL);
|
INSERT INTO `versionLog` VALUES ('vn-database','11026','00-entryAlter.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-05-14 07:45:27',NULL,NULL);
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11026','01-entryUpdate.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-05-14 07:45:27',NULL,NULL);
|
INSERT INTO `versionLog` VALUES ('vn-database','11026','01-entryUpdate.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-05-14 07:45:27',NULL,NULL);
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11026','02-entryInternal.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-05-14 07:45:27',NULL,NULL);
|
INSERT INTO `versionLog` VALUES ('vn-database','11026','02-entryInternal.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-05-14 07:45:27',NULL,NULL);
|
||||||
|
INSERT INTO `versionLog` VALUES ('vn-database','11030','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-05-28 07:32:17',NULL,NULL);
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11031','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-05-14 07:45:27',NULL,NULL);
|
INSERT INTO `versionLog` VALUES ('vn-database','11031','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-05-14 07:45:27',NULL,NULL);
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11033','00-rollbackAcls.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-05-07 12:45:45',NULL,NULL);
|
INSERT INTO `versionLog` VALUES ('vn-database','11033','00-rollbackAcls.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-05-07 12:45:45',NULL,NULL);
|
||||||
|
INSERT INTO `versionLog` VALUES ('vn-database','11034','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-05-28 07:32:17',NULL,NULL);
|
||||||
|
INSERT INTO `versionLog` VALUES ('vn-database','11037','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-05-28 07:32:17',NULL,NULL);
|
||||||
|
INSERT INTO `versionLog` VALUES ('vn-database','11038','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-05-28 07:32:17',NULL,NULL);
|
||||||
|
INSERT INTO `versionLog` VALUES ('vn-database','11040','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-05-28 07:32:31',NULL,NULL);
|
||||||
|
INSERT INTO `versionLog` VALUES ('vn-database','11044','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-05-28 07:32:31',NULL,NULL);
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11045','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-05-10 14:53:29',NULL,NULL);
|
INSERT INTO `versionLog` VALUES ('vn-database','11045','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-05-10 14:53:29',NULL,NULL);
|
||||||
|
INSERT INTO `versionLog` VALUES ('vn-database','11046','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-05-28 07:32:46',NULL,NULL);
|
||||||
|
INSERT INTO `versionLog` VALUES ('vn-database','11051','00-sipConfig_callLimit.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-05-14 14:31:10',NULL,NULL);
|
||||||
|
INSERT INTO `versionLog` VALUES ('vn-database','11054','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-05-28 07:32:46',NULL,NULL);
|
||||||
|
INSERT INTO `versionLog` VALUES ('vn-database','11055','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-05-28 07:32:46',NULL,NULL);
|
||||||
|
INSERT INTO `versionLog` VALUES ('vn-database','11057','00-part.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-05-28 07:32:46',NULL,NULL);
|
||||||
|
INSERT INTO `versionLog` VALUES ('vn-database','11057','01-part.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-05-28 07:32:47',NULL,NULL);
|
||||||
|
INSERT INTO `versionLog` VALUES ('vn-database','11057','02-part.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-05-28 07:32:47',NULL,NULL);
|
||||||
|
INSERT INTO `versionLog` VALUES ('vn-database','11057','03-part.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-05-28 07:32:48',NULL,NULL);
|
||||||
|
INSERT INTO `versionLog` VALUES ('vn-database','11058','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-05-28 07:32:48',NULL,NULL);
|
||||||
|
INSERT INTO `versionLog` VALUES ('vn-database','11061','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-05-28 07:32:48',NULL,NULL);
|
||||||
|
INSERT INTO `versionLog` VALUES ('vn-database','11071','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-05-28 07:32:48',NULL,NULL);
|
||||||
|
|
||||||
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
|
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
|
||||||
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
|
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
|
||||||
|
@ -1090,7 +1115,6 @@ INSERT INTO `roleInherit` VALUES (249,109,18,NULL);
|
||||||
INSERT INTO `roleInherit` VALUES (250,109,13,NULL);
|
INSERT INTO `roleInherit` VALUES (250,109,13,NULL);
|
||||||
INSERT INTO `roleInherit` VALUES (251,51,21,NULL);
|
INSERT INTO `roleInherit` VALUES (251,51,21,NULL);
|
||||||
INSERT INTO `roleInherit` VALUES (253,48,49,NULL);
|
INSERT INTO `roleInherit` VALUES (253,48,49,NULL);
|
||||||
INSERT INTO `roleInherit` VALUES (254,110,1,NULL);
|
|
||||||
INSERT INTO `roleInherit` VALUES (255,110,76,NULL);
|
INSERT INTO `roleInherit` VALUES (255,110,76,NULL);
|
||||||
INSERT INTO `roleInherit` VALUES (256,48,69,NULL);
|
INSERT INTO `roleInherit` VALUES (256,48,69,NULL);
|
||||||
INSERT INTO `roleInherit` VALUES (257,47,111,NULL);
|
INSERT INTO `roleInherit` VALUES (257,47,111,NULL);
|
||||||
|
@ -1165,6 +1189,7 @@ INSERT INTO `roleInherit` VALUES (360,101,129,NULL);
|
||||||
INSERT INTO `roleInherit` VALUES (361,50,112,NULL);
|
INSERT INTO `roleInherit` VALUES (361,50,112,NULL);
|
||||||
INSERT INTO `roleInherit` VALUES (362,122,15,NULL);
|
INSERT INTO `roleInherit` VALUES (362,122,15,NULL);
|
||||||
INSERT INTO `roleInherit` VALUES (364,35,18,NULL);
|
INSERT INTO `roleInherit` VALUES (364,35,18,NULL);
|
||||||
|
INSERT INTO `roleInherit` VALUES (365,123,119,NULL);
|
||||||
|
|
||||||
INSERT INTO `userPassword` VALUES (1,7,1,0,2,1);
|
INSERT INTO `userPassword` VALUES (1,7,1,0,2,1);
|
||||||
|
|
||||||
|
@ -1887,6 +1912,14 @@ INSERT INTO `ACL` VALUES (834,'AgencyMode','*','READ','ALLOW','ROLE','employee')
|
||||||
INSERT INTO `ACL` VALUES (835,'Agency','*','READ','ALLOW','ROLE','employee');
|
INSERT INTO `ACL` VALUES (835,'Agency','*','READ','ALLOW','ROLE','employee');
|
||||||
INSERT INTO `ACL` VALUES (836,'Agency','*','WRITE','ALLOW','ROLE','deliveryAssistant');
|
INSERT INTO `ACL` VALUES (836,'Agency','*','WRITE','ALLOW','ROLE','deliveryAssistant');
|
||||||
INSERT INTO `ACL` VALUES (837,'AgencyWorkCenter','*','WRITE','ALLOW','ROLE','deliveryAssistant');
|
INSERT INTO `ACL` VALUES (837,'AgencyWorkCenter','*','WRITE','ALLOW','ROLE','deliveryAssistant');
|
||||||
|
INSERT INTO `ACL` VALUES (838,'Worker','getAvailablePda','READ','ALLOW','ROLE','hr');
|
||||||
|
INSERT INTO `ACL` VALUES (839,'Locker','__get__codes','READ','ALLOW','ROLE','employee');
|
||||||
|
INSERT INTO `ACL` VALUES (840,'Locker','*','*','ALLOW','ROLE','hr');
|
||||||
|
INSERT INTO `ACL` VALUES (841,'Locker','*','*','ALLOW','ROLE','productionBoss');
|
||||||
|
INSERT INTO `ACL` VALUES (842,'Worker','__get__locker','READ','ALLOW','ROLE','hr');
|
||||||
|
INSERT INTO `ACL` VALUES (843,'Worker','__get__locker','READ','ALLOW','ROLE','productionBoss');
|
||||||
|
INSERT INTO `ACL` VALUES (844,'RoadmapStop','*','*','ALLOW','ROLE','production');
|
||||||
|
INSERT INTO `ACL` VALUES (845,'RoadmapStop','*','*','ALLOW','ROLE','productionBoss');
|
||||||
|
|
||||||
INSERT INTO `fieldAcl` VALUES (1,'Client','name','update','employee');
|
INSERT INTO `fieldAcl` VALUES (1,'Client','name','update','employee');
|
||||||
INSERT INTO `fieldAcl` VALUES (2,'Client','contact','update','employee');
|
INSERT INTO `fieldAcl` VALUES (2,'Client','contact','update','employee');
|
||||||
|
@ -2206,8 +2239,8 @@ INSERT INTO `continent` VALUES (3,'África','AF');
|
||||||
INSERT INTO `continent` VALUES (4,'Europa','EU');
|
INSERT INTO `continent` VALUES (4,'Europa','EU');
|
||||||
INSERT INTO `continent` VALUES (5,'Oceanía','OC');
|
INSERT INTO `continent` VALUES (5,'Oceanía','OC');
|
||||||
|
|
||||||
INSERT INTO `department` VALUES (1,'VN','VERDNATURA',1,110,763,0,0,0,0,26,NULL,'/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
INSERT INTO `department` VALUES (1,'VN','VERDNATURA',1,110,763,0,0,0,0,25,NULL,'/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||||
INSERT INTO `department` VALUES (22,'shopping','COMPRAS',2,3,NULL,72,0,0,1,0,1,'/1/',NULL,1,NULL,1,0,0,0,NULL,NULL,NULL,NULL);
|
INSERT INTO `department` VALUES (22,'shopping','COMPRAS',2,3,NULL,72,0,0,1,0,1,'/1/',NULL,1,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||||
INSERT INTO `department` VALUES (23,'CMA','CAMARA',13,14,NULL,72,1,1,2,0,37,'/1/37/',NULL,0,NULL,0,1,1,1,NULL,NULL,NULL,NULL);
|
INSERT INTO `department` VALUES (23,'CMA','CAMARA',13,14,NULL,72,1,1,2,0,37,'/1/37/',NULL,0,NULL,0,1,1,1,NULL,NULL,NULL,NULL);
|
||||||
INSERT INTO `department` VALUES (31,'it','INFORMATICA',4,5,NULL,72,0,0,1,0,1,'/1/','informatica-cau',1,NULL,1,0,0,0,NULL,NULL,NULL,NULL);
|
INSERT INTO `department` VALUES (31,'it','INFORMATICA',4,5,NULL,72,0,0,1,0,1,'/1/','informatica-cau',1,NULL,1,0,0,0,NULL,NULL,NULL,NULL);
|
||||||
INSERT INTO `department` VALUES (34,'accounting','CONTABILIDAD',6,7,NULL,0,0,0,1,0,1,'/1/',NULL,1,NULL,1,0,0,0,NULL,NULL,NULL,NULL);
|
INSERT INTO `department` VALUES (34,'accounting','CONTABILIDAD',6,7,NULL,0,0,0,1,0,1,'/1/',NULL,1,NULL,1,0,0,0,NULL,NULL,NULL,NULL);
|
||||||
|
@ -2217,28 +2250,28 @@ INSERT INTO `department` VALUES (37,'PROD','PRODUCCION',12,35,NULL,72,1,1,1,11,1
|
||||||
INSERT INTO `department` VALUES (38,'picking','SACADO',15,16,NULL,72,1,0,2,0,37,'/1/37/',NULL,0,NULL,0,0,0,1,NULL,NULL,NULL,NULL);
|
INSERT INTO `department` VALUES (38,'picking','SACADO',15,16,NULL,72,1,0,2,0,37,'/1/37/',NULL,0,NULL,0,0,0,1,NULL,NULL,NULL,NULL);
|
||||||
INSERT INTO `department` VALUES (39,'packing','ENCAJADO',17,18,NULL,72,1,0,2,0,37,'/1/37/',NULL,0,NULL,0,0,0,1,NULL,NULL,NULL,NULL);
|
INSERT INTO `department` VALUES (39,'packing','ENCAJADO',17,18,NULL,72,1,0,2,0,37,'/1/37/',NULL,0,NULL,0,0,0,1,NULL,NULL,NULL,NULL);
|
||||||
INSERT INTO `department` VALUES (41,'administration','ADMINISTRACION',36,37,NULL,72,0,0,1,0,1,'/1/',NULL,1,NULL,1,0,0,0,NULL,NULL,NULL,NULL);
|
INSERT INTO `department` VALUES (41,'administration','ADMINISTRACION',36,37,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',38,69,NULL,0,0,0,1,15,1,'/1/',NULL,1,'',1,0,0,0,NULL,NULL,NULL,NULL);
|
INSERT INTO `department` VALUES (43,'VT','VENTAS',38,71,NULL,0,0,0,1,16,1,'/1/',NULL,1,'',1,0,0,0,NULL,NULL,NULL,NULL);
|
||||||
INSERT INTO `department` VALUES (44,'management','GERENCIA',70,71,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
INSERT INTO `department` VALUES (44,'management','GERENCIA',72,73,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',72,73,NULL,72,0,0,1,0,1,'/1/',NULL,1,NULL,1,0,0,0,NULL,NULL,NULL,NULL);
|
INSERT INTO `department` VALUES (45,'logistic','LOGISTICA',74,75,NULL,72,0,0,1,0,1,'/1/',NULL,1,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||||
INSERT INTO `department` VALUES (46,'delivery','REPARTO',74,75,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,0,1,0,0,NULL,NULL,NULL,NULL);
|
INSERT INTO `department` VALUES (46,'delivery','REPARTO',76,77,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,0,1,0,0,NULL,NULL,NULL,NULL);
|
||||||
INSERT INTO `department` VALUES (48,'storage','ALMACENAJE',76,77,NULL,0,1,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
INSERT INTO `department` VALUES (48,'storage','ALMACENAJE',78,79,NULL,0,1,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||||
INSERT INTO `department` VALUES (49,NULL,'PROPIEDAD',78,79,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
INSERT INTO `department` VALUES (49,NULL,'PROPIEDAD',80,81,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||||
INSERT INTO `department` VALUES (52,NULL,'CARGA AEREA',80,81,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
INSERT INTO `department` VALUES (52,NULL,'CARGA AEREA',82,83,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||||
INSERT INTO `department` VALUES (53,'marketing','MARKETING Y COMUNICACIÓN',39,40,NULL,72,0,0,2,0,43,'/1/43/',NULL,1,NULL,1,0,0,0,NULL,NULL,NULL,NULL);
|
INSERT INTO `department` VALUES (53,'marketing','MARKETING Y COMUNICACIÓN',39,40,NULL,72,0,0,2,0,43,'/1/43/',NULL,1,NULL,1,0,0,0,NULL,NULL,NULL,NULL);
|
||||||
INSERT INTO `department` VALUES (54,NULL,'ORNAMENTALES',82,83,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
INSERT INTO `department` VALUES (54,NULL,'ORNAMENTALES',84,85,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||||
INSERT INTO `department` VALUES (55,NULL,'TALLER NATURAL',19,20,14548,72,0,0,2,0,37,'/1/37/',NULL,0,NULL,0,1,1,0,1118,NULL,NULL,NULL);
|
INSERT INTO `department` VALUES (55,NULL,'TALLER NATURAL',19,20,14548,72,0,0,2,0,37,'/1/37/',NULL,0,NULL,0,1,1,0,1118,NULL,NULL,NULL);
|
||||||
INSERT INTO `department` VALUES (56,NULL,'TALLER ARTIFICIAL',21,22,8470,72,0,0,2,0,37,'/1/37/',NULL,0,NULL,0,1,1,0,1927,NULL,NULL,NULL);
|
INSERT INTO `department` VALUES (56,NULL,'TALLER ARTIFICIAL',21,22,8470,72,0,0,2,0,37,'/1/37/',NULL,0,NULL,0,1,1,0,1927,NULL,NULL,NULL);
|
||||||
INSERT INTO `department` VALUES (58,'CMP','CAMPOS',84,87,NULL,72,0,0,1,1,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
INSERT INTO `department` VALUES (58,'CMP','CAMPOS',86,89,NULL,72,0,0,1,1,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||||
INSERT INTO `department` VALUES (59,'maintenance','MANTENIMIENTO',88,89,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,0,1,0,0,NULL,NULL,NULL,NULL);
|
INSERT INTO `department` VALUES (59,'maintenance','MANTENIMIENTO',90,91,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,0,1,0,0,NULL,NULL,NULL,NULL);
|
||||||
INSERT INTO `department` VALUES (60,'claims','RECLAMACIONES',41,42,NULL,72,0,0,2,0,43,'/1/43/',NULL,1,NULL,1,1,0,0,NULL,NULL,NULL,NULL);
|
INSERT INTO `department` VALUES (60,'claims','RECLAMACIONES',41,42,NULL,72,0,0,2,0,43,'/1/43/',NULL,1,NULL,1,1,0,0,NULL,NULL,NULL,NULL);
|
||||||
INSERT INTO `department` VALUES (61,NULL,'VNH',90,93,NULL,73,0,0,1,1,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
INSERT INTO `department` VALUES (61,NULL,'VNH',92,95,NULL,73,0,0,1,1,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||||
INSERT INTO `department` VALUES (66,NULL,'VERDNAMADRID',94,95,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
INSERT INTO `department` VALUES (66,NULL,'VERDNAMADRID',96,97,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||||
INSERT INTO `department` VALUES (68,NULL,'COMPLEMENTOS',23,24,NULL,72,1,0,2,0,37,'/1/37/',NULL,0,NULL,0,1,0,0,NULL,NULL,NULL,NULL);
|
INSERT INTO `department` VALUES (68,NULL,'COMPLEMENTOS',23,24,NULL,72,1,0,2,0,37,'/1/37/',NULL,0,NULL,0,1,0,0,NULL,NULL,NULL,NULL);
|
||||||
INSERT INTO `department` VALUES (69,NULL,'VERDNABARNA',96,97,NULL,74,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
INSERT INTO `department` VALUES (69,NULL,'VERDNABARNA',98,99,NULL,74,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||||
INSERT INTO `department` VALUES (80,'vallesTeam','EQUIPO ESPAÑA 5',43,44,4250,72,0,0,2,0,43,'/1/43/','jvp_equipo',1,'equipojvalles@verdnatura.es',0,0,0,0,NULL,NULL,'5300',NULL);
|
INSERT INTO `department` VALUES (80,'spainTeam5','EQUIPO ESPAÑA 5',43,44,4250,0,0,0,2,0,43,'/1/43/','es5_equipo',1,'es5@verdnatura.es',0,0,0,0,NULL,NULL,'5300',NULL);
|
||||||
INSERT INTO `department` VALUES (86,NULL,'LIMPIEZA',98,99,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
INSERT INTO `department` VALUES (86,NULL,'LIMPIEZA',100,101,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||||
INSERT INTO `department` VALUES (89,NULL,'COORDINACION',100,101,NULL,0,1,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
INSERT INTO `department` VALUES (89,NULL,'COORDINACION',102,103,NULL,0,1,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||||
INSERT INTO `department` VALUES (90,NULL,'TRAILER',91,92,NULL,0,0,0,2,0,61,'/1/61/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
INSERT INTO `department` VALUES (90,NULL,'TRAILER',93,94,NULL,0,0,0,2,0,61,'/1/61/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||||
INSERT INTO `department` VALUES (91,'artificial','ARTIFICIAL',25,26,NULL,0,1,0,2,0,37,'/1/37/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
INSERT INTO `department` VALUES (91,'artificial','ARTIFICIAL',25,26,NULL,0,1,0,2,0,37,'/1/37/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||||
INSERT INTO `department` VALUES (92,NULL,'EQUIPO SILVERIO',45,46,1203,0,0,0,2,0,43,'/1/43/','sdc_equipo',0,'gestioncomercial@verdnatura.es',0,0,0,0,NULL,NULL,NULL,NULL);
|
INSERT INTO `department` VALUES (92,NULL,'EQUIPO SILVERIO',45,46,1203,0,0,0,2,0,43,'/1/43/','sdc_equipo',0,'gestioncomercial@verdnatura.es',0,0,0,0,NULL,NULL,NULL,NULL);
|
||||||
INSERT INTO `department` VALUES (94,'spainTeam2','EQUIPO ESPAÑA 2',47,48,3797,0,0,0,2,0,43,'/1/43/','es2_equipo',0,'es2@verdnatura.es',0,0,0,0,NULL,NULL,'5100',NULL);
|
INSERT INTO `department` VALUES (94,'spainTeam2','EQUIPO ESPAÑA 2',47,48,3797,0,0,0,2,0,43,'/1/43/','es2_equipo',0,'es2@verdnatura.es',0,0,0,0,NULL,NULL,'5100',NULL);
|
||||||
|
@ -2246,20 +2279,20 @@ INSERT INTO `department` VALUES (95,'spainTeam1','EQUIPO ESPAÑA 1',49,50,24065,
|
||||||
INSERT INTO `department` VALUES (96,NULL,'EQUIPO C LOPEZ',51,52,4661,0,0,0,2,0,43,'/1/43/','cla_equipo',0,'gestioncomercial@verdnatura.es',0,0,0,0,NULL,NULL,NULL,NULL);
|
INSERT INTO `department` VALUES (96,NULL,'EQUIPO C LOPEZ',51,52,4661,0,0,0,2,0,43,'/1/43/','cla_equipo',0,'gestioncomercial@verdnatura.es',0,0,0,0,NULL,NULL,NULL,NULL);
|
||||||
INSERT INTO `department` VALUES (115,NULL,'EQUIPO CLAUDI',53,54,3810,0,0,0,2,0,43,'/1/43/','csr_equipo',0,'gestioncomercial@verdnatura.es',0,0,0,0,NULL,NULL,NULL,NULL);
|
INSERT INTO `department` VALUES (115,NULL,'EQUIPO CLAUDI',53,54,3810,0,0,0,2,0,43,'/1/43/','csr_equipo',0,'gestioncomercial@verdnatura.es',0,0,0,0,NULL,NULL,NULL,NULL);
|
||||||
INSERT INTO `department` VALUES (123,NULL,'EQUIPO ELENA BASCUÑANA',55,56,7102,0,0,0,2,0,43,'/1/43/','ebt_equipo',0,'gestioncomercial@verdnatura.es',0,0,0,0,NULL,NULL,NULL,NULL);
|
INSERT INTO `department` VALUES (123,NULL,'EQUIPO ELENA BASCUÑANA',55,56,7102,0,0,0,2,0,43,'/1/43/','ebt_equipo',0,'gestioncomercial@verdnatura.es',0,0,0,0,NULL,NULL,NULL,NULL);
|
||||||
INSERT INTO `department` VALUES (124,NULL,'CONTROL INTERNO',102,103,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,1,0,0,0,NULL,NULL,NULL,NULL);
|
INSERT INTO `department` VALUES (124,NULL,'CONTROL INTERNO',57,58,NULL,72,0,0,2,0,43,'/1/43/',NULL,0,NULL,1,0,0,0,NULL,NULL,NULL,NULL);
|
||||||
INSERT INTO `department` VALUES (125,'miriamMarTeam','EQUIPO ESPAÑA 3',57,58,1118,0,0,0,2,0,43,'/1/43/','mir_equipo',0,'equipomirgir@verdnatura.es',0,0,0,0,NULL,NULL,'5200',NULL);
|
INSERT INTO `department` VALUES (125,'spainTeam3','EQUIPO ESPAÑA 3',59,60,1118,0,0,0,2,0,43,'/1/43/','es3_equipo',0,'es3@verdnatura.es',0,0,0,0,NULL,NULL,'5200',NULL);
|
||||||
INSERT INTO `department` VALUES (126,NULL,'PRESERVADO',27,28,NULL,0,0,0,2,0,37,'/1/37/',NULL,0,NULL,0,1,1,0,NULL,NULL,NULL,NULL);
|
INSERT INTO `department` VALUES (126,NULL,'PRESERVADO',27,28,NULL,0,0,0,2,0,37,'/1/37/',NULL,0,NULL,0,1,1,0,NULL,NULL,NULL,NULL);
|
||||||
INSERT INTO `department` VALUES (128,NULL,'PALETIZADO',29,30,NULL,0,1,0,2,0,37,'/1/37/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
INSERT INTO `department` VALUES (128,NULL,'PALETIZADO',29,30,NULL,0,1,0,2,0,37,'/1/37/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||||
INSERT INTO `department` VALUES (130,NULL,'REVISION',31,32,NULL,0,1,0,2,0,37,'/1/37/',NULL,0,NULL,0,0,0,1,NULL,NULL,NULL,NULL);
|
INSERT INTO `department` VALUES (130,NULL,'REVISION',31,32,NULL,0,1,0,2,0,37,'/1/37/',NULL,0,NULL,0,0,0,1,NULL,NULL,NULL,NULL);
|
||||||
INSERT INTO `department` VALUES (131,'greenhouse','INVERNADERO',85,86,NULL,0,0,0,2,0,58,'/1/58/',NULL,0,NULL,0,1,0,0,NULL,NULL,NULL,NULL);
|
INSERT INTO `department` VALUES (131,'greenhouse','INVERNADERO',87,88,NULL,0,0,0,2,0,58,'/1/58/',NULL,0,NULL,0,1,0,0,NULL,NULL,NULL,NULL);
|
||||||
INSERT INTO `department` VALUES (132,NULL,'EQUIPO DC',59,60,1731,0,0,0,2,0,43,'/1/43/','dc_equipo',1,'gestioncomercial@verdnatura.es',0,0,0,0,NULL,NULL,NULL,NULL);
|
INSERT INTO `department` VALUES (132,NULL,'EQUIPO DC',61,62,1731,0,0,0,2,0,43,'/1/43/','dc_equipo',1,'gestioncomercial@verdnatura.es',0,0,0,0,NULL,NULL,NULL,NULL);
|
||||||
INSERT INTO `department` VALUES (133,'franceTeam','EQUIPO FRANCIA',61,62,1731,72,0,0,2,0,43,'/1/43/','fr_equipo',1,'gestionfrancia@verdnatura.es',0,0,0,0,NULL,NULL,'3300',NULL);
|
INSERT INTO `department` VALUES (133,'franceTeam','EQUIPO FRANCIA',63,64,1731,72,0,0,2,0,43,'/1/43/','fr_equipo',1,'gestionfrancia@verdnatura.es',0,0,0,0,NULL,NULL,'3300',NULL);
|
||||||
INSERT INTO `department` VALUES (134,'portugalTeam','EQUIPO PORTUGAL',63,64,6264,0,0,0,2,0,43,'/1/43/','pt_equipo',1,'portugal@verdnatura.es',0,0,0,0,NULL,NULL,'3500',NULL);
|
INSERT INTO `department` VALUES (134,'portugalTeam','EQUIPO PORTUGAL',65,66,6264,0,0,0,2,0,43,'/1/43/','pt_equipo',1,'portugal@verdnatura.es',0,0,0,0,NULL,NULL,'3500',NULL);
|
||||||
INSERT INTO `department` VALUES (135,'routers','ENRUTADORES',104,105,NULL,0,0,0,1,0,1,'/1/',NULL,1,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
INSERT INTO `department` VALUES (135,'routers','ENRUTADORES',104,105,NULL,0,0,0,1,0,1,'/1/',NULL,1,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||||
INSERT INTO `department` VALUES (136,'heavyVehicles','VEHICULOS PESADOS',106,107,NULL,0,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
INSERT INTO `department` VALUES (136,'heavyVehicles','VEHICULOS PESADOS',106,107,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',108,109,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',108,109,NULL,0,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||||
INSERT INTO `department` VALUES (139,'soriaTeam','EQUIPO ESPAÑA 4',65,66,3803,0,0,0,2,0,43,'/1/43/','jss_equipo',1,'equipojsoria@verdnatura.es',0,0,0,0,NULL,NULL,'5400',NULL);
|
INSERT INTO `department` VALUES (139,'spainTeam4','EQUIPO ESPAÑA 4',67,68,3803,0,0,0,2,0,43,'/1/43/','es4_equipo',1,'es4@verdnatura.es',0,0,0,0,NULL,NULL,'5400',NULL);
|
||||||
INSERT INTO `department` VALUES (140,'hollandTeam','EQUIPO HOLANDA',67,68,NULL,0,0,0,2,0,43,'/1/43/','nl_equipo',1,NULL,1,0,0,0,NULL,NULL,NULL,NULL);
|
INSERT INTO `department` VALUES (140,'hollandTeam','EQUIPO HOLANDA',69,70,NULL,0,0,0,2,0,43,'/1/43/','nl_equipo',1,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||||
INSERT INTO `department` VALUES (141,NULL,'PREVIA',33,34,NULL,0,1,0,2,0,37,'/1/37/',NULL,0,NULL,0,0,0,1,NULL,NULL,NULL,NULL);
|
INSERT INTO `department` VALUES (141,NULL,'PREVIA',33,34,NULL,0,1,0,2,0,37,'/1/37/',NULL,0,NULL,0,0,0,1,NULL,NULL,NULL,NULL);
|
||||||
|
|
||||||
INSERT INTO `docuware` VALUES (1,'deliveryNote','Albaranes cliente','find','find','N__ALBAR_N',NULL);
|
INSERT INTO `docuware` VALUES (1,'deliveryNote','Albaranes cliente','find','find','N__ALBAR_N',NULL);
|
||||||
|
|
|
@ -1300,7 +1300,7 @@ INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','claimState','juan@d
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','company','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','company','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','srt','grafana','buffer','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','srt','grafana','buffer','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','greuge','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','greuge','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','item','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','','Select,Update');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','item','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','','Select,Update');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','coolerBoss','itemShelving','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Update','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','coolerBoss','itemShelving','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Update','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','negativeOrigin','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','negativeOrigin','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','deliveryBoss','Vehiculos_consumo','carlosap@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','deliveryBoss','Vehiculos_consumo','carlosap@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete','');
|
||||||
|
@ -1400,6 +1400,12 @@ INSERT IGNORE INTO `tables_priv` VALUES ('','bs','buyer','waste','alexm@db-prox
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','clientObservation','guillermo@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','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','invoiceInConfig','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','invoiceInConfig','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','workerActivity','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','workerActivity','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||||
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','financial','bankPolicy','alexm@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Delete','');
|
||||||
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','financial','bankPolicyDetail','alexm@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Delete','');
|
||||||
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','financial','bankPolicyReview','alexm@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Delete','');
|
||||||
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','chat','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||||
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','production','roadmapStop','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||||
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','agencyWorkCenter','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||||
/*!40000 ALTER TABLE `tables_priv` ENABLE KEYS */;
|
/*!40000 ALTER TABLE `tables_priv` ENABLE KEYS */;
|
||||||
|
|
||||||
/*!40000 ALTER TABLE `columns_priv` DISABLE KEYS */;
|
/*!40000 ALTER TABLE `columns_priv` DISABLE KEYS */;
|
||||||
|
@ -1595,10 +1601,7 @@ INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','editorFk',
|
||||||
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','recycledPlastic','0000-00-00 00:00:00','Update');
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','recycledPlastic','0000-00-00 00:00:00','Update');
|
||||||
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','nonRecycledPlastic','0000-00-00 00:00:00','Update');
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','nonRecycledPlastic','0000-00-00 00:00:00','Update');
|
||||||
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','minQuantity','0000-00-00 00:00:00','Update');
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','minQuantity','0000-00-00 00:00:00','Update');
|
||||||
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','buyer','item','size','0000-00-00 00:00:00','Update');
|
|
||||||
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','buyer','item','originFk','0000-00-00 00:00:00','Select,Update');
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','buyer','item','originFk','0000-00-00 00:00:00','Select,Update');
|
||||||
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','buyer','item','longName','0000-00-00 00:00:00','Update');
|
|
||||||
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','buyer','item','name','0000-00-00 00:00:00','Update');
|
|
||||||
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','ticket','id','0000-00-00 00:00:00','Update');
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','ticket','id','0000-00-00 00:00:00','Update');
|
||||||
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','ticket','warehouseFk','0000-00-00 00:00:00','Update');
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','ticket','warehouseFk','0000-00-00 00:00:00','Update');
|
||||||
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','ticket','shipped','0000-00-00 00:00:00','Update');
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','ticket','shipped','0000-00-00 00:00:00','Update');
|
||||||
|
@ -1873,7 +1876,6 @@ INSERT IGNORE INTO `procs_priv` VALUES ('','vn','administrative','duaParcialMak
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','palletizerBoss','packingsite_startcollection','PROCEDURE','alexm@db-proxy2.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','palletizerBoss','packingsite_startcollection','PROCEDURE','alexm@db-proxy2.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','sale_calculatecomponent','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','sale_calculatecomponent','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00');
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','salesPerson','manaspellersrequery','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','salesPerson','manaspellersrequery','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00');
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','adminBoss','packageinvoicing','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00');
|
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','packinglistswitch','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','packinglistswitch','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00');
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','previoussticker_get','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','previoussticker_get','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00');
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','productioncontrol','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','productioncontrol','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00');
|
||||||
|
@ -1976,7 +1978,6 @@ INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','expeditionscan_ad
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','expeditionscan_list','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','expeditionscan_list','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','expeditionscan_put','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','expeditionscan_put','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','cmrpallet_add','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','cmrpallet_add','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','itemtrash','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','item_getbalance','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','item_getbalance','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','expedition_checkroute','FUNCTION','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','expedition_checkroute','FUNCTION','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','addnotefromdelivery','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','addnotefromdelivery','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||||
|
@ -2029,7 +2030,6 @@ INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','expeditionscan_add'
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','expeditionscan_list','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','expeditionscan_list','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','expeditionscan_put','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','expeditionscan_put','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','cmrpallet_add','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','cmrpallet_add','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','itemtrash','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','item_getbalance','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','item_getbalance','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','expedition_checkroute','FUNCTION','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','expedition_checkroute','FUNCTION','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','addnotefromdelivery','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','addnotefromdelivery','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -3789,7 +3789,7 @@ DELIMITER ;;
|
||||||
BEFORE INSERT ON `country`
|
BEFORE INSERT ON `country`
|
||||||
FOR EACH ROW
|
FOR EACH ROW
|
||||||
BEGIN
|
BEGIN
|
||||||
SET NEW.geoFk = zoneGeo_new('country', NEW.country, NULL);
|
SET NEW.geoFk = zoneGeo_new('country', NEW.name, NULL);
|
||||||
END */;;
|
END */;;
|
||||||
DELIMITER ;
|
DELIMITER ;
|
||||||
/*!50003 SET sql_mode = @saved_sql_mode */ ;
|
/*!50003 SET sql_mode = @saved_sql_mode */ ;
|
||||||
|
@ -3811,14 +3811,17 @@ DELIMITER ;;
|
||||||
BEGIN
|
BEGIN
|
||||||
UPDATE sage.Naciones
|
UPDATE sage.Naciones
|
||||||
SET countryFk = NEW.id
|
SET countryFk = NEW.id
|
||||||
WHERE Nacion = NEW.country;
|
WHERE Nacion = NEW.name;
|
||||||
|
|
||||||
IF ROW_COUNT() = 0 THEN
|
IF ROW_COUNT() = 0 THEN
|
||||||
CALL mail_insert(
|
CALL mail_insert(
|
||||||
'cau@verdnatura.es',
|
'cau@verdnatura.es',
|
||||||
NULL,
|
NULL,
|
||||||
'Actualizar tabla sage.Naciones',
|
'Actualizar tabla sage.Naciones',
|
||||||
CONCAT('Se ha insertado un nuevo país en la tabla vn.conuntry. Para el correcto funcionamiento del sistema \n\t\t\t\tde contabilidad es necesario actualizar la columna sage.Naciones.countryFk con el valor del nuevo país. \n\t\t\t Hay que buscar el nuevo país: ', NEW.country, ' en la tabla sage.Naciones y actualizar el campo sage.Naciones.countryFk con el valor ', NEW.id)
|
CONCAT('Se ha insertado un nuevo país en la tabla vn.conuntry.
|
||||||
|
Para el correcto funcionamiento del sistema \n\t\t\t\tde contabilidad es necesario actualizar la columna
|
||||||
|
sage.Naciones.countryFk con el valor del nuevo país. \n\t\t\t Hay que buscar el nuevo país: ', NEW.name,
|
||||||
|
' en la tabla sage.Naciones y actualizar el campo sage.Naciones.countryFk con el valor ', NEW.id)
|
||||||
);
|
);
|
||||||
END IF;
|
END IF;
|
||||||
END */;;
|
END */;;
|
||||||
|
@ -3862,8 +3865,8 @@ DELIMITER ;;
|
||||||
AFTER UPDATE ON `country`
|
AFTER UPDATE ON `country`
|
||||||
FOR EACH ROW
|
FOR EACH ROW
|
||||||
BEGIN
|
BEGIN
|
||||||
IF !(OLD.country <=> NEW.country) THEN
|
IF !(OLD.name <=> NEW.name) THEN
|
||||||
UPDATE zoneGeo SET `name` = NEW.country
|
UPDATE zoneGeo SET `name` = NEW.name
|
||||||
WHERE id = NEW.geoFk;
|
WHERE id = NEW.geoFk;
|
||||||
END IF;
|
END IF;
|
||||||
END */;;
|
END */;;
|
||||||
|
@ -4325,10 +4328,32 @@ DELIMITER ;
|
||||||
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
|
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
|
||||||
/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
|
/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
|
||||||
DELIMITER ;;
|
DELIMITER ;;
|
||||||
|
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `vn`.`deviceProductionUser_afterInsert`
|
||||||
|
AFTER INSERT ON `deviceProductionUser`
|
||||||
|
FOR EACH ROW
|
||||||
|
BEGIN
|
||||||
|
CALL worker_checkMultipleDevice(NEW.userFk);
|
||||||
|
END */;;
|
||||||
|
DELIMITER ;
|
||||||
|
/*!50003 SET sql_mode = @saved_sql_mode */ ;
|
||||||
|
/*!50003 SET character_set_client = @saved_cs_client */ ;
|
||||||
|
/*!50003 SET character_set_results = @saved_cs_results */ ;
|
||||||
|
/*!50003 SET collation_connection = @saved_col_connection */ ;
|
||||||
|
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
||||||
|
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
||||||
|
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
|
||||||
|
/*!50003 SET character_set_client = utf8mb4 */ ;
|
||||||
|
/*!50003 SET character_set_results = utf8mb4 */ ;
|
||||||
|
/*!50003 SET collation_connection = utf8mb4_unicode_ci */ ;
|
||||||
|
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
|
||||||
|
/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
|
||||||
|
DELIMITER ;;
|
||||||
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `vn`.`deviceProductionUser_beforeUpdate`
|
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `vn`.`deviceProductionUser_beforeUpdate`
|
||||||
BEFORE UPDATE ON `deviceProductionUser`
|
BEFORE UPDATE ON `deviceProductionUser`
|
||||||
FOR EACH ROW
|
FOR EACH ROW
|
||||||
BEGIN
|
BEGIN
|
||||||
|
|
||||||
|
CALL worker_checkMultipleDevice(NEW.userFk);
|
||||||
SET NEW.editorFk = account.myUser_getId();
|
SET NEW.editorFk = account.myUser_getId();
|
||||||
END */;;
|
END */;;
|
||||||
DELIMITER ;
|
DELIMITER ;
|
||||||
|
@ -5060,50 +5085,6 @@ BEGIN
|
||||||
SET e.stateTypeFk = NEW.typeFk
|
SET e.stateTypeFk = NEW.typeFk
|
||||||
WHERE e.id = NEW.expeditionFk;
|
WHERE e.id = NEW.expeditionFk;
|
||||||
|
|
||||||
END */;;
|
|
||||||
DELIMITER ;
|
|
||||||
/*!50003 SET sql_mode = @saved_sql_mode */ ;
|
|
||||||
/*!50003 SET character_set_client = @saved_cs_client */ ;
|
|
||||||
/*!50003 SET character_set_results = @saved_cs_results */ ;
|
|
||||||
/*!50003 SET collation_connection = @saved_col_connection */ ;
|
|
||||||
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
|
||||||
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
|
||||||
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
|
|
||||||
/*!50003 SET character_set_client = utf8mb4 */ ;
|
|
||||||
/*!50003 SET character_set_results = utf8mb4 */ ;
|
|
||||||
/*!50003 SET collation_connection = utf8mb4_unicode_ci */ ;
|
|
||||||
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
|
|
||||||
/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
|
|
||||||
DELIMITER ;;
|
|
||||||
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `vn`.`expeditionTruck_beforeInsert`
|
|
||||||
BEFORE INSERT ON `expeditionTruck`
|
|
||||||
FOR EACH ROW
|
|
||||||
BEGIN
|
|
||||||
|
|
||||||
SET NEW.description = UCASE(NEW.description);
|
|
||||||
|
|
||||||
END */;;
|
|
||||||
DELIMITER ;
|
|
||||||
/*!50003 SET sql_mode = @saved_sql_mode */ ;
|
|
||||||
/*!50003 SET character_set_client = @saved_cs_client */ ;
|
|
||||||
/*!50003 SET character_set_results = @saved_cs_results */ ;
|
|
||||||
/*!50003 SET collation_connection = @saved_col_connection */ ;
|
|
||||||
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
|
||||||
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
|
||||||
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
|
|
||||||
/*!50003 SET character_set_client = utf8mb4 */ ;
|
|
||||||
/*!50003 SET character_set_results = utf8mb4 */ ;
|
|
||||||
/*!50003 SET collation_connection = utf8mb4_unicode_ci */ ;
|
|
||||||
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
|
|
||||||
/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
|
|
||||||
DELIMITER ;;
|
|
||||||
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `vn`.`expeditionTruck_beforeUpdate`
|
|
||||||
BEFORE UPDATE ON `expeditionTruck`
|
|
||||||
FOR EACH ROW
|
|
||||||
BEGIN
|
|
||||||
|
|
||||||
SET NEW.description = UCASE(NEW.description);
|
|
||||||
|
|
||||||
END */;;
|
END */;;
|
||||||
DELIMITER ;
|
DELIMITER ;
|
||||||
/*!50003 SET sql_mode = @saved_sql_mode */ ;
|
/*!50003 SET sql_mode = @saved_sql_mode */ ;
|
||||||
|
@ -6796,94 +6777,95 @@ DELIMITER ;;
|
||||||
BEFORE INSERT ON `payment`
|
BEFORE INSERT ON `payment`
|
||||||
FOR EACH ROW
|
FOR EACH ROW
|
||||||
BEGIN
|
BEGIN
|
||||||
DECLARE cuenta_banco,cuenta_proveedor DOUBLE;
|
DECLARE vBankAccount DOUBLE;
|
||||||
DECLARE vNewBookEntry INT;
|
DECLARE vSupplierAccount DOUBLE;
|
||||||
DECLARE bolCASH BOOLEAN;
|
DECLARE vNewBookEntry INT;
|
||||||
DECLARE isSupplierActive BOOLEAN;
|
DECLARE vIsCash BOOLEAN;
|
||||||
|
DECLARE vIsSupplierActive BOOLEAN;
|
||||||
|
|
||||||
-- PAK 10/02/15 No se asientan los pagos directamente, salvo en el caso de las cajas de CASH
|
-- PAK 10/02/15 No se asientan los pagos directamente, salvo en el caso de las cajas de CASH
|
||||||
SELECT (at2.code = 'cash') INTO bolCASH
|
SELECT (at2.code = 'cash') INTO vIsCash
|
||||||
FROM accounting a
|
FROM accounting a
|
||||||
JOIN accountingType at2 ON at2.id = a.accountingTypeFk
|
JOIN accountingType at2 ON at2.id = a.accountingTypeFk
|
||||||
WHERE a.id = NEW.bankFk;
|
WHERE a.id = NEW.bankFk;
|
||||||
|
|
||||||
IF bolCASH THEN
|
IF vIsCash THEN
|
||||||
|
SELECT account INTO vBankAccount
|
||||||
SELECT account INTO cuenta_banco
|
FROM accounting
|
||||||
FROM accounting
|
WHERE id = NEW.bankFk;
|
||||||
WHERE id = NEW.bankFk;
|
|
||||||
|
|
||||||
SELECT account INTO cuenta_proveedor
|
|
||||||
FROM supplier
|
|
||||||
WHERE id = NEW.supplierFk;
|
|
||||||
|
|
||||||
CALL ledger_next(vNewBookEntry);
|
SELECT account INTO vSupplierAccount
|
||||||
|
|
||||||
INSERT INTO XDiario ( ASIEN,
|
|
||||||
FECHA,
|
|
||||||
SUBCTA,
|
|
||||||
CONTRA,
|
|
||||||
CONCEPTO,
|
|
||||||
EURODEBE,
|
|
||||||
EUROHABER,
|
|
||||||
empresa_id)
|
|
||||||
SELECT vNewBookEntry,
|
|
||||||
NEW.received,
|
|
||||||
SUBCTA,
|
|
||||||
CONTRA,
|
|
||||||
NEW.concept,
|
|
||||||
EURODEBE,
|
|
||||||
EUROHABER,
|
|
||||||
NEW.companyFk
|
|
||||||
FROM ( SELECT cuenta_banco SUBCTA,
|
|
||||||
cuenta_proveedor CONTRA,
|
|
||||||
0 EURODEBE,
|
|
||||||
NEW.amount + NEW.bankingFees EUROHABER
|
|
||||||
UNION ALL
|
|
||||||
SELECT cuenta_proveedor SUBCTA,
|
|
||||||
cuenta_banco CONTRA,
|
|
||||||
NEW.amount EURODEBE,
|
|
||||||
0 EUROHABER) gf;
|
|
||||||
|
|
||||||
IF NEW.bankingFees <> 0 THEN
|
|
||||||
INSERT INTO XDiario ( ASIEN,
|
|
||||||
FECHA,
|
|
||||||
SUBCTA,
|
|
||||||
CONTRA,
|
|
||||||
CONCEPTO,
|
|
||||||
EURODEBE,
|
|
||||||
EUROHABER,
|
|
||||||
empresa_id)
|
|
||||||
SELECT vNewBookEntry,
|
|
||||||
NEW.received,
|
|
||||||
IF(c.id = 1,6260000002,
|
|
||||||
IF(CEE = 1,6260000003,6260000004)),
|
|
||||||
cuenta_banco,
|
|
||||||
NEW.concept,
|
|
||||||
NEW.bankingFees,
|
|
||||||
0,
|
|
||||||
NEW.companyFk
|
|
||||||
FROM supplier s
|
|
||||||
JOIN country c ON s.countryFk = c.id
|
|
||||||
WHERE s.id = NEW.supplierFk;
|
|
||||||
END IF;
|
|
||||||
END IF;
|
|
||||||
|
|
||||||
SET NEW.dueDated = IFNULL(NEW.dueDated, NEW.received);
|
|
||||||
|
|
||||||
SELECT isActive INTO isSupplierActive
|
|
||||||
FROM supplier
|
FROM supplier
|
||||||
WHERE id = NEW.supplierFk;
|
WHERE id = NEW.supplierFk;
|
||||||
|
|
||||||
IF isSupplierActive = FALSE THEN
|
CALL ledger_next(YEAR(NEW.received), NEW.companyFk, vNewBookEntry);
|
||||||
CALL util.throw('SUPPLIER_INACTIVE');
|
|
||||||
END IF;
|
INSERT INTO XDiario (
|
||||||
|
ASIEN,
|
||||||
IF ISNULL(NEW.workerFk) THEN
|
FECHA,
|
||||||
SET NEW.workerFk = account.myUser_getId();
|
SUBCTA,
|
||||||
END IF;
|
CONTRA,
|
||||||
|
CONCEPTO,
|
||||||
END */;;
|
EURODEBE,
|
||||||
|
EUROHABER,
|
||||||
|
empresa_id)
|
||||||
|
SELECT vNewBookEntry,
|
||||||
|
NEW.received,
|
||||||
|
SUBCTA,
|
||||||
|
CONTRA,
|
||||||
|
NEW.concept,
|
||||||
|
EURODEBE,
|
||||||
|
EUROHABER,
|
||||||
|
NEW.companyFk
|
||||||
|
FROM (SELECT vBankAccount SUBCTA,
|
||||||
|
vSupplierAccount CONTRA,
|
||||||
|
0 EURODEBE,
|
||||||
|
NEW.amount + NEW.bankingFees EUROHABER
|
||||||
|
UNION ALL
|
||||||
|
SELECT vSupplierAccount SUBCTA,
|
||||||
|
vBankAccount CONTRA,
|
||||||
|
NEW.amount EURODEBE,
|
||||||
|
0 EUROHABER) gf;
|
||||||
|
|
||||||
|
IF NEW.bankingFees <> 0 THEN
|
||||||
|
INSERT INTO XDiario (
|
||||||
|
ASIEN,
|
||||||
|
FECHA,
|
||||||
|
SUBCTA,
|
||||||
|
CONTRA,
|
||||||
|
CONCEPTO,
|
||||||
|
EURODEBE,
|
||||||
|
EUROHABER,
|
||||||
|
empresa_id)
|
||||||
|
SELECT vNewBookEntry,
|
||||||
|
NEW.received,
|
||||||
|
IF(c.id = 1,6260000002,
|
||||||
|
IF(CEE = 1,6260000003,6260000004)),
|
||||||
|
vBankAccount,
|
||||||
|
NEW.concept,
|
||||||
|
NEW.bankingFees,
|
||||||
|
0,
|
||||||
|
NEW.companyFk
|
||||||
|
FROM supplier s
|
||||||
|
JOIN country c ON s.countryFk = c.id
|
||||||
|
WHERE s.id = NEW.supplierFk;
|
||||||
|
END IF;
|
||||||
|
END IF;
|
||||||
|
|
||||||
|
SET NEW.dueDated = IFNULL(NEW.dueDated, NEW.received);
|
||||||
|
|
||||||
|
SELECT isActive INTO vIsSupplierActive
|
||||||
|
FROM supplier
|
||||||
|
WHERE id = NEW.supplierFk;
|
||||||
|
|
||||||
|
IF vIsSupplierActive = FALSE THEN
|
||||||
|
CALL util.throw('SUPPLIER_INACTIVE');
|
||||||
|
END IF;
|
||||||
|
|
||||||
|
IF ISNULL(NEW.workerFk) THEN
|
||||||
|
SET NEW.workerFk = account.myUser_getId();
|
||||||
|
END IF;
|
||||||
|
END */;;
|
||||||
DELIMITER ;
|
DELIMITER ;
|
||||||
/*!50003 SET sql_mode = @saved_sql_mode */ ;
|
/*!50003 SET sql_mode = @saved_sql_mode */ ;
|
||||||
/*!50003 SET character_set_client = @saved_cs_client */ ;
|
/*!50003 SET character_set_client = @saved_cs_client */ ;
|
||||||
|
@ -7472,6 +7454,48 @@ DELIMITER ;
|
||||||
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
|
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
|
||||||
/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
|
/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
|
||||||
DELIMITER ;;
|
DELIMITER ;;
|
||||||
|
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `vn`.`expeditionTruck_beforeInsert`
|
||||||
|
BEFORE INSERT ON `roadmapStop` FOR EACH ROW
|
||||||
|
BEGIN
|
||||||
|
|
||||||
|
SET NEW.description = UCASE(NEW.description);
|
||||||
|
|
||||||
|
END */;;
|
||||||
|
DELIMITER ;
|
||||||
|
/*!50003 SET sql_mode = @saved_sql_mode */ ;
|
||||||
|
/*!50003 SET character_set_client = @saved_cs_client */ ;
|
||||||
|
/*!50003 SET character_set_results = @saved_cs_results */ ;
|
||||||
|
/*!50003 SET collation_connection = @saved_col_connection */ ;
|
||||||
|
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
||||||
|
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
||||||
|
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
|
||||||
|
/*!50003 SET character_set_client = utf8mb4 */ ;
|
||||||
|
/*!50003 SET character_set_results = utf8mb4 */ ;
|
||||||
|
/*!50003 SET collation_connection = utf8mb4_unicode_ci */ ;
|
||||||
|
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
|
||||||
|
/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
|
||||||
|
DELIMITER ;;
|
||||||
|
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `vn`.`expeditionTruck_beforeUpdate`
|
||||||
|
BEFORE UPDATE ON `roadmapStop` FOR EACH ROW
|
||||||
|
BEGIN
|
||||||
|
|
||||||
|
SET NEW.description = UCASE(NEW.description);
|
||||||
|
|
||||||
|
END */;;
|
||||||
|
DELIMITER ;
|
||||||
|
/*!50003 SET sql_mode = @saved_sql_mode */ ;
|
||||||
|
/*!50003 SET character_set_client = @saved_cs_client */ ;
|
||||||
|
/*!50003 SET character_set_results = @saved_cs_results */ ;
|
||||||
|
/*!50003 SET collation_connection = @saved_col_connection */ ;
|
||||||
|
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
||||||
|
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
||||||
|
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
|
||||||
|
/*!50003 SET character_set_client = utf8mb4 */ ;
|
||||||
|
/*!50003 SET character_set_results = utf8mb4 */ ;
|
||||||
|
/*!50003 SET collation_connection = utf8mb4_unicode_ci */ ;
|
||||||
|
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
|
||||||
|
/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
|
||||||
|
DELIMITER ;;
|
||||||
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `vn`.`route_beforeInsert`
|
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `vn`.`route_beforeInsert`
|
||||||
BEFORE INSERT ON `route`
|
BEFORE INSERT ON `route`
|
||||||
FOR EACH ROW
|
FOR EACH ROW
|
||||||
|
@ -8961,6 +8985,8 @@ BEGIN
|
||||||
UPDATE expedition
|
UPDATE expedition
|
||||||
SET hasNewRoute = TRUE
|
SET hasNewRoute = TRUE
|
||||||
WHERE ticketFk = NEW.id;
|
WHERE ticketFk = NEW.id;
|
||||||
|
|
||||||
|
CALL ticket_doCmr(NEW.id);
|
||||||
END IF;
|
END IF;
|
||||||
END */;;
|
END */;;
|
||||||
DELIMITER ;
|
DELIMITER ;
|
||||||
|
@ -9318,7 +9344,6 @@ DELIMITER ;;
|
||||||
FOR EACH ROW
|
FOR EACH ROW
|
||||||
BEGIN
|
BEGIN
|
||||||
SET NEW.editorFk = account.myUser_getId();
|
SET NEW.editorFk = account.myUser_getId();
|
||||||
CALL ticketRefund_beforeUpsert(NEW.refundTicketFk, NEW.originalTicketFk);
|
|
||||||
END */;;
|
END */;;
|
||||||
DELIMITER ;
|
DELIMITER ;
|
||||||
/*!50003 SET sql_mode = @saved_sql_mode */ ;
|
/*!50003 SET sql_mode = @saved_sql_mode */ ;
|
||||||
|
@ -9339,7 +9364,6 @@ DELIMITER ;;
|
||||||
FOR EACH ROW
|
FOR EACH ROW
|
||||||
BEGIN
|
BEGIN
|
||||||
SET NEW.editorFk = account.myUser_getId();
|
SET NEW.editorFk = account.myUser_getId();
|
||||||
CALL ticketRefund_beforeUpsert(NEW.refundTicketFk, NEW.originalTicketFk);
|
|
||||||
END */;;
|
END */;;
|
||||||
DELIMITER ;
|
DELIMITER ;
|
||||||
/*!50003 SET sql_mode = @saved_sql_mode */ ;
|
/*!50003 SET sql_mode = @saved_sql_mode */ ;
|
||||||
|
@ -9655,11 +9679,6 @@ BEGIN
|
||||||
`changedModel` = 'TicketTracking',
|
`changedModel` = 'TicketTracking',
|
||||||
`changedModelId` = OLD.id,
|
`changedModelId` = OLD.id,
|
||||||
`userFk` = account.myUser_getId();
|
`userFk` = account.myUser_getId();
|
||||||
|
|
||||||
CALL util.debugAdd('deletedState',
|
|
||||||
CONCAT('interFk: ', OLD.id,
|
|
||||||
' ticketFk: ', OLD.ticketFk,
|
|
||||||
' stateFk: ', OLD.stateFk));
|
|
||||||
|
|
||||||
SELECT i.ticketFk, i.id, s.`name`
|
SELECT i.ticketFk, i.id, s.`name`
|
||||||
INTO vTicketFk, vTicketTrackingFk, vStateName
|
INTO vTicketFk, vTicketTrackingFk, vStateName
|
||||||
|
@ -10805,4 +10824,4 @@ USE `vn2008`;
|
||||||
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
|
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
|
||||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||||
|
|
||||||
-- Dump completed on 2024-05-14 6:26:46
|
-- Dump completed on 2024-05-28 6:58:42
|
||||||
|
|
|
@ -1205,11 +1205,11 @@ INSERT INTO `vn`.`saleComponent`(`saleFk`, `componentFk`, `value`)
|
||||||
(32, 36, -92.324),
|
(32, 36, -92.324),
|
||||||
(32, 39, 0.994);
|
(32, 39, 0.994);
|
||||||
|
|
||||||
INSERT INTO `vn`.`itemShelving` (`itemFk`, `shelvingFk`, `visible`, `grouping`, `packing`, `userFk`)
|
INSERT INTO `vn`.`itemShelving` (`itemFk`, `shelvingFk`, `visible`, `grouping`, `packing`,`buyFk`, `userFk`)
|
||||||
VALUES
|
VALUES
|
||||||
(2, 'GVC', 1, 1, 1, 1106),
|
(2, 'GVC', 1, 1, 1, 2,1106),
|
||||||
(4, 'HEJ', 1, 1, 1, 1106),
|
(4, 'HEJ', 1, 1, 1, NULL,1106),
|
||||||
(1, 'UXN', 2, 12, 12, 1106);
|
(1, 'UXN', 2, 12, 12, NULL,1106);
|
||||||
|
|
||||||
INSERT INTO `vn`.`itemShelvingSale` (`itemShelvingFk`, `saleFk`, `quantity`, `created`, `userFk`)
|
INSERT INTO `vn`.`itemShelvingSale` (`itemShelvingFk`, `saleFk`, `quantity`, `created`, `userFk`)
|
||||||
VALUES
|
VALUES
|
||||||
|
@ -3788,14 +3788,22 @@ INSERT INTO vn.workerTeam(id, team, workerFk)
|
||||||
VALUES
|
VALUES
|
||||||
(8, 1, 19);
|
(8, 1, 19);
|
||||||
|
|
||||||
INSERT INTO vn.workCenter (id, name, payrollCenterFk, counter, warehouseFk, street, geoFk, deliveryManAdjustment)
|
INSERT INTO vn.workCenter (id, name, payrollCenterFk, counter, warehouseFk, street, geoFk, deliveryManAdjustment)
|
||||||
VALUES(100, 'workCenterOne', 1, NULL, 1, 'gotham', NULL, NULL);
|
VALUES(100, 'workCenterOne', 1, NULL, 1, 'gotham', NULL, NULL);
|
||||||
|
|
||||||
UPDATE vn.locker SET workerFk = 1110 WHERE id = 147;
|
INSERT INTO `vn`.`locker` (code, gender, workerFk) VALUES
|
||||||
|
('1M', 'M', 1),
|
||||||
|
('2M', 'M', 9),
|
||||||
|
('3M', 'M', NULL),
|
||||||
|
('4M', 'M', NULL),
|
||||||
|
('1F', 'F', 1110),
|
||||||
|
('2F', 'F', NULL),
|
||||||
|
('3F', 'F', NULL),
|
||||||
|
('4F', 'F', NULL);
|
||||||
|
|
||||||
INSERT INTO `vn`.`ledgerCompany` SET
|
INSERT INTO `vn`.`ledgerCompany` SET
|
||||||
fiscalYear = YEAR(util.VN_CURDATE()),
|
fiscalYear = YEAR(util.VN_CURDATE()),
|
||||||
bookEntry = 2;
|
bookEntry = 2;
|
||||||
|
|
||||||
INSERT INTO `vn`.`ledgerConfig` SET
|
INSERT INTO `vn`.`ledgerConfig` SET
|
||||||
maxTolerance = 0.01;
|
maxTolerance = 0.01;
|
||||||
|
|
|
@ -13,27 +13,12 @@ BEGIN
|
||||||
* @param vCollectionFk Id de colección
|
* @param vCollectionFk Id de colección
|
||||||
*/
|
*/
|
||||||
DECLARE vHasTooMuchCollections BOOL;
|
DECLARE vHasTooMuchCollections BOOL;
|
||||||
DECLARE vItemPackingTypeFk VARCHAR(1);
|
|
||||||
DECLARE vWarehouseFk INT;
|
|
||||||
DECLARE vLockName VARCHAR(215);
|
|
||||||
DECLARE vLockTime INT DEFAULT 30;
|
|
||||||
|
|
||||||
DECLARE EXIT HANDLER FOR SQLEXCEPTION
|
|
||||||
BEGIN
|
|
||||||
IF vLockName IS NOT NULL THEN
|
|
||||||
DO RELEASE_LOCK(vLockName);
|
|
||||||
END IF;
|
|
||||||
|
|
||||||
RESIGNAL;
|
|
||||||
END;
|
|
||||||
|
|
||||||
-- Si hay colecciones sin terminar, sale del proceso
|
-- Si hay colecciones sin terminar, sale del proceso
|
||||||
CALL collection_get(vUserFk);
|
CALL collection_get(vUserFk);
|
||||||
|
|
||||||
SELECT (pc.maxNotReadyCollections - COUNT(*)) <= 0,
|
SELECT (pc.maxNotReadyCollections - COUNT(*)) <= 0
|
||||||
collection_assign_lockname
|
INTO vHasTooMuchCollections
|
||||||
INTO vHasTooMuchCollections,
|
|
||||||
vLockName
|
|
||||||
FROM productionConfig pc
|
FROM productionConfig pc
|
||||||
LEFT JOIN tCollection ON TRUE;
|
LEFT JOIN tCollection ON TRUE;
|
||||||
|
|
||||||
|
@ -43,21 +28,6 @@ BEGIN
|
||||||
CALL util.throw('Hay colecciones pendientes');
|
CALL util.throw('Hay colecciones pendientes');
|
||||||
END IF;
|
END IF;
|
||||||
|
|
||||||
SELECT warehouseFk, itemPackingTypeFk
|
|
||||||
INTO vWarehouseFk, vItemPackingTypeFk
|
|
||||||
FROM operator
|
|
||||||
WHERE workerFk = vUserFk;
|
|
||||||
|
|
||||||
SET vLockName = CONCAT_WS('/',
|
|
||||||
vLockName,
|
|
||||||
vWarehouseFk,
|
|
||||||
vItemPackingTypeFk
|
|
||||||
);
|
|
||||||
|
|
||||||
IF NOT GET_LOCK(vLockName, vLockTime) THEN
|
|
||||||
CALL util.throw(CONCAT('Cannot get lock: ', vLockName));
|
|
||||||
END IF;
|
|
||||||
|
|
||||||
-- Se eliminan las colecciones sin asignar que estan obsoletas
|
-- Se eliminan las colecciones sin asignar que estan obsoletas
|
||||||
INSERT INTO ticketTracking(stateFk, ticketFk)
|
INSERT INTO ticketTracking(stateFk, ticketFk)
|
||||||
SELECT s.id, tc.ticketFk
|
SELECT s.id, tc.ticketFk
|
||||||
|
@ -65,7 +35,7 @@ BEGIN
|
||||||
JOIN ticketCollection tc ON tc.collectionFk = c.id
|
JOIN ticketCollection tc ON tc.collectionFk = c.id
|
||||||
JOIN `state` s ON s.code = 'PRINTED_AUTO'
|
JOIN `state` s ON s.code = 'PRINTED_AUTO'
|
||||||
JOIN productionConfig pc
|
JOIN productionConfig pc
|
||||||
WHERE c.workerFk IS NULL
|
WHERE c.workerFk IS NULL
|
||||||
AND TIMEDIFF(util.VN_NOW(), c.created) > pc.maxNotAssignedCollectionLifeTime;
|
AND TIMEDIFF(util.VN_NOW(), c.created) > pc.maxNotAssignedCollectionLifeTime;
|
||||||
|
|
||||||
DELETE c.*
|
DELETE c.*
|
||||||
|
@ -79,8 +49,7 @@ BEGIN
|
||||||
VALUES(vUserFk);
|
VALUES(vUserFk);
|
||||||
|
|
||||||
-- Comprueba si hay colecciones disponibles que se ajustan a su configuracion
|
-- Comprueba si hay colecciones disponibles que se ajustan a su configuracion
|
||||||
SELECT MIN(c.id)
|
SELECT MIN(c.id) INTO vCollectionFk
|
||||||
INTO vCollectionFk
|
|
||||||
FROM `collection` c
|
FROM `collection` c
|
||||||
JOIN operator o
|
JOIN operator o
|
||||||
ON (o.itemPackingTypeFk = c.itemPackingTypeFk OR c.itemPackingTypeFk IS NULL)
|
ON (o.itemPackingTypeFk = c.itemPackingTypeFk OR c.itemPackingTypeFk IS NULL)
|
||||||
|
@ -106,7 +75,5 @@ BEGIN
|
||||||
UPDATE `collection`
|
UPDATE `collection`
|
||||||
SET workerFk = vUserFk
|
SET workerFk = vUserFk
|
||||||
WHERE id = vCollectionFk;
|
WHERE id = vCollectionFk;
|
||||||
|
|
||||||
DO RELEASE_LOCK(vLockName);
|
|
||||||
END$$
|
END$$
|
||||||
DELIMITER ;
|
DELIMITER ;
|
||||||
|
|
|
@ -49,6 +49,7 @@ BEGIN
|
||||||
BEGIN
|
BEGIN
|
||||||
IF vLockName IS NOT NULL THEN
|
IF vLockName IS NOT NULL THEN
|
||||||
DO RELEASE_LOCK(vLockName);
|
DO RELEASE_LOCK(vLockName);
|
||||||
|
CALL util.debugAdd('releaseLock', vLockName); -- Tmp
|
||||||
END IF;
|
END IF;
|
||||||
|
|
||||||
RESIGNAL;
|
RESIGNAL;
|
||||||
|
|
|
@ -6,12 +6,12 @@ BEGIN
|
||||||
*
|
*
|
||||||
* @param vDuaFk Id del dua a recalcular
|
* @param vDuaFk Id del dua a recalcular
|
||||||
*/
|
*/
|
||||||
DECLARE done BOOL DEFAULT FALSE;
|
DECLARE vDone BOOL DEFAULT FALSE;
|
||||||
DECLARE vInvoiceFk INT;
|
DECLARE vInvoiceFk INT;
|
||||||
DECLARE vASIEN BIGINT DEFAULT 0;
|
DECLARE vBookEntry INT;
|
||||||
DECLARE vCounter INT DEFAULT 0;
|
DECLARE vFiscalYear INT;
|
||||||
|
|
||||||
DECLARE rs CURSOR FOR
|
DECLARE vInvoicesIn CURSOR FOR
|
||||||
SELECT DISTINCT e.invoiceInFk
|
SELECT DISTINCT e.invoiceInFk
|
||||||
FROM entry e
|
FROM entry e
|
||||||
JOIN duaEntry de ON de.entryFk = e.id
|
JOIN duaEntry de ON de.entryFk = e.id
|
||||||
|
@ -20,9 +20,7 @@ BEGIN
|
||||||
AND de.customsValue
|
AND de.customsValue
|
||||||
AND ii.isBooked = FALSE;
|
AND ii.isBooked = FALSE;
|
||||||
|
|
||||||
DECLARE CONTINUE HANDLER FOR NOT FOUND SET done = TRUE;
|
DECLARE CONTINUE HANDLER FOR NOT FOUND SET vDone = TRUE;
|
||||||
|
|
||||||
OPEN rs;
|
|
||||||
|
|
||||||
UPDATE invoiceIn ii
|
UPDATE invoiceIn ii
|
||||||
JOIN entry e ON e.invoiceInFk = ii.id
|
JOIN entry e ON e.invoiceInFk = ii.id
|
||||||
|
@ -36,38 +34,36 @@ BEGIN
|
||||||
e.isConfirmed = TRUE
|
e.isConfirmed = TRUE
|
||||||
WHERE d.id = vDuaFk;
|
WHERE d.id = vDuaFk;
|
||||||
|
|
||||||
SELECT IFNULL(ASIEN,0) INTO vASIEN
|
SELECT ASIEN INTO vBookEntry FROM dua WHERE id = vDuaFk;
|
||||||
FROM dua
|
|
||||||
WHERE id = vDuaFk;
|
|
||||||
|
|
||||||
FETCH rs INTO vInvoiceFk;
|
IF vBookEntry IS NULL THEN
|
||||||
|
SELECT YEAR(IFNULL(ii.bookEntried, d.bookEntried)) INTO vFiscalYear
|
||||||
|
FROM invoiceIn ii
|
||||||
|
JOIN entry e ON e.invoiceInFk = ii.id
|
||||||
|
JOIN duaEntry de ON de.entryFk = e.id
|
||||||
|
JOIN dua d ON d.id = de.duaFk
|
||||||
|
WHERE d.id = vDuaFk
|
||||||
|
LIMIT 1;
|
||||||
|
CALL ledger_next(vFiscalYear, FALSE, vBookEntry);
|
||||||
|
END IF;
|
||||||
|
|
||||||
WHILE NOT done DO
|
OPEN vInvoicesIn;
|
||||||
|
|
||||||
CALL invoiceIn_booking(vInvoiceFk);
|
l: LOOP
|
||||||
|
SET vDone = FALSE;
|
||||||
IF vCounter > 0 OR vASIEN > 0 THEN
|
FETCH vInvoicesIn INTO vInvoiceFk;
|
||||||
|
|
||||||
UPDATE XDiario x
|
|
||||||
JOIN ledgerConfig lc ON lc.lastBookEntry = x.ASIEN
|
|
||||||
SET x.ASIEN = vASIEN;
|
|
||||||
|
|
||||||
ELSE
|
|
||||||
|
|
||||||
SELECT lastBookEntry INTO vASIEN FROM ledgerConfig;
|
|
||||||
|
|
||||||
|
IF vDone THEN
|
||||||
|
LEAVE l;
|
||||||
END IF;
|
END IF;
|
||||||
|
|
||||||
SET vCounter = vCounter + 1;
|
CALL invoiceIn_booking(vInvoiceFk, vBookEntry);
|
||||||
|
END LOOP;
|
||||||
|
|
||||||
FETCH rs INTO vInvoiceFk;
|
CLOSE vInvoicesIn;
|
||||||
|
|
||||||
END WHILE;
|
|
||||||
|
|
||||||
CLOSE rs;
|
|
||||||
|
|
||||||
UPDATE dua
|
UPDATE dua
|
||||||
SET ASIEN = vASIEN
|
SET ASIEN = vBookEntry
|
||||||
WHERE id = vDuaFk;
|
WHERE id = vDuaFk;
|
||||||
|
|
||||||
UPDATE invoiceIn ii
|
UPDATE invoiceIn ii
|
||||||
|
|
|
@ -12,7 +12,7 @@ BEGIN
|
||||||
WHERE id = vDuaFk;
|
WHERE id = vDuaFk;
|
||||||
|
|
||||||
IF vBookNumber IS NULL OR NOT vBookNumber THEN
|
IF vBookNumber IS NULL OR NOT vBookNumber THEN
|
||||||
CALL ledger_next(YEAR(vBookDated), vBookNumber);
|
CALL ledger_next(YEAR(vBookDated), FALSE, vBookNumber);
|
||||||
END IF;
|
END IF;
|
||||||
|
|
||||||
-- Apunte de la aduana
|
-- Apunte de la aduana
|
||||||
|
|
|
@ -1,7 +1,17 @@
|
||||||
DELIMITER $$
|
DELIMITER $$
|
||||||
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`invoiceIn_booking`(vSelf INT)
|
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`invoiceIn_booking`(
|
||||||
|
vSelf INT,
|
||||||
|
vBookNumber INT
|
||||||
|
)
|
||||||
BEGIN
|
BEGIN
|
||||||
DECLARE vBookNumber INT;
|
/**
|
||||||
|
* Genera la contabilidad para una factura y la marca como contabilizada
|
||||||
|
* Cuadra el asiento generado en si encuentra problemas derivados
|
||||||
|
* de los calculos con decimales
|
||||||
|
*
|
||||||
|
* @param vSelf Id invoiceIn
|
||||||
|
* @param vBookEntry Id de asiento, si es NULL se genera uno nuevo
|
||||||
|
*/
|
||||||
DECLARE vFiscalYear INT;
|
DECLARE vFiscalYear INT;
|
||||||
|
|
||||||
CREATE OR REPLACE TEMPORARY TABLE tInvoiceIn
|
CREATE OR REPLACE TEMPORARY TABLE tInvoiceIn
|
||||||
|
@ -58,7 +68,10 @@ BEGIN
|
||||||
WHERE ii.id = vSelf;
|
WHERE ii.id = vSelf;
|
||||||
|
|
||||||
SELECT YEAR(bookEntried) INTO vFiscalYear FROM tInvoiceIn LIMIT 1;
|
SELECT YEAR(bookEntried) INTO vFiscalYear FROM tInvoiceIn LIMIT 1;
|
||||||
CALL ledger_next(vFiscalYear, vBookNumber);
|
|
||||||
|
IF vBookNumber IS NULL THEN
|
||||||
|
CALL ledger_next(vFiscalYear, FALSE, vBookNumber);
|
||||||
|
END IF;
|
||||||
|
|
||||||
-- Apunte del proveedor
|
-- Apunte del proveedor
|
||||||
INSERT INTO XDiario(
|
INSERT INTO XDiario(
|
||||||
|
@ -187,7 +200,7 @@ BEGIN
|
||||||
LEFT JOIN (
|
LEFT JOIN (
|
||||||
SELECT e.id
|
SELECT e.id
|
||||||
FROM tInvoiceIn tii
|
FROM tInvoiceIn tii
|
||||||
JOIN expense e ON e.id = tii.expenseFk
|
JOIN expense e ON e.id = tii.expenseFk
|
||||||
WHERE e.isWithheld
|
WHERE e.isWithheld
|
||||||
LIMIT 1
|
LIMIT 1
|
||||||
) eWithheld ON TRUE
|
) eWithheld ON TRUE
|
||||||
|
|
|
@ -61,7 +61,7 @@ BEGIN
|
||||||
WHERE io.id = vInvoice;
|
WHERE io.id = vInvoice;
|
||||||
|
|
||||||
SELECT YEAR(FECHA) INTO vFiscalYear FROM rs LIMIT 1;
|
SELECT YEAR(FECHA) INTO vFiscalYear FROM rs LIMIT 1;
|
||||||
CALL ledger_next(vFiscalYear, vBookNumber);
|
CALL ledger_next(vFiscalYear, FALSE, vBookNumber);
|
||||||
-- Linea del cliente
|
-- Linea del cliente
|
||||||
INSERT INTO XDiario(
|
INSERT INTO XDiario(
|
||||||
ASIEN,
|
ASIEN,
|
||||||
|
|
|
@ -17,13 +17,15 @@ BEGIN
|
||||||
SELECT
|
SELECT
|
||||||
itemFk,
|
itemFk,
|
||||||
packing,
|
packing,
|
||||||
created
|
created,
|
||||||
|
buyFk
|
||||||
FROM itemShelving
|
FROM itemShelving
|
||||||
WHERE id = vItemShelvingFk
|
WHERE id = vItemShelvingFk
|
||||||
) ish2
|
) ish2
|
||||||
ON ish2.itemFk = ish.itemFk
|
ON ish2.itemFk = ish.itemFk
|
||||||
AND ish2.packing = ish.packing
|
AND ish2.packing = ish.packing
|
||||||
AND date(ish2.created) = date(ish.created)
|
AND date(ish2.created) = date(ish.created)
|
||||||
|
AND ish2.buyFk = ish.buyFk
|
||||||
WHERE ish.shelvingFk = vShelvingFk COLLATE utf8_unicode_ci;
|
WHERE ish.shelvingFk = vShelvingFk COLLATE utf8_unicode_ci;
|
||||||
|
|
||||||
IF vNewItemShelvingFk THEN
|
IF vNewItemShelvingFk THEN
|
||||||
|
|
|
@ -2,7 +2,6 @@ DELIMITER $$
|
||||||
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`itemShelving_add`(IN vShelvingFk VARCHAR(8), IN vBarcode VARCHAR(22), IN vQuantity INT, IN vPackagingFk VARCHAR(10), IN vGrouping INT, IN vPacking INT, IN vWarehouseFk INT)
|
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`itemShelving_add`(IN vShelvingFk VARCHAR(8), IN vBarcode VARCHAR(22), IN vQuantity INT, IN vPackagingFk VARCHAR(10), IN vGrouping INT, IN vPacking INT, IN vWarehouseFk INT)
|
||||||
BEGIN
|
BEGIN
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Añade registro o lo actualiza si ya existe.
|
* Añade registro o lo actualiza si ya existe.
|
||||||
*
|
*
|
||||||
|
@ -15,11 +14,23 @@ BEGIN
|
||||||
* @param vWarehouseFk indica el sector
|
* @param vWarehouseFk indica el sector
|
||||||
*
|
*
|
||||||
**/
|
**/
|
||||||
|
|
||||||
DECLARE vItemFk INT;
|
DECLARE vItemFk INT;
|
||||||
|
DECLARE vBuyFk INT;
|
||||||
|
|
||||||
|
SELECT id INTO vBuyFk
|
||||||
|
FROM buy WHERE id = vBarcode;
|
||||||
|
|
||||||
SELECT barcodeToItem(vBarcode) INTO vItemFk;
|
SELECT barcodeToItem(vBarcode) INTO vItemFk;
|
||||||
|
|
||||||
|
IF vBuyFk IS NULL THEN
|
||||||
|
CALL cache.last_buy_refresh(FALSE);
|
||||||
|
|
||||||
|
SELECT buy_id INTO vBuyFk
|
||||||
|
FROM cache.last_buy
|
||||||
|
WHERE item_id = vItemFk
|
||||||
|
AND warehouse_id = vWarehouseFk;
|
||||||
|
END IF;
|
||||||
|
|
||||||
IF vPacking IS NULL
|
IF vPacking IS NULL
|
||||||
THEN
|
THEN
|
||||||
SET vPacking = itemPacking(vBarcode, vWarehouseFk);
|
SET vPacking = itemPacking(vBarcode, vWarehouseFk);
|
||||||
|
@ -29,31 +40,32 @@ BEGIN
|
||||||
IF (SELECT COUNT(*) FROM itemShelving
|
IF (SELECT COUNT(*) FROM itemShelving
|
||||||
WHERE shelvingFk COLLATE utf8_unicode_ci = vShelvingFk
|
WHERE shelvingFk COLLATE utf8_unicode_ci = vShelvingFk
|
||||||
AND itemFk = vItemFk
|
AND itemFk = vItemFk
|
||||||
AND packing = vPacking) = 1 THEN
|
AND packing = vPacking
|
||||||
|
AND buyFk = vBuyFk) THEN
|
||||||
|
|
||||||
UPDATE itemShelving
|
UPDATE itemShelving
|
||||||
SET visible = visible+vQuantity
|
SET visible = visible + vQuantity
|
||||||
WHERE shelvingFk COLLATE utf8_unicode_ci = vShelvingFk AND itemFk = vItemFk AND packing = vPacking;
|
WHERE shelvingFk COLLATE utf8_unicode_ci = vShelvingFk AND itemFk = vItemFk AND packing = vPacking;
|
||||||
|
|
||||||
ELSE
|
ELSE
|
||||||
CALL cache.last_buy_refresh(FALSE);
|
|
||||||
INSERT INTO itemShelving( itemFk,
|
|
||||||
shelvingFk,
|
|
||||||
visible,
|
|
||||||
grouping,
|
|
||||||
packing,
|
|
||||||
packagingFk)
|
|
||||||
|
|
||||||
SELECT vItemFk,
|
INSERT INTO itemShelving(
|
||||||
vShelvingFk,
|
itemFk,
|
||||||
vQuantity,
|
shelvingFk,
|
||||||
IFNULL(vGrouping, b.grouping),
|
visible,
|
||||||
IFNULL(vPacking, b.packing),
|
grouping,
|
||||||
IFNULL(vPackagingFk, b.packagingFk)
|
packing,
|
||||||
FROM item i
|
packagingFk,
|
||||||
LEFT JOIN cache.last_buy lb ON i.id = lb.item_id AND lb.warehouse_id = vWarehouseFk
|
buyFk)
|
||||||
LEFT JOIN buy b ON b.id = lb.buy_id
|
SELECT vItemFk,
|
||||||
WHERE i.id = vItemFk;
|
vShelvingFk,
|
||||||
|
vQuantity,
|
||||||
|
IFNULL(vGrouping, b.grouping),
|
||||||
|
IFNULL(vPacking, b.packing),
|
||||||
|
IFNULL(vPackagingFk, b.packagingFk),
|
||||||
|
id
|
||||||
|
FROM buy b
|
||||||
|
WHERE id = vBuyFk;
|
||||||
END IF;
|
END IF;
|
||||||
END$$
|
END$$
|
||||||
DELIMITER ;
|
DELIMITER ;
|
||||||
|
|
|
@ -28,7 +28,7 @@ BEGIN
|
||||||
DECLARE vIsOriginalAClient BOOL;
|
DECLARE vIsOriginalAClient BOOL;
|
||||||
DECLARE vPayMethodCompensation INT;
|
DECLARE vPayMethodCompensation INT;
|
||||||
|
|
||||||
CALL ledger_next(YEAR(vDated), vNewBookEntry);
|
CALL ledger_next(YEAR(vDated), FALSE, vNewBookEntry);
|
||||||
|
|
||||||
SELECT COUNT(id) INTO vIsOriginalAClient
|
SELECT COUNT(id) INTO vIsOriginalAClient
|
||||||
FROM client
|
FROM client
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
DELIMITER $$
|
DELIMITER $$
|
||||||
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ledger_next`(
|
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ledger_next`(
|
||||||
IN vFiscalYear INT,
|
IN vFiscalYear INT,
|
||||||
|
IN vIsManageTransaction BOOLEAN,
|
||||||
OUT vLastBookEntry INT
|
OUT vLastBookEntry INT
|
||||||
)
|
)
|
||||||
BEGIN
|
BEGIN
|
||||||
|
@ -22,13 +23,15 @@ BEGIN
|
||||||
CALL util.throw('Fiscal year is required');
|
CALL util.throw('Fiscal year is required');
|
||||||
END IF;
|
END IF;
|
||||||
|
|
||||||
SELECT @@in_transaction INTO vHasStartTransaction;
|
IF NOT vIsManageTransaction THEN
|
||||||
|
SELECT @@in_transaction INTO vHasStartTransaction;
|
||||||
|
|
||||||
IF NOT vHasStartTransaction THEN
|
IF NOT vHasStartTransaction THEN
|
||||||
START TRANSACTION;
|
START TRANSACTION;
|
||||||
ELSE
|
ELSE
|
||||||
SAVEPOINT sp;
|
SAVEPOINT sp;
|
||||||
END IF;
|
END IF;
|
||||||
|
END IF;
|
||||||
|
|
||||||
SELECT bookEntry + 1 INTO vLastBookEntry
|
SELECT bookEntry + 1 INTO vLastBookEntry
|
||||||
FROM ledgerCompany
|
FROM ledgerCompany
|
||||||
|
@ -46,10 +49,12 @@ BEGIN
|
||||||
SET bookEntry = vLastBookEntry
|
SET bookEntry = vLastBookEntry
|
||||||
WHERE fiscalYear = vFiscalYear;
|
WHERE fiscalYear = vFiscalYear;
|
||||||
|
|
||||||
IF vHasStartTransaction THEN
|
IF NOT vIsManageTransaction THEN
|
||||||
RELEASE SAVEPOINT sp;
|
IF vHasStartTransaction THEN
|
||||||
ELSE
|
RELEASE SAVEPOINT sp;
|
||||||
COMMIT;
|
ELSE
|
||||||
END IF;
|
COMMIT;
|
||||||
|
END IF;
|
||||||
|
END IF;
|
||||||
END$$
|
END$$
|
||||||
DELIMITER ;
|
DELIMITER ;
|
|
@ -1,18 +0,0 @@
|
||||||
DELIMITER $$
|
|
||||||
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ticketRefund_beforeUpsert`(vRefundTicketFk INT, vOriginalTicketFk INT)
|
|
||||||
BEGIN
|
|
||||||
DECLARE vAlreadyExists BOOLEAN DEFAULT FALSE;
|
|
||||||
|
|
||||||
IF vRefundTicketFk = vOriginalTicketFk THEN
|
|
||||||
CALL util.throw('Original ticket and refund ticket has same id');
|
|
||||||
END IF;
|
|
||||||
|
|
||||||
SELECT COUNT(*) INTO vAlreadyExists
|
|
||||||
FROM ticketRefund
|
|
||||||
WHERE refundTicketFk = vOriginalTicketFk;
|
|
||||||
|
|
||||||
IF vAlreadyExists > 0 THEN
|
|
||||||
CALL util.throw('This ticket is already a refund');
|
|
||||||
END IF;
|
|
||||||
END$$
|
|
||||||
DELIMITER ;
|
|
|
@ -0,0 +1,14 @@
|
||||||
|
DELIMITER $$
|
||||||
|
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`travel_throwAwb`(vSelf INT)
|
||||||
|
BEGIN
|
||||||
|
/**
|
||||||
|
* Throws an error if travel does not have a logical AWB
|
||||||
|
* or there are several AWBs associated with the same DUA
|
||||||
|
*
|
||||||
|
* @param vSelf The travel id
|
||||||
|
*/
|
||||||
|
IF NOT travel_hasUniqueAwb(vSelf) THEN
|
||||||
|
CALL util.throw('A different AWB is found in the entries');
|
||||||
|
END IF;
|
||||||
|
END$$
|
||||||
|
DELIMITER ;
|
|
@ -39,7 +39,7 @@ CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`xdiario_new`(
|
||||||
*/
|
*/
|
||||||
BEGIN
|
BEGIN
|
||||||
IF vBookNumber IS NULL THEN
|
IF vBookNumber IS NULL THEN
|
||||||
CALL ledger_next(YEAR(vDated), vBookNumber);
|
CALL ledger_next(YEAR(vDated), FALSE, vBookNumber);
|
||||||
END IF;
|
END IF;
|
||||||
|
|
||||||
INSERT INTO XDiario
|
INSERT INTO XDiario
|
||||||
|
|
|
@ -7,8 +7,8 @@ BEGIN
|
||||||
CALL supplier_checkIsActive(NEW.supplierFk);
|
CALL supplier_checkIsActive(NEW.supplierFk);
|
||||||
SET NEW.currencyFk = entry_getCurrency(NEW.currencyFk, NEW.supplierFk);
|
SET NEW.currencyFk = entry_getCurrency(NEW.currencyFk, NEW.supplierFk);
|
||||||
SET NEW.commission = entry_getCommission(NEW.travelFk, NEW.currencyFk,NEW.supplierFk);
|
SET NEW.commission = entry_getCommission(NEW.travelFk, NEW.currencyFk,NEW.supplierFk);
|
||||||
IF NEW.travelFk IS NOT NULL AND NOT travel_hasUniqueAwb(NEW.travelFk) THEN
|
IF NEW.travelFk IS NOT NULL THEN
|
||||||
CALL util.throw('The travel is incorrect, there is a different AWB in the associated entries');
|
CALL travel_throwAwb(NEW.travelFk);
|
||||||
END IF;
|
END IF;
|
||||||
END$$
|
END$$
|
||||||
DELIMITER ;
|
DELIMITER ;
|
||||||
|
|
|
@ -25,8 +25,8 @@ BEGIN
|
||||||
|
|
||||||
IF NOT (NEW.travelFk <=> OLD.travelFk) THEN
|
IF NOT (NEW.travelFk <=> OLD.travelFk) THEN
|
||||||
|
|
||||||
IF NEW.travelFk IS NOT NULL AND NOT travel_hasUniqueAwb(NEW.travelFk) THEN
|
IF NEW.travelFk IS NOT NULL THEN
|
||||||
CALL util.throw('The travel is incorrect, there is a different AWB in the associated entries');
|
CALL travel_throwAwb(NEW.travelFk);
|
||||||
END IF;
|
END IF;
|
||||||
|
|
||||||
SELECT COUNT(*) > 0 INTO vIsVirtual
|
SELECT COUNT(*) > 0 INTO vIsVirtual
|
||||||
|
|
|
@ -9,13 +9,12 @@ BEGIN
|
||||||
DECLARE vIsCash BOOLEAN;
|
DECLARE vIsCash BOOLEAN;
|
||||||
DECLARE vIsSupplierActive BOOLEAN;
|
DECLARE vIsSupplierActive BOOLEAN;
|
||||||
|
|
||||||
-- PAK 10/02/15 No se asientan los pagos directamente, salvo en el caso de las cajas de CASH
|
|
||||||
SELECT (at2.code = 'cash') INTO vIsCash
|
SELECT (at2.code = 'cash') INTO vIsCash
|
||||||
FROM accounting a
|
FROM accounting a
|
||||||
JOIN accountingType at2 ON at2.id = a.accountingTypeFk
|
JOIN accountingType at2 ON at2.id = a.accountingTypeFk
|
||||||
WHERE a.id = NEW.bankFk;
|
WHERE a.id = NEW.bankFk;
|
||||||
|
|
||||||
IF vIsCash THEN
|
IF vIsCash THEN
|
||||||
SELECT account INTO vBankAccount
|
SELECT account INTO vBankAccount
|
||||||
FROM accounting
|
FROM accounting
|
||||||
WHERE id = NEW.bankFk;
|
WHERE id = NEW.bankFk;
|
||||||
|
@ -24,7 +23,7 @@ BEGIN
|
||||||
FROM supplier
|
FROM supplier
|
||||||
WHERE id = NEW.supplierFk;
|
WHERE id = NEW.supplierFk;
|
||||||
|
|
||||||
CALL ledger_next(YEAR(NEW.received), NEW.companyFk, vNewBookEntry);
|
CALL ledger_next(YEAR(NEW.received), TRUE, vNewBookEntry);
|
||||||
|
|
||||||
INSERT INTO XDiario (
|
INSERT INTO XDiario (
|
||||||
ASIEN,
|
ASIEN,
|
||||||
|
|
|
@ -4,6 +4,5 @@ CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`ticketRefund_beforeIn
|
||||||
FOR EACH ROW
|
FOR EACH ROW
|
||||||
BEGIN
|
BEGIN
|
||||||
SET NEW.editorFk = account.myUser_getId();
|
SET NEW.editorFk = account.myUser_getId();
|
||||||
CALL ticketRefund_beforeUpsert(NEW.refundTicketFk, NEW.originalTicketFk);
|
|
||||||
END$$
|
END$$
|
||||||
DELIMITER ;
|
DELIMITER ;
|
||||||
|
|
|
@ -4,6 +4,5 @@ CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`ticketRefund_beforeUp
|
||||||
FOR EACH ROW
|
FOR EACH ROW
|
||||||
BEGIN
|
BEGIN
|
||||||
SET NEW.editorFk = account.myUser_getId();
|
SET NEW.editorFk = account.myUser_getId();
|
||||||
CALL ticketRefund_beforeUpsert(NEW.refundTicketFk, NEW.originalTicketFk);
|
|
||||||
END$$
|
END$$
|
||||||
DELIMITER ;
|
DELIMITER ;
|
||||||
|
|
|
@ -9,8 +9,8 @@ BEGIN
|
||||||
|
|
||||||
CALL travel_checkWarehouseIsFeedStock(NEW.warehouseInFk);
|
CALL travel_checkWarehouseIsFeedStock(NEW.warehouseInFk);
|
||||||
|
|
||||||
IF NEW.awbFk IS NOT NULL AND NOT travel_hasUniqueAwb(NEW.id) THEN
|
IF NEW.awbFk IS NOT NULL THEN
|
||||||
CALL util.throw('The AWB is incorrect, there is a different AWB in the associated entries');
|
CALL travel_throwAwb(NEW.id);
|
||||||
END IF;
|
END IF;
|
||||||
END$$
|
END$$
|
||||||
DELIMITER ;
|
DELIMITER ;
|
||||||
|
|
|
@ -33,8 +33,8 @@ BEGIN
|
||||||
END IF;
|
END IF;
|
||||||
END IF;
|
END IF;
|
||||||
|
|
||||||
IF (NOT(NEW.awbFk <=> OLD.awbFk)) AND NEW.awbFk IS NOT NULL AND NOT travel_hasUniqueAwb(NEW.id) THEN
|
IF (NOT(NEW.awbFk <=> OLD.awbFk)) AND NEW.awbFk IS NOT NULL THEN
|
||||||
CALL util.throw('The AWB is incorrect, there is a different AWB in the associated entries');
|
CALL travel_throwAwb(NEW.id);
|
||||||
END IF;
|
END IF;
|
||||||
END$$
|
END$$
|
||||||
DELIMITER ;
|
DELIMITER ;
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
-- Auto-generated SQL script. Actual values for binary/complex data types may differ - what you see is the default string representation of values.
|
||||||
|
INSERT INTO salix.ACL (model,property,accessType,permission,principalType,principalId)
|
||||||
|
VALUES ('RoadmapStop','*','*','ALLOW','ROLE','production');
|
||||||
|
INSERT INTO salix.ACL (model,property,accessType,permission,principalType,principalId)
|
||||||
|
VALUES ('RoadmapStop','*','*','ALLOW','ROLE','productionBoss');
|
|
@ -0,0 +1,5 @@
|
||||||
|
-- Place your SQL code here
|
||||||
|
ALTER TABLE vn.mrwConfig ADD IF NOT EXISTS defaultHeight INT UNSIGNED NULL COMMENT 'default height in centimeters';
|
||||||
|
ALTER TABLE vn.mrwConfig ADD IF NOT EXISTS defaultLength INT UNSIGNED NULL COMMENT 'default length in centimeters';
|
||||||
|
ALTER TABLE vn.mrwConfig ADD IF NOT EXISTS defaultWidth INT UNSIGNED NULL COMMENT 'default width in centimeters';
|
||||||
|
ALTER TABLE vn.mrwConfig ADD IF NOT EXISTS defaultWeight INT UNSIGNED NULL COMMENT 'default weight in centimeters';
|
|
@ -4,62 +4,8 @@ services:
|
||||||
image: registry.verdnatura.es/salix-front:${VERSION:?}
|
image: registry.verdnatura.es/salix-front:${VERSION:?}
|
||||||
build:
|
build:
|
||||||
context: front
|
context: front
|
||||||
environment:
|
|
||||||
- TZ
|
|
||||||
- NODE_ENV
|
|
||||||
ports:
|
|
||||||
- 80
|
|
||||||
deploy:
|
|
||||||
replicas: 2
|
|
||||||
placement:
|
|
||||||
constraints:
|
|
||||||
- node.role == worker
|
|
||||||
resources:
|
|
||||||
limits:
|
|
||||||
memory: 1G
|
|
||||||
back:
|
back:
|
||||||
image: registry.verdnatura.es/salix-back:${VERSION:?}
|
image: registry.verdnatura.es/salix-back:${VERSION:?}
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: back/Dockerfile
|
dockerfile: back/Dockerfile
|
||||||
environment:
|
|
||||||
- TZ
|
|
||||||
- NODE_ENV
|
|
||||||
- DEBUG
|
|
||||||
ports:
|
|
||||||
- 3000
|
|
||||||
configs:
|
|
||||||
- source: datasources
|
|
||||||
target: /etc/salix/datasources.json
|
|
||||||
- source: datasources_local
|
|
||||||
target: /etc/salix/datasources.local.json
|
|
||||||
- source: print
|
|
||||||
target: /etc/salix/print.json
|
|
||||||
- source: print_local
|
|
||||||
target: /etc/salix/print.local.json
|
|
||||||
volumes:
|
|
||||||
- /mnt/appdata/pdfs:/var/lib/salix/pdfs
|
|
||||||
- /mnt/appdata/dms:/var/lib/salix/dms
|
|
||||||
- /mnt/appdata/image:/var/lib/salix/image
|
|
||||||
- /mnt/appdata/vn-access:/var/lib/salix/vn-access
|
|
||||||
deploy:
|
|
||||||
replicas: ${BACK_REPLICAS:?}
|
|
||||||
placement:
|
|
||||||
constraints:
|
|
||||||
- node.role == worker
|
|
||||||
resources:
|
|
||||||
limits:
|
|
||||||
memory: 8G
|
|
||||||
configs:
|
|
||||||
datasources:
|
|
||||||
external: true
|
|
||||||
name: salix_datasources
|
|
||||||
datasources_local:
|
|
||||||
external: true
|
|
||||||
name: salix-${BRANCH_NAME:?}_datasources
|
|
||||||
print:
|
|
||||||
external: true
|
|
||||||
name: salix_print
|
|
||||||
print_local:
|
|
||||||
external: true
|
|
||||||
name: salix-${BRANCH_NAME:?}_print
|
|
||||||
|
|
|
@ -59,7 +59,7 @@ describe('Client Add address path', () => {
|
||||||
await page.waitToClick(selectors.clientAddresses.saveButton);
|
await page.waitToClick(selectors.clientAddresses.saveButton);
|
||||||
const message = await page.waitForSnackbar();
|
const message = await page.waitForSnackbar();
|
||||||
|
|
||||||
expect(message.text).toContain('Customs agent is required for a non UEE member');
|
expect(message.text).toContain('Incoterms and Customs agent are required for a non UEE member');
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should create a new custom agent and then save the address`, async() => {
|
it(`should create a new custom agent and then save the address`, async() => {
|
||||||
|
|
|
@ -69,3 +69,4 @@ Send cau: Enviar cau
|
||||||
By sending this ticket, all the data related to the error, the section, the user, etc., are already sent.: Al enviar este cau ya se envían todos los datos relacionados con el error, la sección, el usuario, etc
|
By sending this ticket, all the data related to the error, the section, the user, etc., are already sent.: Al enviar este cau ya se envían todos los datos relacionados con el error, la sección, el usuario, etc
|
||||||
ExplainReason: Explique el motivo por el que no deberia aparecer este fallo
|
ExplainReason: Explique el motivo por el que no deberia aparecer este fallo
|
||||||
You already have the mailAlias: Ya tienes este alias de correo
|
You already have the mailAlias: Ya tienes este alias de correo
|
||||||
|
Error loading ACLs: Error al cargar los ACLs
|
||||||
|
|
|
@ -7,16 +7,17 @@ import UserError from 'core/lib/user-error';
|
||||||
* @property {Boolean} loggedIn Whether the user is currently logged
|
* @property {Boolean} loggedIn Whether the user is currently logged
|
||||||
*/
|
*/
|
||||||
export default class Auth {
|
export default class Auth {
|
||||||
constructor($http, $q, $state, $transitions, $window, vnToken, vnModules, aclService) {
|
constructor($http, $q, vnApp, $translate, $state, $transitions, $window, vnToken, vnModules) {
|
||||||
Object.assign(this, {
|
Object.assign(this, {
|
||||||
$http,
|
$http,
|
||||||
$q,
|
$q,
|
||||||
|
vnApp,
|
||||||
|
$translate,
|
||||||
$state,
|
$state,
|
||||||
$transitions,
|
$transitions,
|
||||||
$window,
|
$window,
|
||||||
vnToken,
|
vnToken,
|
||||||
vnModules,
|
vnModules,
|
||||||
aclService,
|
|
||||||
loggedIn: false
|
loggedIn: false
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -39,9 +40,26 @@ export default class Auth {
|
||||||
};
|
};
|
||||||
|
|
||||||
if (this.vnToken.token) {
|
if (this.vnToken.token) {
|
||||||
return this.loadAcls()
|
const loadWithRetry = () => {
|
||||||
.then(() => true)
|
return this.validateToken()
|
||||||
.catch(redirectToLogin);
|
.then(() => true)
|
||||||
|
.catch(err => {
|
||||||
|
switch (err.status) {
|
||||||
|
case 400:
|
||||||
|
case 401:
|
||||||
|
return redirectToLogin();
|
||||||
|
default:
|
||||||
|
return new Promise(resolve => {
|
||||||
|
setTimeout(() => {
|
||||||
|
this.vnApp.showMessage(this.$translate.instant('Loading...'));
|
||||||
|
|
||||||
|
resolve(loadWithRetry());
|
||||||
|
}, 2000);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
return loadWithRetry();
|
||||||
} else
|
} else
|
||||||
return redirectToLogin();
|
return redirectToLogin();
|
||||||
});
|
});
|
||||||
|
@ -87,13 +105,11 @@ export default class Auth {
|
||||||
headers: {Authorization: json.data.token}
|
headers: {Authorization: json.data.token}
|
||||||
}).then(({data}) => {
|
}).then(({data}) => {
|
||||||
this.vnToken.set(json.data.token, data.multimediaToken.id, now, json.data.ttl, remember);
|
this.vnToken.set(json.data.token, data.multimediaToken.id, now, json.data.ttl, remember);
|
||||||
this.loadAcls().then(() => {
|
let continueHash = this.$state.params.continue;
|
||||||
let continueHash = this.$state.params.continue;
|
if (continueHash)
|
||||||
if (continueHash)
|
this.$window.location = continueHash;
|
||||||
this.$window.location = continueHash;
|
else
|
||||||
else
|
this.$state.go('home');
|
||||||
this.$state.go('home');
|
|
||||||
});
|
|
||||||
}).catch(() => {});
|
}).catch(() => {});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -107,24 +123,25 @@ export default class Auth {
|
||||||
this.vnToken.unset();
|
this.vnToken.unset();
|
||||||
this.loggedIn = false;
|
this.loggedIn = false;
|
||||||
this.vnModules.reset();
|
this.vnModules.reset();
|
||||||
this.aclService.reset();
|
this.vnModules.aclService.reset();
|
||||||
this.$state.go('login');
|
this.$state.go('login');
|
||||||
|
|
||||||
return promise;
|
return promise;
|
||||||
}
|
}
|
||||||
|
|
||||||
loadAcls() {
|
validateToken() {
|
||||||
return this.aclService.load()
|
return this.$http.get('VnUsers/validateToken')
|
||||||
.then(() => {
|
.then(() => {
|
||||||
this.loggedIn = true;
|
this.loggedIn = true;
|
||||||
this.vnModules.reset();
|
this.vnModules.reset();
|
||||||
})
|
})
|
||||||
.catch(err => {
|
.catch(err => {
|
||||||
this.vnToken.unset();
|
|
||||||
throw err;
|
throw err;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Auth.$inject = ['$http', '$q', '$state', '$transitions', '$window', 'vnToken', 'vnModules', 'aclService'];
|
Auth.$inject = [
|
||||||
|
'$http', '$q', 'vnApp', '$translate', '$state',
|
||||||
|
'$transitions', '$window', 'vnToken', 'vnModules'];
|
||||||
|
|
||||||
ngModule.service('vnAuth', Auth);
|
ngModule.service('vnAuth', Auth);
|
||||||
|
|
|
@ -12,7 +12,8 @@ function config($stateProvider, $urlRouterProvider) {
|
||||||
template: '<vn-layout></vn-layout>',
|
template: '<vn-layout></vn-layout>',
|
||||||
resolve: {
|
resolve: {
|
||||||
config: ['vnConfig', vnConfig => vnConfig.initialize()],
|
config: ['vnConfig', vnConfig => vnConfig.initialize()],
|
||||||
token: ['vnToken', vnToken => vnToken.fetchConfig()]
|
token: ['vnToken', vnToken => vnToken.fetchConfig()],
|
||||||
|
acl: ['aclService', aclService => aclService.load()]
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.state('outLayout', {
|
.state('outLayout', {
|
||||||
|
|
|
@ -230,4 +230,3 @@
|
||||||
"You can only have one PDA": "You can only have one PDA",
|
"You can only have one PDA": "You can only have one PDA",
|
||||||
"Incoterms and Customs agent are required for a non UEE member": "Incoterms and Customs agent are required for a non UEE member"
|
"Incoterms and Customs agent are required for a non UEE member": "Incoterms and Customs agent are required for a non UEE member"
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
|
@ -360,5 +360,6 @@
|
||||||
"ticketCommercial": "El ticket {{ ticket }} para el vendedor {{ salesMan }} está en preparación. (mensaje generado automáticamente)",
|
"ticketCommercial": "El ticket {{ ticket }} para el vendedor {{ salesMan }} está en preparación. (mensaje generado automáticamente)",
|
||||||
"This PDA is already assigned to another user": "Este PDA ya está asignado a otro usuario",
|
"This PDA is already assigned to another user": "Este PDA ya está asignado a otro usuario",
|
||||||
"You can only have one PDA": "Solo puedes tener un PDA",
|
"You can only have one PDA": "Solo puedes tener un PDA",
|
||||||
"Incoterms and Customs agent are required for a non UEE member": "Se requieren Incoterms y agente de aduanas para un no miembro de la UEE"
|
"Incoterms and Customs agent are required for a non UEE member": "Se requieren Incoterms y agente de aduanas para un no miembro de la UEE",
|
||||||
|
"You can not use the same password": "No puedes usar la misma contraseña"
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,7 +32,7 @@ module.exports = Self => {
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await Self.rawSql(`CALL vn.invoiceIn_booking(?)`, [id], myOptions);
|
await Self.rawSql(`CALL vn.invoiceIn_booking(?, NULL)`, [id], myOptions);
|
||||||
if (tx) await tx.commit();
|
if (tx) await tx.commit();
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
if (tx) await tx.rollback();
|
if (tx) await tx.rollback();
|
||||||
|
|
|
@ -25,5 +25,8 @@
|
||||||
},
|
},
|
||||||
"RoutesMonitor": {
|
"RoutesMonitor": {
|
||||||
"dataSource": "vn"
|
"dataSource": "vn"
|
||||||
|
},
|
||||||
|
"ExpeditionTruck": {
|
||||||
|
"dataSource": "vn"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
{
|
||||||
|
"name": "ExpeditionTruck",
|
||||||
|
"base": "RoadmapStop",
|
||||||
|
"options": {
|
||||||
|
"mysql": {
|
||||||
|
"table": "expeditionTruck"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -13,8 +13,6 @@ module.exports = async function(ctx, Self, tickets, reqArgs = {}) {
|
||||||
const failedtickets = [];
|
const failedtickets = [];
|
||||||
for (const ticket of tickets) {
|
for (const ticket of tickets) {
|
||||||
try {
|
try {
|
||||||
await Self.rawSql(`CALL util.debugAdd('invoicingTicket', ?)`, [ticket.id], {userId});
|
|
||||||
|
|
||||||
await Self.app.models.InvoiceOut.getSerial(ticket.clientFk, ticket.companyFk, ticket.addressFk, 'M');
|
await Self.app.models.InvoiceOut.getSerial(ticket.clientFk, ticket.companyFk, ticket.addressFk, 'M');
|
||||||
await Self.rawSql(
|
await Self.rawSql(
|
||||||
`CALL vn.ticket_closeByTicket(?)`,
|
`CALL vn.ticket_closeByTicket(?)`,
|
||||||
|
|
|
@ -6,8 +6,9 @@ describe('locker model ', () => {
|
||||||
const hrId = 37;
|
const hrId = 37;
|
||||||
const jessicaJonesId = 1110;
|
const jessicaJonesId = 1110;
|
||||||
const bruceBannerId = 1109;
|
const bruceBannerId = 1109;
|
||||||
const lockerMaleId = 1;
|
const lockerMaleId = 3;
|
||||||
const lockerFemaleId = 147;
|
const lockerFemaleId = 5;
|
||||||
|
const lockerNewFemaleId = 6;
|
||||||
let ctx;
|
let ctx;
|
||||||
let options;
|
let options;
|
||||||
let tx;
|
let tx;
|
||||||
|
@ -46,11 +47,13 @@ describe('locker model ', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should change a locker', async() => {
|
it('should change a locker', async() => {
|
||||||
const locker = await models.Locker.findById(148, null, options);
|
|
||||||
await locker.updateAttributes({workerFk: jessicaJonesId}, options);
|
|
||||||
const oldLocker = await models.Locker.findById(lockerFemaleId, null, options);
|
const oldLocker = await models.Locker.findById(lockerFemaleId, null, options);
|
||||||
|
const locker = await models.Locker.findById(lockerNewFemaleId, null, options);
|
||||||
|
await locker.updateAttributes({workerFk: jessicaJonesId}, options);
|
||||||
|
const oldNowLocker = await models.Locker.findById(lockerFemaleId, null, options);
|
||||||
|
|
||||||
|
expect(oldLocker.workerFk).toEqual(jessicaJonesId);
|
||||||
expect(locker.workerFk).toEqual(jessicaJonesId);
|
expect(locker.workerFk).toEqual(jessicaJonesId);
|
||||||
expect(oldLocker.workerFk).toEqual(null);
|
expect(oldNowLocker.workerFk).toEqual(null);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "salix-back",
|
"name": "salix-back",
|
||||||
"version": "24.24.0",
|
"version": "24.24.1",
|
||||||
"author": "Verdnatura Levante SL",
|
"author": "Verdnatura Levante SL",
|
||||||
"description": "Salix backend",
|
"description": "Salix backend",
|
||||||
"license": "GPL-3.0",
|
"license": "GPL-3.0",
|
||||||
|
|
Loading…
Reference in New Issue