Compare commits
20 Commits
dev
...
7731-clien
Author | SHA1 | Date |
---|---|---|
|
5f5df9b0e8 | |
|
43ed80deab | |
|
5281151f89 | |
|
801c25a903 | |
|
49846cfd66 | |
|
29d0a7ac1a | |
|
36cfff13ca | |
|
80fc3235e9 | |
|
df77ec5552 | |
|
e9e81df904 | |
|
acb1fecda2 | |
|
7183e77250 | |
|
cecc1e70e1 | |
|
faf4bb34c6 | |
|
b3539e6c6e | |
|
62e38eff23 | |
|
1a5e473656 | |
|
7b1362a9d5 | |
|
1def362a8f | |
|
f7ff78ed96 |
|
@ -8,7 +8,6 @@ def RUN_BUILD
|
||||||
def BRANCH_ENV = [
|
def BRANCH_ENV = [
|
||||||
test: 'test',
|
test: 'test',
|
||||||
master: 'production',
|
master: 'production',
|
||||||
main: 'production',
|
|
||||||
beta: 'production'
|
beta: 'production'
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -21,14 +20,12 @@ node {
|
||||||
'dev',
|
'dev',
|
||||||
'test',
|
'test',
|
||||||
'master',
|
'master',
|
||||||
'main',
|
|
||||||
'beta'
|
'beta'
|
||||||
].contains(env.BRANCH_NAME)
|
].contains(env.BRANCH_NAME)
|
||||||
|
|
||||||
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
|
||||||
IS_LATEST = ['master', 'main'].contains(env.BRANCH_NAME)
|
|
||||||
|
|
||||||
// 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}"
|
||||||
|
@ -76,7 +73,6 @@ pipeline {
|
||||||
def packageJson = readJSON file: 'package.json'
|
def packageJson = readJSON file: 'package.json'
|
||||||
def version = "${packageJson.version}-build${env.BUILD_ID}"
|
def version = "${packageJson.version}-build${env.BUILD_ID}"
|
||||||
writeFile(file: 'VERSION.txt', text: version)
|
writeFile(file: 'VERSION.txt', text: version)
|
||||||
echo "VERSION: ${version}"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -109,6 +105,10 @@ pipeline {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
stage('Stack') {
|
||||||
|
parallel {
|
||||||
|
stage('Back') {
|
||||||
|
stages {
|
||||||
stage('Test') {
|
stage('Test') {
|
||||||
when {
|
when {
|
||||||
expression { RUN_TESTS }
|
expression { RUN_TESTS }
|
||||||
|
@ -116,8 +116,6 @@ pipeline {
|
||||||
environment {
|
environment {
|
||||||
NODE_ENV = ''
|
NODE_ENV = ''
|
||||||
}
|
}
|
||||||
parallel {
|
|
||||||
stage('Back') {
|
|
||||||
steps {
|
steps {
|
||||||
sh 'node back/tests.js --junit'
|
sh 'node back/tests.js --junit'
|
||||||
}
|
}
|
||||||
|
@ -130,7 +128,31 @@ pipeline {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
stage('Build') {
|
||||||
|
when {
|
||||||
|
expression { RUN_BUILD }
|
||||||
|
}
|
||||||
|
environment {
|
||||||
|
VERSION = readFile 'VERSION.txt'
|
||||||
|
}
|
||||||
|
steps {
|
||||||
|
sh 'docker-compose build back'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
stage('Front') {
|
stage('Front') {
|
||||||
|
when {
|
||||||
|
expression { FROM_GIT }
|
||||||
|
}
|
||||||
|
stages {
|
||||||
|
stage('Test') {
|
||||||
|
when {
|
||||||
|
expression { RUN_TESTS }
|
||||||
|
}
|
||||||
|
environment {
|
||||||
|
NODE_ENV = ''
|
||||||
|
}
|
||||||
steps {
|
steps {
|
||||||
sh 'jest --ci --reporters=default --reporters=jest-junit --maxWorkers=10'
|
sh 'jest --ci --reporters=default --reporters=jest-junit --maxWorkers=10'
|
||||||
}
|
}
|
||||||
|
@ -143,38 +165,33 @@ pipeline {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
stage('Build') {
|
stage('Build') {
|
||||||
when {
|
when {
|
||||||
expression { RUN_BUILD }
|
expression { RUN_BUILD }
|
||||||
}
|
}
|
||||||
environment {
|
environment {
|
||||||
VERSION = readFile 'VERSION.txt'
|
VERSION = readFile 'VERSION.txt'
|
||||||
CREDENTIALS = credentials('docker-registry')
|
|
||||||
}
|
}
|
||||||
parallel {
|
|
||||||
stage('Back') {
|
|
||||||
steps {
|
|
||||||
dockerBuild 'salix-back', '.', 'back/Dockerfile'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
stage('Front') {
|
|
||||||
steps {
|
steps {
|
||||||
sh 'gulp build'
|
sh 'gulp build'
|
||||||
dockerBuild 'salix-front', 'front'
|
sh 'docker-compose build front'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('DB') {
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('Push') {
|
||||||
|
when {
|
||||||
|
expression { RUN_BUILD }
|
||||||
|
}
|
||||||
|
environment {
|
||||||
|
CREDENTIALS = credentials('docker-registry')
|
||||||
|
VERSION = readFile 'VERSION.txt'
|
||||||
|
}
|
||||||
steps {
|
steps {
|
||||||
sh 'npx myt run -t'
|
sh 'docker login --username $CREDENTIALS_USR --password $CREDENTIALS_PSW $REGISTRY'
|
||||||
sh 'docker exec vn-database sh -c "rm -rf /mysql-template"'
|
sh 'docker-compose push'
|
||||||
sh 'docker exec vn-database sh -c "cp -a /var/lib/mysql /mysql-template"'
|
|
||||||
sh 'docker commit vn-database salix-db:$VERSION'
|
|
||||||
sh 'docker rm -f vn-database'
|
|
||||||
dockerPush docker.image("salix-db:${VERSION}")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('Deploy') {
|
stage('Deploy') {
|
||||||
|
@ -247,19 +264,3 @@ pipeline {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
def dockerBuild(imageName, context, dockerfile = null) {
|
|
||||||
if (dockerfile == null)
|
|
||||||
dockerfile = "${context}/Dockerfile"
|
|
||||||
def baseImage = "${imageName}:${env.VERSION}"
|
|
||||||
def image = docker.build(baseImage, "-f ${dockerfile} ${context}")
|
|
||||||
dockerPush(image)
|
|
||||||
}
|
|
||||||
|
|
||||||
def dockerPush(image) {
|
|
||||||
docker.withRegistry("https://${env.REGISTRY}", 'docker-registry') {
|
|
||||||
image.push()
|
|
||||||
image.push(env.BRANCH_NAME)
|
|
||||||
if (IS_LATEST) image.push('latest')
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -25,7 +25,7 @@ RUN apt-get update \
|
||||||
libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 \
|
libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 \
|
||||||
libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 \
|
libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 \
|
||||||
libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 \
|
libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 \
|
||||||
libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 build-essential \
|
libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 \
|
||||||
fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget
|
fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget
|
||||||
|
|
||||||
# Extra dependencies
|
# Extra dependencies
|
||||||
|
|
|
@ -33,52 +33,25 @@ module.exports = Self => {
|
||||||
const emailUser =
|
const emailUser =
|
||||||
await Self.app.models.EmailUser.findById(userId, {fields: ['email']});
|
await Self.app.models.EmailUser.findById(userId, {fields: ['email']});
|
||||||
|
|
||||||
const tableStyle = 'width:100%; border-collapse: collapse; text-align: left;';
|
let html = `<h2>Motivo: ${reason}</h2>`;
|
||||||
const thStyle = 'padding: 8px; border: 1px solid #ddd; background-color: #f4f4f4;';
|
html += `<h3>Usuario: ${userId} ${emailUser.email}</h3>`;
|
||||||
const tdStyle = 'padding: 8px; border: 1px solid #ddd;';
|
html += `<h3>Additional Data:</h3>`;
|
||||||
const tdBoldStyle = 'padding: 8px; border: 1px solid #ddd; font-weight: bold;';
|
html += '<ul>';
|
||||||
const subTdStyle = 'padding: 6px; border: 1px solid #ddd;';
|
|
||||||
const subTdBoldStyle = 'padding: 6px; border: 1px solid #ddd; font-weight: bold;';
|
|
||||||
|
|
||||||
let html = `
|
|
||||||
<h2>Motivo: ${reason}</h2>
|
|
||||||
<h3>Usuario: ${userId} ${emailUser.email}</h3>
|
|
||||||
<h3>Additional Data:</h3>
|
|
||||||
<table style="${tableStyle}">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th style="${thStyle}">Clave</th><th style="${thStyle}">Valor</th></tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>`;
|
|
||||||
for (const [key, val] of Object.entries(additionalData)) {
|
for (const [key, val] of Object.entries(additionalData)) {
|
||||||
if (key !== 'config') {
|
if (key !== 'config') html += `<li>${key}: ${parse(val)}</li>`;
|
||||||
html += `<tr>
|
else {
|
||||||
<td style="${tdBoldStyle}">${key}</td>
|
html += `<li>${key}:</li><ul style="list-style-type: square;">`;
|
||||||
<td style="${tdStyle}">${parse(val)}</td>
|
for (const [confKey, confVal] of Object.entries(val))
|
||||||
</tr>`;
|
html += `<li>${confKey}: ${parse(confVal)}</li>`;
|
||||||
} else {
|
html += '</ul>';
|
||||||
html += `<tr>
|
|
||||||
<td style="${tdBoldStyle}">${key}</td>
|
|
||||||
<td style="${tdStyle}">
|
|
||||||
<table style="${tableStyle}">
|
|
||||||
<tbody>`;
|
|
||||||
for (const [confKey, confVal] of Object.entries(val)) {
|
|
||||||
html += `<tr>
|
|
||||||
<td style="${subTdBoldStyle}">${confKey}</td>
|
|
||||||
<td style="${subTdStyle}">${parse(confVal)}</td>
|
|
||||||
</tr>`;
|
|
||||||
}
|
|
||||||
html += `</tbody></table></td></tr>`;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
html += `</tbody></table>`;
|
html += '</ul>';
|
||||||
|
|
||||||
const {message, path, name} = additionalData;
|
const {message, path, name} = additionalData;
|
||||||
const err = name && message ? `${name}: ${message}` : name || message || '';
|
|
||||||
|
|
||||||
await smtp.send({
|
await smtp.send({
|
||||||
to: `${config.app.reportEmail}, ${emailUser.email}`,
|
to: `${config.app.reportEmail}, ${emailUser.email}`,
|
||||||
subject: `[Support-Salix] ${path.split('?')[0]} ${err}`,
|
subject: `[Support-Salix] ${path} ${name}: ${message}`,
|
||||||
html
|
html
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
|
@ -54,8 +54,7 @@
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"hasGrant": {
|
"hasGrant": {
|
||||||
"type": "boolean",
|
"type": "boolean"
|
||||||
"default": false
|
|
||||||
},
|
},
|
||||||
"passExpired": {
|
"passExpired": {
|
||||||
"type": "date"
|
"type": "date"
|
||||||
|
@ -169,7 +168,6 @@
|
||||||
"emailVerified",
|
"emailVerified",
|
||||||
"twoFactor"
|
"twoFactor"
|
||||||
]
|
]
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,7 @@ USE `util`;
|
||||||
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
|
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
|
||||||
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
|
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
|
||||||
|
|
||||||
INSERT INTO `version` VALUES ('vn-database','11436','f83055057e5eb15c800033882ea117e6ee646673','2025-02-18 09:15:11','11445');
|
INSERT INTO `version` VALUES ('vn-database','11410','7a02af9a3acae14a658de1557baa44542c24d480','2025-01-28 07:44:02','11423');
|
||||||
|
|
||||||
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);
|
||||||
|
@ -853,7 +853,6 @@ INSERT INTO `versionLog` VALUES ('vn-database','11071','00-firstScript.sql','jen
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11073','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-07-09 07:39:38',NULL,NULL);
|
INSERT INTO `versionLog` VALUES ('vn-database','11073','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-07-09 07:39:38',NULL,NULL);
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11074','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-06-11 08:32:35',NULL,NULL);
|
INSERT INTO `versionLog` VALUES ('vn-database','11074','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-06-11 08:32:35',NULL,NULL);
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11075','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-05-28 12:54:13',NULL,NULL);
|
INSERT INTO `versionLog` VALUES ('vn-database','11075','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-05-28 12:54:13',NULL,NULL);
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11076','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2025-02-18 08:53:24',NULL,NULL);
|
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11078','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-06-11 08:32:35',NULL,NULL);
|
INSERT INTO `versionLog` VALUES ('vn-database','11078','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-06-11 08:32:35',NULL,NULL);
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11079','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-05-31 08:22:10',NULL,NULL);
|
INSERT INTO `versionLog` VALUES ('vn-database','11079','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-05-31 08:22:10',NULL,NULL);
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11080','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-05-31 12:01:58',NULL,NULL);
|
INSERT INTO `versionLog` VALUES ('vn-database','11080','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-05-31 12:01:58',NULL,NULL);
|
||||||
|
@ -991,7 +990,6 @@ INSERT INTO `versionLog` VALUES ('vn-database','11196','00-firstScript.sql','jen
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11197','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-09-03 08:58:01',NULL,NULL);
|
INSERT INTO `versionLog` VALUES ('vn-database','11197','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-09-03 08:58:01',NULL,NULL);
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11198','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-12 07:42:49',NULL,NULL);
|
INSERT INTO `versionLog` VALUES ('vn-database','11198','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-11-12 07:42:49',NULL,NULL);
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11201','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-08-27 13:04:26',NULL,NULL);
|
INSERT INTO `versionLog` VALUES ('vn-database','11201','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-08-27 13:04:26',NULL,NULL);
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11202','01-updateStateAlertLevel.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2025-02-18 08:53:24',NULL,NULL);
|
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11204','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-09-03 08:58:01',NULL,NULL);
|
INSERT INTO `versionLog` VALUES ('vn-database','11204','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-09-03 08:58:01',NULL,NULL);
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11205','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-09-04 13:54:55',NULL,NULL);
|
INSERT INTO `versionLog` VALUES ('vn-database','11205','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-09-04 13:54:55',NULL,NULL);
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11206','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-09-17 07:38:42',NULL,NULL);
|
INSERT INTO `versionLog` VALUES ('vn-database','11206','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-09-17 07:38:42',NULL,NULL);
|
||||||
|
@ -1141,15 +1139,11 @@ INSERT INTO `versionLog` VALUES ('vn-database','11377','00-firstScript.sql','jen
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11378','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2025-01-07 07:46:32',NULL,NULL);
|
INSERT INTO `versionLog` VALUES ('vn-database','11378','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2025-01-07 07:46:32',NULL,NULL);
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11379','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2025-01-07 07:46:32',NULL,NULL);
|
INSERT INTO `versionLog` VALUES ('vn-database','11379','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2025-01-07 07:46:32',NULL,NULL);
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11379','01-secScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2025-01-07 07:46:32',NULL,NULL);
|
INSERT INTO `versionLog` VALUES ('vn-database','11379','01-secScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2025-01-07 07:46:32',NULL,NULL);
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11383','00-town.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2025-02-18 08:53:25',NULL,NULL);
|
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11383','01-postCode.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2025-02-18 08:53:34',NULL,NULL);
|
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11383','02-province.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2025-02-18 08:53:36',NULL,NULL);
|
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11384','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2025-01-07 07:46:32',NULL,NULL);
|
INSERT INTO `versionLog` VALUES ('vn-database','11384','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2025-01-07 07:46:32',NULL,NULL);
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11385','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2025-01-07 07:46:33',NULL,NULL);
|
INSERT INTO `versionLog` VALUES ('vn-database','11385','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2025-01-07 07:46:33',NULL,NULL);
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11387','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2025-01-28 07:43:58',NULL,NULL);
|
INSERT INTO `versionLog` VALUES ('vn-database','11387','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2025-01-28 07:43:58',NULL,NULL);
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11390','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2025-01-14 07:32:08',NULL,NULL);
|
INSERT INTO `versionLog` VALUES ('vn-database','11390','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2025-01-14 07:32:08',NULL,NULL);
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11391','00-itemAlter.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2025-01-14 07:32:08',NULL,NULL);
|
INSERT INTO `versionLog` VALUES ('vn-database','11391','00-itemAlter.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2025-01-14 07:32:08',NULL,NULL);
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11393','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2025-02-18 08:53:36',NULL,NULL);
|
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11396','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2025-01-28 07:43:58',NULL,NULL);
|
INSERT INTO `versionLog` VALUES ('vn-database','11396','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2025-01-28 07:43:58',NULL,NULL);
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11398','00-zoneEventPriceOptimum.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2025-01-28 07:43:59',NULL,NULL);
|
INSERT INTO `versionLog` VALUES ('vn-database','11398','00-zoneEventPriceOptimum.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2025-01-28 07:43:59',NULL,NULL);
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11398','00-zonePriceOptimum.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2025-01-28 07:43:59',NULL,NULL);
|
INSERT INTO `versionLog` VALUES ('vn-database','11398','00-zonePriceOptimum.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2025-01-28 07:43:59',NULL,NULL);
|
||||||
|
@ -1162,35 +1156,9 @@ INSERT INTO `versionLog` VALUES ('vn-database','11406','00-currrencyAlter.sql','
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11406','01-currrencyUpdate.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2025-01-28 07:44:00',NULL,NULL);
|
INSERT INTO `versionLog` VALUES ('vn-database','11406','01-currrencyUpdate.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2025-01-28 07:44:00',NULL,NULL);
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11407','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2025-01-28 07:44:00',NULL,NULL);
|
INSERT INTO `versionLog` VALUES ('vn-database','11407','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2025-01-28 07:44:00',NULL,NULL);
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11410','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2025-01-28 07:44:00',NULL,NULL);
|
INSERT INTO `versionLog` VALUES ('vn-database','11410','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2025-01-28 07:44:00',NULL,NULL);
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11411','00-agencyIncomingForeign.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2025-02-18 08:53:36',NULL,NULL);
|
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11411','01-travelThermographAlter.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2025-02-18 08:53:37',NULL,NULL);
|
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11415','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2025-01-20 08:12:38',NULL,NULL);
|
INSERT INTO `versionLog` VALUES ('vn-database','11415','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2025-01-20 08:12:38',NULL,NULL);
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11416','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2025-02-18 08:53:37',NULL,NULL);
|
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11416','01-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2025-02-18 08:53:37',NULL,NULL);
|
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11416','02-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2025-02-18 08:53:37',NULL,NULL);
|
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11416','03-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2025-02-18 08:53:38',NULL,NULL);
|
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11416','04-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2025-02-18 08:53:40',NULL,NULL);
|
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11416','05-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2025-02-18 08:53:40',NULL,NULL);
|
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11416','06-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2025-02-18 08:53:40',NULL,NULL);
|
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11416','07-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2025-02-18 08:53:41',NULL,NULL);
|
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11416','08-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2025-02-18 08:53:41',NULL,NULL);
|
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11416','09-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2025-02-18 08:53:41',NULL,NULL);
|
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11418','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2025-01-21 11:03:27',NULL,NULL);
|
INSERT INTO `versionLog` VALUES ('vn-database','11418','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2025-01-21 11:03:27',NULL,NULL);
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11419','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2025-02-18 08:53:41',NULL,NULL);
|
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11422','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2025-02-18 08:53:41',NULL,NULL);
|
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11423','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2025-01-23 15:19:32',NULL,NULL);
|
INSERT INTO `versionLog` VALUES ('vn-database','11423','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2025-01-23 15:19:32',NULL,NULL);
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11424','00-travel.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2025-02-18 08:53:45',NULL,NULL);
|
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11425','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2025-02-18 08:53:45',NULL,NULL);
|
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11427','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2025-02-18 08:53:46',NULL,NULL);
|
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11428','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2025-02-18 08:53:47',NULL,NULL);
|
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11429','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2025-02-18 08:53:47',NULL,NULL);
|
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11430','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2025-02-18 08:53:47',NULL,NULL);
|
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11432','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2025-02-06 13:34:31',NULL,NULL);
|
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11433','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2025-02-06 13:45:28',NULL,NULL);
|
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11436','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2025-02-18 08:53:47',NULL,NULL);
|
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11436','01-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2025-02-18 08:53:47',NULL,NULL);
|
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11436','02-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2025-02-18 08:53:47',NULL,NULL);
|
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11436','03-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2025-02-18 08:53:47',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 */;
|
||||||
|
@ -1290,7 +1258,6 @@ INSERT INTO `role` VALUES (129,'buyerAssistant','Comprador que tienes mas permis
|
||||||
INSERT INTO `role` VALUES (130,'reviewer','Revisor de producción',1,'2024-06-11 00:00:00','2024-06-11 00:00:00',10578);
|
INSERT INTO `role` VALUES (130,'reviewer','Revisor de producción',1,'2024-06-11 00:00:00','2024-06-11 00:00:00',10578);
|
||||||
INSERT INTO `role` VALUES (131,'supplier','Privilegios básicos de un proveedor',1,'2024-07-05 10:18:58','2024-07-05 10:18:58',19295);
|
INSERT INTO `role` VALUES (131,'supplier','Privilegios básicos de un proveedor',1,'2024-07-05 10:18:58','2024-07-05 10:18:58',19295);
|
||||||
INSERT INTO `role` VALUES (132,'salesPersonClaim','Departamento de ventas con funciones de reclamaciones',1,'2025-01-17 07:07:40','2025-01-17 07:07:40',19295);
|
INSERT INTO `role` VALUES (132,'salesPersonClaim','Departamento de ventas con funciones de reclamaciones',1,'2025-01-17 07:07:40','2025-01-17 07:07:40',19295);
|
||||||
INSERT INTO `role` VALUES (133,'deliveryFreelancer','Repartidor autónomo',1,'2025-02-18 08:53:36','2025-02-18 08:53:36',10578);
|
|
||||||
|
|
||||||
INSERT INTO `roleInherit` VALUES (1,1,2,NULL);
|
INSERT INTO `roleInherit` VALUES (1,1,2,NULL);
|
||||||
INSERT INTO `roleInherit` VALUES (2,1,3,NULL);
|
INSERT INTO `roleInherit` VALUES (2,1,3,NULL);
|
||||||
|
@ -1563,6 +1530,7 @@ INSERT INTO `roleInherit` VALUES (373,131,2,19295);
|
||||||
INSERT INTO `roleInherit` VALUES (375,120,131,1437);
|
INSERT INTO `roleInherit` VALUES (375,120,131,1437);
|
||||||
INSERT INTO `roleInherit` VALUES (376,124,21,19336);
|
INSERT INTO `roleInherit` VALUES (376,124,21,19336);
|
||||||
INSERT INTO `roleInherit` VALUES (377,47,49,19295);
|
INSERT INTO `roleInherit` VALUES (377,47,49,19295);
|
||||||
|
INSERT INTO `roleInherit` VALUES (378,101,15,19294);
|
||||||
INSERT INTO `roleInherit` VALUES (379,103,121,19294);
|
INSERT INTO `roleInherit` VALUES (379,103,121,19294);
|
||||||
INSERT INTO `roleInherit` VALUES (381,119,123,19295);
|
INSERT INTO `roleInherit` VALUES (381,119,123,19295);
|
||||||
INSERT INTO `roleInherit` VALUES (382,48,72,783);
|
INSERT INTO `roleInherit` VALUES (382,48,72,783);
|
||||||
|
@ -1570,9 +1538,6 @@ INSERT INTO `roleInherit` VALUES (383,114,111,19295);
|
||||||
INSERT INTO `roleInherit` VALUES (384,132,18,19295);
|
INSERT INTO `roleInherit` VALUES (384,132,18,19295);
|
||||||
INSERT INTO `roleInherit` VALUES (385,132,72,19295);
|
INSERT INTO `roleInherit` VALUES (385,132,72,19295);
|
||||||
INSERT INTO `roleInherit` VALUES (386,109,132,19295);
|
INSERT INTO `roleInherit` VALUES (386,109,132,19295);
|
||||||
INSERT INTO `roleInherit` VALUES (387,101,122,19295);
|
|
||||||
INSERT INTO `roleInherit` VALUES (388,59,58,13657);
|
|
||||||
INSERT INTO `roleInherit` VALUES (389,59,111,19295);
|
|
||||||
|
|
||||||
INSERT INTO `userPassword` VALUES (1,7,1,0,2,1);
|
INSERT INTO `userPassword` VALUES (1,7,1,0,2,1);
|
||||||
|
|
||||||
|
@ -2131,7 +2096,7 @@ INSERT INTO `ACL` VALUES (664,'MailForward','*','*','ALLOW','ROLE','itManagement
|
||||||
INSERT INTO `ACL` VALUES (667,'VnUser','*','*','ALLOW','ROLE','itManagement',NULL);
|
INSERT INTO `ACL` VALUES (667,'VnUser','*','*','ALLOW','ROLE','itManagement',NULL);
|
||||||
INSERT INTO `ACL` VALUES (668,'VnUser','__get__preview','READ','ALLOW','ROLE','employee',NULL);
|
INSERT INTO `ACL` VALUES (668,'VnUser','__get__preview','READ','ALLOW','ROLE','employee',NULL);
|
||||||
INSERT INTO `ACL` VALUES (669,'VnUser','preview','*','ALLOW','ROLE','employee',NULL);
|
INSERT INTO `ACL` VALUES (669,'VnUser','preview','*','ALLOW','ROLE','employee',NULL);
|
||||||
INSERT INTO `ACL` VALUES (670,'VnUser','create','*','ALLOW','ROLE','developerBoss',19295);
|
INSERT INTO `ACL` VALUES (670,'VnUser','create','*','ALLOW','ROLE','itManagement',NULL);
|
||||||
INSERT INTO `ACL` VALUES (672,'PackingSiteAdvanced','*','*','ALLOW','ROLE','production',NULL);
|
INSERT INTO `ACL` VALUES (672,'PackingSiteAdvanced','*','*','ALLOW','ROLE','production',NULL);
|
||||||
INSERT INTO `ACL` VALUES (673,'InvoiceOut','makePdfAndNotify','WRITE','ALLOW','ROLE','invoicing',NULL);
|
INSERT INTO `ACL` VALUES (673,'InvoiceOut','makePdfAndNotify','WRITE','ALLOW','ROLE','invoicing',NULL);
|
||||||
INSERT INTO `ACL` VALUES (674,'InvoiceOutConfig','*','READ','ALLOW','ROLE','invoicing',NULL);
|
INSERT INTO `ACL` VALUES (674,'InvoiceOutConfig','*','READ','ALLOW','ROLE','invoicing',NULL);
|
||||||
|
@ -2443,31 +2408,6 @@ INSERT INTO `ACL` VALUES (1013,'Route','optimizePriority','*','ALLOW','ROLE','em
|
||||||
INSERT INTO `ACL` VALUES (1014,'Worker','canModifyAbsenceInPast','WRITE','ALLOW','ROLE','hr',10578);
|
INSERT INTO `ACL` VALUES (1014,'Worker','canModifyAbsenceInPast','WRITE','ALLOW','ROLE','hr',10578);
|
||||||
INSERT INTO `ACL` VALUES (1015,'Worker','__get__sip','READ','ALLOW','ROLE','employee',19294);
|
INSERT INTO `ACL` VALUES (1015,'Worker','__get__sip','READ','ALLOW','ROLE','employee',19294);
|
||||||
INSERT INTO `ACL` VALUES (1016,'VnUser','adminUser','WRITE','ALLOW','ROLE','sysadmin',10578);
|
INSERT INTO `ACL` VALUES (1016,'VnUser','adminUser','WRITE','ALLOW','ROLE','sysadmin',10578);
|
||||||
INSERT INTO `ACL` VALUES (1017,'BusinessReasonEnd','find','*','ALLOW','ROLE','hr',10578);
|
|
||||||
INSERT INTO `ACL` VALUES (1018,'CalendarType','find','*','ALLOW','ROLE','hr',10578);
|
|
||||||
INSERT INTO `ACL` VALUES (1019,'OccupationCode','find','*','ALLOW','ROLE','hr',10578);
|
|
||||||
INSERT INTO `ACL` VALUES (1020,'BusinessReasonEnd','find','*','ALLOW','ROLE','hr',10578);
|
|
||||||
INSERT INTO `ACL` VALUES (1021,'WorkerBusinessProfessionalCategory','find','*','ALLOW','ROLE','hr',10578);
|
|
||||||
INSERT INTO `ACL` VALUES (1022,'WorkerBusinessAgreement','find','*','ALLOW','ROLE','hr',10578);
|
|
||||||
INSERT INTO `ACL` VALUES (1023,'WorkerBusinessType','find','*','ALLOW','ROLE','hr',10578);
|
|
||||||
INSERT INTO `ACL` VALUES (1024,'PayrollCategory','find','*','ALLOW','ROLE','hr',10578);
|
|
||||||
INSERT INTO `ACL` VALUES (1025,'Worker','__get__business','*','ALLOW','ROLE','hr',10578);
|
|
||||||
INSERT INTO `ACL` VALUES (1026,'Worker','__create__business','*','ALLOW','ROLE','hr',10578);
|
|
||||||
INSERT INTO `ACL` VALUES (1027,'Business','crud','*','ALLOW','ROLE','hr',10578);
|
|
||||||
INSERT INTO `ACL` VALUES (1028,'Route','getTickets','READ','ALLOW','ROLE','deliveryFreelancer',10578);
|
|
||||||
INSERT INTO `ACL` VALUES (1029,'AgencyTerm','filter','READ','ALLOW','ROLE','deliveryFreelancer',10578);
|
|
||||||
INSERT INTO `ACL` VALUES (1030,'Route','summary','READ','ALLOW','ROLE','deliveryFreelancer',10578);
|
|
||||||
INSERT INTO `ACL` VALUES (1031,'Route','getRouteByAgency','WRITE','ALLOW','ROLE','deliveryFreelancer',10578);
|
|
||||||
INSERT INTO `ACL` VALUES (1032,'Route','filter','READ','ALLOW','ROLE','deliveryFreelancer',10578);
|
|
||||||
INSERT INTO `ACL` VALUES (1033,'UserConfig','getUserConfig','*','ALLOW','ROLE','deliveryFreelancer',10578);
|
|
||||||
INSERT INTO `ACL` VALUES (1034,'Route','getTickets','READ','ALLOW','ROLE','deliveryFreelancer',10578);
|
|
||||||
INSERT INTO `ACL` VALUES (1035,'Route','guessPriority','WRITE','ALLOW','ROLE','deliveryFreelancer',10578);
|
|
||||||
INSERT INTO `ACL` VALUES (1036,'Route','getDeliveryPoint','READ','ALLOW','ROLE','deliveryFreelancer',10578);
|
|
||||||
INSERT INTO `ACL` VALUES (1037,'Route','findById','READ','ALLOW','ROLE','deliveryFreelancer',10578);
|
|
||||||
INSERT INTO `ACL` VALUES (1038,'Route','sendSms','WRITE','ALLOW','ROLE','deliveryFreelancer',10578);
|
|
||||||
INSERT INTO `ACL` VALUES (1039,'Ticket','updateAttributes','WRITE','ALLOW','ROLE','deliveryFreelancer',10578);
|
|
||||||
INSERT INTO `ACL` VALUES (1040,'Client','findById','READ','ALLOW','ROLE','deliveryFreelancer',10578);
|
|
||||||
INSERT INTO `ACL` VALUES (1041,'Entry','transfer','WRITE','ALLOW','ROLE','coolerBoss',10578);
|
|
||||||
|
|
||||||
INSERT INTO `fieldAcl` VALUES (1,'Client','name','update','employee');
|
INSERT INTO `fieldAcl` VALUES (1,'Client','name','update','employee');
|
||||||
INSERT INTO `fieldAcl` VALUES (2,'Client','contact','update','employee');
|
INSERT INTO `fieldAcl` VALUES (2,'Client','contact','update','employee');
|
||||||
|
@ -2766,79 +2706,77 @@ 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,134,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,132,763,0,0,0,0,26,NULL,'/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||||
INSERT INTO `department` VALUES (22,'shopping','COMPRAS',2,5,NULL,72,0,0,1,1,1,'/1/',NULL,1,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
INSERT INTO `department` VALUES (22,'shopping','COMPRAS',2,5,NULL,72,0,0,1,1,1,'/1/',NULL,1,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||||
INSERT INTO `department` VALUES (23,'CMA','CAMARA',15,16,NULL,72,1,1,2,0,37,'/1/37/',NULL,0,NULL,0,1,1,1,NULL,NULL,NULL,'PREVIOUS');
|
INSERT INTO `department` VALUES (23,'CMA','CAMARA',15,16,NULL,72,1,1,2,0,37,'/1/37/',NULL,0,NULL,0,1,1,1,NULL,NULL,NULL,'PREVIOUS');
|
||||||
INSERT INTO `department` VALUES (31,'it','INFORMATICA',6,7,NULL,72,0,0,1,0,1,'/1/','informatica-cau',1,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
INSERT INTO `department` VALUES (31,'it','INFORMATICA',6,7,NULL,72,0,0,1,0,1,'/1/','informatica-cau',1,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||||
INSERT INTO `department` VALUES (34,'accounting','CONTABILIDAD',8,9,NULL,0,0,0,1,0,1,'/1/',NULL,1,NULL,1,0,0,0,NULL,NULL,NULL,NULL);
|
INSERT INTO `department` VALUES (34,'accounting','CONTABILIDAD',8,9,NULL,0,0,0,1,0,1,'/1/',NULL,1,NULL,1,0,0,0,NULL,NULL,NULL,NULL);
|
||||||
INSERT INTO `department` VALUES (35,'finance','FINANZAS',10,11,NULL,0,0,0,1,0,1,'/1/',NULL,1,'begonya@verdnatura.es',0,0,0,0,NULL,NULL,NULL,NULL);
|
INSERT INTO `department` VALUES (35,'finance','FINANZAS',10,11,NULL,0,0,0,1,0,1,'/1/',NULL,1,'begonya@verdnatura.es',0,0,0,0,NULL,NULL,NULL,NULL);
|
||||||
INSERT INTO `department` VALUES (36,'labor','LABORAL',12,13,NULL,0,0,0,1,0,1,'/1/',NULL,1,NULL,1,0,0,0,NULL,NULL,NULL,NULL);
|
INSERT INTO `department` VALUES (36,'labor','LABORAL',12,13,NULL,0,0,0,1,0,1,'/1/',NULL,1,NULL,1,0,0,0,NULL,NULL,NULL,NULL);
|
||||||
INSERT INTO `department` VALUES (37,'PROD','PRODUCCION',14,41,NULL,72,1,1,1,13,1,'/1/',NULL,0,NULL,0,1,1,1,NULL,NULL,NULL,NULL);
|
INSERT INTO `department` VALUES (37,'PROD','PRODUCCION',14,39,NULL,72,1,1,1,12,1,'/1/',NULL,0,NULL,0,1,1,1,NULL,NULL,NULL,NULL);
|
||||||
INSERT INTO `department` VALUES (38,'picking','SACADO',17,18,NULL,72,1,0,2,0,37,'/1/37/',NULL,0,NULL,0,1,0,1,NULL,NULL,NULL,'ON_PREPARATION');
|
INSERT INTO `department` VALUES (38,'picking','SACADO',17,18,NULL,72,1,0,2,0,37,'/1/37/',NULL,0,NULL,0,1,0,1,NULL,NULL,NULL,'ON_PREPARATION');
|
||||||
INSERT INTO `department` VALUES (39,'packing','ENCAJADO',19,20,NULL,72,1,0,2,0,37,'/1/37/',NULL,0,NULL,0,0,0,1,NULL,NULL,NULL,'PACKING');
|
INSERT INTO `department` VALUES (39,'packing','ENCAJADO',19,20,NULL,72,1,0,2,0,37,'/1/37/',NULL,0,NULL,0,0,0,1,NULL,NULL,NULL,'PACKING');
|
||||||
INSERT INTO `department` VALUES (41,'administration','ADMINISTRACION',42,43,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',40,41,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',44,93,NULL,0,0,0,1,24,1,'/1/',NULL,1,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
INSERT INTO `department` VALUES (43,'VT','VENTAS',42,91,NULL,0,0,0,1,24,1,'/1/',NULL,1,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||||
INSERT INTO `department` VALUES (44,'management','GERENCIA',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 (44,'management','GERENCIA',92,93,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',96,97,NULL,72,0,0,1,0,1,'/1/',NULL,1,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
INSERT INTO `department` VALUES (45,'logistic','LOGISTICA',94,95,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',98,99,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,0,1,0,0,NULL,NULL,NULL,'DELIVERY');
|
INSERT INTO `department` VALUES (46,'delivery','REPARTO',96,97,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,0,1,0,0,NULL,NULL,NULL,'DELIVERY');
|
||||||
INSERT INTO `department` VALUES (48,'storage','ALMACENAJE',100,101,NULL,0,1,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,'STORAGE');
|
INSERT INTO `department` VALUES (48,'storage','ALMACENAJE',98,99,NULL,0,1,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,'STORAGE');
|
||||||
INSERT INTO `department` VALUES (49,NULL,'PROPIEDAD',102,103,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
INSERT INTO `department` VALUES (49,NULL,'PROPIEDAD',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 (52,NULL,'CARGA AEREA',104,105,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
INSERT INTO `department` VALUES (52,NULL,'CARGA AEREA',102,103,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||||
INSERT INTO `department` VALUES (53,'marketing','MARKETING Y COMUNICACIÓN',45,46,NULL,72,0,0,2,0,43,'/1/43/',NULL,1,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
INSERT INTO `department` VALUES (53,'marketing','MARKETING Y COMUNICACIÓN',43,44,NULL,72,0,0,2,0,43,'/1/43/',NULL,1,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||||
INSERT INTO `department` VALUES (54,NULL,'ORNAMENTALES',106,107,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',104,105,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||||
INSERT INTO `department` VALUES (55,NULL,'TALLER NATURAL',21,22,14548,72,0,0,2,0,37,'/1/37/',NULL,0,NULL,0,1,1,0,1118,NULL,NULL,NULL);
|
INSERT INTO `department` VALUES (55,NULL,'TALLER NATURAL',21,22,14548,72,0,0,2,0,37,'/1/37/',NULL,0,NULL,0,1,1,0,1118,NULL,NULL,NULL);
|
||||||
INSERT INTO `department` VALUES (56,NULL,'TALLER ARTIFICIAL',23,24,8470,72,0,0,2,0,37,'/1/37/',NULL,0,NULL,0,1,1,0,1927,NULL,NULL,NULL);
|
INSERT INTO `department` VALUES (56,NULL,'TALLER ARTIFICIAL',23,24,8470,72,0,0,2,0,37,'/1/37/',NULL,0,NULL,0,1,1,0,1927,NULL,NULL,NULL);
|
||||||
INSERT INTO `department` VALUES (58,'CMP','CAMPOS',108,111,NULL,72,0,0,1,1,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,'FIELD');
|
INSERT INTO `department` VALUES (58,'CMP','CAMPOS',106,109,NULL,72,0,0,1,1,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,'FIELD');
|
||||||
INSERT INTO `department` VALUES (59,'maintenance','MANTENIMIENTO',112,113,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',110,111,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',47,48,NULL,72,0,0,2,0,43,'/1/43/',NULL,0,NULL,0,1,0,0,NULL,NULL,NULL,'CLAIM');
|
INSERT INTO `department` VALUES (60,'claims','RECLAMACIONES',45,46,NULL,72,0,0,2,0,43,'/1/43/',NULL,0,NULL,0,1,0,0,NULL,NULL,NULL,'CLAIM');
|
||||||
INSERT INTO `department` VALUES (61,NULL,'VNH',114,117,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',112,115,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',118,119,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',116,117,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||||
INSERT INTO `department` VALUES (68,NULL,'COMPLEMENTOS',25,26,NULL,72,1,0,2,0,37,'/1/37/',NULL,0,NULL,0,1,0,0,NULL,NULL,NULL,NULL);
|
INSERT INTO `department` VALUES (68,NULL,'COMPLEMENTOS',25,26,NULL,72,1,0,2,0,37,'/1/37/',NULL,0,NULL,0,1,0,0,NULL,NULL,NULL,NULL);
|
||||||
INSERT INTO `department` VALUES (69,NULL,'VERDNABARNA',120,121,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',118,119,NULL,74,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||||
INSERT INTO `department` VALUES (80,'spainTeam5','EQUIPO ESPAÑA 5',49,50,4250,0,0,0,2,0,43,'/1/43/',NULL,1,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
INSERT INTO `department` VALUES (80,'spainTeam5','EQUIPO ESPAÑA 5',47,48,4250,0,0,0,2,0,43,'/1/43/',NULL,1,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||||
INSERT INTO `department` VALUES (86,NULL,'LIMPIEZA',122,123,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',120,121,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',124,125,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',122,123,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',115,116,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',113,114,NULL,0,0,0,2,0,61,'/1/61/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||||
INSERT INTO `department` VALUES (91,'artificial','ARTIFICIAL',27,28,NULL,0,1,0,2,0,37,'/1/37/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,'PREVIOUS');
|
INSERT INTO `department` VALUES (91,'artificial','ARTIFICIAL',27,28,NULL,0,1,0,2,0,37,'/1/37/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,'PREVIOUS');
|
||||||
INSERT INTO `department` VALUES (92,NULL,'EQUIPO SILVERIO',51,52,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',49,50,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',53,54,3797,0,0,0,2,0,43,'/1/43/',NULL,1,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
INSERT INTO `department` VALUES (94,'spainTeam2','EQUIPO ESPAÑA 2',51,52,3797,0,0,0,2,0,43,'/1/43/',NULL,1,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||||
INSERT INTO `department` VALUES (95,'spainTeam1','EQUIPO ESPAÑA 1',55,56,24065,0,0,0,2,0,43,'/1/43/',NULL,1,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
INSERT INTO `department` VALUES (95,'spainTeam1','EQUIPO ESPAÑA 1',53,54,24065,0,0,0,2,0,43,'/1/43/',NULL,1,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||||
INSERT INTO `department` VALUES (96,NULL,'EQUIPO C LOPEZ',57,58,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',55,56,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',59,60,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',57,58,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',61,62,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',59,60,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',126,127,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
INSERT INTO `department` VALUES (124,NULL,'CONTROL INTERNO',124,125,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||||
INSERT INTO `department` VALUES (125,'spainTeam3','EQUIPO ESPAÑA 3',63,64,1118,0,0,0,2,0,43,'/1/43/',NULL,1,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
INSERT INTO `department` VALUES (125,'spainTeam3','EQUIPO ESPAÑA 3',61,62,1118,0,0,0,2,0,43,'/1/43/',NULL,1,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||||
INSERT INTO `department` VALUES (126,'preserved','PRESERVADO',29,30,NULL,0,0,0,2,0,37,'/1/37/',NULL,0,NULL,0,1,1,0,NULL,NULL,NULL,NULL);
|
INSERT INTO `department` VALUES (126,NULL,'PRESERVADO',29,30,NULL,0,0,0,2,0,37,'/1/37/',NULL,0,NULL,0,1,1,0,NULL,NULL,NULL,NULL);
|
||||||
INSERT INTO `department` VALUES (128,NULL,'PALETIZADO',31,32,NULL,0,1,0,2,0,37,'/1/37/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,'PALLETIZING');
|
INSERT INTO `department` VALUES (128,NULL,'PALETIZADO',31,32,NULL,0,1,0,2,0,37,'/1/37/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,'PALLETIZING');
|
||||||
INSERT INTO `department` VALUES (130,'reviewers','REVISION',33,34,NULL,0,1,0,2,0,37,'/1/37/',NULL,0,NULL,0,0,0,1,NULL,NULL,NULL,'ON_CHECKING');
|
INSERT INTO `department` VALUES (130,'reviewers','REVISION',33,34,NULL,0,1,0,2,0,37,'/1/37/',NULL,0,NULL,0,0,0,1,NULL,NULL,NULL,'ON_CHECKING');
|
||||||
INSERT INTO `department` VALUES (131,'greenhouse','INVERNADERO',109,110,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',107,108,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',65,66,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',63,64,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,'franceTeamManagement','EQUIPO GESTIÓN FRANCIA',67,68,9751,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,'franceTeamManagement','EQUIPO GESTIÓN FRANCIA',65,66,9751,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',69,70,8964,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',67,68,8964,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',128,129,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',126,127,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',130,131,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',128,129,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',132,133,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',130,131,NULL,0,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||||
INSERT INTO `department` VALUES (139,'spainTeam4','EQUIPO ESPAÑA 4',71,72,3803,0,0,0,2,0,43,'/1/43/',NULL,1,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
INSERT INTO `department` VALUES (139,'spainTeam4','EQUIPO ESPAÑA 4',69,70,3803,0,0,0,2,0,43,'/1/43/',NULL,1,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||||
INSERT INTO `department` VALUES (140,'internationalTeam','EQUIPO INTERNACIONAL',73,74,24065,0,0,0,2,0,43,'/1/43/','int_equipo',1,'international@verdnatura.es',0,0,0,0,NULL,NULL,NULL,NULL);
|
INSERT INTO `department` VALUES (140,'internationalTeam','EQUIPO INTERNACIONAL',71,72,24065,0,0,0,2,0,43,'/1/43/','int_equipo',1,'international@verdnatura.es',0,0,0,0,NULL,NULL,NULL,NULL);
|
||||||
INSERT INTO `department` VALUES (141,NULL,'PREVIA',35,36,NULL,0,1,0,2,0,37,'/1/37/',NULL,0,NULL,0,0,0,1,NULL,NULL,NULL,'PREVIOUS');
|
INSERT INTO `department` VALUES (141,NULL,'PREVIA',35,36,NULL,0,1,0,2,0,37,'/1/37/',NULL,0,NULL,0,0,0,1,NULL,NULL,NULL,'PREVIOUS');
|
||||||
INSERT INTO `department` VALUES (146,NULL,'VERDNACOLOMBIA',3,4,NULL,72,0,0,2,0,22,'/1/22/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
INSERT INTO `department` VALUES (146,NULL,'VERDNACOLOMBIA',3,4,NULL,72,0,0,2,0,22,'/1/22/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||||
INSERT INTO `department` VALUES (147,'spainTeamAsia','EQUIPO ESPAÑA ASIA',75,76,40214,0,0,0,2,0,43,'/1/43/','esA_equipo',1,'esA@verdnatura.es',0,0,0,0,NULL,NULL,'5500',NULL);
|
INSERT INTO `department` VALUES (147,'spainTeamAsia','EQUIPO ESPAÑA ASIA',73,74,40214,0,0,0,2,0,43,'/1/43/','esA_equipo',1,'esA@verdnatura.es',0,0,0,0,NULL,NULL,'5500',NULL);
|
||||||
INSERT INTO `department` VALUES (148,'franceTeamCatchment','EQUIPO CAPTACIÓN FRANCIA',77,78,25178,0,0,0,2,0,43,'/1/43/',NULL,1,NULL,0,0,0,0,NULL,NULL,'6000',NULL);
|
INSERT INTO `department` VALUES (148,'franceTeamCatchment','EQUIPO CAPTACIÓN FRANCIA',75,76,25178,0,0,0,2,0,43,'/1/43/',NULL,1,NULL,0,0,0,0,NULL,NULL,'6000',NULL);
|
||||||
INSERT INTO `department` VALUES (149,'spainTeamCatchment','EQUIPO ESPAÑA CAPTACIÓN',79,80,1203,0,0,0,2,0,43,'/1/43/','es_captacion_equipo',1,'es_captacion@verdnatura.es',0,0,0,0,NULL,NULL,'5700',NULL);
|
INSERT INTO `department` VALUES (149,'spainTeamCatchment','EQUIPO ESPAÑA CAPTACIÓN',77,78,1203,0,0,0,2,0,43,'/1/43/','es_captacion_equipo',1,'es_captacion@verdnatura.es',0,0,0,0,NULL,NULL,'5700',NULL);
|
||||||
INSERT INTO `department` VALUES (150,'spainTeamLevanteIslands','EQUIPO ESPAÑA LEVANTE',81,82,1118,0,0,0,2,0,43,'/1/43/','es_levante_equipo',1,'es_levante@verdnatura.es',0,0,0,0,NULL,NULL,'5000',NULL);
|
INSERT INTO `department` VALUES (150,'spainTeamLevanteIslands','EQUIPO ESPAÑA LEVANTE',79,80,1118,0,0,0,2,0,43,'/1/43/','es_levante_equipo',1,'es_levante@verdnatura.es',0,0,0,0,NULL,NULL,'5000',NULL);
|
||||||
INSERT INTO `department` VALUES (151,'spainTeamNorthwest','EQUIPO ESPAÑA NOROESTE',83,84,7102,0,0,0,2,0,43,'/1/43/','es_noroeste_equipo',1,'es_noroeste@verdnatura.es',0,0,0,0,NULL,NULL,'5300',NULL);
|
INSERT INTO `department` VALUES (151,'spainTeamNorthwest','EQUIPO ESPAÑA NOROESTE',81,82,7102,0,0,0,2,0,43,'/1/43/','es_noroeste_equipo',1,'es_noroeste@verdnatura.es',0,0,0,0,NULL,NULL,'5300',NULL);
|
||||||
INSERT INTO `department` VALUES (152,'spainTeamNortheast','EQUIPO ESPAÑA NORESTE',85,86,1118,0,0,0,2,0,43,'/1/43/','es_noreste_equipo',1,'es_noreste@verdnatura.es',0,0,0,0,NULL,NULL,'5200',NULL);
|
INSERT INTO `department` VALUES (152,'spainTeamNortheast','EQUIPO ESPAÑA NORESTE',83,84,1118,0,0,0,2,0,43,'/1/43/','es_noreste_equipo',1,'es_noreste@verdnatura.es',0,0,0,0,NULL,NULL,'5200',NULL);
|
||||||
INSERT INTO `department` VALUES (153,'spainTeamSouth','EQUIPO ESPAÑA SUR',87,88,36578,0,0,0,2,0,43,'/1/43/','es_sur_equipo',1,'es_sur@verdnatura.es',0,0,0,0,NULL,NULL,'5400',NULL);
|
INSERT INTO `department` VALUES (153,'spainTeamSouth','EQUIPO ESPAÑA SUR',85,86,36578,0,0,0,2,0,43,'/1/43/','es_sur_equipo',1,'es_sur@verdnatura.es',0,0,0,0,NULL,NULL,'5400',NULL);
|
||||||
INSERT INTO `department` VALUES (154,'spainTeamCenter','EQUIPO ESPAÑA CENTRO',89,90,4661,0,0,0,2,0,43,'/1/43/','es_centro_equipo',1,'es_centro@verdnatura.es',0,0,0,0,NULL,NULL,'5100',NULL);
|
INSERT INTO `department` VALUES (154,'spainTeamCenter','EQUIPO ESPAÑA CENTRO',87,88,4661,0,0,0,2,0,43,'/1/43/','es_centro_equipo',1,'es_centro@verdnatura.es',0,0,0,0,NULL,NULL,'5100',NULL);
|
||||||
INSERT INTO `department` VALUES (155,'spainTeamVip','EQUIPO ESPAÑA VIP',91,92,5432,0,0,0,2,0,43,'/1/43/','es_vip_equipo',1,'es_vip@verdnatura.es',0,0,0,0,NULL,NULL,'5600',NULL);
|
INSERT INTO `department` VALUES (155,'spainTeamVip','EQUIPO ESPAÑA VIP',89,90,5432,0,0,0,2,0,43,'/1/43/','es_vip_equipo',1,'es_vip@verdnatura.es',0,0,0,0,NULL,NULL,'5600',NULL);
|
||||||
INSERT INTO `department` VALUES (156,NULL,'COCINA',37,38,NULL,0,0,0,2,0,37,'/1/37/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
INSERT INTO `department` VALUES (156,NULL,'COCINA',37,38,NULL,0,0,0,2,0,37,'/1/37/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||||
INSERT INTO `department` VALUES (157,NULL,'RECICLAJE',39,40,NULL,0,0,0,2,0,37,'/1/37/',NULL,0,NULL,0,0,0,0,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);
|
||||||
INSERT INTO `docuware` VALUES (2,'deliveryNote','Albaranes cliente','store','Archivar','N__ALBAR_N',NULL);
|
INSERT INTO `docuware` VALUES (2,'deliveryNote','Albaranes cliente','store','Archivar','N__ALBAR_N',NULL);
|
||||||
INSERT INTO `docuware` VALUES (3,'hr','RRHH','find','Búsqueda','N__DOCUMENTO',3);
|
INSERT INTO `docuware` VALUES (3,'hr','RRHH','find','Búsqueda','N__DOCUMENTO',3);
|
||||||
|
|
||||||
INSERT INTO `itemPackingType` VALUES ('A','Altillo',1);
|
|
||||||
INSERT INTO `itemPackingType` VALUES ('F','Fruta y Verdura',0);
|
INSERT INTO `itemPackingType` VALUES ('F','Fruta y Verdura',0);
|
||||||
INSERT INTO `itemPackingType` VALUES ('H','Horizontal',1);
|
INSERT INTO `itemPackingType` VALUES ('H','Horizontal',1);
|
||||||
INSERT INTO `itemPackingType` VALUES ('P','Pienso',0);
|
INSERT INTO `itemPackingType` VALUES ('P','Pienso',0);
|
||||||
|
@ -2940,21 +2878,21 @@ INSERT INTO `state` VALUES (13,'En Reparto',11,4,'ON_DELIVERY',13,0,1,0,0,0,0,0,
|
||||||
INSERT INTO `state` VALUES (14,'Preparado',6,2,'PREPARED',14,0,1,0,2,0,0,1,0,'warning');
|
INSERT INTO `state` VALUES (14,'Preparado',6,2,'PREPARED',14,0,1,0,2,0,0,1,0,'warning');
|
||||||
INSERT INTO `state` VALUES (15,'Pte Recogida',12,4,'WAITING_FOR_PICKUP',15,0,1,0,0,0,0,0,0,NULL);
|
INSERT INTO `state` VALUES (15,'Pte Recogida',12,4,'WAITING_FOR_PICKUP',15,0,1,0,0,0,0,0,0,NULL);
|
||||||
INSERT INTO `state` VALUES (16,'Entregado',13,4,'DELIVERED',16,0,1,0,0,0,0,0,0,NULL);
|
INSERT INTO `state` VALUES (16,'Entregado',13,4,'DELIVERED',16,0,1,0,0,0,0,0,0,NULL);
|
||||||
INSERT INTO `state` VALUES (20,'Asignado',4,1,'PICKER_DESIGNED',20,1,0,0,0,0,0,2,0,'success');
|
INSERT INTO `state` VALUES (20,'Asignado',4,0,'PICKER_DESIGNED',20,1,0,0,0,0,0,2,0,'success');
|
||||||
INSERT INTO `state` VALUES (21,'Retornado',4,2,'PRINTED_BACK',21,0,0,0,0,0,0,2,0,'success');
|
INSERT INTO `state` VALUES (21,'Retornado',4,2,'PRINTED_BACK',21,0,0,0,0,0,0,2,0,'success');
|
||||||
INSERT INTO `state` VALUES (22,'Pte. Ampliar',2,0,'EXPANDABLE',22,0,0,0,0,0,0,4,1,'alert');
|
INSERT INTO `state` VALUES (22,'Pte. Ampliar',2,0,'EXPANDABLE',22,0,0,0,0,0,0,4,1,'alert');
|
||||||
INSERT INTO `state` VALUES (23,'URGENTE',5,1,'LAST_CALL',23,1,0,1,0,0,0,4,1,'success');
|
INSERT INTO `state` VALUES (23,'URGENTE',5,2,'LAST_CALL',23,1,0,1,0,0,0,4,1,'success');
|
||||||
INSERT INTO `state` VALUES (24,'Encadenado',4,0,'CHAINED',24,0,0,0,0,0,0,3,1,'success');
|
INSERT INTO `state` VALUES (24,'Encadenado',4,0,'CHAINED',24,0,0,0,0,0,0,3,1,'success');
|
||||||
INSERT INTO `state` VALUES (25,'Embarcando',3,0,'BOARDING',25,1,0,0,0,0,0,3,0,'alert');
|
INSERT INTO `state` VALUES (25,'Embarcando',3,0,'BOARDING',25,1,0,0,0,0,0,3,0,'alert');
|
||||||
INSERT INTO `state` VALUES (26,'Prep Previa',5,1,'PREVIOUS_PREPARATION',28,1,0,0,1,0,0,2,0,'warning');
|
INSERT INTO `state` VALUES (26,'Prep Previa',5,0,'PREVIOUS_PREPARATION',28,1,0,0,1,0,0,2,0,'warning');
|
||||||
INSERT INTO `state` VALUES (28,'Previa OK',3,1,'OK PREVIOUS',28,1,0,1,1,1,1,3,0,'warning');
|
INSERT INTO `state` VALUES (28,'Previa OK',3,0,'OK PREVIOUS',28,1,0,1,1,1,1,3,0,'warning');
|
||||||
INSERT INTO `state` VALUES (29,'Previa Impreso',4,1,'PRINTED PREVIOUS',29,1,0,1,0,0,1,2,0,'success');
|
INSERT INTO `state` VALUES (29,'Previa Impreso',4,0,'PRINTED PREVIOUS',29,1,0,1,0,0,1,2,0,'success');
|
||||||
INSERT INTO `state` VALUES (31,'Polizon Impreso',4,1,'PRINTED STOWAWAY',29,1,0,1,0,0,1,2,0,'success');
|
INSERT INTO `state` VALUES (31,'Polizon Impreso',4,2,'PRINTED STOWAWAY',29,1,0,1,0,0,1,2,0,'success');
|
||||||
INSERT INTO `state` VALUES (33,'Auto_Impreso',4,1,'PRINTED_AUTO',29,1,0,1,0,0,1,2,0,'success');
|
INSERT INTO `state` VALUES (33,'Auto_Impreso',4,0,'PRINTED_AUTO',29,1,0,1,0,0,1,2,0,'success');
|
||||||
INSERT INTO `state` VALUES (34,'Pte Pago',3,0,'WAITING_FOR_PAYMENT',34,0,0,0,0,0,0,4,1,'alert');
|
INSERT INTO `state` VALUES (34,'Pte Pago',3,0,'WAITING_FOR_PAYMENT',34,0,0,0,0,0,0,4,1,'alert');
|
||||||
INSERT INTO `state` VALUES (35,'Semi-Encajado',9,3,'HALF_PACKED',10,0,1,0,0,0,0,1,0,NULL);
|
INSERT INTO `state` VALUES (35,'Semi-Encajado',9,3,'HALF_PACKED',10,0,1,0,0,0,0,1,0,NULL);
|
||||||
INSERT INTO `state` VALUES (36,'Previa Revisando',3,1,'PREVIOUS_CONTROL',37,1,0,0,4,0,1,2,0,'warning');
|
INSERT INTO `state` VALUES (36,'Previa Revisando',3,0,'PREVIOUS_CONTROL',37,1,0,0,4,0,1,2,0,'warning');
|
||||||
INSERT INTO `state` VALUES (37,'Previa Revisado',3,1,'PREVIOUS_CONTROLLED',29,1,0,1,0,0,1,2,0,'warning');
|
INSERT INTO `state` VALUES (37,'Previa Revisado',3,0,'PREVIOUS_CONTROLLED',29,1,0,1,0,0,1,2,0,'warning');
|
||||||
INSERT INTO `state` VALUES (38,'Prep Cámara',6,2,'COOLER_PREPARATION',14,0,0,0,2,0,0,2,0,'warning');
|
INSERT INTO `state` VALUES (38,'Prep Cámara',6,2,'COOLER_PREPARATION',14,0,0,0,2,0,0,2,0,'warning');
|
||||||
INSERT INTO `state` VALUES (42,'Entregado en parte',13,3,'PARTIAL_DELIVERED',16,0,1,0,0,0,0,0,0,NULL);
|
INSERT INTO `state` VALUES (42,'Entregado en parte',13,3,'PARTIAL_DELIVERED',16,0,1,0,0,0,0,0,0,NULL);
|
||||||
INSERT INTO `state` VALUES (43,'Preparación por caja',6,2,'BOX_PICKING',42,0,0,0,2,0,0,2,0,'warning');
|
INSERT INTO `state` VALUES (43,'Preparación por caja',6,2,'BOX_PICKING',42,0,0,0,2,0,0,2,0,'warning');
|
||||||
|
@ -2964,7 +2902,7 @@ INSERT INTO `ticketUpdateAction` VALUES (2,'Convertir en maná','mana');
|
||||||
|
|
||||||
INSERT INTO `ticketCanAdvanceConfig` VALUES (1,5);
|
INSERT INTO `ticketCanAdvanceConfig` VALUES (1,5);
|
||||||
|
|
||||||
INSERT INTO `volumeConfig` VALUES (1,2.67,1.60,0.8,150,0.30,120,57,2.0,50,200,10,167.0);
|
INSERT INTO `volumeConfig` VALUES (2.67,1.60,0.8,150,0.30,120,57,2.0,50,200,10,167.0);
|
||||||
|
|
||||||
INSERT INTO `workerActivityType` VALUES ('CLAIM','RECLAMACIONES');
|
INSERT INTO `workerActivityType` VALUES ('CLAIM','RECLAMACIONES');
|
||||||
INSERT INTO `workerActivityType` VALUES ('DELIVERY','REPARTO');
|
INSERT INTO `workerActivityType` VALUES ('DELIVERY','REPARTO');
|
||||||
|
|
|
@ -326,7 +326,7 @@ INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','printQueue','juan@db
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','preservedBoss','travel','alexm@%','0000-00-00 00:00:00','Insert,Delete','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','preservedBoss','travel','alexm@%','0000-00-00 00:00:00','Insert,Delete','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyer','travel','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Insert,Update,Delete','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyer','travel','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Insert,Update,Delete','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','hr','Cubos','alexm@%','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','hr','Cubos','alexm@%','0000-00-00 00:00:00','Select','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','itemType','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Insert,Update,Delete','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyerAssistant','itemType','jgallego@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Insert,Update,Delete','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyer','Cubos','alexm@%','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyer','Cubos','alexm@%','0000-00-00 00:00:00','Select','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','salesPerson','Cubos','alexm@%','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','salesPerson','Cubos','alexm@%','0000-00-00 00:00:00','Select','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','artificialBoss','state','alexm@%','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','artificialBoss','state','alexm@%','0000-00-00 00:00:00','Select','');
|
||||||
|
@ -561,6 +561,7 @@ INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','logistic','awb_component_t
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vncontrol','employee','accion','alexm@%','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vncontrol','employee','accion','alexm@%','0000-00-00 00:00:00','Select','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','volumeConfig','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','volumeConfig','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','currency','alexm@%','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','currency','alexm@%','0000-00-00 00:00:00','Select','');
|
||||||
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyerBoss','tag','alexm@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Insert,Update,Delete','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','currency','alexm@%','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','currency','alexm@%','0000-00-00 00:00:00','Select','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','financial','creditClassification','alexm@%','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','financial','creditClassification','alexm@%','0000-00-00 00:00:00','Select','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','financial','creditInsurance','alexm@%','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','financial','creditInsurance','alexm@%','0000-00-00 00:00:00','Select','');
|
||||||
|
@ -751,11 +752,11 @@ INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','dua','alexm@%','0000-0
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','duaEntry','alexm@%','0000-00-00 00:00:00','Insert,Delete','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','duaEntry','alexm@%','0000-00-00 00:00:00','Insert,Delete','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','expeditionTruck','alexm@%','0000-00-00 00:00:00','Update','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','expeditionTruck','alexm@%','0000-00-00 00:00:00','Update','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','srt','maintenance','moving','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Delete','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','srt','maintenance','moving','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Delete','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hrBoss','machineDetail','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Insert,Update,Delete','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hrBoss','machineDetail','alexm@%','0000-00-00 00:00:00','Select,Insert,Update,Delete','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hrBoss','machineDms','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Insert,Update,Delete','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hrBoss','machineDms','alexm@%','0000-00-00 00:00:00','Select,Insert,Update,Delete','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','claimManager','vehicle','alexm@%','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','claimManager','vehicle','alexm@%','0000-00-00 00:00:00','Select','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','awb','alexm@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','awb','alexm@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hrBoss','machine','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Insert,Update','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hrBoss','machine','alexm@%','0000-00-00 00:00:00','Select,Insert,Update','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','logistic','Entradas_dits','alexm@%','0000-00-00 00:00:00','Insert,Update','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','logistic','Entradas_dits','alexm@%','0000-00-00 00:00:00','Insert,Update','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','workerTimeControlMail','alexm@%','0000-00-00 00:00:00','Select,Update','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','workerTimeControlMail','alexm@%','0000-00-00 00:00:00','Select,Update','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','bi','coolerBoss','rotacion','alexm@%','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','bi','coolerBoss','rotacion','alexm@%','0000-00-00 00:00:00','Select','');
|
||||||
|
@ -834,7 +835,6 @@ INSERT IGNORE INTO `tables_priv` VALUES ('','bi','salesPerson','tarifa_component
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','srt','employee','expeditionLog','alexm@%','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','srt','employee','expeditionLog','alexm@%','0000-00-00 00:00:00','Select','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','bs','salesPerson','clientNewBorn','alexm@%','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','bs','salesPerson','clientNewBorn','alexm@%','0000-00-00 00:00:00','Select','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','saleItemShelving__','alexm@%','0000-00-00 00:00:00','Select,Insert,Update,Delete','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','saleItemShelving__','alexm@%','0000-00-00 00:00:00','Select,Insert,Update,Delete','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','adminBoss','ticketDms','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Delete','');
|
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','srt','employee','expedition','alexm@%','0000-00-00 00:00:00','Update','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','srt','employee','expedition','alexm@%','0000-00-00 00:00:00','Update','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','itemShelvingStock','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','itemShelvingStock','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','saleParking__','alexm@%','0000-00-00 00:00:00','Select,Insert,Update,Delete','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','saleParking__','alexm@%','0000-00-00 00:00:00','Select,Insert,Update,Delete','');
|
||||||
|
@ -889,6 +889,7 @@ INSERT IGNORE INTO `tables_priv` VALUES ('','vn','productionAssi','supplierAgenc
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','packager','franceExpressConfig','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','packager','franceExpressConfig','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','manager','ticketLog','juan@10.5.1.2','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','manager','ticketLog','juan@10.5.1.2','0000-00-00 00:00:00','Select','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','productionAssi','ticketCollection','alexm@%','0000-00-00 00:00:00','Delete','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','productionAssi','ticketCollection','alexm@%','0000-00-00 00:00:00','Delete','');
|
||||||
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','ticketDms','alexm@%','0000-00-00 00:00:00','Select','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','ticketObservation','alexm@%','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','ticketObservation','alexm@%','0000-00-00 00:00:00','Select','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logistic','ticketPackaging','alexm@%','0000-00-00 00:00:00','Insert','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logistic','ticketPackaging','alexm@%','0000-00-00 00:00:00','Insert','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','ticketPackaging','alexm@%','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','ticketPackaging','alexm@%','0000-00-00 00:00:00','Select','');
|
||||||
|
@ -1239,7 +1240,7 @@ INSERT IGNORE INTO `tables_priv` VALUES ('','hedera','grafana','visitAccess','ro
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','deliveryAssistant','v_botanic_export','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','deliveryAssistant','v_botanic_export','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','deliveryAssistant','itemCost','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','deliveryAssistant','itemCost','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','bs','deliveryAssistant','m3','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','bs','deliveryAssistant','m3','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','marketingBoss','itemTypeI18n','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','deliveryAssistant','ticketDms','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','deliveryAssistant','time','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','deliveryAssistant','time','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','deliveryAssistant','v_Articles_botanical','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','deliveryAssistant','v_Articles_botanical','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','inventoryConfig','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','inventoryConfig','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||||
|
@ -1284,7 +1285,7 @@ INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','company','juan@db-pr
|
||||||
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','jenkins@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','cooler','itemShelving','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Insert,Update,Delete','');
|
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','buyer','agencyIncoming','alexm@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','agencyIncoming','alexm@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','addressObservation','carlosap@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','addressObservation','carlosap@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 ('','vn','grafana','negativeOrigin','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||||
|
@ -1504,29 +1505,6 @@ INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logisticAssist','itemSoldOutTa
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logisticAssist','itemDurationTag','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logisticAssist','itemDurationTag','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logisticAssist','itemGrowingTag','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logisticAssist','itemGrowingTag','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','adminBoss','receipt','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Update,Delete','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','adminBoss','receipt','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Update,Delete','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','machine','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','packagerBoss','awb','alexm@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','machineDetail','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','machineDms','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logisticAssist','tag','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Insert,Update,Delete','');
|
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','packagerBoss','buy','carlosap@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update','');
|
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','packagerBoss','genericAllocation','carlosap@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','packagerBoss','Tintas','carlosap@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','productionCountry','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','teamBoss','workerTimeControlConfig','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','packagerBoss','Entradas','carlosap@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','packagerBoss','Compres','carlosap@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update','');
|
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','packagerBoss','buySource','carlosap@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','payment','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','administrative','Tickets','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','','Update');
|
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','financialBoss','payMethod','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Insert,Update,Delete','');
|
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','delivery','roadmap','jenkins@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','delivery','roadmapStop','jenkins@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','delivery','roadmapAddress','jenkins@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','deliveryBoss','roadmap','jenkins@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Insert,Update,Delete','');
|
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','deliveryBoss','roadmapStop','jenkins@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Insert,Update,Delete','');
|
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','deliveryBoss','roadmapAddress','jenkins@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Insert,Update,Delete','');
|
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','deliveryBoss','volumeConfig','jenkins@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','','Update');
|
|
||||||
/*!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 */;
|
||||||
|
@ -1586,8 +1564,6 @@ INSERT IGNORE INTO `columns_priv` VALUES ('','pbx','grafana','sip','user_id','00
|
||||||
INSERT IGNORE INTO `columns_priv` VALUES ('','pbx','grafana','sip','extension','0000-00-00 00:00:00','Select');
|
INSERT IGNORE INTO `columns_priv` VALUES ('','pbx','grafana','sip','extension','0000-00-00 00:00:00','Select');
|
||||||
INSERT IGNORE INTO `columns_priv` VALUES ('','account','grafana','user','name','0000-00-00 00:00:00','Select');
|
INSERT IGNORE INTO `columns_priv` VALUES ('','account','grafana','user','name','0000-00-00 00:00:00','Select');
|
||||||
INSERT IGNORE INTO `columns_priv` VALUES ('','account','grafana','user','active','0000-00-00 00:00:00','Select');
|
INSERT IGNORE INTO `columns_priv` VALUES ('','account','grafana','user','active','0000-00-00 00:00:00','Select');
|
||||||
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','deliveryBoss','volumeConfig','palletM3','0000-00-00 00:00:00','Update');
|
|
||||||
INSERT IGNORE INTO `columns_priv` VALUES ('','vn2008','administrative','Tickets','Bultos','0000-00-00 00:00:00','Update');
|
|
||||||
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','business','workerFk','0000-00-00 00:00:00','Select');
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','business','workerFk','0000-00-00 00:00:00','Select');
|
||||||
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','business','id','0000-00-00 00:00:00','Select');
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','business','id','0000-00-00 00:00:00','Select');
|
||||||
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','business','departmentFk','0000-00-00 00:00:00','Select');
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','business','departmentFk','0000-00-00 00:00:00','Select');
|
||||||
|
@ -1999,8 +1975,9 @@ INSERT IGNORE INTO `procs_priv` VALUES ('','util','productionAssi','midnight','F
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','dipole','employee','expedition_add','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','dipole','employee','expedition_add','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00');
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','itemshelving_transfer','PROCEDURE','alexm@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','itemshelving_transfer','PROCEDURE','alexm@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','coolerBoss','itempacking','FUNCTION','alexm@%','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','coolerBoss','itempacking','FUNCTION','alexm@%','Execute','0000-00-00 00:00:00');
|
||||||
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','salesPerson','ticket_clone','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00');
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','cache','employee','available_refresh','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','cache','employee','available_refresh','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00');
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','ticket_doCmr','PROCEDURE','guillermo@db-proxy2.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','logistic','ticket_clone','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00');
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','coolerBoss','ticket_clone','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','coolerBoss','ticket_clone','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00');
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','financial','payment_add','PROCEDURE','jgallego@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','financial','payment_add','PROCEDURE','jgallego@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','hr','timebusiness_calculatebyuser','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','hr','timebusiness_calculatebyuser','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00');
|
||||||
|
@ -2015,6 +1992,7 @@ INSERT IGNORE INTO `procs_priv` VALUES ('','cache','buyer','last_buy_refresh','P
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','buyer','supplierpackaging_reportsource','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','buyer','supplierpackaging_reportsource','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00');
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','cache','buyer','stock_refresh','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','cache','buyer','stock_refresh','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00');
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','itemshelvingproblem','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','itemshelvingproblem','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00');
|
||||||
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','itemshelvingradar','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00');
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','cache','employee','visible_refresh','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','cache','employee','visible_refresh','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00');
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','util','grafana','quarterfirstday','FUNCTION','juan@db-proxy2.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','util','grafana','quarterfirstday','FUNCTION','juan@db-proxy2.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','hr','workertimecontrol_sendmailbydepartment','PROCEDURE','alexm@db-proxy2.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','hr','workertimecontrol_sendmailbydepartment','PROCEDURE','alexm@db-proxy2.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||||
|
@ -2184,7 +2162,6 @@ INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','collection_printstic
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','deviceproductionuser_getworker','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','deviceproductionuser_getworker','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','ticket_printlabelprevious','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','ticket_printlabelprevious','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','ticket_isoutclosurezone','FUNCTION','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','ticket_isoutclosurezone','FUNCTION','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','packagerBoss','entry_lock','PROCEDURE','jgallego@db-proxy2.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00');
|
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','ticketstatetoday_setstate','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','ticketstatetoday_setstate','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','device_checklogin','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','device_checklogin','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','worker_getfromhasmistake','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','worker_getfromhasmistake','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||||
|
@ -2235,7 +2212,6 @@ INSERT IGNORE INTO `procs_priv` VALUES ('','vn','claimManager','entry_getTransfe
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','buyer','entry_getTransfer','PROCEDURE','jenkins@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','buyer','entry_getTransfer','PROCEDURE','jenkins@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','administrative','intrastat_estimateNet','FUNCTION','jenkins@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','administrative','intrastat_estimateNet','FUNCTION','jenkins@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','artificialBoss','confection_controlSource','PROCEDURE','jenkins@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','artificialBoss','confection_controlSource','PROCEDURE','jenkins@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','packagerBoss','item_comparative','PROCEDURE','carlosap@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00');
|
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','util','developer','connection_kill','PROCEDURE','jenkins@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','util','developer','connection_kill','PROCEDURE','jenkins@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','financial','client_getRisk','PROCEDURE','jenkins@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','financial','client_getRisk','PROCEDURE','jenkins@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','account','developer','user_hasRole','FUNCTION','root@localhost','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','account','developer','user_hasRole','FUNCTION','root@localhost','Execute','0000-00-00 00:00:00');
|
||||||
|
@ -2267,12 +2243,6 @@ INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','saletracking_secto
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','salesAssistant','saleSplit','PROCEDURE','carlosap@db-proxy2.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','salesAssistant','saleSplit','PROCEDURE','carlosap@db-proxy2.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','itemShelvingSale_deleteAdded','PROCEDURE','guillermo@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','itemShelvingSale_deleteAdded','PROCEDURE','guillermo@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','buy_getUltimate','PROCEDURE','guillermo@db-proxy2.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','buy_getUltimate','PROCEDURE','guillermo@db-proxy2.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','packagerBoss','entry_isintrastat','FUNCTION','carlosap@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00');
|
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','packagerBoss','entry_clone','PROCEDURE','carlosap@db-proxy2.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00');
|
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','packagerBoss','buy_getUltimate','PROCEDURE','carlosap@db-proxy2.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00');
|
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','salesAssistant','ticket_clone','PROCEDURE','guillermo@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00');
|
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','deliveryBoss','roadmap_cloneDay','PROCEDURE','guillermo@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00');
|
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','deliveryBoss','getTimeBetweenRoadmapAddresses','FUNCTION','guillermo@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00');
|
|
||||||
/*!40000 ALTER TABLE `procs_priv` ENABLE KEYS */;
|
/*!40000 ALTER TABLE `procs_priv` ENABLE KEYS */;
|
||||||
|
|
||||||
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
|
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
|
||||||
|
@ -2287,7 +2257,6 @@ USE `mysql`;
|
||||||
|
|
||||||
/*!40000 ALTER TABLE `global_priv` DISABLE KEYS */;
|
/*!40000 ALTER TABLE `global_priv` DISABLE KEYS */;
|
||||||
INSERT IGNORE INTO `global_priv` VALUES ('','account','{\"access\": 0, \"is_role\": true,\"version_id\":100707}');
|
INSERT IGNORE INTO `global_priv` VALUES ('','account','{\"access\": 0, \"is_role\": true,\"version_id\":100707}');
|
||||||
INSERT IGNORE INTO `global_priv` VALUES ('','adminAssistant','{\"access\":0,\"version_id\":101106,\"is_role\":true}');
|
|
||||||
INSERT IGNORE INTO `global_priv` VALUES ('','adminBoss','{\"access\":0,\"version_id\":101106,\"is_role\":true}');
|
INSERT IGNORE INTO `global_priv` VALUES ('','adminBoss','{\"access\":0,\"version_id\":101106,\"is_role\":true}');
|
||||||
INSERT IGNORE INTO `global_priv` VALUES ('','adminOfficer','{\"access\": 0, \"version_id\": 101106, \"is_role\": true}');
|
INSERT IGNORE INTO `global_priv` VALUES ('','adminOfficer','{\"access\": 0, \"version_id\": 101106, \"is_role\": true}');
|
||||||
INSERT IGNORE INTO `global_priv` VALUES ('','administrative','{\"access\": 0, \"is_role\": true, \"version_id\": 101106}');
|
INSERT IGNORE INTO `global_priv` VALUES ('','administrative','{\"access\": 0, \"is_role\": true, \"version_id\": 101106}');
|
||||||
|
@ -2338,7 +2307,6 @@ INSERT IGNORE INTO `global_priv` VALUES ('','marketing','{\"access\": 0, \"is_ro
|
||||||
INSERT IGNORE INTO `global_priv` VALUES ('','marketingBoss','{\"access\":0,\"version_id\":101106,\"is_role\":true}');
|
INSERT IGNORE INTO `global_priv` VALUES ('','marketingBoss','{\"access\":0,\"version_id\":101106,\"is_role\":true}');
|
||||||
INSERT IGNORE INTO `global_priv` VALUES ('','officeBoss','{\"access\":0,\"version_id\":101106,\"is_role\":true}');
|
INSERT IGNORE INTO `global_priv` VALUES ('','officeBoss','{\"access\":0,\"version_id\":101106,\"is_role\":true}');
|
||||||
INSERT IGNORE INTO `global_priv` VALUES ('','packager','{\"access\":0,\"version_id\":100707,\"is_role\":true}');
|
INSERT IGNORE INTO `global_priv` VALUES ('','packager','{\"access\":0,\"version_id\":100707,\"is_role\":true}');
|
||||||
INSERT IGNORE INTO `global_priv` VALUES ('','packagerBoss','{\"access\":0,\"version_id\":101106,\"is_role\":true}');
|
|
||||||
INSERT IGNORE INTO `global_priv` VALUES ('','palletizer','{\"access\":0,\"version_id\":101106,\"is_role\":true}');
|
INSERT IGNORE INTO `global_priv` VALUES ('','palletizer','{\"access\":0,\"version_id\":101106,\"is_role\":true}');
|
||||||
INSERT IGNORE INTO `global_priv` VALUES ('','palletizerBoss','{\"access\":0,\"version_id\":101106,\"is_role\":true}');
|
INSERT IGNORE INTO `global_priv` VALUES ('','palletizerBoss','{\"access\":0,\"version_id\":101106,\"is_role\":true}');
|
||||||
INSERT IGNORE INTO `global_priv` VALUES ('','preservedBoss','{\"access\":0,\"version_id\":100707,\"is_role\":true}');
|
INSERT IGNORE INTO `global_priv` VALUES ('','preservedBoss','{\"access\":0,\"version_id\":100707,\"is_role\":true}');
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -2668,7 +2668,6 @@ trig:BEGIN
|
||||||
THEN
|
THEN
|
||||||
|
|
||||||
CALL entry_isEditable(OLD.entryFk);
|
CALL entry_isEditable(OLD.entryFk);
|
||||||
CALL entry_isEditable(NEW.entryFk);
|
|
||||||
END IF;
|
END IF;
|
||||||
|
|
||||||
SET NEW.editorFk = account.myUser_getId();
|
SET NEW.editorFk = account.myUser_getId();
|
||||||
|
@ -4980,6 +4979,7 @@ BEGIN
|
||||||
|
|
||||||
IF NEW.isBooked = OLD.isBooked AND (
|
IF NEW.isBooked = OLD.isBooked AND (
|
||||||
NOT (NEW.supplierFk <=> OLD.supplierFk) OR
|
NOT (NEW.supplierFk <=> OLD.supplierFk) OR
|
||||||
|
NOT (NEW.dated <=> OLD.dated) OR
|
||||||
NOT (NEW.travelFk <=> OLD.travelFk) OR
|
NOT (NEW.travelFk <=> OLD.travelFk) OR
|
||||||
NOT (NEW.companyFk <=> OLD.companyFk) OR
|
NOT (NEW.companyFk <=> OLD.companyFk) OR
|
||||||
NOT (NEW.invoiceInFk <=> OLD.invoiceInFk) OR
|
NOT (NEW.invoiceInFk <=> OLD.invoiceInFk) OR
|
||||||
|
@ -6994,8 +6994,6 @@ DELIMITER ;;
|
||||||
BEFORE INSERT ON `mandate`
|
BEFORE INSERT ON `mandate`
|
||||||
FOR EACH ROW
|
FOR EACH ROW
|
||||||
BEGIN
|
BEGIN
|
||||||
SET NEW.editorFk = account.myUser_getId();
|
|
||||||
|
|
||||||
IF (NEW.code IS NULL) THEN
|
IF (NEW.code IS NULL) THEN
|
||||||
SET NEW.code=CONCAT(NEW.clientFk,'-',(SELECT AUTO_INCREMENT
|
SET NEW.code=CONCAT(NEW.clientFk,'-',(SELECT AUTO_INCREMENT
|
||||||
FROM information_schema.TABLES
|
FROM information_schema.TABLES
|
||||||
|
@ -7016,50 +7014,6 @@ 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=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`mandate_beforeUpdate`
|
|
||||||
BEFORE INSERT ON `mandate`
|
|
||||||
FOR EACH ROW
|
|
||||||
BEGIN
|
|
||||||
SET NEW.editorFk = account.myUser_getId();
|
|
||||||
END */;;
|
|
||||||
DELIMITER ;
|
|
||||||
/*!50003 SET sql_mode = @saved_sql_mode */ ;
|
|
||||||
/*!50003 SET character_set_client = @saved_cs_client */ ;
|
|
||||||
/*!50003 SET character_set_results = @saved_cs_results */ ;
|
|
||||||
/*!50003 SET collation_connection = @saved_col_connection */ ;
|
|
||||||
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
|
||||||
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
|
||||||
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
|
|
||||||
/*!50003 SET character_set_client = utf8mb4 */ ;
|
|
||||||
/*!50003 SET character_set_results = utf8mb4 */ ;
|
|
||||||
/*!50003 SET collation_connection = utf8mb4_unicode_ci */ ;
|
|
||||||
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
|
|
||||||
/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
|
|
||||||
DELIMITER ;;
|
|
||||||
/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`mandate_afterDelete`
|
|
||||||
AFTER DELETE ON `mandate`
|
|
||||||
FOR EACH ROW
|
|
||||||
BEGIN
|
|
||||||
INSERT INTO mandateLog
|
|
||||||
SET `action` = 'delete',
|
|
||||||
`changedModel` = 'mandate',
|
|
||||||
`changedModelId` = OLD.id,
|
|
||||||
`userFk` = account.myUser_getId();
|
|
||||||
END */;;
|
|
||||||
DELIMITER ;
|
|
||||||
/*!50003 SET sql_mode = @saved_sql_mode */ ;
|
|
||||||
/*!50003 SET character_set_client = @saved_cs_client */ ;
|
|
||||||
/*!50003 SET character_set_results = @saved_cs_results */ ;
|
|
||||||
/*!50003 SET collation_connection = @saved_col_connection */ ;
|
|
||||||
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
|
||||||
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
|
||||||
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
|
|
||||||
/*!50003 SET character_set_client = utf8mb4 */ ;
|
|
||||||
/*!50003 SET character_set_results = utf8mb4 */ ;
|
|
||||||
/*!50003 SET collation_connection = utf8mb4_unicode_ci */ ;
|
|
||||||
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
|
|
||||||
/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
|
|
||||||
DELIMITER ;;
|
|
||||||
/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`operator_beforeInsert`
|
/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`operator_beforeInsert`
|
||||||
BEFORE INSERT ON `operator`
|
BEFORE INSERT ON `operator`
|
||||||
FOR EACH ROW
|
FOR EACH ROW
|
||||||
|
@ -8024,31 +7978,10 @@ DELIMITER ;;
|
||||||
BEFORE INSERT ON `roadmap`
|
BEFORE INSERT ON `roadmap`
|
||||||
FOR EACH ROW
|
FOR EACH ROW
|
||||||
BEGIN
|
BEGIN
|
||||||
SET NEW.editorFk = account.myUser_getId();
|
|
||||||
|
|
||||||
IF NEW.name IS NOT NULL THEN
|
|
||||||
SET NEW.name = UCASE(NEW.name);
|
|
||||||
END IF;
|
|
||||||
|
|
||||||
IF NEW.trailerPlate IS NOT NULL OR NEW.tugPlate IS NOT NULL THEN
|
|
||||||
SET NEW.m3 = (SELECT SUM(m3) FROM vehicle WHERE numberPlate IN (NEW.trailerPlate, NEW.tugPlate));
|
|
||||||
END IF;
|
|
||||||
|
|
||||||
IF NEW.driver1Fk IS NOT NULL THEN
|
IF NEW.driver1Fk IS NOT NULL THEN
|
||||||
SET NEW.driverName = (SELECT CONCAT(w.firstName, ' ', w.lastName)
|
SET NEW.driverName = (SELECT firstName FROM worker WHERE id = NEW.driver1Fk);
|
||||||
FROM worker w
|
ELSE
|
||||||
WHERE w.id = NEW.driver1Fk);
|
SET NEW.driverName = NULL;
|
||||||
|
|
||||||
SET NEW.phone = (SELECT COALESCE(w.phone, c.mobile, c.phone, c.mobile)
|
|
||||||
FROM worker w
|
|
||||||
LEFT JOIN client c ON c.id = w.id
|
|
||||||
WHERE w.id = NEW.driver1Fk);
|
|
||||||
END IF;
|
|
||||||
|
|
||||||
IF NEW.driverChangeFk IS NOT NULL THEN
|
|
||||||
SET NEW.driverChangeName = (SELECT CONCAT(w.firstName, ' ', w.lastName)
|
|
||||||
FROM worker w
|
|
||||||
WHERE w.id = NEW.driverChangeFk);
|
|
||||||
END IF;
|
END IF;
|
||||||
END */;;
|
END */;;
|
||||||
DELIMITER ;
|
DELIMITER ;
|
||||||
|
@ -8069,51 +8002,10 @@ DELIMITER ;;
|
||||||
BEFORE UPDATE ON `roadmap`
|
BEFORE UPDATE ON `roadmap`
|
||||||
FOR EACH ROW
|
FOR EACH ROW
|
||||||
BEGIN
|
BEGIN
|
||||||
DECLARE vSeconds INT;
|
IF NEW.driver1Fk IS NOT NULL THEN
|
||||||
|
SET NEW.driverName = (SELECT firstName FROM worker WHERE id = NEW.driver1Fk);
|
||||||
SET NEW.editorFk = account.myUser_getId();
|
ELSE
|
||||||
|
SET NEW.driverName = NULL;
|
||||||
IF NOT (NEW.name <=> OLD.name) THEN
|
|
||||||
SET NEW.name = UCASE(NEW.name);
|
|
||||||
END IF;
|
|
||||||
|
|
||||||
IF NOT (NEW.trailerPlate <=> OLD.trailerPlate) OR NOT (NEW.tugPlate <=> OLD.tugPlate) THEN
|
|
||||||
SET NEW.m3 = (SELECT SUM(m3) FROM vehicle WHERE numberPlate IN (NEW.trailerPlate, NEW.tugPlate));
|
|
||||||
END IF;
|
|
||||||
|
|
||||||
IF NOT (NEW.driverName <=> OLD.driverName) THEN
|
|
||||||
SET NEW.driver1Fk = NULL;
|
|
||||||
END IF;
|
|
||||||
|
|
||||||
IF NOT (NEW.driver1Fk <=> OLD.driver1Fk) AND NEW.driver1Fk IS NOT NULL THEN
|
|
||||||
SET NEW.driverName = (SELECT CONCAT(w.firstName, ' ', w.lastName)
|
|
||||||
FROM worker w
|
|
||||||
WHERE w.id = NEW.driver1Fk);
|
|
||||||
|
|
||||||
SET NEW.phone = (SELECT COALESCE(w.phone, c.mobile, c.phone, c.mobile)
|
|
||||||
FROM worker w
|
|
||||||
LEFT JOIN client c ON c.id = w.id
|
|
||||||
WHERE w.id = NEW.driver1Fk);
|
|
||||||
END IF;
|
|
||||||
|
|
||||||
IF NOT (NEW.driverChangeName <=> OLD.driverChangeName) THEN
|
|
||||||
SET NEW.driverChangeFk = NULL;
|
|
||||||
END IF;
|
|
||||||
|
|
||||||
IF NOT (NEW.driverChangeFk <=> OLD.driverChangeFk) AND NEW.driverChangeFk IS NOT NULL THEN
|
|
||||||
SET NEW.driverChangeName = (SELECT CONCAT(w.firstName, ' ', w.lastName)
|
|
||||||
FROM worker w
|
|
||||||
WHERE w.id = NEW.driverChangeFk);
|
|
||||||
END IF;
|
|
||||||
|
|
||||||
IF NOT (NEW.etd <=> OLD.etd) THEN
|
|
||||||
SET vSeconds = TIME_TO_SEC(TIMEDIFF(NEW.etd, OLD.etd));
|
|
||||||
|
|
||||||
IF vSeconds <> 0 THEN
|
|
||||||
UPDATE roadmapStop
|
|
||||||
SET eta = eta + INTERVAL vSeconds SECOND
|
|
||||||
WHERE roadmapFk = NEW.id;
|
|
||||||
END IF;
|
|
||||||
END IF;
|
END IF;
|
||||||
END */;;
|
END */;;
|
||||||
DELIMITER ;
|
DELIMITER ;
|
||||||
|
@ -8134,17 +8026,9 @@ DELIMITER ;;
|
||||||
BEFORE INSERT ON `roadmapStop`
|
BEFORE INSERT ON `roadmapStop`
|
||||||
FOR EACH ROW
|
FOR EACH ROW
|
||||||
BEGIN
|
BEGIN
|
||||||
SET NEW.editorFk = account.myUser_getId();
|
|
||||||
|
|
||||||
IF NEW.description IS NOT NULL THEN
|
|
||||||
SET NEW.description = UCASE(NEW.description);
|
SET NEW.description = UCASE(NEW.description);
|
||||||
END IF;
|
|
||||||
|
|
||||||
IF NEW.roadmapFk IS NOT NULL THEN
|
|
||||||
IF NEW.eta < (SELECT etd FROM roadmap WHERE id = NEW.roadmapFk) THEN
|
|
||||||
CALL util.throw('Departure time can not be after arrival time');
|
|
||||||
END IF;
|
|
||||||
END IF;
|
|
||||||
END */;;
|
END */;;
|
||||||
DELIMITER ;
|
DELIMITER ;
|
||||||
/*!50003 SET sql_mode = @saved_sql_mode */ ;
|
/*!50003 SET sql_mode = @saved_sql_mode */ ;
|
||||||
|
@ -8164,18 +8048,9 @@ DELIMITER ;;
|
||||||
BEFORE UPDATE ON `roadmapStop`
|
BEFORE UPDATE ON `roadmapStop`
|
||||||
FOR EACH ROW
|
FOR EACH ROW
|
||||||
BEGIN
|
BEGIN
|
||||||
SET NEW.editorFk = account.myUser_getId();
|
|
||||||
|
|
||||||
IF NOT (NEW.description <=> OLD.description) THEN
|
|
||||||
SET NEW.description = UCASE(NEW.description);
|
SET NEW.description = UCASE(NEW.description);
|
||||||
END IF;
|
|
||||||
|
|
||||||
IF NOT (NEW.roadmapFk <=> OLD.roadmapFk) OR NOT (NEW.eta <=> OLD.eta) THEN
|
|
||||||
|
|
||||||
IF NEW.eta < (SELECT etd FROM roadmap WHERE id = NEW.roadmapFk) THEN
|
|
||||||
CALL util.throw('Departure time can not be after arrival time');
|
|
||||||
END IF;
|
|
||||||
END IF;
|
|
||||||
END */;;
|
END */;;
|
||||||
DELIMITER ;
|
DELIMITER ;
|
||||||
/*!50003 SET sql_mode = @saved_sql_mode */ ;
|
/*!50003 SET sql_mode = @saved_sql_mode */ ;
|
||||||
|
@ -10702,10 +10577,6 @@ BEGIN
|
||||||
IF NEW.awbFk IS NOT NULL THEN
|
IF NEW.awbFk IS NOT NULL THEN
|
||||||
CALL travel_throwAwb(NEW.id);
|
CALL travel_throwAwb(NEW.id);
|
||||||
END IF;
|
END IF;
|
||||||
|
|
||||||
IF NEW.availabled < NEW.landed THEN
|
|
||||||
CALL util.throw('The travel availabled cannot be earlier than landed');
|
|
||||||
END IF;
|
|
||||||
END */;;
|
END */;;
|
||||||
DELIMITER ;
|
DELIMITER ;
|
||||||
/*!50003 SET sql_mode = @saved_sql_mode */ ;
|
/*!50003 SET sql_mode = @saved_sql_mode */ ;
|
||||||
|
@ -10762,10 +10633,6 @@ BEGIN
|
||||||
IF (NOT(NEW.awbFk <=> OLD.awbFk)) AND NEW.awbFk IS NOT NULL THEN
|
IF (NOT(NEW.awbFk <=> OLD.awbFk)) AND NEW.awbFk IS NOT NULL THEN
|
||||||
CALL travel_throwAwb(NEW.id);
|
CALL travel_throwAwb(NEW.id);
|
||||||
END IF;
|
END IF;
|
||||||
|
|
||||||
IF NEW.availabled < NEW.landed THEN
|
|
||||||
CALL util.throw('The travel availabled cannot be earlier than landed');
|
|
||||||
END IF;
|
|
||||||
END */;;
|
END */;;
|
||||||
DELIMITER ;
|
DELIMITER ;
|
||||||
/*!50003 SET sql_mode = @saved_sql_mode */ ;
|
/*!50003 SET sql_mode = @saved_sql_mode */ ;
|
||||||
|
@ -11659,8 +11526,9 @@ BEGIN
|
||||||
INSERT INTO zoneLog
|
INSERT INTO zoneLog
|
||||||
SET `action` = 'delete',
|
SET `action` = 'delete',
|
||||||
`changedModel` = 'zoneIncluded',
|
`changedModel` = 'zoneIncluded',
|
||||||
`changedModelId` = OLD.id,
|
`changedModelId` = OLD.zoneFk,
|
||||||
`userFk` = account.myUser_getId();
|
`userFk` = account.myUser_getId();
|
||||||
|
|
||||||
END */;;
|
END */;;
|
||||||
DELIMITER ;
|
DELIMITER ;
|
||||||
/*!50003 SET sql_mode = @saved_sql_mode */ ;
|
/*!50003 SET sql_mode = @saved_sql_mode */ ;
|
||||||
|
@ -11743,4 +11611,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 2025-02-18 8:16:03
|
-- Dump completed on 2025-01-28 7:09:01
|
||||||
|
|
|
@ -77,8 +77,8 @@ INSERT INTO `vn`.`agency` (`name`, `warehouseFk`, `isOwn`, `isAnyVolumeAllowed`)
|
||||||
('Otra agencia ', '1', '0', '0');
|
('Otra agencia ', '1', '0', '0');
|
||||||
|
|
||||||
INSERT INTO `vn`.`expedition` (`agencyModeFk`, `ticketFk`, `isBox`, `counter`, `workerFk`, `externalId`, `packagingFk`, `hostFk`, `itemPackingTypeFk`, `hasNewRoute`) VALUES
|
INSERT INTO `vn`.`expedition` (`agencyModeFk`, `ticketFk`, `isBox`, `counter`, `workerFk`, `externalId`, `packagingFk`, `hostFk`, `itemPackingTypeFk`, `hasNewRoute`) VALUES
|
||||||
('1', '1', 1, '1', '1', '1', '1', 'pc1', 'F', 0),
|
('1', '1', 1, '1', '1', '1', '1', 'pc00', 'F', 0),
|
||||||
('1', '1', 1, '2', '1', '1', '1', 'pc1', 'F', 0);
|
('1', '1', 1, '2', '1', '1', '1', 'pc00', 'F', 0);
|
||||||
|
|
||||||
INSERT INTO vn.client (id,name,defaultAddressFk,street,fi,email,dueDay,isTaxDataChecked,accountingAccount,city,provinceFk,postcode,socialName,contact,credit,countryFk,quality,riskCalculated) VALUES
|
INSERT INTO vn.client (id,name,defaultAddressFk,street,fi,email,dueDay,isTaxDataChecked,accountingAccount,city,provinceFk,postcode,socialName,contact,credit,countryFk,quality,riskCalculated) VALUES
|
||||||
(100,'root',110,'Valle de la muerte','74974747G','root@mydomain.com',0,1,'4300000078','ALGEMESI',1,'46680','rootSocial','rootContact',500.0,1,10,'2025-01-01');
|
(100,'root',110,'Valle de la muerte','74974747G','root@mydomain.com',0,1,'4300000078','ALGEMESI',1,'46680','rootSocial','rootContact',500.0,1,10,'2025-01-01');
|
||||||
|
|
|
@ -214,15 +214,15 @@ INSERT INTO `vn`.`worker`(`id`, `code`, `firstName`, `lastName`,`bossFk`, `phone
|
||||||
(1109, 'HLK', 'Bruce' , 'Banner', 19, 432978109),
|
(1109, 'HLK', 'Bruce' , 'Banner', 19, 432978109),
|
||||||
(1110, 'JJJ', 'Jessica' , 'Jones' , 19, 432978110);
|
(1110, 'JJJ', 'Jessica' , 'Jones' , 19, 432978110);
|
||||||
|
|
||||||
INSERT INTO `vn`.`parking` (`id`, `sectorFk`, `code`, `pickingOrder`)
|
INSERT INTO `vn`.`parking` (`id`, `column`, `row`, `sectorFk`, `code`, `pickingOrder`)
|
||||||
VALUES
|
VALUES
|
||||||
('1', 1, '700-01', 70001),
|
('1', 700, '01', 1, '700-01', 70001),
|
||||||
('2', 2, '700-02', 70002),
|
('2', 700, '02', 2, '700-02', 70002),
|
||||||
('3', 1, '100-01', 1),
|
('3', 100, '01', 1, '100-01', 1),
|
||||||
(32397, 1, 'A-47-1', 1165),
|
(32397, 100, '02', 1, 'A-47-1', 1165),
|
||||||
(34831, 1, 'K-26-2', 20220),
|
(34831, 200, '01', 1, 'K-26-2', 20220),
|
||||||
(34965, 2, 'L-08-4', 21800),
|
(34965, 200, '02', 2, 'L-08-4', 21800),
|
||||||
(39096, 2, 'LR-02-3', 99999);
|
(39096, 200, '03', 2, 'LR-02-3', 99999);
|
||||||
|
|
||||||
INSERT INTO `vn`.`shelving` (`code`, `parkingFk`, `isPrinted`, `priority`, `userFk`, `isRecyclable`)
|
INSERT INTO `vn`.`shelving` (`code`, `parkingFk`, `isPrinted`, `priority`, `userFk`, `isRecyclable`)
|
||||||
VALUES
|
VALUES
|
||||||
|
@ -393,20 +393,20 @@ INSERT INTO `vn`.`contactChannel`(`id`, `name`)
|
||||||
(4, 'GCN Channel'),
|
(4, 'GCN Channel'),
|
||||||
(5, 'The Newspaper');
|
(5, 'The Newspaper');
|
||||||
|
|
||||||
INSERT INTO `vn`.`client`(`id`,`name`,`fi`,`socialName`,`contact`,`street`,`city`,`postcode`,`phone`,`mobile`,`isRelevant`,`email`,`iban`,`dueDay`,`accountingAccount`,`isEqualizated`,`provinceFk`,`hasToInvoice`,`credit`,`countryFk`,`isActive`,`quality`,`payMethodFk`,`created`,`isToBeMailed`,`contactChannelFk`,`hasSepaVnl`,`hasCoreVnl`,`hasCoreVnh`,`riskCalculated`, `hasToInvoiceByAddress`,`isTaxDataChecked`,`isFreezed`,`creditInsurance`,`isCreatedAsServed`,`hasInvoiceSimplified`,`salesPersonFk`,`isVies`,`businessTypeFk`,`typeFk`)
|
INSERT INTO `vn`.`client`(`id`,`name`,`fi`,`socialName`,`contact`,`street`,`city`,`postcode`,`phone`,`mobile`,`isRelevant`,`email`,`iban`,`dueDay`,`accountingAccount`,`isEqualizated`,`provinceFk`,`hasToInvoice`,`credit`,`countryFk`,`isActive`,`quality`,`payMethodFk`,`created`,`isToBeMailed`,`contactChannelFk`,`hasSepaVnl`,`hasCoreVnl`,`hasCoreVnh`,`riskCalculated`, `hasToInvoiceByAddress`,`isTaxDataChecked`,`isFreezed`,`creditInsurance`,`isCreatedAsServed`,`hasInvoiceSimplified`,`salesPersonFk`,`viesCode`,`businessTypeFk`,`typeFk`)
|
||||||
VALUES
|
VALUES
|
||||||
(1101, 'Bruce Wayne', '84612325V', 'BATMAN', 'Alfred', '1007 MOUNTAIN DRIVE, GOTHAM', 'Gotham', 46460, 1111111111, 222222222, 1, 'BruceWayne@mydomain.com', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 0, NULL, 0, 0, 18, 0, 'florist','normal'),
|
(1101, 'Bruce Wayne', '84612325V', 'BATMAN', 'Alfred', '1007 MOUNTAIN DRIVE, GOTHAM', 'Gotham', 46460, 1111111111, 222222222, 1, 'BruceWayne@mydomain.com', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 0, NULL, 0, 0, 18, NULL, 'florist','normal'),
|
||||||
(1102, 'Petter Parker', '87945234L', 'SPIDER MAN', 'Aunt May', '20 INGRAM STREET, QUEENS, USA', 'Gotham', 46460, 1111111111, 222222222, 1, 'PetterParker@mydomain.com', NULL, 0, 1234567890, 0, 2, 1, 300, 1, 1, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 0, NULL, 0, 0, 18, 0, 'florist','normal'),
|
(1102, 'Petter Parker', '87945234L', 'SPIDER MAN', 'Aunt May', '20 INGRAM STREET, QUEENS, USA', 'Gotham', 46460, 1111111111, 222222222, 1, 'PetterParker@mydomain.com', NULL, 0, 1234567890, 0, 2, 1, 300, 1, 1, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 0, NULL, 0, 0, 18, NULL, 'florist','normal'),
|
||||||
(1103, 'Clark Kent', '06815934E', 'SUPER MAN', 'lois lane', '344 CLINTON STREET, APARTAMENT 3-D', 'Gotham', 46460, 1111111111, 222222222, 1, 'ClarkKent@mydomain.com', NULL, 0, 1234567890, 0, 3, 1, 0, 19, 1, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 0, NULL, 0, 0, 18, 0, 'florist','normal'),
|
(1103, 'Clark Kent', '06815934E', 'SUPER MAN', 'lois lane', '344 CLINTON STREET, APARTAMENT 3-D', 'Gotham', 46460, 1111111111, 222222222, 1, 'ClarkKent@mydomain.com', NULL, 0, 1234567890, 0, 3, 1, 0, 19, 1, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 0, NULL, 0, 0, 18, NULL, 'florist','normal'),
|
||||||
(1104, 'Tony Stark', '06089160W', 'IRON MAN', 'Pepper Potts', '10880 MALIBU POINT, 90265', 'Gotham', 46460, 1111111111, 222222222, 1, 'TonyStark@mydomain.com', NULL, 0, 1234567890, 0, 2, 1, 300, 1, 1, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 0, NULL, 0, 0, 18, 0, 'florist','normal'),
|
(1104, 'Tony Stark', '06089160W', 'IRON MAN', 'Pepper Potts', '10880 MALIBU POINT, 90265', 'Gotham', 46460, 1111111111, 222222222, 1, 'TonyStark@mydomain.com', NULL, 0, 1234567890, 0, 2, 1, 300, 1, 1, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 0, NULL, 0, 0, 18, NULL, 'florist','normal'),
|
||||||
(1105, 'Max Eisenhardt', '251628698', 'MAGNETO', 'Rogue', 'UNKNOWN WHEREABOUTS', 'Gotham', 46460, 1111111111, 222222222, 1, 'MaxEisenhardt@mydomain.com', NULL, 0, 1234567890, 0, 3, 1, 300, 8, 1, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 1, NULL, 0, 0, 18, 0, 'florist','normal'),
|
(1105, 'Max Eisenhardt', '251628698', 'MAGNETO', 'Rogue', 'UNKNOWN WHEREABOUTS', 'Gotham', 46460, 1111111111, 222222222, 1, 'MaxEisenhardt@mydomain.com', NULL, 0, 1234567890, 0, 3, 1, 300, 8, 1, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 1, NULL, 0, 0, 18, NULL, 'florist','normal'),
|
||||||
(1106, 'DavidCharlesHaller', '53136686Q', 'LEGION', 'Charles Xavier', 'CITY OF NEW YORK, NEW YORK, USA', 'Gotham', 46460, 1111111111, 222222222, 1, 'DavidCharlesHaller@mydomain.com', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 0, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 0, NULL, 0, 0, 19, 0, 'florist','normal'),
|
(1106, 'DavidCharlesHaller', '53136686Q', 'LEGION', 'Charles Xavier', 'CITY OF NEW YORK, NEW YORK, USA', 'Gotham', 46460, 1111111111, 222222222, 1, 'DavidCharlesHaller@mydomain.com', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 0, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 0, NULL, 0, 0, 19, NULL, 'florist','normal'),
|
||||||
(1107, 'Hank Pym', '09854837G', 'ANT MAN', 'Hawk', 'ANTHILL, SAN FRANCISCO, CALIFORNIA', 'Gotham', 46460, 1111111111, 222222222, 1, 'HankPym@mydomain.com', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 0, 0, NULL, 0, 0, 19, 0, 'florist','normal'),
|
(1107, 'Hank Pym', '09854837G', 'ANT MAN', 'Hawk', 'ANTHILL, SAN FRANCISCO, CALIFORNIA', 'Gotham', 46460, 1111111111, 222222222, 1, 'HankPym@mydomain.com', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 0, 0, NULL, 0, 0, 19, NULL, 'florist','normal'),
|
||||||
(1108, 'Charles Xavier', '22641921P', 'PROFESSOR X', 'Beast', '3800 VICTORY PKWY, CINCINNATI, OH 45207, USA', 'Gotham', 46460, 1111111111, 222222222, 1, 'CharlesXavier@mydomain.com', NULL, 0, 1234567890, 0, 5, 1, 300, 13, 1, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 1, NULL, 0, 0, 19, 0, 'florist','normal'),
|
(1108, 'Charles Xavier', '22641921P', 'PROFESSOR X', 'Beast', '3800 VICTORY PKWY, CINCINNATI, OH 45207, USA', 'Gotham', 46460, 1111111111, 222222222, 1, 'CharlesXavier@mydomain.com', NULL, 0, 1234567890, 0, 5, 1, 300, 13, 1, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 1, NULL, 0, 0, 19, NULL, 'florist','normal'),
|
||||||
(1109, 'Bruce Banner', '16104829E', 'HULK', 'Black widow', 'SOMEWHERE IN NEW YORK', 'Gotham', 46460, 1111111111, 222222222, 1, 'BruceBanner@mydomain.com', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 0, 0, NULL, 0, 0, 9, 0, 'florist','normal'),
|
(1109, 'Bruce Banner', '16104829E', 'HULK', 'Black widow', 'SOMEWHERE IN NEW YORK', 'Gotham', 46460, 1111111111, 222222222, 1, 'BruceBanner@mydomain.com', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 0, 0, NULL, 0, 0, 9, NULL, 'florist','normal'),
|
||||||
(1110, 'Jessica Jones', '58282869H', 'JESSICA JONES', 'Luke Cage', 'NYCC 2015 POSTER', 'Gotham', 46460, 1111111111, 222222222, 1, 'JessicaJones@mydomain.com', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 0, NULL, 0, 0, NULL, 1, 'florist','normal'),
|
(1110, 'Jessica Jones', '58282869H', 'JESSICA JONES', 'Luke Cage', 'NYCC 2015 POSTER', 'Gotham', 46460, 1111111111, 222222222, 1, 'JessicaJones@mydomain.com', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 0, NULL, 0, 0, NULL, 'ES', 'florist','normal'),
|
||||||
(1111, 'Missing', NULL, 'MISSING MAN', 'Anton', 'THE SPACE, UNIVERSE FAR AWAY', 'Gotham', 46460, 1111111111, 222222222, 0, NULL, NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 0, 1, 0, NULL, 1, 0, NULL, 0, 'others','loses'),
|
(1111, 'Missing', NULL, 'MISSING MAN', 'Anton', 'THE SPACE, UNIVERSE FAR AWAY', 'Gotham', 46460, 1111111111, 222222222, 1, NULL, NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 0, 1, 0, NULL, 1, 0, NULL, NULL, 'others','loses'),
|
||||||
(1112, 'Trash', NULL, 'GARBAGE MAN', 'Unknown name', 'NEW YORK CITY, UNDERGROUND', 'Gotham', 46460, 1111111111, 222222222, 0, NULL, NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 0, 1, 0, NULL, 1, 0, NULL, 0, 'others','loses');
|
(1112, 'Trash', NULL, 'GARBAGE MAN', 'Unknown name', 'NEW YORK CITY, UNDERGROUND', 'Gotham', 46460, 1111111111, 222222222, 1, NULL, NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 0, 1, 0, NULL, 1, 0, NULL, NULL, 'others','loses');
|
||||||
|
|
||||||
INSERT INTO `vn`.`client`(`id`, `name`, `fi`, `socialName`, `contact`, `street`, `city`, `postcode`, `isRelevant`, `email`, `iban`,`dueDay`,`accountingAccount`, `isEqualizated`, `provinceFk`, `hasToInvoice`, `credit`, `countryFk`, `isActive`, `quality`, `payMethodFk`,`created`, `isTaxDataChecked`)
|
INSERT INTO `vn`.`client`(`id`, `name`, `fi`, `socialName`, `contact`, `street`, `city`, `postcode`, `isRelevant`, `email`, `iban`,`dueDay`,`accountingAccount`, `isEqualizated`, `provinceFk`, `hasToInvoice`, `credit`, `countryFk`, `isActive`, `quality`, `payMethodFk`,`created`, `isTaxDataChecked`)
|
||||||
SELECT id, name, CONCAT(RPAD(CONCAT(id,9),8,id),'A'), UPPER(CONCAT(name, 'Social')), CONCAT(name, 'Contact'), UPPER(CONCAT(name, 'Street')), 'GOTHAM', 46460, 0, CONCAT(name,'@mydomain.com'), NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, 10, 5, util.VN_CURDATE(), 1
|
SELECT id, name, CONCAT(RPAD(CONCAT(id,9),8,id),'A'), UPPER(CONCAT(name, 'Social')), CONCAT(name, 'Contact'), UPPER(CONCAT(name, 'Street')), 'GOTHAM', 46460, 0, CONCAT(name,'@mydomain.com'), NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, 10, 5, util.VN_CURDATE(), 1
|
||||||
|
@ -499,7 +499,7 @@ DROP TEMPORARY TABLE IF EXISTS tmp.address;
|
||||||
CREATE TEMPORARY TABLE tmp.address
|
CREATE TEMPORARY TABLE tmp.address
|
||||||
SELECT * FROM `vn`.`address`;
|
SELECT * FROM `vn`.`address`;
|
||||||
|
|
||||||
UPDATE `vn`.`client` `c`
|
UPDATE `vn`.`client` `c`
|
||||||
JOIN `tmp`.`address` `a` ON `a`.`clientFk` = `c`.`id`
|
JOIN `tmp`.`address` `a` ON `a`.`clientFk` = `c`.`id`
|
||||||
SET `c`.`defaultAddressFk` = `a`.`id`
|
SET `c`.`defaultAddressFk` = `a`.`id`
|
||||||
WHERE `defaultAddressFk` IS NULL;
|
WHERE `defaultAddressFk` IS NULL;
|
||||||
|
@ -587,16 +587,16 @@ INSERT INTO `vn`.`supplierActivity`(`code`, `name`)
|
||||||
('flowerPlants', 'Wholesale of flowers and plants'),
|
('flowerPlants', 'Wholesale of flowers and plants'),
|
||||||
('vegetablesFruits', 'Fruit and vegetable trade');
|
('vegetablesFruits', 'Fruit and vegetable trade');
|
||||||
|
|
||||||
INSERT INTO `vn`.`supplier`(`id`, `name`, `nickname`,`account`,`countryFk`,`nif`, `commission`, `created`, `isActive`, `street`, `city`, `provinceFk`, `postCode`, `payMethodFk`, `payDemFk`, `payDay`, `taxTypeSageFk`, `withholdingSageFk`, `transactionTypeSageFk`, `workerFk`, `supplierActivityFk`, `isPayMethodChecked`, `healthRegister`)
|
INSERT INTO `vn`.`supplier`(`id`, `name`, `nickname`,`account`,`countryFk`,`nif`, `commission`, `created`, `isActive`, `street`, `city`, `provinceFk`, `postCode`, `payMethodFk`, `payDemFk`, `payDay`, `taxTypeSageFk`, `withholdingSageFk`, `transactionTypeSageFk`, `workerFk`, `supplierActivityFk`, `isPayMethodChecked`, `healthRegister`, `viesCode`)
|
||||||
VALUES
|
VALUES
|
||||||
(1, 'PLANTS SL', 'Plants nick', 4100000001, 1, '06089160W', 0, util.VN_CURDATE(), 1, 'supplier address 1', 'GOTHAM', 1, 46000, 1, 1, 15, 4, 1, 1, 18, 'flowerPlants', 1, '400664487V'),
|
(1, 'PLANTS SL', 'Plants nick', 4100000001, 1, '06089160W', 0, util.VN_CURDATE(), 1, 'supplier address 1', 'GOTHAM', 1, 46000, 1, 1, 15, 4, 1, 1, 18, 'flowerPlants', 1, '400664487V','ES'),
|
||||||
(2, 'FARMER KING', 'The farmer', 4000020002, 1, '87945234L', 0, util.VN_CURDATE(), 1, 'supplier address 2', 'GOTHAM', 2, 46000, 1, 2, 10, 93, 2, 8, 18, 'animals', 1, '400664487V'),
|
(2, 'FARMER KING', 'The farmer', 4000020002, 1, '87945234L', 0, util.VN_CURDATE(), 1, 'supplier address 2', 'GOTHAM', 2, 46000, 1, 2, 10, 93, 2, 8, 18, 'animals', 1, '400664487V',NULL),
|
||||||
(4, 'INVENTARIO', 'INVENTARIO', 4000000004, NULL, NULL, 0, util.VN_CURDATE(), 1, NULL, NULL, NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL, NULL),
|
(4, 'INVENTARIO', 'INVENTARIO', 4000000004, NULL, NULL, 0, util.VN_CURDATE(), 1, NULL, NULL, NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL, NULL,NULL),
|
||||||
(69, 'PACKAGING', 'Packaging nick', 4100000069, 1, '94935005K', 0, util.VN_CURDATE(), 1, 'supplier address 5', 'ASGARD', 3, 46600, 1, 1, 15, 4, 1, 1, 18, 'flowerPlants', 1, '400664487V'),
|
(69, 'PACKAGING', 'Packaging nick', 4100000069, 1, '94935005K', 0, util.VN_CURDATE(), 1, 'supplier address 5', 'ASGARD', 3, 46600, 1, 1, 15, 4, 1, 1, 18, 'flowerPlants', 1, '400664487V', NULL),
|
||||||
(442, 'VERDNATURA LEVANTE SL', 'Verdnatura', 5115000442, 1, '06815934E', 0, util.VN_CURDATE(), 1, 'supplier address 3', 'GOTHAM', 1, 46000, 1, 2, 15, 6, 9, 3, 18, 'complements', 1, '400664487V'),
|
(442, 'VERDNATURA LEVANTE SL', 'Verdnatura', 5115000442, 1, '06815934E', 0, util.VN_CURDATE(), 1, 'supplier address 3', 'GOTHAM', 1, 46000, 1, 2, 15, 6, 9, 3, 18, 'complements', 1, '400664487V', NULL),
|
||||||
(567, 'HOLLAND', 'Holland nick', 4000020567, 1, '14364089Z', 0, util.VN_CURDATE(), 1, 'supplier address 6', 'ASGARD', 3, 46600, 1, 2, 10, 93, 2, 8, 18, 'animals', 1, '400664487V'),
|
(567, 'HOLLAND', 'Holland nick', 4000020567, 1, '14364089Z', 0, util.VN_CURDATE(), 1, 'supplier address 6', 'ASGARD', 3, 46600, 1, 2, 10, 93, 2, 8, 18, 'animals', 1, '400664487V', NULL),
|
||||||
(791, 'BROS SL', 'Bros nick', 5115000791, 1, '37718083S', 0, util.VN_CURDATE(), 1, 'supplier address 7', 'ASGARD', 3, 46600, 1, 2, 15, 6, 9, 3, 18, 'complements', 1, '400664487V'),
|
(791, 'BROS SL', 'Bros nick', 5115000791, 1, '37718083S', 0, util.VN_CURDATE(), 1, 'supplier address 7', 'ASGARD', 3, 46600, 1, 2, 15, 6, 9, 3, 18, 'complements', 1, '400664487V', NULL),
|
||||||
(1381, 'ORNAMENTALES', 'Ornamentales', 7185001381, 1, '07972486L', 0, util.VN_CURDATE(), 1, 'supplier address 4', 'GOTHAM', 1, 46000, 1, 2, 15, 6, 9, 3, 18, 'complements', 1, '400664487V');
|
(1381, 'ORNAMENTALES', 'Ornamentales', 7185001381, 1, '07972486L', 0, util.VN_CURDATE(), 1, 'supplier address 4', 'GOTHAM', 1, 46000, 1, 2, 15, 6, 9, 3, 18, 'complements', 1, '400664487V', NULL);
|
||||||
|
|
||||||
INSERT INTO `vn`.`supplierAddress`(`id`, `supplierFk`, `nickname`, `street`, `provinceFk`, `postalCode`, `city`, `phone`, `mobile`)
|
INSERT INTO `vn`.`supplierAddress`(`id`, `supplierFk`, `nickname`, `street`, `provinceFk`, `postalCode`, `city`, `phone`, `mobile`)
|
||||||
VALUES
|
VALUES
|
||||||
|
@ -798,8 +798,7 @@ INSERT INTO `vn`.`ticket`(`id`, `priority`, `agencyModeFk`,`warehouseFk`,`routeF
|
||||||
(34, 1, 1, 1, 3, util.VN_CURDATE(), util.VN_CURDATE(), 1103, 'BEJAR', 123, NULL, 0, 1, 16, 0, util.VN_CURDATE(), NULL, NULL, NULL, NULL),
|
(34, 1, 1, 1, 3, util.VN_CURDATE(), util.VN_CURDATE(), 1103, 'BEJAR', 123, NULL, 0, 1, 16, 0, util.VN_CURDATE(), NULL, NULL, NULL, NULL),
|
||||||
(35, 1, 1, 1, 3, util.VN_CURDATE(), util.VN_CURDATE(), 1102, 'Somewhere in Philippines', 123, NULL, 0, 1, 16, 0, util.VN_CURDATE(), NULL, NULL, NULL, NULL),
|
(35, 1, 1, 1, 3, util.VN_CURDATE(), util.VN_CURDATE(), 1102, 'Somewhere in Philippines', 123, NULL, 0, 1, 16, 0, util.VN_CURDATE(), NULL, NULL, NULL, NULL),
|
||||||
(36, 1, 1, 1, 3, util.VN_CURDATE(), util.VN_CURDATE(), 1102, 'Ant-Man Adventure', 123, NULL, 0, 1, 16, 0, util.VN_CURDATE(), NULL, NULL, NULL, NULL),
|
(36, 1, 1, 1, 3, util.VN_CURDATE(), util.VN_CURDATE(), 1102, 'Ant-Man Adventure', 123, NULL, 0, 1, 16, 0, util.VN_CURDATE(), NULL, NULL, NULL, NULL),
|
||||||
(37, 1, 1, 1, 3, util.VN_CURDATE(), util.VN_CURDATE(), 1110, 'Deadpool swords', 123, NULL, 0, 1, 16, 0, util.VN_CURDATE(), NULL, NULL, NULL, NULL),
|
(37, 1, 1, 1, 3, util.VN_CURDATE(), util.VN_CURDATE(), 1110, 'Deadpool swords', 123, NULL, 0, 1, 16, 0, util.VN_CURDATE(), NULL, NULL, NULL, NULL);
|
||||||
(1000000, NULL, 1, 1, NULL, util.VN_CURDATE(), util.VN_CURDATE(), 1, 'employee', 121, NULL, 0, 1, 1.00, 0.00, CURDATE(), NULL, NULL, '', NULL);
|
|
||||||
|
|
||||||
INSERT INTO `vn`.`ticketObservation`(`id`, `ticketFk`, `observationTypeFk`, `description`)
|
INSERT INTO `vn`.`ticketObservation`(`id`, `ticketFk`, `observationTypeFk`, `description`)
|
||||||
VALUES
|
VALUES
|
||||||
|
@ -924,18 +923,17 @@ INSERT INTO `vn`.`itemType`(`id`, `code`, `name`, `categoryFk`, `life`, `workerF
|
||||||
(5, 'CON', 'Container', 3, NULL, 35, 1, 'warm', 0),
|
(5, 'CON', 'Container', 3, NULL, 35, 1, 'warm', 0),
|
||||||
(6, 'ALS', 'Alstroemeria', 1, 31, 16, 0, 'warm', 1);
|
(6, 'ALS', 'Alstroemeria', 1, 31, 16, 0, 'warm', 1);
|
||||||
|
|
||||||
INSERT INTO `vn`.`ink`(`id`, `name`, `picture`, `showOrder`, `hex`, `hexJson`)
|
INSERT INTO `vn`.`ink`(`id`, `name`, `picture`, `showOrder`, `hex`)
|
||||||
VALUES
|
VALUES
|
||||||
('YEL', 'Yellow', 1, 1, 'F4D03F', '{"value": ["F4D03F"]}'),
|
('YEL', 'Yellow', 1, 1, 'F4D03F'),
|
||||||
('BLU', 'Blue', 1, 2, '5DADE2', '{"value": ["5DADE2"]}'),
|
('BLU', 'Blue', 1, 2, '5DADE2'),
|
||||||
('RED', 'Red', 1, 3, 'EC7063', '{"value": ["EC7063"]}'),
|
('RED', 'Red', 1, 3, 'EC7063'),
|
||||||
('SLV', 'Silver', 1, 4, 'CACFD2', '{"value": ["CACFD2"]}'),
|
('SLV', 'Silver', 1, 4, 'CACFD2'),
|
||||||
('BRW', 'Brown', 1, 5, 'DC7633', '{"value": ["DC7633"]}'),
|
('BRW', 'Brown', 1, 5, 'DC7633'),
|
||||||
('BLK', 'Black', 1, 6, '000000', '{"value": ["000000"]}'),
|
('BLK', 'Black', 1, 6, '000000'),
|
||||||
('BAS', 'Blue/Silver', 1, 7, '5DADE2', '{"value": ["5DADE2"]}'),
|
('BAS', 'Blue/Silver', 1, 7, '5DADE2'),
|
||||||
('GRN', 'Green', 1, 8, '28A745', '{"value": ["28A745"]}'),
|
('GRN', 'Green', 1, 8, '28A745'),
|
||||||
('WHT', 'White', 1, 9, 'FFFFFF', '{"value": ["FFFFFF"]}'),
|
('WHT', 'White', 1, 9, 'FFFFFF');
|
||||||
('RGB', 'Red/Green/Blue', 1, 9, 'FFFFFF', '{"value": ["EC7063","5DADE2","28A745"]}');
|
|
||||||
|
|
||||||
INSERT INTO `vn`.`origin`(`id`,`code`, `name`)
|
INSERT INTO `vn`.`origin`(`id`,`code`, `name`)
|
||||||
VALUES
|
VALUES
|
||||||
|
@ -985,28 +983,26 @@ INSERT INTO `vn`.`itemFamily`(`code`, `description`)
|
||||||
INSERT INTO `vn`.`item`(
|
INSERT INTO `vn`.`item`(
|
||||||
`id`, `typeFk`, `stems`, `originFk`, `description`, `producerFk`, `intrastatFk`, `expenseFk`,
|
`id`, `typeFk`, `stems`, `originFk`, `description`, `producerFk`, `intrastatFk`, `expenseFk`,
|
||||||
`comment`, `relevancy`, `image`, `subName`, `minPrice`, `family`, `isFloramondo`, `genericFk`,
|
`comment`, `relevancy`, `image`, `subName`, `minPrice`, `family`, `isFloramondo`, `genericFk`,
|
||||||
`itemPackingTypeFk`, `hasMinPrice`, `packingOut`, `weightByPiece`, `isCustomInspectionRequired`
|
`itemPackingTypeFk`, `hasMinPrice`, `weightByPiece`, `isCustomInspectionRequired`
|
||||||
)
|
)
|
||||||
VALUES
|
VALUES
|
||||||
(1, 2, 1, 1, NULL, 1, 06021010, 2000000000, NULL, 0, '1', NULL, 0, 'EMB', 0, NULL, 'V', 0, NULL, 3, 1),
|
(1, 2, 1, 1, NULL, 1, 06021010, 2000000000, NULL, 0, '1', NULL, 0, 'EMB', 0, NULL, 'V', 0, 3, 1),
|
||||||
(2, 2, 1, 2, NULL, 1, 06021010, 2000000000, NULL, 0, '2', NULL, 0, 'VT', 0, NULL, 'H', 0, NULL, 2, 1),
|
(2, 2, 1, 2, NULL, 1, 06021010, 2000000000, NULL, 0, '2', NULL, 0, 'VT', 0, NULL, 'H', 0, 2, 1),
|
||||||
(3, 1, 1, 3, NULL, 1, 05080000, 4751000000, NULL, 0, '3', NULL, 0, 'VT', 0, NULL, NULL, 0, NULL, 5, 0),
|
(3, 1, 1, 3, NULL, 1, 05080000, 4751000000, NULL, 0, '3', NULL, 0, 'VT', 0, NULL, NULL, 0, 5, 0),
|
||||||
(4, 1, 1, 1, 'Increases block', 1, 05080000, 4751000000, NULL, 0, '4', NULL, 0, 'VT', 0, NULL, NULL, 0, NULL, NULL, 0),
|
(4, 1, 1, 1, 'Increases block', 1, 05080000, 4751000000, NULL, 0, '4', NULL, 0, 'VT', 0, NULL, NULL, 0, NULL, 0),
|
||||||
(5, 3, 1, 2, NULL, 2, 06021010, 4751000000, NULL, 0, '5', NULL, 0, 'VT', 0, NULL, NULL, 0, NULL, NULL, 0),
|
(5, 3, 1, 2, NULL, 2, 06021010, 4751000000, NULL, 0, '5', NULL, 0, 'VT', 0, NULL, NULL, 0, NULL, 0),
|
||||||
(6, 5, 1, 2, NULL, NULL, 06021010, 4751000000, NULL, 0, '6', NULL, 0, 'VT', 0, NULL, NULL, 0, NULL, NULL, 0),
|
(6, 5, 1, 2, NULL, NULL, 06021010, 4751000000, NULL, 0, '6', NULL, 0, 'VT', 0, NULL, NULL, 0, NULL, 0),
|
||||||
(7, 5, 1, 2, NULL, NULL, 06021010, 4751000000, NULL, 0, '7', NULL, 0, 'VT', 0, NULL, NULL, 0, NULL, NULL, 0),
|
(7, 5, 1, 2, NULL, NULL, 06021010, 4751000000, NULL, 0, '7', NULL, 0, 'VT', 0, NULL, NULL, 0, NULL, 0),
|
||||||
(8, 2, 1, 1, NULL, 1, 06021010, 2000000000, NULL, 0, '8', NULL, 0, 'VT', 0, NULL, NULL, 0, NULL, NULL, 0),
|
(8, 2, 1, 1, NULL, 1, 06021010, 2000000000, NULL, 0, '8', NULL, 0, 'VT', 0, NULL, NULL, 0, NULL, 0),
|
||||||
(9, 2, 1, 2, NULL, 1, 06021010, 2000000000, NULL, 0, '9', NULL, 0, 'VT', 1, NULL, NULL, 0, NULL, NULL, 0),
|
(9, 2, 1, 2, NULL, 1, 06021010, 2000000000, NULL, 0, '9', NULL, 0, 'VT', 1, NULL, NULL, 0, NULL, 0),
|
||||||
(10, 1, 1, 3, NULL, 1, 05080000, 4751000000, NULL, 0, '10', NULL, 0, 'VT', 0, NULL, NULL, 0, NULL, NULL, 0),
|
(10, 1, 1, 3, NULL, 1, 05080000, 4751000000, NULL, 0, '10', NULL, 0, 'VT', 0, NULL, NULL, 0, NULL, 0),
|
||||||
(11, 1, 1, 1, NULL, 1, 05080000, 4751000000, NULL, 0, '11', NULL, 0, 'VT', 0, NULL, NULL, 0, NULL, NULL, 0),
|
(11, 1, 1, 1, NULL, 1, 05080000, 4751000000, NULL, 0, '11', NULL, 0, 'VT', 0, NULL, NULL, 0, NULL, 0),
|
||||||
(12, 3, 1, 2, NULL, 2, 06021010, 4751000000, NULL, 0, '12', NULL, 0, 'VT', 0, NULL, NULL, 0, NULL, NULL, 0),
|
(12, 3, 1, 2, NULL, 2, 06021010, 4751000000, NULL, 0, '12', NULL, 0, 'VT', 0, NULL, NULL, 0, NULL, 0),
|
||||||
(13, 5, 1, 2, NULL, NULL, 06021010, 4751000000, NULL, 0, '13', NULL, 1, 'VT', 1, NULL, NULL, 1, NULL, NULL, 0),
|
(13, 5, 1, 2, NULL, NULL, 06021010, 4751000000, NULL, 0, '13', NULL, 1, 'VT', 1, NULL, NULL, 1, NULL, 0),
|
||||||
(14, 5, 1, 2, NULL, NULL, 06021010, 4751000000, NULL, 0, '', NULL, 0, 'VT', 1, NULL, NULL, 0, NULL, NULL, 0),
|
(14, 5, 1, 2, NULL, NULL, 06021010, 4751000000, NULL, 0, '', NULL, 0, 'VT', 1, NULL, NULL, 0, NULL, 0),
|
||||||
(15, 4, NULL, 1, NULL, NULL, 06021010, 4751000000, NULL, 0, '', NULL, 0, 'EMB', 0, NULL, NULL, 0, NULL, NULL, 0),
|
(15, 4, NULL, 1, NULL, NULL, 06021010, 4751000000, NULL, 0, '', NULL, 0, 'EMB', 0, NULL, NULL, 0, NULL, 0),
|
||||||
(16, 6, NULL, 1, NULL, NULL, 06021010, 4751000000, NULL, 0, '', NULL, 0, 'EMB', 0, NULL, NULL, 0, NULL, NULL, 0),
|
(16, 6, NULL, 1, NULL, NULL, 06021010, 4751000000, NULL, 0, '', NULL, 0, 'EMB', 0, NULL, NULL, 0, NULL, 0),
|
||||||
(71, 6, NULL, 1, NULL, NULL, 06021010, 4751000000, NULL, 0, '', NULL, 0, 'VT', 0, NULL, NULL, 0, NULL, NULL, 0),
|
(71, 6, NULL, 1, NULL, NULL, 06021010, 4751000000, NULL, 0, '', NULL, 0, 'VT', 0, NULL, NULL, 0, NULL, 0);
|
||||||
(72, 6, NULL, 1, NULL, NULL, 06021010, 4751000000, NULL, 0, NULL, NULL, 1, 'VT', 0, NULL, NULL, 1, 1, NULL, 0),
|
|
||||||
(88, 1, 1, 2, NULL, NULL, 06021010, 4751000000, NULL, 0, NULL, NULL,10, 'VT', 0, NULL, NULL, 1, NULL, NULL, 0);
|
|
||||||
|
|
||||||
|
|
||||||
-- Update the taxClass after insert of the items
|
-- Update the taxClass after insert of the items
|
||||||
|
@ -1129,8 +1125,7 @@ INSERT INTO `vn`.`sale`(`id`, `itemFk`, `ticketFk`, `concept`, `quantity`, `pric
|
||||||
(39, 1, 32, 'Ranged weapon longbow 200cm', 2, 103.49, 0, 0, 0, util.VN_CURDATE(), 'hasComponentLack'),
|
(39, 1, 32, 'Ranged weapon longbow 200cm', 2, 103.49, 0, 0, 0, util.VN_CURDATE(), 'hasComponentLack'),
|
||||||
(40, 2, 34, 'Melee weapon combat fist 15cm', 10.00, 3.91, 0, 0, 0, util.VN_CURDATE(), 'hasComponentLack,hasItemLost'),
|
(40, 2, 34, 'Melee weapon combat fist 15cm', 10.00, 3.91, 0, 0, 0, util.VN_CURDATE(), 'hasComponentLack,hasItemLost'),
|
||||||
(41, 2, 35, 'Melee weapon combat fist 15cm', 8.00, 3.01, 0, 0, 0, util.VN_CURDATE(), 'hasComponentLack,hasRounding,hasItemLost'),
|
(41, 2, 35, 'Melee weapon combat fist 15cm', 8.00, 3.01, 0, 0, 0, util.VN_CURDATE(), 'hasComponentLack,hasRounding,hasItemLost'),
|
||||||
(42, 2, 36, 'Melee weapon combat fist 15cm', 6.00, 2.50, 0, 0, 0, util.VN_CURDATE(), 'hasComponentLack,hasRounding,hasItemLost'),
|
(42, 2, 36, 'Melee weapon combat fist 15cm', 6.00, 2.50, 0, 0, 0, util.VN_CURDATE(), 'hasComponentLack,hasRounding,hasItemLost');
|
||||||
(43, 88, 1000000, 'Chest medical box 2', 15.00, 10.00, 0, 0, 0, CURDATE(), '');
|
|
||||||
|
|
||||||
INSERT INTO `vn`.`saleComponent`(`saleFk`, `componentFk`, `value`)
|
INSERT INTO `vn`.`saleComponent`(`saleFk`, `componentFk`, `value`)
|
||||||
VALUES
|
VALUES
|
||||||
|
@ -1462,21 +1457,7 @@ INSERT INTO `vn`.`itemTag`(`id`,`itemFk`,`tagFk`,`value`,`priority`)
|
||||||
(98, 14, 23, '1', 7),
|
(98, 14, 23, '1', 7),
|
||||||
(99, 15, 92, 'Trolley', 2),
|
(99, 15, 92, 'Trolley', 2),
|
||||||
(100, 16, 92, 'Pallet', 2),
|
(100, 16, 92, 'Pallet', 2),
|
||||||
(101, 71, 92, 'Shipping cost', 2),
|
(101, 71, 92, 'Shipping cost', 2);
|
||||||
(102, 88, 56, 'Chest', 1),
|
|
||||||
(103, 88, 58, 'ammo box', 2),
|
|
||||||
(104, 88, 27, '100cm', 3),
|
|
||||||
(105, 88, 36, 'Stark Industries', 4),
|
|
||||||
(106, 88, 1, 'White', 5),
|
|
||||||
(107, 88, 67, 'supply', 6),
|
|
||||||
(108, 88, 23, '13', 7),
|
|
||||||
(109, 72, 56, 'Mistic weapon', 1),
|
|
||||||
(110, 72, 58, 'Stormbreaker', 2),
|
|
||||||
(111, 72, 27, '200cm', 3),
|
|
||||||
(112, 72, 36, 'Stark Industries', 4),
|
|
||||||
(113, 72, 1, 'Red/Green/Blue', 5),
|
|
||||||
(114, 72, 67, '-1 precission', 6),
|
|
||||||
(115, 72, 23, '1', 7);
|
|
||||||
|
|
||||||
INSERT INTO `vn`.`itemTypeTag`(`id`, `itemTypeFk`, `tagFk`, `priority`)
|
INSERT INTO `vn`.`itemTypeTag`(`id`, `itemTypeFk`, `tagFk`, `priority`)
|
||||||
VALUES
|
VALUES
|
||||||
|
@ -1546,8 +1527,7 @@ INSERT INTO `vn`.`travel`(`id`,`shipped`, `landed`, `warehouseInFk`, `warehouseO
|
||||||
(10, DATE_ADD(util.VN_CURDATE(), INTERVAL +5 DAY), DATE_ADD(util.VN_CURDATE(), INTERVAL +5 DAY), 5, 1, 1, 50.00, 500, 'nineth travel', 1, 2, 10, TRUE, 2),
|
(10, DATE_ADD(util.VN_CURDATE(), INTERVAL +5 DAY), DATE_ADD(util.VN_CURDATE(), INTERVAL +5 DAY), 5, 1, 1, 50.00, 500, 'nineth travel', 1, 2, 10, TRUE, 2),
|
||||||
(11, util.VN_CURDATE() - INTERVAL 1 DAY , util.VN_CURDATE(), 6, 3, 0, 50.00, 500, 'eleventh travel', 1, 2, 4, FALSE, NULL),
|
(11, util.VN_CURDATE() - INTERVAL 1 DAY , util.VN_CURDATE(), 6, 3, 0, 50.00, 500, 'eleventh travel', 1, 2, 4, FALSE, NULL),
|
||||||
(12, util.VN_CURDATE() , util.VN_CURDATE() + INTERVAL 1 DAY, 6, 3, 0, 50.00, 500, 'eleventh travel', 1, 2, 4, FALSE, NULL),
|
(12, util.VN_CURDATE() , util.VN_CURDATE() + INTERVAL 1 DAY, 6, 3, 0, 50.00, 500, 'eleventh travel', 1, 2, 4, FALSE, NULL),
|
||||||
(13, util.VN_CURDATE() - INTERVAL 1 MONTH - INTERVAL 1 DAY, util.VN_CURDATE() - INTERVAL 1 MONTH, 6, 3, 0, 50.00, 500, 'eleventh travel', 1, 2, 4, FALSE, NULL),
|
(13, util.VN_CURDATE() - INTERVAL 1 MONTH - INTERVAL 1 DAY, util.VN_CURDATE() - INTERVAL 1 MONTH, 6, 3, 0, 50.00, 500, 'eleventh travel', 1, 2, 4, FALSE, NULL);
|
||||||
(14, util.VN_CURDATE() - INTERVAL 1 DAY , util.VN_CURDATE() + INTERVAL 1 DAY, 6, 3, 0, 50.00, 500, 'eleventh travel', 1, 2, 4, FALSE, NULL);
|
|
||||||
|
|
||||||
INSERT INTO `vn`.`entry`(`id`, `supplierFk`, `created`, `travelFk`, `isConfirmed`, `companyFk`, `invoiceNumber`, `reference`, `isExcludedFromAvailable`, `evaNotes`, `typeFk`)
|
INSERT INTO `vn`.`entry`(`id`, `supplierFk`, `created`, `travelFk`, `isConfirmed`, `companyFk`, `invoiceNumber`, `reference`, `isExcludedFromAvailable`, `evaNotes`, `typeFk`)
|
||||||
VALUES
|
VALUES
|
||||||
|
@ -1563,11 +1543,10 @@ INSERT INTO `vn`.`entry`(`id`, `supplierFk`, `created`, `travelFk`, `isConfirmed
|
||||||
(10, 2, DATE_ADD(util.VN_CURDATE(), INTERVAL +2 DAY), 10, 0, 442, 'IN2010', 'Movement 10',1, '', 'product'),
|
(10, 2, DATE_ADD(util.VN_CURDATE(), INTERVAL +2 DAY), 10, 0, 442, 'IN2010', 'Movement 10',1, '', 'product'),
|
||||||
(11, 4, DATE_ADD(util.VN_CURDATE(), INTERVAL -2 MONTH), 1, 1, 442, 'IN2011', 'Movement 11',0, '', 'product'),
|
(11, 4, DATE_ADD(util.VN_CURDATE(), INTERVAL -2 MONTH), 1, 1, 442, 'IN2011', 'Movement 11',0, '', 'product'),
|
||||||
(12, 4, util.VN_CURDATE() - INTERVAL 1 MONTH, 13, 1, 442, 'IN2012', 'Movement 12',0, '', 'product'),
|
(12, 4, util.VN_CURDATE() - INTERVAL 1 MONTH, 13, 1, 442, 'IN2012', 'Movement 12',0, '', 'product'),
|
||||||
(99, 69, util.VN_CURDATE() - INTERVAL 1 MONTH, 11, 0, 442, 'IN2009', 'Movement 99',0, '', 'product'),
|
(99, 69, util.VN_CURDATE() - INTERVAL 1 MONTH, 11, 0, 442, 'IN2009', 'Movement 99',0, '', 'product');
|
||||||
(100, 1, util.VN_CURDATE() , 14, 0, 442, 'IN2009','Movement 100',0, '', 'product');
|
|
||||||
|
|
||||||
INSERT INTO `vn`.`entryConfig` (`defaultEntry`, `inventorySupplierFk`, `maxLockTime`, `defaultSupplierFk`)
|
INSERT INTO `vn`.`entryConfig` (`defaultEntry`, `inventorySupplierFk`, `defaultSupplierFk`)
|
||||||
VALUES (2, 4, 300, 1);
|
VALUES (2, 4, 1);
|
||||||
|
|
||||||
INSERT INTO `bs`.`waste`(`buyerFk`, `year`, `week`, `itemFk`, `itemTypeFk`, `saleTotal`, `saleWasteQuantity`, `saleExternalWaste`, `saleFaultWaste`, `saleContainerWaste`, `saleBreakWaste`, `saleOtherWaste`)
|
INSERT INTO `bs`.`waste`(`buyerFk`, `year`, `week`, `itemFk`, `itemTypeFk`, `saleTotal`, `saleWasteQuantity`, `saleExternalWaste`, `saleFaultWaste`, `saleContainerWaste`, `saleBreakWaste`, `saleOtherWaste`)
|
||||||
VALUES
|
VALUES
|
||||||
|
@ -1587,35 +1566,26 @@ INSERT INTO `bs`.`waste`(`buyerFk`, `year`, `week`, `itemFk`, `itemTypeFk`, `sal
|
||||||
('103', YEAR(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 WEEK)), WEEK(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 WEEK), 1), 6, 1, '186', '0', '51', '53.12', '56.20', '56.20', '56.20'),
|
('103', YEAR(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 WEEK)), WEEK(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 WEEK), 1), 6, 1, '186', '0', '51', '53.12', '56.20', '56.20', '56.20'),
|
||||||
('103', YEAR(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 WEEK)), WEEK(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 WEEK), 1), 7, 1, '277', '0', '53.12', '56.20', '56.20', '56.20', '56.20');
|
('103', YEAR(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 WEEK)), WEEK(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 WEEK), 1), 7, 1, '277', '0', '53.12', '56.20', '56.20', '56.20', '56.20');
|
||||||
|
|
||||||
INSERT INTO edi.supplier (supplier_id,company_name,entry_date,expiry_date,change_date_time,isAllowedDirectSales,isBanned)
|
INSERT INTO vn.buy(id,entryFk,itemFk,buyingValue,quantity,packagingFk,stickers,freightValue,packageValue,comissionValue,packing,grouping,groupingMode,location,price1,price2,price3,printedStickers,isChecked,isIgnored,weight,created)
|
||||||
VALUES (1,'MV', util.VN_CURDATE(), util.VN_CURDATE(), util.VN_CURDATE(), 1, 0);
|
|
||||||
INSERT INTO edi.ekt (id,`ref`,qty,pro,pri,ok,scanned)
|
|
||||||
VALUES (1, 1234, 1, 1, 1.1, 1, 1);
|
|
||||||
|
|
||||||
INSERT INTO vn.buy(id,entryFk,itemFk,buyingValue,quantity,packagingFk,stickers,freightValue,packageValue,comissionValue,packing,grouping,groupingMode,location,price1,price2,price3,printedStickers,isChecked,isIgnored,ektFk,weight,created)
|
|
||||||
VALUES
|
VALUES
|
||||||
( 1, 1, 1, 50, 5000, 4, 1, 1.500, 1.500, 0.000, 1, 1, 'packing', NULL, 0.00, 99.6, 99.4, 0, 1, 0, NULL, 1, util.VN_CURDATE() - INTERVAL 2 MONTH),
|
(1, 1, 1, 50, 5000, 4, 1, 1.500, 1.500, 0.000, 1, 1, 'packing', NULL, 0.00, 99.6, 99.4, 0, 1, 0, 1, util.VN_CURDATE() - INTERVAL 2 MONTH),
|
||||||
( 2, 2, 1, 50, 100, 4, 1, 1.500, 1.500, 0.000, 1, 1, 'packing', NULL, 0.00, 99.6, 99.4, 0, 1, 0, NULL, 1, util.VN_CURDATE() - INTERVAL 1 MONTH),
|
(2, 2, 1, 50, 100, 4, 1, 1.500, 1.500, 0.000, 1, 1, 'packing', NULL, 0.00, 99.6, 99.4, 0, 1, 0, 1, util.VN_CURDATE() - INTERVAL 1 MONTH),
|
||||||
( 3, 3, 1, 50, 100, 4, 1, 1.500, 1.500, 0.000, 1, 1, NULL, NULL, 0.00, 99.6, 99.4, 0, 1, 0, NULL, 1, util.VN_CURDATE()),
|
(3, 3, 1, 50, 100, 4, 1, 1.500, 1.500, 0.000, 1, 1, NULL, NULL, 0.00, 99.6, 99.4, 0, 1, 0, 1, util.VN_CURDATE()),
|
||||||
( 4, 2, 2, 5, 450, 3, 1, 1.000, 1.000, 0.000, 10, 10, NULL, NULL, 0.00, 7.30, 7.00, 0, 1, 0, NULL, 2.5, util.VN_CURDATE()),
|
(4, 2, 2, 5, 450, 3, 1, 1.000, 1.000, 0.000, 10, 10, NULL, NULL, 0.00, 7.30, 7.00, 0, 1, 0, 2.5, util.VN_CURDATE()),
|
||||||
( 5, 3, 3, 55, 500, 5, 1, 1.000, 1.000, 0.000, 1, 1, NULL, NULL, 0.00, 78.3, 75.6, 0, 1, 0, NULL, 2.5, util.VN_CURDATE()),
|
(5, 3, 3, 55, 500, 5, 1, 1.000, 1.000, 0.000, 1, 1, NULL, NULL, 0.00, 78.3, 75.6, 0, 1, 0, 2.5, util.VN_CURDATE()),
|
||||||
( 6, 4, 8, 50, 1000, 4, 1, 1.000, 1.000, 0.000, 1, 1, 'grouping', NULL, 0.00, 99.6, 99.4, 0, 1, 0, NULL, 2.5, util.VN_CURDATE()),
|
(6, 4, 8, 50, 1000, 4, 1, 1.000, 1.000, 0.000, 1, 1, 'grouping', NULL, 0.00, 99.6, 99.4, 0, 1, 0, 2.5, util.VN_CURDATE()),
|
||||||
( 7, 4, 9, 20, 1000, 3, 1, 0.500, 0.500, 0.000, 10, 10, 'packing', NULL, 0.00, 30.50, 29.00, 0, 1, 0, NULL, 2.5, util.VN_CURDATE()),
|
(7, 4, 9, 20, 1000, 3, 1, 0.500, 0.500, 0.000, 10, 10, 'packing', NULL, 0.00, 30.50, 29.00, 0, 1, 0, 2.5, util.VN_CURDATE()),
|
||||||
( 8, 4, 4, 1.25, 1000, 3, 1, 0.500, 0.500, 0.000, 10, 10, 'grouping', NULL, 0.00, 1.75, 1.67, 0, 1, 0, NULL, 2.5, util.VN_CURDATE()),
|
(8, 4, 4, 1.25, 1000, 3, 1, 0.500, 0.500, 0.000, 10, 10, 'grouping', NULL, 0.00, 1.75, 1.67, 0, 1, 0, 2.5, util.VN_CURDATE()),
|
||||||
( 9, 4, 4, 1.25, 1000, 3, 1, 0.500, 0.500, 0.000, 10, 10, 'grouping', NULL, 0.00, 1.75, 1.67, 0, 1, 0, NULL, 4, util.VN_CURDATE()),
|
(9, 4, 4, 1.25, 1000, 3, 1, 0.500, 0.500, 0.000, 10, 10, 'grouping', NULL, 0.00, 1.75, 1.67, 0, 1, 0, 4, util.VN_CURDATE()),
|
||||||
(10, 5, 1, 50, 10, 4, 1, 2.500, 2.500, 0.000, 1, 1, 'packing', NULL, 0.00, 99.6, 99.4, 0, 1, 0, NULL, 4, util.VN_CURDATE()),
|
(10, 5, 1, 50, 10, 4, 1, 2.500, 2.500, 0.000, 1, 1, 'packing', NULL, 0.00, 99.6, 99.4, 0, 1, 0, 4, util.VN_CURDATE()),
|
||||||
(11, 5, 4, 1.25, 10, 3, 1, 2.500, 2.500, 0.000, 10, 10, 'grouping', NULL, 0.00, 1.75, 1.67, 0, 1, 0, NULL, 4, util.VN_CURDATE()),
|
(11, 5, 4, 1.25, 10, 3, 1, 2.500, 2.500, 0.000, 10, 10, 'grouping', NULL, 0.00, 1.75, 1.67, 0, 1, 0, 4, util.VN_CURDATE()),
|
||||||
(12, 6, 4, 1.25, 0, 3, 1, 2.500, 2.500, 0.000, 10, 10, 'grouping', NULL, 0.00, 1.75, 1.67, 0, 1, 0, NULL, 4, util.VN_CURDATE()),
|
(12, 6, 4, 1.25, 0, 3, 1, 2.500, 2.500, 0.000, 10, 10, 'grouping', NULL, 0.00, 1.75, 1.67, 0, 1, 0, 4, util.VN_CURDATE()),
|
||||||
(13, 7, 1, 50, 0, 3, 1, 2.000, 2.000, 0.000, 1, 1, 'packing', NULL, 0.00, 99.6, 99.4, 0, 1, 0, NULL, 4, util.VN_CURDATE()),
|
(13, 7, 1, 50, 0, 3, 1, 2.000, 2.000, 0.000, 1, 1, 'packing', NULL, 0.00, 99.6, 99.4, 0, 1, 0, 4, util.VN_CURDATE()),
|
||||||
(14, 7, 2, 5, 0, 3, 1, 2.000, 2.000, 0.000, 10, 10, 'grouping', NULL, 0.00, 7.30, 7.00, 0, 1, 0, NULL, 4, util.VN_CURDATE()),
|
(14, 7, 2, 5, 0, 3, 1, 2.000, 2.000, 0.000, 10, 10, 'grouping', NULL, 0.00, 7.30, 7.00, 0, 1, 0, 4, util.VN_CURDATE()),
|
||||||
(15, 7, 4, 1.25, 0, 3, 1, 2.000, 2.000, 0.000, 10, 10, 'grouping', NULL, 0.00, 1.75, 1.67, 0, 1, 0, NULL, 4, util.VN_CURDATE()),
|
(15, 7, 4, 1.25, 0, 3, 1, 2.000, 2.000, 0.000, 10, 10, 'grouping', NULL, 0.00, 1.75, 1.67, 0, 1, 0, 4, util.VN_CURDATE()),
|
||||||
(16, 99, 1, 50.0000, 5000, 4, 1, 1.500, 1.500, 0.000, 1, 1, 'packing', NULL, 0.00, 99.60, 99.40, 0, 1, 0, NULL, 1.00, util.VN_CURDATE()),
|
(16, 99,1,50.0000, 5000, 4, 1, 1.500, 1.500, 0.000, 1, 1, 'packing', NULL, 0.00, 99.60, 99.40, 0, 1, 0, 1.00, '2024-07-30 08:13:51.000'),
|
||||||
(17, 11, 1, 50, 5000, 4, 1, 1.500, 1.500, 0.000, 1, 1, 'packing', NULL, 0.00, 99.6, 99.4, 0, 1, 0, NULL, 1, util.VN_CURDATE() - INTERVAL 2 MONTH),
|
(17, 11, 1, 50, 5000, 4, 1, 1.500, 1.500, 0.000, 1, 1, 'packing', NULL, 0.00, 99.6, 99.4, 0, 1, 0, 1, util.VN_CURDATE() - INTERVAL 2 MONTH),
|
||||||
(18, 12, 1, 50, 5000, 4, 1, 1.500, 1.500, 0.000, 1, 1, 'grouping', NULL, 0.00, 99.6, 99.4, 0, 1, 0, NULL, 1, util.VN_CURDATE() - INTERVAL 2 MONTH),
|
(18, 12, 1, 50, 5000, 4, 1, 1.500, 1.500, 0.000, 1, 1, 'grouping', NULL, 0.00, 99.6, 99.4, 0, 1, 0, 1, util.VN_CURDATE() - INTERVAL 2 MONTH);
|
||||||
(19, 100, 1, 50, 100, 4, 1, 1.500, 1.500, 0.000, 1, 1, 'grouping', NULL, 0.00, 99.6, 99.4, 0, 1, 0, NULL, 1, util.VN_CURDATE()),
|
|
||||||
(20, 100, 2, 5, 450, 3, 2, 1.000, 1.000, 0.000, 10, 10, NULL, NULL, 0.00, 7.30, 7.00, 0, 1, 0, NULL, 2.5, util.VN_CURDATE()),
|
|
||||||
(21, 100,72, 55, 500, 5, 3, 1.000, 1.000, 0.000, 1, 1, 'packing', NULL, 0.00, 78.3, 75.6, 0, 1, 0, 1, 3, util.VN_CURDATE()),
|
|
||||||
(10000002, 12,88, 50.0000, 5000, 4, 1, 1.500, 1.500, 0.000, 1, 1, 'grouping', NULL, 0.00, 99.60, 99.40, 0, 1, 0, 1.00, 1,util.VN_CURDATE() - INTERVAL 2 MONTH);
|
|
||||||
|
|
||||||
INSERT INTO `hedera`.`order`(`id`, `date_send`, `customer_id`, `delivery_method_id`, `agency_id`, `address_id`, `company_id`, `note`, `source_app`, `confirmed`,`total`, `date_make`, `first_row_stamp`, `confirm_date`)
|
INSERT INTO `hedera`.`order`(`id`, `date_send`, `customer_id`, `delivery_method_id`, `agency_id`, `address_id`, `company_id`, `note`, `source_app`, `confirmed`,`total`, `date_make`, `first_row_stamp`, `confirm_date`)
|
||||||
VALUES
|
VALUES
|
||||||
|
@ -1910,10 +1880,10 @@ INSERT INTO `vn`.`workerManaExcluded`(`workerFk`)
|
||||||
VALUES
|
VALUES
|
||||||
(9);
|
(9);
|
||||||
/*
|
/*
|
||||||
el mana de los trabajadores lo podemos poner a mano en la tabla si lo calculamos antes,
|
el mana de los trabajadores lo podemos poner a mano en la tabla si lo calculamos antes,
|
||||||
pero si hazemos alguna modificacion en alguna tabla que utiliza para calcularlo ya no seria correcto
|
pero si hazemos alguna modificacion en alguna tabla que utiliza para calcularlo ya no seria correcto
|
||||||
|
|
||||||
La otra manera es poner el calculo con los 2 trabajadores que utilizamos ahora mismo para los tickets
|
La otra manera es poner el calculo con los 2 trabajadores que utilizamos ahora mismo para los tickets
|
||||||
*/
|
*/
|
||||||
|
|
||||||
call vn.manaSpellersRequery(19);
|
call vn.manaSpellersRequery(19);
|
||||||
|
@ -2785,11 +2755,11 @@ INSERT INTO `vn`.`roadmapAddress` (`addressFk`)
|
||||||
(3),
|
(3),
|
||||||
(4);
|
(4);
|
||||||
|
|
||||||
INSERT INTO `vn`.`roadmap` (`id`, `name`, `tractorPlate`, `trailerPlate`, `phone`, `supplierFk`, `etd`, `observations`, `editorFk`, `price`, `driverName`)
|
INSERT INTO `vn`.`roadmap` (`id`, `name`, `tractorPlate`, `trailerPlate`, `phone`, `supplierFk`, `etd`, `eta`, `observations`, `editorFk`, `price`, `driverName`)
|
||||||
VALUES
|
VALUES
|
||||||
(1, 'val-algemesi', '1234-BCD', '9876-BCD', '111111111', 1, util.VN_NOW(), 'this is test observation', 1, 15, 'Batman'),
|
(1, 'val-algemesi', '1234-BCD', '9876-BCD', '111111111', 1, util.VN_NOW(), DATE_ADD(util.VN_NOW(), INTERVAL 2 DAY), 'this is test observation', 1, 15, 'Batman'),
|
||||||
(2, 'alg-valencia', '2345-CDF', '8765-BCD', '111111111', 1, util.VN_NOW(), 'test observation', 1, 20, 'Robin'),
|
(2, 'alg-valencia', '2345-CDF', '8765-BCD', '111111111', 1, util.VN_NOW(), DATE_ADD(util.VN_NOW(), INTERVAL 5 DAY), 'test observation', 1, 20, 'Robin'),
|
||||||
(3, 'alz-algemesi', '3456-DFG', '7654-BCD', '222222222', 2, DATE_ADD(util.VN_NOW(), INTERVAL 3 DAY), 'observations...', 2, 25, 'Driverman');
|
(3, 'alz-algemesi', '3456-DFG', '7654-BCD', '222222222', 2, DATE_ADD(util.VN_NOW(), INTERVAL 3 DAY), DATE_ADD(util.VN_NOW(), INTERVAL 6 DAY), 'observations...', 2, 25, 'Driverman');
|
||||||
|
|
||||||
INSERT INTO `vn`.`roadmapStop` (`id`, `roadmapFk`, `roadmapAddressFk`, `eta`, `description`, `editorFk`)
|
INSERT INTO `vn`.`roadmapStop` (`id`, `roadmapFk`, `roadmapAddressFk`, `eta`, `description`, `editorFk`)
|
||||||
VALUES
|
VALUES
|
||||||
|
|
|
@ -89,12 +89,12 @@ proc: BEGIN
|
||||||
AND (ir.ended IS NULL OR i.shipped <= ir.ended)
|
AND (ir.ended IS NULL OR i.shipped <= ir.ended)
|
||||||
AND i.warehouseFk = vWarehouse
|
AND i.warehouseFk = vWarehouse
|
||||||
UNION ALL
|
UNION ALL
|
||||||
SELECT i.itemFk, IFNULL(i.availabled, i.landed), i.quantity
|
SELECT i.itemFk, i.landed, i.quantity
|
||||||
FROM vn.itemEntryIn i
|
FROM vn.itemEntryIn i
|
||||||
JOIN itemRange ir ON ir.itemFk = i.itemFk
|
JOIN itemRange ir ON ir.itemFk = i.itemFk
|
||||||
WHERE IFNULL(i.availabled, i.landed) >= vStartDate
|
WHERE i.landed >= vStartDate
|
||||||
AND IFNULL(i.availabled, i.landed) <= vAvailabled
|
AND IFNULL(i.availabled, i.landed) <= vAvailabled
|
||||||
AND (ir.ended IS NULL OR IFNULL(i.availabled, i.landed) <= ir.ended)
|
AND (ir.ended IS NULL OR i.landed <= ir.ended)
|
||||||
AND i.warehouseInFk = vWarehouse
|
AND i.warehouseInFk = vWarehouse
|
||||||
UNION ALL
|
UNION ALL
|
||||||
SELECT i.itemFk, i.shipped, i.quantity
|
SELECT i.itemFk, i.shipped, i.quantity
|
||||||
|
|
|
@ -57,8 +57,8 @@ BEGIN
|
||||||
c.socialName,
|
c.socialName,
|
||||||
IFNULL(c.street, ''),
|
IFNULL(c.street, ''),
|
||||||
c.accountingAccount,
|
c.accountingAccount,
|
||||||
@fi := IF(cu.code = LEFT(TRIM(c.fi), 2) AND c.isVies, MID(TRIM(c.fi), 3, LENGTH(TRIM(c.fi))-1), TRIM(c.fi)),
|
@fi := REGEXP_REPLACE(TRIM(c.fi), c.viesCode, ''),
|
||||||
IF(c.isVies, CONCAT(IFNULL(cu.viesCode,cu.code), @fi ), TRIM(c.fi)),
|
IF(c.viesCode IS NOT NULL, CONCAT(cu.code, @fi ), TRIM(c.fi)),
|
||||||
IFNULL(c.postcode, ''),
|
IFNULL(c.postcode, ''),
|
||||||
IFNULL(c.city, ''),
|
IFNULL(c.city, ''),
|
||||||
IFNULL(pr.CodigoProvincia, ''),
|
IFNULL(pr.CodigoProvincia, ''),
|
||||||
|
@ -68,7 +68,7 @@ BEGIN
|
||||||
IF((c.fi REGEXP '^([[:blank:]]|[[:digit:]])'), 'J','F'),
|
IF((c.fi REGEXP '^([[:blank:]]|[[:digit:]])'), 'J','F'),
|
||||||
IF(cu.code = 'ES',
|
IF(cu.code = 'ES',
|
||||||
1,
|
1,
|
||||||
IF((cu.isUeeMember AND c.isVies), 2, 4)),
|
IF((cu.isUeeMember AND c.viesCode IS NOT NULL), 2, 4)),
|
||||||
IFNULL(c.taxTypeSageFk,0),
|
IFNULL(c.taxTypeSageFk,0),
|
||||||
IF(n.SiglaNacion = vCountryCanariasCode COLLATE utf8mb3_unicode_ci,
|
IF(n.SiglaNacion = vCountryCanariasCode COLLATE utf8mb3_unicode_ci,
|
||||||
IF(@isCeutaMelilla, 'CEUTA Y MELILLA', IF (@isCanarias, 'ISLAS CANARIAS', n.Nacion)),
|
IF(@isCeutaMelilla, 'CEUTA Y MELILLA', IF (@isCanarias, 'ISLAS CANARIAS', n.Nacion)),
|
||||||
|
@ -94,8 +94,8 @@ BEGIN
|
||||||
s.name,
|
s.name,
|
||||||
IFNULL(s.street, ''),
|
IFNULL(s.street, ''),
|
||||||
s.account,
|
s.account,
|
||||||
@nif := IF(co.code = LEFT(TRIM(s.nif), 2), MID(TRIM(s.nif), 3, LENGTH(TRIM(s.nif))-1), TRIM(s.nif)),
|
@nif := REGEXP_REPLACE(TRIM(s.nif), s.viesCode, ''),
|
||||||
IF(s.isVies, CONCAT(IFNULL(co.viesCode,co.code), @nif), TRIM(s.nif)),
|
TRIM(CONCAT(IFNULL(s.viesCode,''), @nif)),
|
||||||
IFNULL(s.postCode,''),
|
IFNULL(s.postCode,''),
|
||||||
IFNULL(s.city, ''),
|
IFNULL(s.city, ''),
|
||||||
IFNULL(pr.CodigoProvincia, ''),
|
IFNULL(pr.CodigoProvincia, ''),
|
||||||
|
|
|
@ -17,7 +17,7 @@ BEGIN
|
||||||
WHEN (NOT IFNULL(auClient.isUeeMember, cClient.isUeeMember) OR NOT cSupplier.isUeeMember)
|
WHEN (NOT IFNULL(auClient.isUeeMember, cClient.isUeeMember) OR NOT cSupplier.isUeeMember)
|
||||||
AND NOT (auSupplier.id <=> auClient.id) THEN
|
AND NOT (auSupplier.id <=> auClient.id) THEN
|
||||||
'WORLD'
|
'WORLD'
|
||||||
WHEN cClient.isUeeMember AND cSupplier.isUeeMember AND c.countryFk != s.countryFk AND c.isVies THEN
|
WHEN cClient.isUeeMember AND cSupplier.isUeeMember AND c.countryFk != s.countryFk AND c.viesCode IS NOT NULL THEN
|
||||||
'CEE'
|
'CEE'
|
||||||
WHEN a.isEqualizated AND cClient.code = 'ES' THEN
|
WHEN a.isEqualizated AND cClient.code = 'ES' THEN
|
||||||
'EQU'
|
'EQU'
|
||||||
|
|
|
@ -19,15 +19,13 @@ BEGIN
|
||||||
* @return tmp.ticketComponentPrice
|
* @return tmp.ticketComponentPrice
|
||||||
*/
|
*/
|
||||||
DECLARE vAvailableCalc INT;
|
DECLARE vAvailableCalc INT;
|
||||||
DECLARE vAvailabled DATETIME;
|
DECLARE vAvailableNoRaidsCalc INT;
|
||||||
DECLARE vDone BOOL;
|
|
||||||
DECLARE vHour INT;
|
|
||||||
DECLARE vShipped DATE;
|
DECLARE vShipped DATE;
|
||||||
DECLARE vWarehouseFk SMALLINT;
|
DECLARE vWarehouseFk SMALLINT;
|
||||||
DECLARE vZoneFk INT;
|
DECLARE vZoneFk INT;
|
||||||
|
DECLARE vDone BOOL;
|
||||||
DECLARE cTravelTree CURSOR FOR
|
DECLARE cTravelTree CURSOR FOR
|
||||||
SELECT zoneFk, warehouseFk, shipped, `hour` FROM tmp.zoneGetShipped;
|
SELECT zoneFk, warehouseFk, shipped FROM tmp.zoneGetShipped;
|
||||||
|
|
||||||
DECLARE CONTINUE HANDLER FOR NOT FOUND SET vDone = TRUE;
|
DECLARE CONTINUE HANDLER FOR NOT FOUND SET vDone = TRUE;
|
||||||
|
|
||||||
|
@ -68,15 +66,14 @@ BEGIN
|
||||||
OPEN cTravelTree;
|
OPEN cTravelTree;
|
||||||
l: LOOP
|
l: LOOP
|
||||||
SET vDone = FALSE;
|
SET vDone = FALSE;
|
||||||
FETCH cTravelTree INTO vZoneFk, vWarehouseFk, vShipped, vHour;
|
FETCH cTravelTree INTO vZoneFk, vWarehouseFk, vShipped;
|
||||||
|
|
||||||
SET vAvailabled = vShipped + INTERVAL HOUR(vHour) HOUR;
|
|
||||||
|
|
||||||
IF vDone THEN
|
IF vDone THEN
|
||||||
LEAVE l;
|
LEAVE l;
|
||||||
END IF;
|
END IF;
|
||||||
|
|
||||||
CALL `cache`.available_refresh(vAvailableCalc, FALSE, vWarehouseFk, vAvailabled);
|
CALL `cache`.available_refresh(vAvailableCalc, FALSE, vWarehouseFk, vShipped);
|
||||||
|
CALL `cache`.availableNoRaids_refresh(vAvailableNoRaidsCalc, FALSE, vWarehouseFk, vShipped);
|
||||||
CALL buy_getUltimate(NULL, vWarehouseFk, vShipped);
|
CALL buy_getUltimate(NULL, vWarehouseFk, vShipped);
|
||||||
|
|
||||||
INSERT INTO tmp.ticketLot (warehouseFk, itemFk, available, buyFk, zoneFk)
|
INSERT INTO tmp.ticketLot (warehouseFk, itemFk, available, buyFk, zoneFk)
|
||||||
|
@ -86,10 +83,31 @@ BEGIN
|
||||||
bu.buyFk,
|
bu.buyFk,
|
||||||
vZoneFk
|
vZoneFk
|
||||||
FROM `cache`.available a
|
FROM `cache`.available a
|
||||||
|
LEFT JOIN cache.availableNoRaids anr ON anr.item_id = a.item_id
|
||||||
|
AND anr.calc_id = vAvailableNoRaidsCalc
|
||||||
JOIN tmp.item i ON i.itemFk = a.item_id
|
JOIN tmp.item i ON i.itemFk = a.item_id
|
||||||
JOIN item it ON it.id = i.itemFk
|
JOIN item it ON it.id = i.itemFk
|
||||||
JOIN `zone` z ON z.id = vZoneFk
|
JOIN `zone` z ON z.id = vZoneFk
|
||||||
LEFT JOIN tmp.buyUltimate bu ON bu.itemFk = a.item_id
|
LEFT JOIN tmp.buyUltimate bu ON bu.itemFk = a.item_id
|
||||||
|
LEFT JOIN edi.supplyResponse sr ON sr.ID = it.supplyResponseFk
|
||||||
|
LEFT JOIN edi.VMPSettings v ON v.VMPID = sr.vmpID
|
||||||
|
LEFT JOIN edi.marketPlace mp ON mp.id = sr.MarketPlaceID
|
||||||
|
LEFT JOIN (SELECT isVNHSupplier, isEarlyBird, TRUE AS itemAllowed
|
||||||
|
FROM addressFilter af
|
||||||
|
JOIN (SELECT ad.provinceFk, p.countryFk, ad.isLogifloraAllowed
|
||||||
|
FROM address ad
|
||||||
|
JOIN province p ON p.id = ad.provinceFk
|
||||||
|
WHERE ad.id = vAddressFk
|
||||||
|
) sub2 ON sub2.provinceFk <=> IFNULL(af.provinceFk, sub2.provinceFk)
|
||||||
|
AND sub2.countryFk <=> IFNULL(af.countryFk, sub2.countryFk)
|
||||||
|
AND sub2.isLogifloraAllowed <=> IFNULL(af.isLogifloraAllowed, sub2.isLogifloraAllowed)
|
||||||
|
WHERE vWarehouseFk = af.warehouseFk
|
||||||
|
AND (vShipped < af.beforeDated
|
||||||
|
OR ISNULL(af.beforeDated)
|
||||||
|
OR vShipped > af.afterDated
|
||||||
|
OR ISNULL(af.afterDated))
|
||||||
|
) sub ON sub.isVNHSupplier = v.isVNHSupplier
|
||||||
|
AND (sub.isEarlyBird = mp.isEarlyBird OR ISNULL(sub.isEarlyBird))
|
||||||
JOIN agencyMode am ON am.id = vAgencyModeFk
|
JOIN agencyMode am ON am.id = vAgencyModeFk
|
||||||
JOIN agency ag ON ag.id = am.agencyFk
|
JOIN agency ag ON ag.id = am.agencyFk
|
||||||
JOIN itemType itt ON itt.id = it.typeFk
|
JOIN itemType itt ON itt.id = it.typeFk
|
||||||
|
@ -106,6 +124,7 @@ BEGIN
|
||||||
AND ait.itemTypeFk = itt.id
|
AND ait.itemTypeFk = itt.id
|
||||||
WHERE a.calc_id = vAvailableCalc
|
WHERE a.calc_id = vAvailableCalc
|
||||||
AND a.available > 0
|
AND a.available > 0
|
||||||
|
AND (sub.itemAllowed OR NOT it.isFloramondo OR anr.available > 0)
|
||||||
AND (ag.isAnyVolumeAllowed OR NOT itt.isUnconventionalSize)
|
AND (ag.isAnyVolumeAllowed OR NOT itt.isUnconventionalSize)
|
||||||
AND (it.`size` IS NULL
|
AND (it.`size` IS NULL
|
||||||
OR IF(itc.isReclining,
|
OR IF(itc.isReclining,
|
||||||
|
|
|
@ -160,11 +160,9 @@ BEGIN
|
||||||
OR (NOT s.isPreparable AND NOT s.isPrintable)
|
OR (NOT s.isPreparable AND NOT s.isPrintable)
|
||||||
OR pb.collectionH IS NOT NULL
|
OR pb.collectionH IS NOT NULL
|
||||||
OR pb.collectionV IS NOT NULL
|
OR pb.collectionV IS NOT NULL
|
||||||
OR pb.collectionA IS NOT NULL
|
|
||||||
OR pb.collectionN IS NOT NULL
|
OR pb.collectionN IS NOT NULL
|
||||||
OR (NOT pb.H AND pb.V + pb.A > 0 AND vItemPackingTypeFk = 'H')
|
OR (NOT pb.H AND pb.V > 0 AND vItemPackingTypeFk = 'H')
|
||||||
OR (NOT pb.V AND vItemPackingTypeFk = 'V')
|
OR (NOT pb.V AND vItemPackingTypeFk = 'V')
|
||||||
OR (NOT pb.A AND vItemPackingTypeFk = 'A')
|
|
||||||
OR (pc.isPreviousPreparationRequired AND pb.previousWithoutParking)
|
OR (pc.isPreviousPreparationRequired AND pb.previousWithoutParking)
|
||||||
OR LENGTH(pb.problem)
|
OR LENGTH(pb.problem)
|
||||||
OR pb.lines > vLinesLimit
|
OR pb.lines > vLinesLimit
|
||||||
|
|
|
@ -50,7 +50,7 @@ BEGIN
|
||||||
s.account supplierAccount,
|
s.account supplierAccount,
|
||||||
s.name supplierName,
|
s.name supplierName,
|
||||||
s.nif,
|
s.nif,
|
||||||
s.IsVies,
|
s.viesCode,
|
||||||
iit.taxTypeSageFk,
|
iit.taxTypeSageFk,
|
||||||
tt.code taxCode,
|
tt.code taxCode,
|
||||||
ti.Iva,
|
ti.Iva,
|
||||||
|
@ -282,7 +282,7 @@ BEGIN
|
||||||
JOIN sage.config c
|
JOIN sage.config c
|
||||||
WHERE tii.taxCode = 'ISP21' OR MID(tii.supplierAccount, 4, 1) = '1'
|
WHERE tii.taxCode = 'ISP21' OR MID(tii.supplierAccount, 4, 1) = '1'
|
||||||
AND tii.taxTypeSageFk IS NOT NULL
|
AND tii.taxTypeSageFk IS NOT NULL
|
||||||
AND NOT(tii.isVies
|
AND NOT(tii.viesCode IS NOT NULL
|
||||||
AND c.nontaxableTransactionTypeFk = tii.transactionTypeSageFk
|
AND c.nontaxableTransactionTypeFk = tii.transactionTypeSageFk
|
||||||
AND tii.taxCode = 'nonTaxable')
|
AND tii.taxCode = 'nonTaxable')
|
||||||
GROUP BY tii.CuentaIvaRepercutido;
|
GROUP BY tii.CuentaIvaRepercutido;
|
||||||
|
|
|
@ -30,7 +30,7 @@ BEGIN
|
||||||
WITH entriesIn AS (
|
WITH entriesIn AS (
|
||||||
SELECT 'entry' originType,
|
SELECT 'entry' originType,
|
||||||
e.id originId,
|
e.id originId,
|
||||||
IFNULL(tr.availabled, tr.landed) shipped,
|
tr.landed shipped,
|
||||||
b.quantity `in`,
|
b.quantity `in`,
|
||||||
NULL `out`,
|
NULL `out`,
|
||||||
st.alertLevel ,
|
st.alertLevel ,
|
||||||
|
@ -54,7 +54,7 @@ BEGIN
|
||||||
OR (util.VN_CURDATE() AND tr.isReceived),
|
OR (util.VN_CURDATE() AND tr.isReceived),
|
||||||
'DELIVERED',
|
'DELIVERED',
|
||||||
'FREE')
|
'FREE')
|
||||||
WHERE IFNULL(tr.availabled, tr.landed) >= vDateInventory
|
WHERE tr.landed >= vDateInventory
|
||||||
AND tr.warehouseInFk = vWarehouseFk
|
AND tr.warehouseInFk = vWarehouseFk
|
||||||
AND (s.id <> vSupplierInventoryFk OR vDated IS NULL)
|
AND (s.id <> vSupplierInventoryFk OR vDated IS NULL)
|
||||||
AND b.itemFk = vItemFk
|
AND b.itemFk = vItemFk
|
||||||
|
@ -99,7 +99,7 @@ BEGIN
|
||||||
),
|
),
|
||||||
sales AS (
|
sales AS (
|
||||||
WITH itemSales AS (
|
WITH itemSales AS (
|
||||||
SELECT DATE(t.shipped) + INTERVAL HOUR(z.`hour`) HOUR shipped,
|
SELECT DATE(t.shipped) shipped,
|
||||||
s.quantity,
|
s.quantity,
|
||||||
st2.alertLevel,
|
st2.alertLevel,
|
||||||
st2.name,
|
st2.name,
|
||||||
|
@ -114,7 +114,6 @@ BEGIN
|
||||||
cb.claimFk
|
cb.claimFk
|
||||||
FROM vn.sale s
|
FROM vn.sale s
|
||||||
JOIN vn.ticket t ON t.id = s.ticketFk
|
JOIN vn.ticket t ON t.id = s.ticketFk
|
||||||
JOIN vn.`zone` z ON z.id = t.zoneFk
|
|
||||||
LEFT JOIN vn.ticketState ts ON ts.ticketFk = t.id
|
LEFT JOIN vn.ticketState ts ON ts.ticketFk = t.id
|
||||||
LEFT JOIN vn.state st ON st.code = ts.code
|
LEFT JOIN vn.state st ON st.code = ts.code
|
||||||
JOIN vn.client c ON c.id = t.clientFk
|
JOIN vn.client c ON c.id = t.clientFk
|
||||||
|
@ -190,15 +189,14 @@ BEGIN
|
||||||
SELECT * FROM sales
|
SELECT * FROM sales
|
||||||
UNION ALL
|
UNION ALL
|
||||||
SELECT * FROM orders
|
SELECT * FROM orders
|
||||||
ORDER BY DATE(shipped),
|
ORDER BY shipped,
|
||||||
(inventorySupplierFk = entityId) DESC,
|
(inventorySupplierFk = entityId) DESC,
|
||||||
alertLevel DESC,
|
alertLevel DESC,
|
||||||
isTicket,
|
isTicket,
|
||||||
`order` DESC,
|
`order` DESC,
|
||||||
isPicked DESC,
|
isPicked DESC,
|
||||||
`in` DESC,
|
`in` DESC,
|
||||||
`out` DESC,
|
`out` DESC;
|
||||||
shipped;
|
|
||||||
|
|
||||||
IF vDated IS NULL THEN
|
IF vDated IS NULL THEN
|
||||||
SET @a := 0;
|
SET @a := 0;
|
||||||
|
@ -207,7 +205,7 @@ BEGIN
|
||||||
|
|
||||||
SELECT t.originType,
|
SELECT t.originType,
|
||||||
t.originId,
|
t.originId,
|
||||||
@shipped:= t.shipped shipped,
|
DATE(@shipped:= t.shipped) shipped,
|
||||||
t.alertLevel,
|
t.alertLevel,
|
||||||
t.stateName,
|
t.stateName,
|
||||||
t.reference,
|
t.reference,
|
||||||
|
|
|
@ -1,16 +1,5 @@
|
||||||
DELIMITER $$
|
DELIMITER $$
|
||||||
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`item_getLack`(
|
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`item_getLack`(IN vForce BOOLEAN, IN vDays INT)
|
||||||
vSelf INT,
|
|
||||||
vForce BOOLEAN,
|
|
||||||
vDays INT,
|
|
||||||
vLongname VARCHAR(255),
|
|
||||||
vProducerName VARCHAR(255),
|
|
||||||
vColor VARCHAR(255),
|
|
||||||
vSize INT,
|
|
||||||
vOrigen INT,
|
|
||||||
vLack INT,
|
|
||||||
vWarehouseFk INT
|
|
||||||
)
|
|
||||||
BEGIN
|
BEGIN
|
||||||
/**
|
/**
|
||||||
* Calcula una tabla con el máximo negativo visible para cada producto y almacen
|
* Calcula una tabla con el máximo negativo visible para cada producto y almacen
|
||||||
|
@ -58,14 +47,6 @@ BEGIN
|
||||||
WHERE w.isForTicket
|
WHERE w.isForTicket
|
||||||
AND ic.display
|
AND ic.display
|
||||||
AND it.code != 'GEN'
|
AND it.code != 'GEN'
|
||||||
AND (vSelf IS NULL OR i.id = vSelf)
|
|
||||||
AND (vLongname IS NULL OR i.name = vLongname)
|
|
||||||
AND (vProducerName IS NULL OR p.`name` LIKE CONCAT('%', vProducerName, '%'))
|
|
||||||
AND (vColor IS NULL OR vColor = i.inkFk)
|
|
||||||
AND (vSize IS NULL OR vSize = i.`size`)
|
|
||||||
AND (vOrigen IS NULL OR vOrigen = w.id)
|
|
||||||
AND (vLack IS NULL OR vLack = sub.amount)
|
|
||||||
AND (vWarehouseFk IS NULL OR vWarehouseFk = w.id)
|
|
||||||
GROUP BY i.id, w.id
|
GROUP BY i.id, w.id
|
||||||
HAVING lack < 0;
|
HAVING lack < 0;
|
||||||
|
|
||||||
|
|
|
@ -82,19 +82,14 @@ BEGIN
|
||||||
AND it.priority = vPriority
|
AND it.priority = vPriority
|
||||||
LEFT JOIN vn.tag t ON t.id = it.tagFk
|
LEFT JOIN vn.tag t ON t.id = it.tagFk
|
||||||
LEFT JOIN vn.buy b ON b.id = bu.buyFk
|
LEFT JOIN vn.buy b ON b.id = bu.buyFk
|
||||||
LEFT JOIN vn.itemShelvingStock iss ON iss.itemFk = i.id
|
|
||||||
AND iss.warehouseFk = vWarehouseFk
|
|
||||||
LEFT JOIN vn.ink ink ON ink.id = i.tag5
|
|
||||||
JOIN itemTags its
|
JOIN itemTags its
|
||||||
WHERE a.available > 0
|
WHERE a.available > 0
|
||||||
AND (i.typeFk = its.typeFk OR NOT vShowType)
|
AND (i.typeFk = its.typeFk OR NOT vShowType)
|
||||||
AND i.id <> vSelf
|
AND i.id <> vSelf
|
||||||
ORDER BY (a.available > 0) DESC,
|
ORDER BY `counter` DESC,
|
||||||
`counter` DESC,
|
|
||||||
(t.name = its.name) DESC,
|
(t.name = its.name) DESC,
|
||||||
(it.value = its.value) DESC,
|
(it.value = its.value) DESC,
|
||||||
(i.tag5 = its.tag5) DESC,
|
(i.tag5 = its.tag5) DESC,
|
||||||
(ink.`showOrder`) DESC,
|
|
||||||
match5 DESC,
|
match5 DESC,
|
||||||
(i.tag6 = its.tag6) DESC,
|
(i.tag6 = its.tag6) DESC,
|
||||||
match6 DESC,
|
match6 DESC,
|
||||||
|
|
|
@ -35,8 +35,8 @@ BEGIN
|
||||||
SELECT iei.itemFk, iei.quantity
|
SELECT iei.itemFk, iei.quantity
|
||||||
FROM itemEntryIn iei
|
FROM itemEntryIn iei
|
||||||
JOIN item i ON i.id = iei.itemFk
|
JOIN item i ON i.id = iei.itemFk
|
||||||
WHERE IFNULL(iei.availabled, iei.landed) >= util.VN_CURDATE()
|
WHERE iei.landed >= util.VN_CURDATE()
|
||||||
AND IFNULL(iei.availabled, iei.landed) < vDated
|
AND iei.landed < vDated
|
||||||
AND iei.warehouseInFk = vWarehouseFk
|
AND iei.warehouseInFk = vWarehouseFk
|
||||||
AND (vItemFk IS NULL OR iei.itemFk = vItemFk)
|
AND (vItemFk IS NULL OR iei.itemFk = vItemFk)
|
||||||
UNION ALL
|
UNION ALL
|
||||||
|
|
|
@ -72,7 +72,7 @@ proc: BEGIN
|
||||||
IF(tpr.isFreezed, ' CONGELADO',''),
|
IF(tpr.isFreezed, ' CONGELADO',''),
|
||||||
IF(tpr.hasHighRisk, ' RIESGO',''),
|
IF(tpr.hasHighRisk, ' RIESGO',''),
|
||||||
IF(tpr.hasTicketRequest, ' COD 100',''),
|
IF(tpr.hasTicketRequest, ' COD 100',''),
|
||||||
IF(tpr.isTaxDataChecked, ' FICHA INCOMPLETA', ''),
|
IF(tpr.isTaxDataChecked, '',' FICHA INCOMPLETA'),
|
||||||
IF(tpr.hasComponentLack, ' COMPONENTES', ''),
|
IF(tpr.hasComponentLack, ' COMPONENTES', ''),
|
||||||
IF(HOUR(util.VN_NOW()) < IF(HOUR(t.shipped), HOUR(t.shipped), COALESCE(HOUR(zc.hour),HOUR(z.hour)))
|
IF(HOUR(util.VN_NOW()) < IF(HOUR(t.shipped), HOUR(t.shipped), COALESCE(HOUR(zc.hour),HOUR(z.hour)))
|
||||||
AND tpr.isTooLittle, ' PEQUEÑO', '')
|
AND tpr.isTooLittle, ' PEQUEÑO', '')
|
||||||
|
@ -91,7 +91,6 @@ proc: BEGIN
|
||||||
pk.code parking,
|
pk.code parking,
|
||||||
0 H,
|
0 H,
|
||||||
0 V,
|
0 V,
|
||||||
0 A,
|
|
||||||
0 N,
|
0 N,
|
||||||
st.isOk,
|
st.isOk,
|
||||||
ag.isOwn,
|
ag.isOwn,
|
||||||
|
@ -139,7 +138,6 @@ proc: BEGIN
|
||||||
CHANGE COLUMN `problem` `problem` VARCHAR(255),
|
CHANGE COLUMN `problem` `problem` VARCHAR(255),
|
||||||
ADD COLUMN `collectionH` INT,
|
ADD COLUMN `collectionH` INT,
|
||||||
ADD COLUMN `collectionV` INT,
|
ADD COLUMN `collectionV` INT,
|
||||||
ADD COLUMN `collectionA` INT,
|
|
||||||
ADD COLUMN `collectionN` INT;
|
ADD COLUMN `collectionN` INT;
|
||||||
|
|
||||||
-- Clientes Nuevos o Recuperados
|
-- Clientes Nuevos o Recuperados
|
||||||
|
@ -181,13 +179,11 @@ proc: BEGIN
|
||||||
SELECT ticketFk,
|
SELECT ticketFk,
|
||||||
SUM(sub.H) H,
|
SUM(sub.H) H,
|
||||||
SUM(sub.V) V,
|
SUM(sub.V) V,
|
||||||
SUM(sub.A) A,
|
|
||||||
SUM(sub.N) N
|
SUM(sub.N) N
|
||||||
FROM (
|
FROM (
|
||||||
SELECT t.ticketFk,
|
SELECT t.ticketFk,
|
||||||
SUM(i.itemPackingTypeFk = 'H') H,
|
SUM(i.itemPackingTypeFk = 'H') H,
|
||||||
SUM(i.itemPackingTypeFk = 'V') V,
|
SUM(i.itemPackingTypeFk = 'V') V,
|
||||||
SUM(i.itemPackingTypeFk = 'A') A,
|
|
||||||
SUM(i.itemPackingTypeFk IS NULL) N
|
SUM(i.itemPackingTypeFk IS NULL) N
|
||||||
FROM tmp.productionTicket t
|
FROM tmp.productionTicket t
|
||||||
JOIN sale s ON s.ticketFk = t.ticketFk
|
JOIN sale s ON s.ticketFk = t.ticketFk
|
||||||
|
@ -200,7 +196,6 @@ proc: BEGIN
|
||||||
JOIN tItemPackingType ti ON ti.ticketFk = pb.ticketFk
|
JOIN tItemPackingType ti ON ti.ticketFk = pb.ticketFk
|
||||||
SET pb.H = ti.H,
|
SET pb.H = ti.H,
|
||||||
pb.V = ti.V,
|
pb.V = ti.V,
|
||||||
pb.A = ti.A,
|
|
||||||
pb.N = ti.N;
|
pb.N = ti.N;
|
||||||
|
|
||||||
-- Colecciones segun tipo de encajado
|
-- Colecciones segun tipo de encajado
|
||||||
|
@ -208,7 +203,6 @@ proc: BEGIN
|
||||||
JOIN ticketCollection tc ON pb.ticketFk = tc.ticketFk
|
JOIN ticketCollection tc ON pb.ticketFk = tc.ticketFk
|
||||||
SET pb.collectionH = IF(pb.H, tc.collectionFk, NULL),
|
SET pb.collectionH = IF(pb.H, tc.collectionFk, NULL),
|
||||||
pb.collectionV = IF(pb.V, tc.collectionFk, NULL),
|
pb.collectionV = IF(pb.V, tc.collectionFk, NULL),
|
||||||
pb.collectionA = IF(pb.A, tc.collectionFk, NULL),
|
|
||||||
pb.collectionN = IF(pb.N, tc.collectionFk, NULL);
|
pb.collectionN = IF(pb.N, tc.collectionFk, NULL);
|
||||||
|
|
||||||
-- Previa pendiente
|
-- Previa pendiente
|
||||||
|
|
|
@ -25,11 +25,9 @@ BEGIN
|
||||||
DECLARE vNewSaleFk INT;
|
DECLARE vNewSaleFk INT;
|
||||||
DECLARE vFinalPrice DECIMAL(10,2);
|
DECLARE vFinalPrice DECIMAL(10,2);
|
||||||
|
|
||||||
|
|
||||||
DECLARE vIsRequiredTx BOOL DEFAULT NOT @@in_transaction;
|
|
||||||
DECLARE EXIT HANDLER FOR SQLEXCEPTION
|
DECLARE EXIT HANDLER FOR SQLEXCEPTION
|
||||||
BEGIN
|
BEGIN
|
||||||
CALL util.tx_rollback(vIsRequiredTx);
|
ROLLBACK;
|
||||||
RESIGNAL;
|
RESIGNAL;
|
||||||
END;
|
END;
|
||||||
|
|
||||||
|
@ -131,6 +129,6 @@ BEGIN
|
||||||
VALUES(vItemFk, vNewItemFk, 1)
|
VALUES(vItemFk, vNewItemFk, 1)
|
||||||
ON DUPLICATE KEY UPDATE counter = counter + 1;
|
ON DUPLICATE KEY UPDATE counter = counter + 1;
|
||||||
|
|
||||||
CALL util.tx_commit(vIsRequiredTx);
|
COMMIT;
|
||||||
END$$
|
END$$
|
||||||
DELIMITER ;
|
DELIMITER ;
|
||||||
|
|
|
@ -30,16 +30,11 @@ BEGIN
|
||||||
st.code stateCode,
|
st.code stateCode,
|
||||||
sub2.code futureStateCode,
|
sub2.code futureStateCode,
|
||||||
st.classColor,
|
st.classColor,
|
||||||
sub2.classColor futureClassColor,
|
sub2.classColor futureClassColor
|
||||||
am.id agencyFk,
|
|
||||||
am.name agency,
|
|
||||||
sub2.agencyModeFk futureAgencyFk,
|
|
||||||
sub2.agencyMode futureAgency
|
|
||||||
FROM vn.saleVolume sv
|
FROM vn.saleVolume sv
|
||||||
JOIN vn.sale s ON s.id = sv.saleFk
|
JOIN vn.sale s ON s.id = sv.saleFk
|
||||||
JOIN vn.item i ON i.id = s.itemFk
|
JOIN vn.item i ON i.id = s.itemFk
|
||||||
JOIN vn.ticket t ON t.id = sv.ticketFk
|
JOIN vn.ticket t ON t.id = sv.ticketFk
|
||||||
JOIN vn.agencyMode am ON am.id = t.agencyModeFk
|
|
||||||
JOIN vn.address a ON a.id = t.addressFk
|
JOIN vn.address a ON a.id = t.addressFk
|
||||||
JOIN vn.province p ON p.id = a.provinceFk
|
JOIN vn.province p ON p.id = a.provinceFk
|
||||||
JOIN vn.country c ON c.id = p.countryFk
|
JOIN vn.country c ON c.id = p.countryFk
|
||||||
|
@ -59,11 +54,8 @@ BEGIN
|
||||||
st.name state,
|
st.name state,
|
||||||
st.code,
|
st.code,
|
||||||
st.classColor,
|
st.classColor,
|
||||||
am.id agencyModeFk,
|
|
||||||
am.name agencyMode,
|
|
||||||
GROUP_CONCAT(DISTINCT i.itemPackingTypeFk ORDER BY i.itemPackingTypeFk) iptd
|
GROUP_CONCAT(DISTINCT i.itemPackingTypeFk ORDER BY i.itemPackingTypeFk) iptd
|
||||||
FROM vn.ticket t
|
FROM vn.ticket t
|
||||||
JOIN vn.agencyMode am ON am.id = t.agencyModeFk
|
|
||||||
JOIN vn.ticketState ts ON ts.ticketFk = t.id
|
JOIN vn.ticketState ts ON ts.ticketFk = t.id
|
||||||
JOIN vn.state st ON st.id = ts.stateFk
|
JOIN vn.state st ON st.id = ts.stateFk
|
||||||
JOIN vn.sale s ON s.ticketFk = t.id
|
JOIN vn.sale s ON s.ticketFk = t.id
|
||||||
|
|
|
@ -10,11 +10,14 @@ BEGIN
|
||||||
DECLARE vDone BOOL;
|
DECLARE vDone BOOL;
|
||||||
DECLARE vClientFk INT;
|
DECLARE vClientFk INT;
|
||||||
DECLARE vCurTicketFk INT;
|
DECLARE vCurTicketFk INT;
|
||||||
|
DECLARE vIsTaxDataChecked BOOL;
|
||||||
|
DECLARE vCompanyFk INT;
|
||||||
|
DECLARE vShipped DATE;
|
||||||
DECLARE vNewInvoiceId INT;
|
DECLARE vNewInvoiceId INT;
|
||||||
DECLARE vHasDailyInvoice BOOL;
|
DECLARE vHasDailyInvoice BOOL;
|
||||||
DECLARE vWithPackage BOOL;
|
DECLARE vWithPackage BOOL;
|
||||||
DECLARE vHasToInvoice BOOL;
|
DECLARE vHasToInvoice BOOL;
|
||||||
DECLARE vStateCode VARCHAR(45);
|
DECLARE vSerial VARCHAR(2);
|
||||||
|
|
||||||
DECLARE cur CURSOR FOR
|
DECLARE cur CURSOR FOR
|
||||||
SELECT ticketFk FROM tmp.ticket_close;
|
SELECT ticketFk FROM tmp.ticket_close;
|
||||||
|
@ -35,11 +38,18 @@ BEGIN
|
||||||
LEAVE proc;
|
LEAVE proc;
|
||||||
END IF;
|
END IF;
|
||||||
|
|
||||||
SELECT c.id,
|
SELECT
|
||||||
|
c.id,
|
||||||
|
c.isTaxDataChecked,
|
||||||
|
t.companyFk,
|
||||||
|
t.shipped,
|
||||||
c.hasDailyInvoice,
|
c.hasDailyInvoice,
|
||||||
w.isManaged,
|
w.isManaged,
|
||||||
c.hasToInvoice
|
c.hasToInvoice
|
||||||
INTO vClientFk,
|
INTO vClientFk,
|
||||||
|
vIsTaxDataChecked,
|
||||||
|
vCompanyFk,
|
||||||
|
vShipped,
|
||||||
vHasDailyInvoice,
|
vHasDailyInvoice,
|
||||||
vWithPackage,
|
vWithPackage,
|
||||||
vHasToInvoice
|
vHasToInvoice
|
||||||
|
@ -49,7 +59,7 @@ BEGIN
|
||||||
WHERE t.id = vCurTicketFk;
|
WHERE t.id = vCurTicketFk;
|
||||||
|
|
||||||
INSERT INTO ticketPackaging (ticketFk, packagingFk, quantity)
|
INSERT INTO ticketPackaging (ticketFk, packagingFk, quantity)
|
||||||
SELECT vCurTicketFk, p.id, COUNT(*)
|
(SELECT vCurTicketFk, p.id, COUNT(*)
|
||||||
FROM expedition e
|
FROM expedition e
|
||||||
JOIN packaging p ON p.id = e.packagingFk
|
JOIN packaging p ON p.id = e.packagingFk
|
||||||
JOIN ticket t ON t.id = e.ticketFk
|
JOIN ticket t ON t.id = e.ticketFk
|
||||||
|
@ -58,35 +68,39 @@ BEGIN
|
||||||
WHERE e.ticketFk = vCurTicketFk AND p.isPackageReturnable
|
WHERE e.ticketFk = vCurTicketFk AND p.isPackageReturnable
|
||||||
AND vWithPackage
|
AND vWithPackage
|
||||||
AND NOT dm.`code`= 'PICKUP'
|
AND NOT dm.`code`= 'PICKUP'
|
||||||
GROUP BY p.itemFk;
|
GROUP BY p.itemFk);
|
||||||
|
|
||||||
-- No retornables o no catalogados
|
-- No retornables o no catalogados
|
||||||
INSERT INTO sale (
|
INSERT INTO sale (itemFk, ticketFk, concept, quantity, price, isPriceFixed)
|
||||||
itemFk,
|
(SELECT e.freightItemFk, vCurTicketFk, i.name, COUNT(*) AS amount, getSpecialPrice(e.freightItemFk, vClientFk), 1
|
||||||
ticketFk,
|
|
||||||
concept,
|
|
||||||
quantity,
|
|
||||||
price, isPriceFixed
|
|
||||||
)SELECT e.freightItemFk,
|
|
||||||
vCurTicketFk,
|
|
||||||
i.name,
|
|
||||||
COUNT(*) amount,
|
|
||||||
getSpecialPrice(e.freightItemFk, vClientFk),
|
|
||||||
TRUE
|
|
||||||
FROM expedition e
|
FROM expedition e
|
||||||
JOIN item i ON i.id = e.freightItemFk
|
JOIN item i ON i.id = e.freightItemFk
|
||||||
LEFT JOIN packaging p ON p.itemFk = i.id
|
LEFT JOIN packaging p ON p.itemFk = i.id
|
||||||
WHERE e.ticketFk = vCurTicketFk
|
WHERE e.ticketFk = vCurTicketFk AND IFNULL(p.isPackageReturnable, 0) = 0
|
||||||
AND (p.isPackageReturnable = 0 OR p.isPackageReturnable IS NULL)
|
|
||||||
AND getSpecialPrice(e.freightItemFk, vClientFk) > 0
|
AND getSpecialPrice(e.freightItemFk, vClientFk) > 0
|
||||||
GROUP BY e.freightItemFk;
|
GROUP BY e.freightItemFk);
|
||||||
|
|
||||||
IF vHasDailyInvoice AND vHasToInvoice THEN
|
IF(vHasDailyInvoice) AND vHasToInvoice THEN
|
||||||
SET vStateCode = 'DELIVERED';
|
SELECT invoiceSerial(vClientFk, vCompanyFk, 'quick') INTO vSerial;
|
||||||
ELSE
|
IF vSerial IS NULL THEN
|
||||||
SELECT getAlert3State(vCurTicketFk) INTO vStateCode;
|
CALL util.throw('Cannot booking without a serial');
|
||||||
|
END IF;
|
||||||
|
|
||||||
|
CALL ticket_setState(vCurTicketFk, 'DELIVERED');
|
||||||
|
|
||||||
|
IF vIsTaxDataChecked THEN
|
||||||
|
CALL invoiceOut_newFromClient(
|
||||||
|
vClientFk,
|
||||||
|
vSerial,
|
||||||
|
vShipped,
|
||||||
|
vCompanyFk,
|
||||||
|
NULL,
|
||||||
|
NULL,
|
||||||
|
vNewInvoiceId);
|
||||||
|
END IF;
|
||||||
|
ELSE
|
||||||
|
CALL ticket_setState(vCurTicketFk, (SELECT vn.getAlert3State(vCurTicketFk)));
|
||||||
END IF;
|
END IF;
|
||||||
CALL ticket_setState(vCurTicketFk, vStateCode);
|
|
||||||
END LOOP;
|
END LOOP;
|
||||||
|
|
||||||
CLOSE cur;
|
CLOSE cur;
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
DELIMITER $$
|
DELIMITER $$
|
||||||
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`ticket_doCmr`(
|
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`ticket_doCmr`(vSelf INT)
|
||||||
vSelf INT
|
|
||||||
)
|
|
||||||
BEGIN
|
BEGIN
|
||||||
/**
|
/**
|
||||||
* Crea u actualiza la información del CMR asociado con
|
* Crea u actualiza la información del CMR asociado con
|
||||||
|
@ -21,7 +19,6 @@ BEGIN
|
||||||
a.id addressFk,
|
a.id addressFk,
|
||||||
c2.defaultAddressFk,
|
c2.defaultAddressFk,
|
||||||
IFNULL(sat.supplierFk, su.id) supplierFk,
|
IFNULL(sat.supplierFk, su.id) supplierFk,
|
||||||
t.packages,
|
|
||||||
t.landed
|
t.landed
|
||||||
FROM ticket t
|
FROM ticket t
|
||||||
JOIN client c ON c.id = t.clientFk
|
JOIN client c ON c.id = t.clientFk
|
||||||
|
@ -36,7 +33,7 @@ BEGIN
|
||||||
LEFT JOIN route r ON r.id = t.routeFk
|
LEFT JOIN route r ON r.id = t.routeFk
|
||||||
LEFT JOIN worker wo ON wo.id = r.workerFk
|
LEFT JOIN worker wo ON wo.id = r.workerFk
|
||||||
LEFT JOIN vehicle v ON v.id = r.vehicleFk
|
LEFT JOIN vehicle v ON v.id = r.vehicleFk
|
||||||
LEFT JOIN agencyMode am ON am.id = t.agencyModeFk
|
LEFT JOIN agencyMode am ON am.id = r.agencyModeFk
|
||||||
LEFT JOIN agency ag ON ag.id = am.agencyFk
|
LEFT JOIN agency ag ON ag.id = am.agencyFk
|
||||||
LEFT JOIN supplierAgencyTerm sat ON sat.agencyFk = ag.id
|
LEFT JOIN supplierAgencyTerm sat ON sat.agencyFk = ag.id
|
||||||
AND wo.isFreelance
|
AND wo.isFreelance
|
||||||
|
@ -55,7 +52,6 @@ BEGIN
|
||||||
c.addressToFk = t.addressFk,
|
c.addressToFk = t.addressFk,
|
||||||
c.addressFromFk = t.defaultAddressFk,
|
c.addressFromFk = t.defaultAddressFk,
|
||||||
c.supplierFk = t.supplierFk,
|
c.supplierFk = t.supplierFk,
|
||||||
c.packagesList = t.packages,
|
|
||||||
c.ead = t.landed
|
c.ead = t.landed
|
||||||
WHERE id = vCmrFk;
|
WHERE id = vCmrFk;
|
||||||
ELSE
|
ELSE
|
||||||
|
@ -66,7 +62,6 @@ BEGIN
|
||||||
addressToFk,
|
addressToFk,
|
||||||
addressFromFk,
|
addressFromFk,
|
||||||
supplierFk,
|
supplierFk,
|
||||||
packagesList,
|
|
||||||
ead
|
ead
|
||||||
)
|
)
|
||||||
SELECT * FROM tTicket;
|
SELECT * FROM tTicket;
|
||||||
|
|
|
@ -3,30 +3,26 @@ CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`ticket_setState`(
|
||||||
vSelf INT,
|
vSelf INT,
|
||||||
vStateCode VARCHAR(255) COLLATE utf8_general_ci
|
vStateCode VARCHAR(255) COLLATE utf8_general_ci
|
||||||
)
|
)
|
||||||
proc:BEGIN
|
BEGIN
|
||||||
/**
|
/**
|
||||||
* Modifica el estado de un ticket si se cumplen las condiciones necesarias.
|
* Modifica el estado de un ticket si se cumplen las condiciones necesarias.
|
||||||
*
|
*
|
||||||
* @param vSelf el id del ticket
|
* @param vSelf el id del ticket
|
||||||
* @param vStateCode estado a modificar del ticket
|
* @param vStateCode estado a modificar del ticket
|
||||||
*/
|
*/
|
||||||
DECLARE vTicketAlertLevel INT;
|
DECLARE vticketAlertLevel INT;
|
||||||
DECLARE vTicketStateCode VARCHAR(255) COLLATE utf8_general_ci;
|
DECLARE vTicketStateCode VARCHAR(255);
|
||||||
DECLARE vCanChangeState BOOL;
|
DECLARE vCanChangeState BOOL;
|
||||||
DECLARE vPackedAlertLevel INT;
|
DECLARE vPackedAlertLevel INT;
|
||||||
DECLARE vZoneFk INT;
|
DECLARE vZoneFk INT;
|
||||||
DECLARE vOldWorkerFk INT;
|
|
||||||
DECLARE vNewWorkerFk INT;
|
|
||||||
|
|
||||||
SET vNewWorkerFk = account.myUser_getId();
|
SELECT s.alertLevel, s.`code`, t.zoneFk
|
||||||
|
INTO vticketAlertLevel, vTicketStateCode, vZoneFk
|
||||||
SELECT s.alertLevel, s.`code`, t.zoneFk, tt.userFk
|
|
||||||
INTO vTicketAlertLevel, vTicketStateCode, vZoneFk, vOldWorkerFk
|
|
||||||
FROM state s
|
FROM state s
|
||||||
JOIN ticketTracking tt ON tt.stateFk = s.id
|
JOIN ticketTracking tt ON tt.stateFk = s.id
|
||||||
JOIN ticket t ON t.id = tt.ticketFk
|
JOIN ticket t ON t.id = tt.ticketFk
|
||||||
WHERE tt.ticketFk = vSelf
|
WHERE tt.ticketFk = vSelf
|
||||||
ORDER BY tt.created DESC, tt.id DESC
|
ORDER BY tt.created DESC
|
||||||
LIMIT 1;
|
LIMIT 1;
|
||||||
|
|
||||||
SELECT id INTO vPackedAlertLevel FROM alertLevel WHERE code = 'PACKED';
|
SELECT id INTO vPackedAlertLevel FROM alertLevel WHERE code = 'PACKED';
|
||||||
|
@ -37,27 +33,24 @@ proc:BEGIN
|
||||||
|
|
||||||
SET vCanChangeState = ((
|
SET vCanChangeState = ((
|
||||||
vStateCode <> 'ON_CHECKING' AND vStateCode <> 'CHECKED') OR
|
vStateCode <> 'ON_CHECKING' AND vStateCode <> 'CHECKED') OR
|
||||||
vTicketAlertLevel < vPackedAlertLevel
|
vticketAlertLevel < vPackedAlertLevel
|
||||||
) AND NOT (
|
)AND NOT (
|
||||||
vTicketStateCode IN ('CHECKED', 'CHECKING')
|
vTicketStateCode IN ('CHECKED', 'CHECKING')
|
||||||
AND vStateCode IN ('PREPARED', 'ON_PREPARATION')
|
AND vStateCode IN ('PREPARED', 'ON_PREPARATION')
|
||||||
);
|
);
|
||||||
|
|
||||||
IF vCanChangeState THEN
|
IF vCanChangeState THEN
|
||||||
|
INSERT INTO ticketTracking (stateFk, ticketFk, userFk)
|
||||||
|
SELECT id, vSelf, account.myUser_getId()
|
||||||
|
FROM state
|
||||||
|
WHERE `code` = vStateCode COLLATE utf8_unicode_ci;
|
||||||
|
|
||||||
IF vStateCode = 'PACKED' THEN
|
IF vStateCode = 'PACKED' THEN
|
||||||
CALL ticket_doCmr(vSelf);
|
CALL ticket_doCmr(vSelf);
|
||||||
END IF;
|
END IF;
|
||||||
|
|
||||||
IF vStateCode = vTicketStateCode AND vOldWorkerFk = vNewWorkerFk THEN
|
|
||||||
LEAVE proc;
|
|
||||||
END IF;
|
|
||||||
|
|
||||||
INSERT INTO ticketTracking (stateFk, ticketFk, userFk, created)
|
|
||||||
SELECT id, vSelf, vNewWorkerFk, util.VN_NOW()
|
|
||||||
FROM state
|
|
||||||
WHERE `code` = vStateCode COLLATE utf8_unicode_ci;
|
|
||||||
ELSE
|
ELSE
|
||||||
CALL util.throw('INCORRECT_TICKET_STATE');
|
CALL util.throw('INCORRECT_TICKET_STATE');
|
||||||
END IF;
|
END IF;
|
||||||
|
|
||||||
END$$
|
END$$
|
||||||
DELIMITER ;
|
DELIMITER ;
|
||||||
|
|
|
@ -4,9 +4,5 @@ CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`claim_beforeInsert`
|
||||||
FOR EACH ROW
|
FOR EACH ROW
|
||||||
BEGIN
|
BEGIN
|
||||||
SET NEW.editorFk = account.myUser_getId();
|
SET NEW.editorFk = account.myUser_getId();
|
||||||
|
|
||||||
IF (SELECT shipped FROM ticket WHERE id = NEW.ticketFk) > util.VN_NOW() THEN
|
|
||||||
CALL util.throw('Future ticket date not allowed');
|
|
||||||
END IF;
|
|
||||||
END$$
|
END$$
|
||||||
DELIMITER ;
|
DELIMITER ;
|
||||||
|
|
|
@ -16,7 +16,7 @@ BEGIN
|
||||||
OR NOT (NEW.socialName <=> OLD.socialName)
|
OR NOT (NEW.socialName <=> OLD.socialName)
|
||||||
OR NOT (NEW.street <=> OLD.street)
|
OR NOT (NEW.street <=> OLD.street)
|
||||||
OR NOT (NEW.accountingAccount <=> OLD.accountingAccount)
|
OR NOT (NEW.accountingAccount <=> OLD.accountingAccount)
|
||||||
OR NOT (NEW.isVies <=> OLD.isVies)
|
OR NOT (NEW.viesCode <=> OLD.viesCode)
|
||||||
OR NOT (NEW.fi <=> OLD.fi)
|
OR NOT (NEW.fi <=> OLD.fi)
|
||||||
OR NOT (NEW.postcode <=> OLD.postcode)
|
OR NOT (NEW.postcode <=> OLD.postcode)
|
||||||
OR NOT (NEW.city <=> OLD.city)
|
OR NOT (NEW.city <=> OLD.city)
|
||||||
|
|
|
@ -10,6 +10,7 @@ BEGIN
|
||||||
|
|
||||||
IF NEW.isBooked = OLD.isBooked AND (
|
IF NEW.isBooked = OLD.isBooked AND (
|
||||||
NOT (NEW.supplierFk <=> OLD.supplierFk) OR
|
NOT (NEW.supplierFk <=> OLD.supplierFk) OR
|
||||||
|
NOT (NEW.dated <=> OLD.dated) OR
|
||||||
NOT (NEW.travelFk <=> OLD.travelFk) OR
|
NOT (NEW.travelFk <=> OLD.travelFk) OR
|
||||||
NOT (NEW.companyFk <=> OLD.companyFk) OR
|
NOT (NEW.companyFk <=> OLD.companyFk) OR
|
||||||
NOT (NEW.invoiceInFk <=> OLD.invoiceInFk) OR
|
NOT (NEW.invoiceInFk <=> OLD.invoiceInFk) OR
|
||||||
|
|
|
@ -0,0 +1,26 @@
|
||||||
|
DELIMITER $$
|
||||||
|
CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`roadmapStop_beforeDelete`
|
||||||
|
BEFORE DELETE ON `roadmapStop`
|
||||||
|
FOR EACH ROW
|
||||||
|
BEGIN
|
||||||
|
DECLARE vMaxEta DATETIME;
|
||||||
|
DECLARE vRoadmapEta DATETIME;
|
||||||
|
|
||||||
|
IF OLD.roadmapFk IS NOT NULL THEN
|
||||||
|
SELECT MAX(eta) INTO vMaxEta
|
||||||
|
FROM roadmapStop
|
||||||
|
WHERE roadmapFk = OLD.roadmapFk
|
||||||
|
AND id <> OLD.id;
|
||||||
|
|
||||||
|
SELECT eta INTO vRoadmapEta
|
||||||
|
FROM roadmap
|
||||||
|
WHERE id = OLD.roadmapFk;
|
||||||
|
|
||||||
|
IF vMaxEta <> vRoadmapEta OR vMaxEta IS NULL THEN
|
||||||
|
UPDATE roadmap
|
||||||
|
SET eta = vMaxEta
|
||||||
|
WHERE id = OLD.roadmapFk;
|
||||||
|
END IF;
|
||||||
|
END IF;
|
||||||
|
END$$
|
||||||
|
DELIMITER ;
|
|
@ -3,6 +3,8 @@ CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`roadmapStop_beforeInser
|
||||||
BEFORE INSERT ON `roadmapStop`
|
BEFORE INSERT ON `roadmapStop`
|
||||||
FOR EACH ROW
|
FOR EACH ROW
|
||||||
BEGIN
|
BEGIN
|
||||||
|
DECLARE vRoadmapEta DATETIME;
|
||||||
|
|
||||||
SET NEW.editorFk = account.myUser_getId();
|
SET NEW.editorFk = account.myUser_getId();
|
||||||
|
|
||||||
IF NEW.description IS NOT NULL THEN
|
IF NEW.description IS NOT NULL THEN
|
||||||
|
@ -14,5 +16,17 @@ BEGIN
|
||||||
CALL util.throw('Departure time can not be after arrival time');
|
CALL util.throw('Departure time can not be after arrival time');
|
||||||
END IF;
|
END IF;
|
||||||
END IF;
|
END IF;
|
||||||
|
|
||||||
|
IF NEW.roadmapFk IS NOT NULL AND NEW.eta IS NOT NULL THEN
|
||||||
|
SELECT eta INTO vRoadmapEta
|
||||||
|
FROM roadmap
|
||||||
|
WHERE id = NEW.roadmapFk;
|
||||||
|
|
||||||
|
IF vRoadmapEta < NEW.eta OR vRoadmapEta IS NULL THEN
|
||||||
|
UPDATE roadmap
|
||||||
|
SET eta = NEW.eta
|
||||||
|
WHERE id = NEW.roadmapFk;
|
||||||
|
END IF;
|
||||||
|
END IF;
|
||||||
END$$
|
END$$
|
||||||
DELIMITER ;
|
DELIMITER ;
|
|
@ -3,17 +3,40 @@ CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`roadmapStop_beforeUpdat
|
||||||
BEFORE UPDATE ON `roadmapStop`
|
BEFORE UPDATE ON `roadmapStop`
|
||||||
FOR EACH ROW
|
FOR EACH ROW
|
||||||
BEGIN
|
BEGIN
|
||||||
|
DECLARE vMaxEta DATETIME;
|
||||||
|
DECLARE vCurrentEta DATETIME;
|
||||||
|
|
||||||
SET NEW.editorFk = account.myUser_getId();
|
SET NEW.editorFk = account.myUser_getId();
|
||||||
|
|
||||||
IF NOT (NEW.description <=> OLD.description) THEN
|
IF NOT (NEW.description <=> OLD.description) THEN
|
||||||
SET NEW.description = UCASE(NEW.description);
|
SET NEW.description = UCASE(NEW.description);
|
||||||
END IF;
|
END IF;
|
||||||
|
|
||||||
IF NOT (NEW.roadmapFk <=> OLD.roadmapFk) OR NOT (NEW.eta <=> OLD.eta) THEN
|
IF (NOT (NEW.roadmapFk <=> OLD.roadmapFk) AND NEW.roadmapFk IS NOT NULL)
|
||||||
|
OR (NOT (NEW.eta <=> OLD.eta)) THEN
|
||||||
|
|
||||||
IF NEW.eta < (SELECT etd FROM roadmap WHERE id = NEW.roadmapFk) THEN
|
IF NEW.eta < (SELECT etd FROM roadmap WHERE id = NEW.roadmapFk) THEN
|
||||||
CALL util.throw('Departure time can not be after arrival time');
|
CALL util.throw('Departure time can not be after arrival time');
|
||||||
END IF;
|
END IF;
|
||||||
|
|
||||||
|
SELECT MAX(eta) INTO vMaxEta
|
||||||
|
FROM roadmapStop
|
||||||
|
WHERE roadmapFk = NEW.roadmapFk
|
||||||
|
AND id <> OLD.id;
|
||||||
|
|
||||||
|
IF vMaxEta < NEW.eta OR vMaxEta IS NULL THEN
|
||||||
|
SET vMaxEta = NEW.eta;
|
||||||
|
END IF;
|
||||||
|
|
||||||
|
SELECT eta INTO vCurrentEta
|
||||||
|
FROM roadmap
|
||||||
|
WHERE id = NEW.roadmapFk;
|
||||||
|
|
||||||
|
IF (vMaxEta <> vCurrentEta OR vMaxEta IS NULL) OR vMaxEta IS NOT NULL THEN
|
||||||
|
UPDATE roadmap
|
||||||
|
SET eta = vMaxEta
|
||||||
|
WHERE id = NEW.roadmapFk;
|
||||||
|
END IF;
|
||||||
END IF;
|
END IF;
|
||||||
END$$
|
END$$
|
||||||
DELIMITER ;
|
DELIMITER ;
|
|
@ -0,0 +1,17 @@
|
||||||
|
DELIMITER $$
|
||||||
|
CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`roadmap_afterUpdate`
|
||||||
|
AFTER UPDATE ON `roadmap`
|
||||||
|
FOR EACH ROW
|
||||||
|
BEGIN
|
||||||
|
DECLARE vSeconds INT;
|
||||||
|
|
||||||
|
IF NOT (NEW.etd <=> OLD.etd) THEN
|
||||||
|
SET vSeconds = TIME_TO_SEC(TIMEDIFF(NEW.etd, OLD.etd));
|
||||||
|
IF vSeconds IS NOT NULL AND vSeconds <> 0 THEN
|
||||||
|
UPDATE roadmapStop
|
||||||
|
SET eta = eta + INTERVAL vSeconds SECOND
|
||||||
|
WHERE roadmapFk = NEW.id;
|
||||||
|
END IF;
|
||||||
|
END IF;
|
||||||
|
END$$
|
||||||
|
DELIMITER ;
|
|
@ -3,8 +3,6 @@ CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`roadmap_beforeUpdate`
|
||||||
BEFORE UPDATE ON `roadmap`
|
BEFORE UPDATE ON `roadmap`
|
||||||
FOR EACH ROW
|
FOR EACH ROW
|
||||||
BEGIN
|
BEGIN
|
||||||
DECLARE vSeconds INT;
|
|
||||||
|
|
||||||
SET NEW.editorFk = account.myUser_getId();
|
SET NEW.editorFk = account.myUser_getId();
|
||||||
|
|
||||||
IF NOT (NEW.name <=> OLD.name) THEN
|
IF NOT (NEW.name <=> OLD.name) THEN
|
||||||
|
@ -39,15 +37,5 @@ BEGIN
|
||||||
FROM worker w
|
FROM worker w
|
||||||
WHERE w.id = NEW.driverChangeFk);
|
WHERE w.id = NEW.driverChangeFk);
|
||||||
END IF;
|
END IF;
|
||||||
|
|
||||||
IF NOT (NEW.etd <=> OLD.etd) THEN
|
|
||||||
SET vSeconds = TIME_TO_SEC(TIMEDIFF(NEW.etd, OLD.etd));
|
|
||||||
|
|
||||||
IF vSeconds <> 0 THEN
|
|
||||||
UPDATE roadmapStop
|
|
||||||
SET eta = eta + INTERVAL vSeconds SECOND
|
|
||||||
WHERE roadmapFk = NEW.id;
|
|
||||||
END IF;
|
|
||||||
END IF;
|
|
||||||
END$$
|
END$$
|
||||||
DELIMITER ;
|
DELIMITER ;
|
|
@ -8,7 +8,7 @@ BEGIN
|
||||||
OR NOT (NEW.street <=> OLD.street)
|
OR NOT (NEW.street <=> OLD.street)
|
||||||
OR NOT (NEW.account <=> OLD.account)
|
OR NOT (NEW.account <=> OLD.account)
|
||||||
OR NOT (NEW.nif <=> OLD.nif)
|
OR NOT (NEW.nif <=> OLD.nif)
|
||||||
OR NOT (NEW.isVies <=> OLD.isVies)
|
OR NOT (NEW.viesCode <=> OLD.viesCode)
|
||||||
OR NOT (NEW.provinceFk <=> OLD.provinceFk)
|
OR NOT (NEW.provinceFk <=> OLD.provinceFk)
|
||||||
OR NOT (NEW.countryFk <=> OLD.countryFk)
|
OR NOT (NEW.countryFk <=> OLD.countryFk)
|
||||||
OR NOT (NEW.postCode <=> OLD.postCode)
|
OR NOT (NEW.postCode <=> OLD.postCode)
|
||||||
|
|
|
@ -4,9 +4,5 @@ CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`zone_beforeInsert`
|
||||||
FOR EACH ROW
|
FOR EACH ROW
|
||||||
BEGIN
|
BEGIN
|
||||||
SET NEW.editorFk = account.myUser_getId();
|
SET NEW.editorFk = account.myUser_getId();
|
||||||
|
|
||||||
IF NEW.priceOptimum = 0 THEN
|
|
||||||
SET NEW.priceOptimum = NEW.price;
|
|
||||||
END IF;
|
|
||||||
END$$
|
END$$
|
||||||
DELIMITER ;
|
DELIMITER ;
|
||||||
|
|
|
@ -4,9 +4,5 @@ CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`zone_beforeUpdate`
|
||||||
FOR EACH ROW
|
FOR EACH ROW
|
||||||
BEGIN
|
BEGIN
|
||||||
SET NEW.editorFk = account.myUser_getId();
|
SET NEW.editorFk = account.myUser_getId();
|
||||||
|
|
||||||
IF NEW.priceOptimum = 0 THEN
|
|
||||||
CALL util.throw('The priceOptimum cannot be 0');
|
|
||||||
END IF;
|
|
||||||
END$$
|
END$$
|
||||||
DELIMITER ;
|
DELIMITER ;
|
||||||
|
|
|
@ -7,5 +7,5 @@ AS SELECT `rs`.`id` AS `id`,
|
||||||
`rs`.`description` AS `description`,
|
`rs`.`description` AS `description`,
|
||||||
`rs`.`bufferFk` AS `bufferFk`,
|
`rs`.`bufferFk` AS `bufferFk`,
|
||||||
`rs`.`created` AS `created`,
|
`rs`.`created` AS `created`,
|
||||||
`rs`.`editorFk` AS `userFk`
|
`rs`.`userFk` AS `userFk`
|
||||||
FROM `vn`.`roadmapStop` `rs`;
|
FROM `vn`.`roadmapStop` `rs`;
|
||||||
|
|
|
@ -1,8 +0,0 @@
|
||||||
CREATE OR REPLACE DEFINER=`vn`@`localhost`
|
|
||||||
SQL SECURITY DEFINER
|
|
||||||
VIEW `vn`.`roadmapEta`
|
|
||||||
AS SELECT `roadmapFk` AS id,
|
|
||||||
MAX(`eta`) AS `eta`
|
|
||||||
FROM `vn`.`roadmapStop`
|
|
||||||
WHERE `roadmapFk` IS NOT NULL
|
|
||||||
GROUP BY `roadmapFk`;
|
|
|
@ -40,7 +40,7 @@ AS SELECT `c`.`id` AS `id_cliente`,
|
||||||
`c`.`isCreatedAsServed` AS `isCreatedAsServed`,
|
`c`.`isCreatedAsServed` AS `isCreatedAsServed`,
|
||||||
`c`.`hasInvoiceSimplified` AS `hasInvoiceSimplified`,
|
`c`.`hasInvoiceSimplified` AS `hasInvoiceSimplified`,
|
||||||
`c`.`salesPersonFk` AS `Id_Trabajador`,
|
`c`.`salesPersonFk` AS `Id_Trabajador`,
|
||||||
`c`.`isVies` AS `vies`,
|
`c`.`viesCode` AS `vies`,
|
||||||
`c`.`bankEntityFk` AS `bankEntityFk`,
|
`c`.`bankEntityFk` AS `bankEntityFk`,
|
||||||
`c`.`typeFk` AS `typeFk`
|
`c`.`typeFk` AS `typeFk`
|
||||||
FROM `vn`.`client` `c`
|
FROM `vn`.`client` `c`
|
||||||
|
|
|
@ -1,6 +0,0 @@
|
||||||
INSERT IGNORE INTO salix.ACL (model,property,accessType,permission,principalType,principalId)
|
|
||||||
VALUES
|
|
||||||
('Ticket','itemLack','READ','ALLOW','ROLE','employee'),
|
|
||||||
('Ticket','itemLackDetail','READ','ALLOW','ROLE','employee'),
|
|
||||||
('Ticket','split','WRITE','ALLOW','ROLE','employee'),
|
|
||||||
('Sale','replaceItem','WRITE','ALLOW','ROLE','employee');
|
|
|
@ -1,2 +0,0 @@
|
||||||
ALTER TABLE vn.ticketConfig ADD lackAlertPrice int(11) DEFAULT 30 NOT NULL COMMENT 'Value to alert when item proposal exceed price';
|
|
||||||
ALTER TABLE vn.ticketConfig ADD lackScopeDays int(11) DEFAULT 2 NOT NULL COMMENT 'Number of days to look back for ticket with negatives';
|
|
|
@ -0,0 +1,29 @@
|
||||||
|
use vn;
|
||||||
|
ALTER TABLE vn.client
|
||||||
|
ADD COLUMN IF NOT EXISTS viesCode varchar(2) DEFAULT NULL;
|
||||||
|
|
||||||
|
ALTER TABLE vn.supplier
|
||||||
|
ADD COLUMN IF NOT EXISTS viesCode varchar(2) COLLATE utf8mb3_unicode_ci DEFAULT NULL NULL;
|
||||||
|
|
||||||
|
-- client
|
||||||
|
UPDATE vn.client c
|
||||||
|
JOIN country c2 ON c2.id = c.countryFk
|
||||||
|
SET c.viesCode = c2.code
|
||||||
|
WHERE c.isVies;
|
||||||
|
|
||||||
|
UPDATE client c
|
||||||
|
JOIN country c2 ON c2.id = c.countryFk
|
||||||
|
SET c.viesCode = 'FR'
|
||||||
|
WHERE c2.name = 'Mónaco' AND c.isVies;
|
||||||
|
|
||||||
|
-- supplier
|
||||||
|
UPDATE supplier s
|
||||||
|
JOIN country c ON c.id = s.countryFk
|
||||||
|
SET s.viesCode = c.code
|
||||||
|
WHERE s.isVies;
|
||||||
|
|
||||||
|
ALTER TABLE vn.client
|
||||||
|
CHANGE IF EXISTS isVies isVies__ tinyint(4) NOT NULL DEFAULT 0 COMMENT'@deprecated 2025-01-24';
|
||||||
|
|
||||||
|
ALTER TABLE vn.supplier
|
||||||
|
CHANGE IF EXISTS isVies isVies__ tinyint(4) NOT NULL DEFAULT 0 COMMENT '@deprecated 2025-01-24';
|
|
@ -1,23 +0,0 @@
|
||||||
CREATE TABLE vn.parkingCoordinates (
|
|
||||||
parkingFk int(11) NOT NULL,
|
|
||||||
x varchar(5) NOT NULL,
|
|
||||||
y varchar(5) NOT NULL,
|
|
||||||
z varchar(5) NOT NULL,
|
|
||||||
CONSTRAINT parkingCoordinates_pk PRIMARY KEY (parkingFk),
|
|
||||||
CONSTRAINT parkingCoordinates_parking_FK FOREIGN KEY (parkingFk) REFERENCES vn.parking(id) ON DELETE CASCADE ON UPDATE CASCADE
|
|
||||||
)
|
|
||||||
ENGINE=InnoDB
|
|
||||||
DEFAULT CHARSET=utf8mb3
|
|
||||||
COLLATE=utf8mb3_unicode_ci;
|
|
||||||
|
|
||||||
INSERT INTO vn.parkingCoordinates (parkingFk, x, y, z)
|
|
||||||
SELECT id, `column`, `row`, `floor`
|
|
||||||
FROM vn.parking
|
|
||||||
WHERE `column` IS NOT NULL
|
|
||||||
OR `row` IS NOT NULL
|
|
||||||
OR `floor` IS NOT NULL;
|
|
||||||
|
|
||||||
ALTER TABLE vn.parking
|
|
||||||
DROP COLUMN `column`,
|
|
||||||
DROP COLUMN `row`,
|
|
||||||
DROP COLUMN `floor`;
|
|
|
@ -1,90 +0,0 @@
|
||||||
INSERT INTO salix.ACL (model,property,accessType,permission,principalType,principalId)
|
|
||||||
VALUES ('Entry','getBuyList','READ','ALLOW','ROLE','buyer'),
|
|
||||||
('Entry','getBuyUltimate','READ','ALLOW','ROLE','buyer'),
|
|
||||||
('Entry','search','READ','ALLOW','ROLE','buyer'),
|
|
||||||
('Entry','create','WRITE','ALLOW','ROLE','buyer'),
|
|
||||||
('Entry','cloneEntry','WRITE','ALLOW','ROLE','buyer'),
|
|
||||||
('Entry','deleteEntry','WRITE','ALLOW','ROLE','buyer'),
|
|
||||||
('Entry','recalcEntryPrices','WRITE','ALLOW','ROLE','buyer'),
|
|
||||||
('EntryType','find','READ','ALLOW','ROLE','buyer'),
|
|
||||||
('EntryConfig','findOne','READ','ALLOW','ROLE','buyer');
|
|
||||||
|
|
||||||
ALTER TABLE vn.ink ADD IF NOT EXISTS hexJson TEXT NOT NULL;
|
|
||||||
|
|
||||||
UPDATE vn.ink
|
|
||||||
SET hexJson = CONCAT('{"value": ["',hex,'"]}');
|
|
||||||
|
|
||||||
UPDATE vn.ink
|
|
||||||
SET hexJson = CASE `name`
|
|
||||||
WHEN 'Blanco/Naranja' THEN '{"value": ["FFFFFF", "FFA500"]}'
|
|
||||||
WHEN 'Sin especificar' THEN '{"value": ["808080"]}'
|
|
||||||
WHEN '2 Colores' THEN '{"value": ["000000", "FFFFFF"]}'
|
|
||||||
WHEN 'Amarillo/Marrón' THEN '{"value": ["FFFF00", "8B4513"]}'
|
|
||||||
WHEN 'Amarillo/Naranja' THEN '{"value": ["FFFF00", "FFA500"]}'
|
|
||||||
WHEN 'Rosa/Blanco/Amarillo' THEN '{"value": ["FFC0CB", "FFFFFF", "FFFF00"]}'
|
|
||||||
WHEN 'Rosa/Amarillo' THEN '{"value": ["FFC0CB", "FFFF00"]}'
|
|
||||||
WHEN 'Antracita' THEN '{"value": ["2F2F2F"]}'
|
|
||||||
WHEN 'Azul/Amarillo' THEN '{"value": ["0000FF", "FFFF00"]}'
|
|
||||||
WHEN 'Azul Claro' THEN '{"value": ["ADD8E6"]}'
|
|
||||||
WHEN 'Azul/Marron' THEN '{"value": ["0000FF", "8B4513"]}'
|
|
||||||
WHEN 'Azul/Verde' THEN '{"value": ["0000FF", "008000"]}'
|
|
||||||
WHEN 'Blanco/Amarillo' THEN '{"value": ["FFFFFF", "FFFF00"]}'
|
|
||||||
WHEN 'Blaugrana' THEN '{"value": ["A50044", "004D98"]}'
|
|
||||||
WHEN 'Blanco/Negro' THEN '{"value": ["FFFFFF", "000000"]}'
|
|
||||||
WHEN 'Blanco/Verde' THEN '{"value": ["FFFFFF", "008000"]}'
|
|
||||||
WHEN 'Blanco/Azul' THEN '{"value": ["FFFFFF", "0000FF"]}'
|
|
||||||
WHEN 'Blanco/Rosa' THEN '{"value": ["FFFFFF", "FFC0CB"]}'
|
|
||||||
WHEN 'Cognac/Verde' THEN '{"value": ["9A463D", "008000"]}'
|
|
||||||
WHEN 'Champagne/Verde' THEN '{"value": ["F7E7CE", "008000"]}'
|
|
||||||
WHEN 'Camuflaje' THEN '{"value": ["6B8E23", "556B2F", "8B4513"]}'
|
|
||||||
WHEN 'Crema/Rosa' THEN '{"value": ["FFFDD0", "FFC0CB"]}'
|
|
||||||
WHEN 'Fucsia/Amarillo' THEN '{"value": ["FF00FF", "FFFF00"]}'
|
|
||||||
WHEN 'Fucsia/Blanco' THEN '{"value": ["FF00FF", "FFFFFF"]}'
|
|
||||||
WHEN 'Fucsia/Crema' THEN '{"value": ["FF00FF", "FFFDD0"]}'
|
|
||||||
WHEN 'Fucsia/Rosa' THEN '{"value": ["FF00FF", "FFC0CB"]}'
|
|
||||||
WHEN 'Fucsia/Verde' THEN '{"value": ["FF00FF", "008000"]}'
|
|
||||||
WHEN 'Granate/Blanco' THEN '{"value": ["800000", "FFFFFF"]}'
|
|
||||||
WHEN 'Gris Lila' THEN '{"value": ["808080", "C8A2C8"]}'
|
|
||||||
WHEN 'Lavanda/Amarillo' THEN '{"value": ["E6E6FA", "FFFF00"]}'
|
|
||||||
WHEN 'Lavanda/Gris' THEN '{"value": ["E6E6FA", "808080"]}'
|
|
||||||
WHEN 'Lividum' THEN '{"value": ["702963"]}'
|
|
||||||
WHEN 'Morado/Amarillo' THEN '{"value": ["800080", "FFFF00"]}'
|
|
||||||
WHEN 'Marrón/Blanco' THEN '{"value": ["8B4513", "FFFFFF"]}'
|
|
||||||
WHEN 'Marron/Gris' THEN '{"value": ["8B4513", "808080"]}'
|
|
||||||
WHEN 'Marron/Negro' THEN '{"value": ["8B4513", "000000"]}'
|
|
||||||
WHEN 'Marrón/Verde' THEN '{"value": ["8B4513", "008000"]}'
|
|
||||||
WHEN 'Matizado' THEN '{"value": ["D3D3D3", "808080", "FFFFFF"]}'
|
|
||||||
WHEN 'Mixto' THEN '{"value": ["FF0000", "0000FF", "008000", "FFFF00"]}'
|
|
||||||
WHEN 'Marrón Oscuro' THEN '{"value": ["654321"]}'
|
|
||||||
WHEN 'Naranja/Marron' THEN '{"value": ["FFA500", "8B4513"]}'
|
|
||||||
WHEN 'Naranja/Rosa' THEN '{"value": ["FFA500", "FFC0CB"]}'
|
|
||||||
WHEN 'Ocre/Burgundi' THEN '{"value": ["CC7722", "800020"]}'
|
|
||||||
WHEN 'Oro/Plata' THEN '{"value": ["FFD700", "C0C0C0"]}'
|
|
||||||
WHEN 'Oro/Negro' THEN '{"value": ["FFD700", "000000"]}'
|
|
||||||
WHEN 'Oro/Verde' THEN '{"value": ["FFD700", "008000"]}'
|
|
||||||
WHEN 'Purpura/Blanco' THEN '{"value": ["800080", "FFFFFF"]}'
|
|
||||||
WHEN 'Purpura/Rosa' THEN '{"value": ["800080", "FFC0CB"]}'
|
|
||||||
WHEN 'Pastel' THEN '{"value": ["FFB6C1", "87CEFA", "98FB98"]}'
|
|
||||||
WHEN 'Plata' THEN '{"value": ["C0C0C0"]}'
|
|
||||||
WHEN 'Plata/Verde' THEN '{"value": ["C0C0C0", "008000"]}'
|
|
||||||
WHEN 'Rojo/Amarillo' THEN '{"value": ["FF0000", "FFFF00"]}'
|
|
||||||
WHEN 'Rojo/Blanco' THEN '{"value": ["FF0000", "FFFFFF"]}'
|
|
||||||
WHEN 'Rojo/Naranja' THEN '{"value": ["FF0000", "FFA500"]}'
|
|
||||||
WHEN 'Rojo/Oro' THEN '{"value": ["FF0000", "FFD700"]}'
|
|
||||||
WHEN 'Rojo/Verde' THEN '{"value": ["FF0000", "008000"]}'
|
|
||||||
WHEN 'Rosa/Lila' THEN '{"value": ["FFC0CB", "C8A2C8"]}'
|
|
||||||
WHEN 'Rosa/Naranja' THEN '{"value": ["FFC0CB", "FFA500"]}'
|
|
||||||
WHEN 'Rojo/Rosa' THEN '{"value": ["FF0000", "FFC0CB"]}'
|
|
||||||
WHEN 'Rosa empolvado' THEN '{"value": ["E6B8AF"]}'
|
|
||||||
WHEN 'Rosa/Verde' THEN '{"value": ["FFC0CB", "008000"]}'
|
|
||||||
WHEN 'Topo/Blanco' THEN '{"value": ["8B8589", "FFFFFF"]}'
|
|
||||||
WHEN 'Topo' THEN '{"value": ["8B8589"]}'
|
|
||||||
WHEN 'Transparente' THEN '{"value": ["00000000"]}'
|
|
||||||
WHEN 'Verde/Amarillo' THEN '{"value": ["008000", "FFFF00"]}'
|
|
||||||
WHEN 'Verde/Negro' THEN '{"value": ["008000", "000000"]}'
|
|
||||||
WHEN 'Variado' THEN '{"value": ["FF0000", "0000FF", "008000", "FFFF00", "FFA500"]}'
|
|
||||||
WHEN 'Verde Claro/Morado' THEN '{"value": ["90EE90", "800080"]}'
|
|
||||||
WHEN 'Verde/Lila' THEN '{"value": ["008000", "C8A2C8"]}'
|
|
||||||
WHEN 'Vaquero Neon' THEN '{"value": ["1560BD", "FFFF00"]}'
|
|
||||||
ELSE hexJson
|
|
||||||
END;
|
|
|
@ -1,3 +0,0 @@
|
||||||
ALTER TABLE vn.roadmap
|
|
||||||
MODIFY COLUMN dollyPlate varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL NULL COMMENT
|
|
||||||
'Vehículo sin motor diseñado para conectarse a una unidad tractora, un camión o un vehículo tractor con fuerte potencia de tracción';
|
|
|
@ -1,3 +0,0 @@
|
||||||
ALTER TABLE vn.volumeConfig ADD COLUMN id INT(11) NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST;
|
|
||||||
|
|
||||||
GRANT UPDATE (palletM3) ON vn.volumeConfig TO deliveryBoss;
|
|
|
@ -1,3 +0,0 @@
|
||||||
ALTER TABLE vn.vehicle
|
|
||||||
MODIFY COLUMN typeFk enum('car','van','truck','trailer','tug','dolly','trailerLink')
|
|
||||||
CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT 'van' NOT NULL;
|
|
|
@ -1 +0,0 @@
|
||||||
ALTER TABLE vn.roadmap DROP COLUMN eta;
|
|
|
@ -1,8 +0,0 @@
|
||||||
UPDATE vn.expedition e
|
|
||||||
JOIN (
|
|
||||||
SELECT id
|
|
||||||
FROM vn.expedition
|
|
||||||
WHERE hostFk COLLATE utf8mb3_unicode_ci NOT IN
|
|
||||||
(SELECT code COLLATE utf8mb3_unicode_ci FROM vn.host WHERE code IS NOT NULL)
|
|
||||||
) s ON e.id = s.id
|
|
||||||
SET e.hostFk = 'pc336';
|
|
|
@ -1,9 +0,0 @@
|
||||||
ALTER TABLE vn.expedition
|
|
||||||
MODIFY COLUMN hostFk VARCHAR(30) COLLATE utf8mb3_general_ci;
|
|
||||||
|
|
||||||
ALTER TABLE vn.expedition
|
|
||||||
ADD CONSTRAINT fk_expedition_host_code
|
|
||||||
FOREIGN KEY (hostFk)
|
|
||||||
REFERENCES host(code)
|
|
||||||
ON UPDATE CASCADE
|
|
||||||
ON DELETE CASCADE;
|
|
|
@ -1,3 +0,0 @@
|
||||||
UPDATE vn.zone
|
|
||||||
SET priceOptimum = price
|
|
||||||
WHERE priceOptimum = 0;
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
version: '3.7'
|
||||||
|
services:
|
||||||
|
front:
|
||||||
|
image: registry.verdnatura.es/salix-front:${VERSION:?}
|
||||||
|
build:
|
||||||
|
context: front
|
||||||
|
back:
|
||||||
|
image: registry.verdnatura.es/salix-back:${VERSION:?}
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: back/Dockerfile
|
|
@ -58,10 +58,10 @@
|
||||||
"Swift / BIC can't be empty": "Swift / BIC can't be empty",
|
"Swift / BIC can't be empty": "Swift / BIC can't be empty",
|
||||||
"Deleted sales from ticket": "I have deleted the following lines from the ticket [{{ticketId}}]({{{ticketUrl}}}): {{{deletions}}}",
|
"Deleted sales from ticket": "I have deleted the following lines from the ticket [{{ticketId}}]({{{ticketUrl}}}): {{{deletions}}}",
|
||||||
"Added sale to ticket": "I have added the following line to the ticket [{{ticketId}}]({{{ticketUrl}}}): {{{addition}}}",
|
"Added sale to ticket": "I have added the following line to the ticket [{{ticketId}}]({{{ticketUrl}}}): {{{addition}}}",
|
||||||
"Changed sale discount": "I have changed the following lines discounts from the ticket [{{ticketId}}]({{{ticketUrl}}}): {{{changes}}} {{ticketWeekly}}",
|
"Changed sale discount": "I have changed the following lines discounts from the ticket [{{ticketId}}]({{{ticketUrl}}}): {{{changes}}}",
|
||||||
"Created claim": "I have created the claim [{{claimId}}]({{{claimUrl}}}) for the following lines from the ticket [{{ticketId}}]({{{ticketUrl}}}): {{{changes}}}",
|
"Created claim": "I have created the claim [{{claimId}}]({{{claimUrl}}}) for the following lines from the ticket [{{ticketId}}]({{{ticketUrl}}}): {{{changes}}}",
|
||||||
"Changed sale price": "I have changed the price of [{{itemId}} {{concept}}]({{{itemUrl}}}) ({{quantity}}) from {{oldPrice}}€ ➔ *{{newPrice}}€* of the ticket [{{ticketId}}]({{{ticketUrl}}}) {{ticketWeekly}}",
|
"Changed sale price": "I have changed the price of [{{itemId}} {{concept}}]({{{itemUrl}}}) ({{quantity}}) from {{oldPrice}}€ ➔ *{{newPrice}}€* of the ticket [{{ticketId}}]({{{ticketUrl}}})",
|
||||||
"Changed sale quantity": "I have changed {{changes}} of the ticket [{{ticketId}}]({{{ticketUrl}}}) {{ticketWeekly}}",
|
"Changed sale quantity": "I have changed {{changes}} of the ticket [{{ticketId}}]({{{ticketUrl}}})",
|
||||||
"Changes in sales": "the quantity of [{{itemId}} {{concept}}]({{{itemUrl}}}) from {{oldQuantity}} ➔ *{{newQuantity}}*",
|
"Changes in sales": "the quantity of [{{itemId}} {{concept}}]({{{itemUrl}}}) from {{oldQuantity}} ➔ *{{newQuantity}}*",
|
||||||
"Changed sale reserved state": "I have changed the following lines reserved state from the ticket [{{ticketId}}]({{{ticketUrl}}}): {{{changes}}}",
|
"Changed sale reserved state": "I have changed the following lines reserved state from the ticket [{{ticketId}}]({{{ticketUrl}}}): {{{changes}}}",
|
||||||
"Bought units from buy request": "Bought {{quantity}} units of [{{itemId}} {{concept}}]({{{urlItem}}}) for the ticket id [{{ticketId}}]({{{url}}})",
|
"Bought units from buy request": "Bought {{quantity}} units of [{{itemId}} {{concept}}]({{{urlItem}}}) for the ticket id [{{ticketId}}]({{{url}}})",
|
||||||
|
@ -234,7 +234,6 @@
|
||||||
"It has been invoiced but the PDF of refund not be generated": "It has been invoiced but the PDF of refund not be generated",
|
"It has been invoiced but the PDF of refund not be generated": "It has been invoiced but the PDF of refund not be generated",
|
||||||
"Cannot add holidays on this day": "Cannot add holidays on this day",
|
"Cannot add holidays on this day": "Cannot add holidays on this day",
|
||||||
"Cannot send mail": "Cannot send mail",
|
"Cannot send mail": "Cannot send mail",
|
||||||
"This worker already exists": "This worker already exists",
|
|
||||||
"CONSTRAINT `chkParkingCodeFormat` failed for `vn`.`parking`": "CONSTRAINT `chkParkingCodeFormat` failed for `vn`.`parking`",
|
"CONSTRAINT `chkParkingCodeFormat` failed for `vn`.`parking`": "CONSTRAINT `chkParkingCodeFormat` failed for `vn`.`parking`",
|
||||||
"This postcode already exists": "This postcode already exists",
|
"This postcode already exists": "This postcode already exists",
|
||||||
"Original invoice not found": "Original invoice not found",
|
"Original invoice not found": "Original invoice not found",
|
||||||
|
@ -254,9 +253,5 @@
|
||||||
"Sales already moved": "Sales already moved",
|
"Sales already moved": "Sales already moved",
|
||||||
"Holidays to past days not available": "Holidays to past days not available",
|
"Holidays to past days not available": "Holidays to past days not available",
|
||||||
"Incorrect delivery order alert on route": "Incorrect delivery order alert on route: {{ route }} zone: {{ zone }}",
|
"Incorrect delivery order alert on route": "Incorrect delivery order alert on route: {{ route }} zone: {{ zone }}",
|
||||||
"Ticket has been delivered out of order": "The ticket {{ticket}} of route {{{fullUrl}}} has been delivered out of order.",
|
"Ticket has been delivered out of order": "The ticket {{ticket}} of route {{{fullUrl}}} has been delivered out of order."
|
||||||
"clonedFromTicketWeekly": ", that is a cloned sale from ticket {{ ticketWeekly }}",
|
|
||||||
"negativeReplaced": "Replaced item [#{{oldItemId}}]({{{oldItemUrl}}}) {{oldItem}} with [#{{newItemId}}]({{{newItemUrl}}}) {{newItem}} from ticket [{{ticketId}}]({{{ticketUrl}}})",
|
|
||||||
"The tag and priority can't be repeated": "The tag and priority can't be repeated",
|
|
||||||
"duplicateWarehouse": "The introduced warehouse already exists"
|
|
||||||
}
|
}
|
|
@ -121,10 +121,10 @@
|
||||||
"Incoterms is required for a non UEE member": "El incoterms es requerido para los clientes extracomunitarios",
|
"Incoterms is required for a non UEE member": "El incoterms es requerido para los clientes extracomunitarios",
|
||||||
"Deleted sales from ticket": "He eliminado las siguientes lineas del ticket [{{ticketId}}]({{{ticketUrl}}}): {{{deletions}}}",
|
"Deleted sales from ticket": "He eliminado las siguientes lineas del ticket [{{ticketId}}]({{{ticketUrl}}}): {{{deletions}}}",
|
||||||
"Added sale to ticket": "He añadido la siguiente linea al ticket [{{ticketId}}]({{{ticketUrl}}}): {{{addition}}}",
|
"Added sale to ticket": "He añadido la siguiente linea al ticket [{{ticketId}}]({{{ticketUrl}}}): {{{addition}}}",
|
||||||
"Changed sale discount": "He cambiado el descuento de las siguientes lineas al ticket [{{ticketId}}]({{{ticketUrl}}}): {{{changes}}} {{ticketWeekly}}",
|
"Changed sale discount": "He cambiado el descuento de las siguientes lineas al ticket [{{ticketId}}]({{{ticketUrl}}}): {{{changes}}}",
|
||||||
"Created claim": "He creado la reclamación [{{claimId}}]({{{claimUrl}}}) de las siguientes lineas del ticket [{{ticketId}}]({{{ticketUrl}}}): {{{changes}}}",
|
"Created claim": "He creado la reclamación [{{claimId}}]({{{claimUrl}}}) de las siguientes lineas del ticket [{{ticketId}}]({{{ticketUrl}}}): {{{changes}}}",
|
||||||
"Changed sale price": "He cambiado el precio de [{{itemId}} {{concept}}]({{{itemUrl}}}) ({{quantity}}) de {{oldPrice}}€ ➔ *{{newPrice}}€* del ticket [{{ticketId}}]({{{ticketUrl}}}) {{ticketWeekly}} ",
|
"Changed sale price": "He cambiado el precio de [{{itemId}} {{concept}}]({{{itemUrl}}}) ({{quantity}}) de {{oldPrice}}€ ➔ *{{newPrice}}€* del ticket [{{ticketId}}]({{{ticketUrl}}})",
|
||||||
"Changed sale quantity": "He cambiado {{changes}} del ticket [{{ticketId}}]({{{ticketUrl}}}) {{ticketWeekly}}",
|
"Changed sale quantity": "He cambiado {{changes}} del ticket [{{ticketId}}]({{{ticketUrl}}})",
|
||||||
"Changes in sales": "la cantidad de [{{itemId}} {{concept}}]({{{itemUrl}}}) de {{oldQuantity}} ➔ *{{newQuantity}}*",
|
"Changes in sales": "la cantidad de [{{itemId}} {{concept}}]({{{itemUrl}}}) de {{oldQuantity}} ➔ *{{newQuantity}}*",
|
||||||
"State": "Estado",
|
"State": "Estado",
|
||||||
"regular": "normal",
|
"regular": "normal",
|
||||||
|
@ -396,8 +396,6 @@
|
||||||
"There are tickets to be invoiced": "La zona tiene tickets por facturar",
|
"There are tickets to be invoiced": "La zona tiene tickets por facturar",
|
||||||
"Incorrect delivery order alert on route": "Alerta de orden de entrega incorrecta en ruta: {{ route }} zona: {{ zone }}",
|
"Incorrect delivery order alert on route": "Alerta de orden de entrega incorrecta en ruta: {{ route }} zona: {{ zone }}",
|
||||||
"Ticket has been delivered out of order": "El ticket {{ticket}} {{{fullUrl}}} no ha sido entregado en su orden.",
|
"Ticket has been delivered out of order": "El ticket {{ticket}} {{{fullUrl}}} no ha sido entregado en su orden.",
|
||||||
"Price cannot be blank": "El precio no puede estar en blanco",
|
"Price cannot be blank": "El precio no puede estar en blanco"
|
||||||
"clonedFromTicketWeekly": ", que es una linea clonada del ticket {{ticketWeekly}}",
|
|
||||||
"negativeReplaced": "Sustituido el articulo [#{{oldItemId}}]({{{oldItemUrl}}}) {{oldItem}} por [#{{newItemId}}]({{{newItemUrl}}}) {{newItem}} del ticket [{{ticketId}}]({{{ticketUrl}}})",
|
|
||||||
"duplicateWarehouse": "El almacén seleccionado ya existe en la zona"
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -368,6 +368,5 @@
|
||||||
"ticketLostExpedition": "Le ticket [{{ticketId}}]({{{ticketUrl}}}) a l'expédition perdue suivante : {{expeditionId}}",
|
"ticketLostExpedition": "Le ticket [{{ticketId}}]({{{ticketUrl}}}) a l'expédition perdue suivante : {{expeditionId}}",
|
||||||
"The web user's email already exists": "L'email de l'internaute existe déjà",
|
"The web user's email already exists": "L'email de l'internaute existe déjà",
|
||||||
"Incorrect delivery order alert on route": "Alerte de bon de livraison incorrect sur l'itinéraire: {{ route }} zone : {{ zone }}",
|
"Incorrect delivery order alert on route": "Alerte de bon de livraison incorrect sur l'itinéraire: {{ route }} zone : {{ zone }}",
|
||||||
"Ticket has been delivered out of order": "Le ticket {{ticket}} de la route {{{fullUrl}}} a été livré hors service.",
|
"Ticket has been delivered out of order": "Le ticket {{ticket}} de la route {{{fullUrl}}} a été livré hors service."
|
||||||
"negativeReplaced": "Remplacé l'article [#{{oldItemId}}]({{{oldItemUrl}}}) {{oldItem}} par [#{{newItemId}}]({{{newItemUrl}}}) {{newItem}} du ticket [{{ticketId}}]({{{ticketUrl}}})"
|
|
||||||
}
|
}
|
|
@ -367,6 +367,5 @@
|
||||||
"ticketLostExpedition": "O ticket [{{ticketId}}]({{{ticketUrl}}}) tem a seguinte expedição perdida: {{expeditionId}}",
|
"ticketLostExpedition": "O ticket [{{ticketId}}]({{{ticketUrl}}}) tem a seguinte expedição perdida: {{expeditionId}}",
|
||||||
"The web user's email already exists": "O e-mail do utilizador da web já existe.",
|
"The web user's email already exists": "O e-mail do utilizador da web já existe.",
|
||||||
"Incorrect delivery order alert on route": "Alerta de ordem de entrega incorreta na rota: {{ route }} zona: {{ zone }}",
|
"Incorrect delivery order alert on route": "Alerta de ordem de entrega incorreta na rota: {{ route }} zona: {{ zone }}",
|
||||||
"Ticket has been delivered out of order": "O ticket {{ticket}} da rota {{{fullUrl}}} foi entregue fora de ordem.",
|
"Ticket has been delivered out of order": "O ticket {{ticket}} da rota {{{fullUrl}}} foi entregue fora de ordem."
|
||||||
"negativeReplaced": "Substituído o artigo [#{{oldItemId}}]({{{oldItemUrl}}}) {{oldItem}} por [#{{newItemId}}]({{{newItemUrl}}}) {{newItem}} do ticket [{{ticketId}}]({{{ticketUrl}}})"
|
|
||||||
}
|
}
|
|
@ -124,7 +124,7 @@ module.exports = Self => {
|
||||||
c.email,
|
c.email,
|
||||||
c.created,
|
c.created,
|
||||||
c.isActive,
|
c.isActive,
|
||||||
c.isVies,
|
c.viesCode,
|
||||||
c.isTaxDataChecked,
|
c.isTaxDataChecked,
|
||||||
c.isEqualizated,
|
c.isEqualizated,
|
||||||
c.isFreezed,
|
c.isFreezed,
|
||||||
|
|
|
@ -89,4 +89,27 @@ describe('Client updateFiscalData', () => {
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('should update the client fiscal data, set vies code that is not on the list', async() => {
|
||||||
|
const tx = await models.Client.beginTransaction({});
|
||||||
|
|
||||||
|
try {
|
||||||
|
const options = {transaction: tx};
|
||||||
|
const ctx = {req: {accessToken: {userId: administrativeId}}};
|
||||||
|
ctx.args = {viesCode: 'TT'};
|
||||||
|
|
||||||
|
const client = await models.Client.findById(clientId, null, options);
|
||||||
|
|
||||||
|
expect(client.viesCode).not.toEqual(ctx.args.viesCode);
|
||||||
|
|
||||||
|
const result = await models.Client.updateFiscalData(ctx, clientId, options);
|
||||||
|
|
||||||
|
expect(result.viesCode).toEqual(ctx.args.viesCode);
|
||||||
|
|
||||||
|
await tx.rollback();
|
||||||
|
} catch (e) {
|
||||||
|
await tx.rollback();
|
||||||
|
throw e;
|
||||||
|
}
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -73,8 +73,8 @@ module.exports = Self => {
|
||||||
type: 'boolean'
|
type: 'boolean'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
arg: 'isVies',
|
arg: 'viesCode',
|
||||||
type: 'boolean'
|
type: 'any'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
arg: 'isToBeMailed',
|
arg: 'isToBeMailed',
|
||||||
|
|
|
@ -121,7 +121,7 @@ module.exports = Self => {
|
||||||
const code = country ? country.code.toLowerCase() : null;
|
const code = country ? country.code.toLowerCase() : null;
|
||||||
const countryCode = this.fi?.toLowerCase().substring(0, 2);
|
const countryCode = this.fi?.toLowerCase().substring(0, 2);
|
||||||
|
|
||||||
if (!this.fi || !validateTin(this.fi, code) || (this.isVies && countryCode == code))
|
if (!this.fi || !validateTin(this.fi, code) || (this.viesCode && countryCode == code))
|
||||||
err();
|
err();
|
||||||
done();
|
done();
|
||||||
}
|
}
|
||||||
|
@ -248,10 +248,9 @@ module.exports = Self => {
|
||||||
const models = Self.app.models;
|
const models = Self.app.models;
|
||||||
|
|
||||||
const loopBackContext = LoopBackContext.getCurrentContext();
|
const loopBackContext = LoopBackContext.getCurrentContext();
|
||||||
|
const accessToken = {req: loopBackContext.active.accessToken};
|
||||||
|
|
||||||
const accessToken = {req: {accessToken: loopBackContext.active.accessToken}};
|
const editVerifiedDataWithoutTaxDataChecked = models.ACL.checkAccessAcl(
|
||||||
|
|
||||||
const editVerifiedDataWithoutTaxDataChecked = await models.ACL.checkAccessAcl(
|
|
||||||
accessToken,
|
accessToken,
|
||||||
'Client',
|
'Client',
|
||||||
'editVerifiedDataWithoutTaxDataCheck',
|
'editVerifiedDataWithoutTaxDataCheck',
|
||||||
|
|
|
@ -103,9 +103,6 @@
|
||||||
"quality": {
|
"quality": {
|
||||||
"type": "number"
|
"type": "number"
|
||||||
},
|
},
|
||||||
"isVies": {
|
|
||||||
"type": "boolean"
|
|
||||||
},
|
|
||||||
"isRelevant": {
|
"isRelevant": {
|
||||||
"type": "boolean"
|
"type": "boolean"
|
||||||
},
|
},
|
||||||
|
@ -147,8 +144,10 @@
|
||||||
},
|
},
|
||||||
"hasDailyInvoice": {
|
"hasDailyInvoice": {
|
||||||
"type": "boolean"
|
"type": "boolean"
|
||||||
|
},
|
||||||
|
"viesCode": {
|
||||||
|
"type": "string"
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
"relations": {
|
"relations": {
|
||||||
"account": {
|
"account": {
|
||||||
|
|
|
@ -116,7 +116,7 @@
|
||||||
</vn-horizontal>
|
</vn-horizontal>
|
||||||
<vn-horizontal>
|
<vn-horizontal>
|
||||||
<vn-autocomplete
|
<vn-autocomplete
|
||||||
vn-one
|
vn-two
|
||||||
vn-id="province"
|
vn-id="province"
|
||||||
label="Province"
|
label="Province"
|
||||||
ng-model="$ctrl.client.provinceFk"
|
ng-model="$ctrl.client.provinceFk"
|
||||||
|
@ -138,6 +138,17 @@
|
||||||
label="Country"
|
label="Country"
|
||||||
rule>
|
rule>
|
||||||
</vn-autocomplete>
|
</vn-autocomplete>
|
||||||
|
<vn-autocomplete
|
||||||
|
vn-one
|
||||||
|
vn-id="viesCode"
|
||||||
|
ng-model="$ctrl.client.viesCode"
|
||||||
|
data="countries"
|
||||||
|
show-field="code"
|
||||||
|
value-field="code"
|
||||||
|
label="viesCode"
|
||||||
|
info="To use vies that is not listed use Lilium"
|
||||||
|
rule>
|
||||||
|
</vn-autocomplete>
|
||||||
</vn-horizontal>
|
</vn-horizontal>
|
||||||
<vn-horizontal>
|
<vn-horizontal>
|
||||||
<vn-check
|
<vn-check
|
||||||
|
@ -155,9 +166,8 @@
|
||||||
ng-model="$ctrl.client.hasToInvoice">
|
ng-model="$ctrl.client.hasToInvoice">
|
||||||
</vn-check>
|
</vn-check>
|
||||||
<vn-check
|
<vn-check
|
||||||
label="Vies"
|
label="Invoice by address"
|
||||||
info="When activating it, do not enter the country code in the ID field."
|
ng-model="$ctrl.client.hasToInvoiceByAddress">
|
||||||
ng-model="$ctrl.client.isVies">
|
|
||||||
</vn-check>
|
</vn-check>
|
||||||
</vn-horizontal>
|
</vn-horizontal>
|
||||||
<vn-horizontal>
|
<vn-horizontal>
|
||||||
|
@ -166,8 +176,9 @@
|
||||||
ng-model="$ctrl.client.isToBeMailed">
|
ng-model="$ctrl.client.isToBeMailed">
|
||||||
</vn-check>
|
</vn-check>
|
||||||
<vn-check
|
<vn-check
|
||||||
label="Invoice by address"
|
label="Verified data"
|
||||||
ng-model="$ctrl.client.hasToInvoiceByAddress">
|
ng-model="$ctrl.client.isTaxDataChecked"
|
||||||
|
vn-acl="salesAssistant">
|
||||||
</vn-check>
|
</vn-check>
|
||||||
</vn-horizontal>
|
</vn-horizontal>
|
||||||
<vn-horizontal>
|
<vn-horizontal>
|
||||||
|
@ -177,13 +188,6 @@
|
||||||
info="In order to invoice, this field is not consulted, but the consignee's ET. When modifying this field if the invoice by address option is not checked, the change will be automatically propagated to all addresses, otherwise the user will be asked if he wants to propagate it or not."
|
info="In order to invoice, this field is not consulted, but the consignee's ET. When modifying this field if the invoice by address option is not checked, the change will be automatically propagated to all addresses, otherwise the user will be asked if he wants to propagate it or not."
|
||||||
on-change="$ctrl.onChangeEqualizated(value)">
|
on-change="$ctrl.onChangeEqualizated(value)">
|
||||||
</vn-check>
|
</vn-check>
|
||||||
<vn-check
|
|
||||||
label="Verified data"
|
|
||||||
ng-model="$ctrl.client.isTaxDataChecked"
|
|
||||||
vn-acl="salesAssistant">
|
|
||||||
</vn-check>
|
|
||||||
</vn-horizontal>
|
|
||||||
<vn-horizontal>
|
|
||||||
<vn-check
|
<vn-check
|
||||||
label="Electronic invoice"
|
label="Electronic invoice"
|
||||||
ng-model="$ctrl.client.hasElectronicInvoice"
|
ng-model="$ctrl.client.hasElectronicInvoice"
|
||||||
|
|
|
@ -1 +1,2 @@
|
||||||
Found a client with this phone or email: The client with id <a href="#!/client/{{clientId}}/summary" target="_blank">{{clientId}}</a> already has this phone or email. <br/> ¿Do you want to continue?
|
Found a client with this phone or email: The client with id <a href="#!/client/{{clientId}}/summary" target="_blank">{{clientId}}</a> already has this phone or email. <br/> ¿Do you want to continue?
|
||||||
|
viesCode: Vies
|
||||||
|
|
|
@ -14,3 +14,5 @@ Incoterms authorization: Autorización incoterms
|
||||||
Electronic invoice: Factura electrónica
|
Electronic invoice: Factura electrónica
|
||||||
When activating it, do not enter the country code in the IF.: Al activarlo, no informar el código del país en el campo IF
|
When activating it, do not enter the country code in the IF.: Al activarlo, no informar el código del país en el campo IF
|
||||||
The first two values are letters: Los dos primeros valores son letras
|
The first two values are letters: Los dos primeros valores son letras
|
||||||
|
viesCode: Vies
|
||||||
|
To use vies that is not listed use Lilium: Para usar un vies que no estan en la lista use Lilium
|
||||||
|
|
|
@ -1,303 +0,0 @@
|
||||||
const ParameterizedSQL = require('loopback-connector').ParameterizedSQL;
|
|
||||||
const buildFilter = require('vn-loopback/util/filter').buildFilter;
|
|
||||||
const mergeFilters = require('vn-loopback/util/filter').mergeFilters;
|
|
||||||
|
|
||||||
module.exports = Self => {
|
|
||||||
Self.remoteMethodCtx('getBuyList', {
|
|
||||||
description: 'Returns buys for editing of one entry',
|
|
||||||
accessType: 'READ',
|
|
||||||
accepts: [{
|
|
||||||
arg: 'entryFk',
|
|
||||||
type: 'number',
|
|
||||||
required: true,
|
|
||||||
description: 'The entry id',
|
|
||||||
http: {source: 'path'}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
arg: 'filter',
|
|
||||||
type: 'object',
|
|
||||||
description: 'Filter defining where, order, offset, and limit - must be a JSON-encoded string'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
arg: 'isIgnored',
|
|
||||||
type: 'boolean',
|
|
||||||
description: 'check if the buy is ignored',
|
|
||||||
http: {source: 'query'}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
arg: 'itemFk',
|
|
||||||
type: 'number',
|
|
||||||
description: 'item id',
|
|
||||||
http: {source: 'query'}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
arg: 'name',
|
|
||||||
type: 'string',
|
|
||||||
description: 'item name',
|
|
||||||
http: {source: 'query'}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
arg: 'size',
|
|
||||||
type: 'number',
|
|
||||||
description: 'item size',
|
|
||||||
http: {source: 'query'}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
arg: 'stickers',
|
|
||||||
type: 'number',
|
|
||||||
description: 'sticker quantity',
|
|
||||||
http: {source: 'query'}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
arg: 'packagingFk',
|
|
||||||
type: 'number',
|
|
||||||
description: 'packaging id',
|
|
||||||
http: {source: 'query'}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
arg: 'weight',
|
|
||||||
type: 'number',
|
|
||||||
description: 'weight',
|
|
||||||
http: {source: 'query'}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
arg: 'packing',
|
|
||||||
type: 'number',
|
|
||||||
description: 'packing quantity',
|
|
||||||
http: {source: 'query'}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
arg: 'grouping',
|
|
||||||
type: 'number',
|
|
||||||
description: 'grouping quantity',
|
|
||||||
http: {source: 'query'}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
arg: 'quantity',
|
|
||||||
type: 'number',
|
|
||||||
http: {source: 'query'}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
arg: 'buyingValue',
|
|
||||||
type: 'number',
|
|
||||||
http: {source: 'query'}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
arg: 'amount',
|
|
||||||
type: 'number',
|
|
||||||
description: 'buying value * quantity',
|
|
||||||
http: {source: 'query'}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
arg: 'price2',
|
|
||||||
type: 'number',
|
|
||||||
description: 'price for the package',
|
|
||||||
http: {source: 'query'}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
arg: 'price3',
|
|
||||||
type: 'number',
|
|
||||||
description: 'price for the box',
|
|
||||||
http: {source: 'query'}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
arg: 'minPrice',
|
|
||||||
type: 'number',
|
|
||||||
description: 'item minimum price',
|
|
||||||
http: {source: 'query'}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
arg: 'packingOut',
|
|
||||||
type: 'number',
|
|
||||||
description: 'quantity of package on a vn box',
|
|
||||||
http: {source: 'query'}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
arg: 'comment',
|
|
||||||
type: 'string',
|
|
||||||
description: 'item comment',
|
|
||||||
http: {source: 'query'}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
arg: 'subName',
|
|
||||||
type: 'string',
|
|
||||||
description: 'supplier name',
|
|
||||||
http: {source: 'query'}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
arg: 'subName',
|
|
||||||
type: 'string',
|
|
||||||
description: 'supplier name',
|
|
||||||
http: {source: 'query'}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
arg: 'company_name',
|
|
||||||
type: 'string',
|
|
||||||
description: 'company name',
|
|
||||||
http: {source: 'query'}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
arg: 'workerFk',
|
|
||||||
type: 'number',
|
|
||||||
description: 'buyer id',
|
|
||||||
http: {source: 'query'}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
arg: 'itemTypeFk',
|
|
||||||
type: 'number',
|
|
||||||
description: 'item family id',
|
|
||||||
http: {source: 'query'}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
arg: 'groupingMode',
|
|
||||||
type: 'string',
|
|
||||||
description: 'grouping mode',
|
|
||||||
http: {source: 'query'}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
arg: 'hasMinPrice',
|
|
||||||
type: 'boolean',
|
|
||||||
description: 'grouping mode',
|
|
||||||
http: {source: 'query'}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
arg: 'groupBy',
|
|
||||||
type: 'string',
|
|
||||||
description: 'group by',
|
|
||||||
http: {source: 'query'}
|
|
||||||
},
|
|
||||||
],
|
|
||||||
returns: {
|
|
||||||
type: ['object'],
|
|
||||||
root: true
|
|
||||||
},
|
|
||||||
http: {
|
|
||||||
path: `/:entryFk/getBuyList`,
|
|
||||||
verb: 'GET'
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
Self.getBuyList = async(ctx, entryFk, filter, options) => {
|
|
||||||
const myOptions = {};
|
|
||||||
|
|
||||||
if (typeof options == 'object')
|
|
||||||
Object.assign(myOptions, options);
|
|
||||||
|
|
||||||
let conn = Self.dataSource.connector;
|
|
||||||
let where = buildFilter(ctx.args, (param, value) => {
|
|
||||||
switch (param) {
|
|
||||||
case 'name':
|
|
||||||
case 'subName':
|
|
||||||
case 'company_name':
|
|
||||||
case 'comment':
|
|
||||||
return {[param]: {like: `%${value}%`}};
|
|
||||||
case 'size':
|
|
||||||
case 'isIgnored':
|
|
||||||
case 'itemFk':
|
|
||||||
case 'stickers':
|
|
||||||
case 'packagingFk':
|
|
||||||
case 'weight':
|
|
||||||
case 'packing':
|
|
||||||
case 'grouping':
|
|
||||||
case 'quantity':
|
|
||||||
case 'buyingValue':
|
|
||||||
case 'amount':
|
|
||||||
case 'price2':
|
|
||||||
case 'price3':
|
|
||||||
case 'packingOut':
|
|
||||||
case 'minPrice':
|
|
||||||
case 'workerFk':
|
|
||||||
case 'itemTypeFk':
|
|
||||||
case 'groupingMode':
|
|
||||||
case 'hasMinPrice':
|
|
||||||
return {[param]: value};
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
filter = mergeFilters(filter, {where});
|
|
||||||
|
|
||||||
let stmts = [];
|
|
||||||
let stmt;
|
|
||||||
|
|
||||||
const selectFields = `b.id,
|
|
||||||
b.isIgnored,
|
|
||||||
b.itemFk,
|
|
||||||
b.printedStickers,
|
|
||||||
b.stickers,
|
|
||||||
b.packagingFk,
|
|
||||||
b.weight,
|
|
||||||
b.packing,
|
|
||||||
b.groupingMode,
|
|
||||||
b.grouping,
|
|
||||||
b.quantity,
|
|
||||||
b.buyingValue,
|
|
||||||
ROUND(b.buyingValue * b.quantity, 2) amount,
|
|
||||||
b.isChecked,
|
|
||||||
b.price2,
|
|
||||||
b.price3,
|
|
||||||
i.name,
|
|
||||||
i.size,
|
|
||||||
i.minPrice,
|
|
||||||
i.hasMinPrice,
|
|
||||||
i.packingOut,
|
|
||||||
i.comment,
|
|
||||||
i.subName,
|
|
||||||
i.tag5,
|
|
||||||
i.value5,
|
|
||||||
i.tag6,
|
|
||||||
i.value6,
|
|
||||||
i.tag7,
|
|
||||||
i.value7,
|
|
||||||
i.tag8,
|
|
||||||
i.value8,
|
|
||||||
i.tag9,
|
|
||||||
i.value9,
|
|
||||||
i.tag10,
|
|
||||||
i.value10,
|
|
||||||
s.company_name,
|
|
||||||
ik.hexJson,
|
|
||||||
it.workerFk,
|
|
||||||
it.id itemTypeFk
|
|
||||||
`;
|
|
||||||
|
|
||||||
const groupByFields = `SUM(b.printedStickers) printedStickers,
|
|
||||||
SUM(b.packing) packing,
|
|
||||||
SUM(b.stickers) stickers,
|
|
||||||
SUM(b.weight) weight,
|
|
||||||
SUM(b.quantity) quantity,
|
|
||||||
SUM(ROUND(b.buyingValue * b.quantity, 2)) amount
|
|
||||||
`;
|
|
||||||
|
|
||||||
const groupBy = ctx.args.groupBy;
|
|
||||||
|
|
||||||
stmt = new ParameterizedSQL(
|
|
||||||
`SELECT *
|
|
||||||
FROM(
|
|
||||||
SELECT
|
|
||||||
${ groupBy ? groupByFields : selectFields}
|
|
||||||
FROM item i
|
|
||||||
LEFT JOIN ink ik ON ik.id = i.inkFk
|
|
||||||
LEFT JOIN buy b ON b.itemFk = i.id
|
|
||||||
LEFT JOIN edi.ekt e ON e.id = b.ektFk
|
|
||||||
LEFT JOIN edi.supplier s ON e.pro = s.supplier_id
|
|
||||||
LEFT JOIN itemType it ON it.id = i.typeFk
|
|
||||||
WHERE b.entryFk = ?
|
|
||||||
${groupBy ?? ''}
|
|
||||||
) sub`,
|
|
||||||
[entryFk]
|
|
||||||
);
|
|
||||||
|
|
||||||
stmt.merge(conn.makeSuffix(filter));
|
|
||||||
let itemsIndex = stmts.push(stmt) - 1;
|
|
||||||
|
|
||||||
let sql = ParameterizedSQL.join(stmts, ';');
|
|
||||||
let result = await conn.executeStmt(sql, myOptions);
|
|
||||||
|
|
||||||
if (groupBy && result.length) {
|
|
||||||
const buys = await Self.app.models.Buy.find({where: {entryFk}}, myOptions);
|
|
||||||
const buysChecked = buys.filter(buy => buy?.isChecked);
|
|
||||||
result[0].isChecked = buysChecked.length === buys.length;
|
|
||||||
}
|
|
||||||
return itemsIndex === 0 ? result : result[itemsIndex];
|
|
||||||
};
|
|
||||||
};
|
|
|
@ -1,46 +0,0 @@
|
||||||
module.exports = Self => {
|
|
||||||
Self.remoteMethodCtx('getBuyUltimate', {
|
|
||||||
description: 'Returns the last buy of the item',
|
|
||||||
accessType: 'READ',
|
|
||||||
accepts: [
|
|
||||||
{
|
|
||||||
arg: 'itemFk',
|
|
||||||
type: 'number',
|
|
||||||
required: true
|
|
||||||
}, {
|
|
||||||
arg: 'warehouseFk',
|
|
||||||
type: 'number',
|
|
||||||
required: true
|
|
||||||
}, {
|
|
||||||
arg: 'date',
|
|
||||||
type: 'date',
|
|
||||||
required: true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
returns: {
|
|
||||||
type: 'object',
|
|
||||||
root: true
|
|
||||||
},
|
|
||||||
http: {
|
|
||||||
path: `/getBuyUltimate`,
|
|
||||||
verb: 'GET'
|
|
||||||
}
|
|
||||||
});
|
|
||||||
Self.getBuyUltimate = async(ctx, itemFk, warehouseFk, date, options) => {
|
|
||||||
const myOptions = {};
|
|
||||||
|
|
||||||
if (typeof options == 'object')
|
|
||||||
Object.assign(myOptions, options);
|
|
||||||
|
|
||||||
await Self.rawSql('CALL vn.buy_getUltimate(?, ?, ?)', [itemFk, warehouseFk, date], myOptions);
|
|
||||||
return Self.rawSql(
|
|
||||||
`SELECT b.*
|
|
||||||
FROM cache.last_buy lb
|
|
||||||
JOIN buy b ON b.id = lb.buy_id
|
|
||||||
WHERE lb.item_id = ?
|
|
||||||
ORDER BY (lb.warehouse_id = ?) desc
|
|
||||||
LIMIT 1`,
|
|
||||||
[itemFk, warehouseFk], myOptions
|
|
||||||
);
|
|
||||||
};
|
|
||||||
};
|
|
|
@ -1,46 +0,0 @@
|
||||||
|
|
||||||
module.exports = Self => {
|
|
||||||
Self.remoteMethodCtx('cloneEntry', {
|
|
||||||
description: 'Clones an entry',
|
|
||||||
accessType: 'WRITE',
|
|
||||||
accepts: [{
|
|
||||||
arg: 'id',
|
|
||||||
type: 'number',
|
|
||||||
required: true,
|
|
||||||
description: 'The entry id',
|
|
||||||
http: {source: 'path'}
|
|
||||||
}],
|
|
||||||
returns: {
|
|
||||||
type: 'object',
|
|
||||||
root: true
|
|
||||||
},
|
|
||||||
http: {
|
|
||||||
path: `/:id/cloneEntry`,
|
|
||||||
verb: 'POST'
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
Self.cloneEntry = async(ctx, id, options) => {
|
|
||||||
const userId = ctx.req.accessToken.userId;
|
|
||||||
const myOptions = {userId};
|
|
||||||
let tx;
|
|
||||||
if (typeof options == 'object')
|
|
||||||
Object.assign(myOptions, options);
|
|
||||||
|
|
||||||
if (!myOptions.transaction) {
|
|
||||||
tx = await Self.beginTransaction({});
|
|
||||||
myOptions.transaction = tx;
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
await Self.rawSql('CALL entry_clone(?, @newEntryId)', [id], myOptions);
|
|
||||||
const result = await Self.rawSql('SELECT @newEntryId', [], myOptions);
|
|
||||||
const newEntryId = result[0]['@newEntryId'];
|
|
||||||
|
|
||||||
if (tx) await tx.commit();
|
|
||||||
return newEntryId;
|
|
||||||
} catch (e) {
|
|
||||||
if (tx) await tx.rollback();
|
|
||||||
throw e;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
};
|
|
|
@ -1,48 +0,0 @@
|
||||||
|
|
||||||
module.exports = Self => {
|
|
||||||
Self.remoteMethodCtx('deleteEntry', {
|
|
||||||
description: 'Clones an entry',
|
|
||||||
accessType: 'WRITE',
|
|
||||||
accepts: [{
|
|
||||||
arg: 'id',
|
|
||||||
type: 'number',
|
|
||||||
required: true,
|
|
||||||
description: 'The entry id',
|
|
||||||
http: {source: 'path'}
|
|
||||||
}],
|
|
||||||
http: {
|
|
||||||
path: `/:id/deleteEntry`,
|
|
||||||
verb: 'POST'
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
Self.deleteEntry = async(ctx, id, options) => {
|
|
||||||
const userId = ctx.req.accessToken.userId;
|
|
||||||
const myOptions = {userId};
|
|
||||||
let tx;
|
|
||||||
if (typeof options == 'object')
|
|
||||||
Object.assign(myOptions, options);
|
|
||||||
|
|
||||||
if (!myOptions.transaction) {
|
|
||||||
tx = await Self.beginTransaction({});
|
|
||||||
myOptions.transaction = tx;
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
|
||||||
const entry = await Self.findById(id, null, myOptions);
|
|
||||||
await entry.updateAttribute('travelFk', null, myOptions);
|
|
||||||
await Self.rawSql('DELETE FROM vn.duaEntry WHERE entryFk = ?;', [id], myOptions);
|
|
||||||
await Self.rawSql(`
|
|
||||||
DELETE i.*
|
|
||||||
FROM vn.invoiceIn i
|
|
||||||
JOIN vn.entry e ON e.invoiceInFk = i.id
|
|
||||||
WHERE e.id = ?`, [id], myOptions
|
|
||||||
);
|
|
||||||
|
|
||||||
if (tx) await tx.commit();
|
|
||||||
} catch (e) {
|
|
||||||
if (tx) await tx.rollback();
|
|
||||||
throw e;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
};
|
|
|
@ -129,68 +129,7 @@ module.exports = Self => {
|
||||||
arg: 'finalTemperature',
|
arg: 'finalTemperature',
|
||||||
type: 'number',
|
type: 'number',
|
||||||
description: 'Final temperature value'
|
description: 'Final temperature value'
|
||||||
},
|
}
|
||||||
{
|
|
||||||
arg: 'isExcludedFromAvailable',
|
|
||||||
type: 'boolean',
|
|
||||||
description: `landing date`
|
|
||||||
},
|
|
||||||
{
|
|
||||||
arg: 'isReceived',
|
|
||||||
type: 'boolean',
|
|
||||||
description: `travel received`
|
|
||||||
},
|
|
||||||
{
|
|
||||||
arg: 'isRaid',
|
|
||||||
type: 'boolean',
|
|
||||||
description: `travel isRaid`
|
|
||||||
},
|
|
||||||
{
|
|
||||||
arg: 'landed',
|
|
||||||
type: 'date',
|
|
||||||
description: `landing date`
|
|
||||||
},
|
|
||||||
{
|
|
||||||
arg: 'invoiceNumber',
|
|
||||||
type: 'string',
|
|
||||||
description: `entry invoice`
|
|
||||||
},
|
|
||||||
{
|
|
||||||
arg: 'reference',
|
|
||||||
type: 'string',
|
|
||||||
description: `entry reference`
|
|
||||||
},
|
|
||||||
{
|
|
||||||
arg: 'awbCode',
|
|
||||||
type: 'string',
|
|
||||||
description: `awb code`
|
|
||||||
},
|
|
||||||
{
|
|
||||||
arg: 'agencyModeId',
|
|
||||||
type: 'number',
|
|
||||||
description: `agency mode id`
|
|
||||||
},
|
|
||||||
{
|
|
||||||
arg: 'evaNotes',
|
|
||||||
type: 'string',
|
|
||||||
description: `observation`
|
|
||||||
},
|
|
||||||
{
|
|
||||||
arg: 'warehouseInFk',
|
|
||||||
type: 'number',
|
|
||||||
description: `warehouse in id`
|
|
||||||
},
|
|
||||||
{
|
|
||||||
arg: 'warehouseOutFk',
|
|
||||||
type: 'number',
|
|
||||||
description: `warehouse out id`
|
|
||||||
},
|
|
||||||
{
|
|
||||||
arg: 'entryTypeCode',
|
|
||||||
type: 'string',
|
|
||||||
description: 'entry type code'
|
|
||||||
},
|
|
||||||
|
|
||||||
],
|
],
|
||||||
returns: {
|
returns: {
|
||||||
type: ['object'],
|
type: ['object'],
|
||||||
|
@ -217,12 +156,19 @@ module.exports = Self => {
|
||||||
{'s.name': {like: `%${value}%`}},
|
{'s.name': {like: `%${value}%`}},
|
||||||
{'s.nickname': {like: `%${value}%`}}
|
{'s.nickname': {like: `%${value}%`}}
|
||||||
]};
|
]};
|
||||||
case 'invoiceNumber':
|
|
||||||
case 'reference':
|
|
||||||
case 'ref':
|
case 'ref':
|
||||||
case 'evaNotes':
|
|
||||||
param = `e.${param}`;
|
param = `e.${param}`;
|
||||||
return {[param]: {like: `%${value}%`}};
|
return {[param]: {like: `%${value}%`}};
|
||||||
|
case 'created':
|
||||||
|
return {'e.created': {gte: value}};
|
||||||
|
case 'from':
|
||||||
|
return {'t.landed': {gte: value}};
|
||||||
|
case 'fromShipped':
|
||||||
|
return {'t.shipped': {gte: value}};
|
||||||
|
case 'to':
|
||||||
|
return {'t.landed': {lte: value}};
|
||||||
|
case 'toShipped':
|
||||||
|
return {'t.shipped': {lte: value}};
|
||||||
case 'id':
|
case 'id':
|
||||||
case 'isBooked':
|
case 'isBooked':
|
||||||
case 'isConfirmed':
|
case 'isConfirmed':
|
||||||
|
@ -232,20 +178,8 @@ module.exports = Self => {
|
||||||
case 'currencyFk':
|
case 'currencyFk':
|
||||||
case 'supplierFk':
|
case 'supplierFk':
|
||||||
case 'invoiceInFk':
|
case 'invoiceInFk':
|
||||||
case 'isExcludedFromAvailable':
|
param = `e.${param}`;
|
||||||
return {[`e.${param}`]: value};
|
return {[param]: value};
|
||||||
case 'isReceived':
|
|
||||||
case 'landed':
|
|
||||||
case 'isRaid':
|
|
||||||
case 'warehouseInFk':
|
|
||||||
case 'warehouseOutFk':
|
|
||||||
return {[`t.${param}`]: value};
|
|
||||||
case 'awbCode':
|
|
||||||
return {'a.code': {like: `%${value}%`}};
|
|
||||||
case 'agencyModeId':
|
|
||||||
return {[`am.id`]: value};
|
|
||||||
case 'entryTypeCode':
|
|
||||||
return {[`et.code`]: value};
|
|
||||||
case 'initialTemperature':
|
case 'initialTemperature':
|
||||||
return {'e.initialTemperature': {lte: value}};
|
return {'e.initialTemperature': {lte: value}};
|
||||||
case 'finalTemperature':
|
case 'finalTemperature':
|
||||||
|
@ -263,14 +197,15 @@ module.exports = Self => {
|
||||||
const stmts = [];
|
const stmts = [];
|
||||||
let stmt;
|
let stmt;
|
||||||
stmt = new ParameterizedSQL(
|
stmt = new ParameterizedSQL(
|
||||||
`SELECT e.id,
|
`SELECT
|
||||||
|
e.id,
|
||||||
e.supplierFk,
|
e.supplierFk,
|
||||||
e.dated,
|
e.dated,
|
||||||
e.reference,
|
e.reference,
|
||||||
e.invoiceNumber,
|
e.invoiceNumber,
|
||||||
e.isBooked,
|
e.isBooked,
|
||||||
e.isExcludedFromAvailable,
|
e.isExcludedFromAvailable,
|
||||||
e.evaNotes,
|
e.evaNotes observation,
|
||||||
e.isConfirmed,
|
e.isConfirmed,
|
||||||
e.isOrdered,
|
e.isOrdered,
|
||||||
t.isRaid,
|
t.isRaid,
|
||||||
|
@ -292,27 +227,15 @@ module.exports = Self => {
|
||||||
cu.code currencyCode,
|
cu.code currencyCode,
|
||||||
t.shipped,
|
t.shipped,
|
||||||
t.landed,
|
t.landed,
|
||||||
t.ref travelRef,
|
t.ref AS travelRef,
|
||||||
t.warehouseInFk,
|
t.warehouseInFk,
|
||||||
w.name warehouseInName,
|
w.name warehouseInName
|
||||||
t.warehouseOutFk,
|
|
||||||
w2.name warehouseOutName,
|
|
||||||
a.code awbCode,
|
|
||||||
am.id agencyModeId,
|
|
||||||
am.name agencyModeName,
|
|
||||||
et.code entryTypeCode,
|
|
||||||
et.description entryTypeDescription,
|
|
||||||
t.isReceived
|
|
||||||
FROM vn.entry e
|
FROM vn.entry e
|
||||||
JOIN vn.supplier s ON s.id = e.supplierFk
|
JOIN vn.supplier s ON s.id = e.supplierFk
|
||||||
LEFT JOIN vn.travel t ON t.id = e.travelFk
|
JOIN vn.travel t ON t.id = e.travelFk
|
||||||
LEFT JOIN vn.warehouse w ON w.id = t.warehouseInFk
|
JOIN vn.warehouse w ON w.id = t.warehouseInFk
|
||||||
LEFT JOIN vn.warehouse w2 ON w2.id = t.warehouseOutFk
|
JOIN vn.company co ON co.id = e.companyFk
|
||||||
LEFT JOIN vn.company co ON co.id = e.companyFk
|
JOIN vn.currency cu ON cu.id = e.currencyFk`
|
||||||
LEFT JOIN vn.currency cu ON cu.id = e.currencyFk
|
|
||||||
LEFT JOIN vn.awb a ON a.id = t.awbFk
|
|
||||||
LEFT JOIN vn.agencyMode am ON am.id = t.agencyModeFk
|
|
||||||
LEFT JOIN vn.entryType et ON et.code = e.typeFk`
|
|
||||||
);
|
);
|
||||||
|
|
||||||
stmt.merge(conn.makeWhere(filter.where));
|
stmt.merge(conn.makeWhere(filter.where));
|
||||||
|
|
|
@ -1,49 +0,0 @@
|
||||||
|
|
||||||
module.exports = Self => {
|
|
||||||
Self.remoteMethodCtx('recalcEntryPrices', {
|
|
||||||
description: 'Clones an entry',
|
|
||||||
accessType: 'WRITE',
|
|
||||||
accepts: [{
|
|
||||||
arg: 'entryFk',
|
|
||||||
type: 'number',
|
|
||||||
required: true,
|
|
||||||
description: 'The entry id',
|
|
||||||
http: {source: 'path'}
|
|
||||||
}],
|
|
||||||
returns: {
|
|
||||||
type: 'object',
|
|
||||||
root: true
|
|
||||||
},
|
|
||||||
http: {
|
|
||||||
path: `/:entryFk/recalcEntryPrices`,
|
|
||||||
verb: 'POST'
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
Self.recalcEntryPrices = async(ctx, entryFk, options) => {
|
|
||||||
const userId = ctx.req.accessToken.userId;
|
|
||||||
const myOptions = {userId};
|
|
||||||
let tx;
|
|
||||||
if (typeof options == 'object')
|
|
||||||
Object.assign(myOptions, options);
|
|
||||||
|
|
||||||
if (!myOptions.transaction) {
|
|
||||||
tx = await Self.beginTransaction({});
|
|
||||||
myOptions.transaction = tx;
|
|
||||||
}
|
|
||||||
const entry = await Self.findById(entryFk, myOptions);
|
|
||||||
const entryConfig = await Self.app.models.EntryConfig.findOne({}, myOptions);
|
|
||||||
|
|
||||||
if (entry.supplierFk === entryConfig.inventorySupplierFk) return;
|
|
||||||
|
|
||||||
try {
|
|
||||||
const result = await Self.rawSql('CALL vn.buy_recalcPricesByEntry(?)', [entryFk], myOptions);
|
|
||||||
|
|
||||||
if (tx) await tx.commit();
|
|
||||||
return result[0];
|
|
||||||
} catch (e) {
|
|
||||||
if (tx) await tx.rollback();
|
|
||||||
throw e;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
};
|
|
|
@ -45,7 +45,7 @@ module.exports = Self => {
|
||||||
{
|
{
|
||||||
relation: 'user',
|
relation: 'user',
|
||||||
scope: {
|
scope: {
|
||||||
fields: ['id', 'nickname']
|
fields: ['id', 'name']
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -31,8 +31,5 @@
|
||||||
},
|
},
|
||||||
"InventoryConfig": {
|
"InventoryConfig": {
|
||||||
"dataSource": "vn"
|
"dataSource": "vn"
|
||||||
},
|
|
||||||
"EntryConfig": {
|
|
||||||
"dataSource": "vn"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,30 +0,0 @@
|
||||||
{
|
|
||||||
"name": "EntryConfig",
|
|
||||||
"base": "VnModel",
|
|
||||||
"mixins": {
|
|
||||||
"Loggable": true
|
|
||||||
},
|
|
||||||
"options": {
|
|
||||||
"mysql": {
|
|
||||||
"table": "entryConfig"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"properties": {
|
|
||||||
"defaultEntry": {
|
|
||||||
"type": "number",
|
|
||||||
"id": true
|
|
||||||
},
|
|
||||||
"mailToNotify": {
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"inventorySupplierFk": {
|
|
||||||
"type": "number"
|
|
||||||
},
|
|
||||||
"maxLockTime": {
|
|
||||||
"type": "number"
|
|
||||||
},
|
|
||||||
"defaultSupplierFk": {
|
|
||||||
"type": "number"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -15,13 +15,8 @@ module.exports = Self => {
|
||||||
require('../methods/entry/transfer')(Self);
|
require('../methods/entry/transfer')(Self);
|
||||||
require('../methods/entry/labelSupplier')(Self);
|
require('../methods/entry/labelSupplier')(Self);
|
||||||
require('../methods/entry/buyLabelSupplier')(Self);
|
require('../methods/entry/buyLabelSupplier')(Self);
|
||||||
require('../methods/entry-buys/getBuyList')(Self);
|
|
||||||
require('../methods/entry-buys/getBuyUltimate')(Self);
|
|
||||||
require('../methods/entry/cloneEntry')(Self);
|
|
||||||
require('../methods/entry/deleteEntry')(Self);
|
|
||||||
require('../methods/entry/recalcEntryPrices')(Self);
|
|
||||||
|
|
||||||
Self.observe('before save', async(ctx, options) => {
|
Self.observe('before save', async function(ctx, options) {
|
||||||
if (ctx.isNewInstance) return;
|
if (ctx.isNewInstance) return;
|
||||||
|
|
||||||
const changes = ctx.data || ctx.instance;
|
const changes = ctx.data || ctx.instance;
|
||||||
|
|
|
@ -56,7 +56,8 @@
|
||||||
"required": true
|
"required": true
|
||||||
},
|
},
|
||||||
"travelFk": {
|
"travelFk": {
|
||||||
"type": "number"
|
"type": "number",
|
||||||
|
"required": true
|
||||||
},
|
},
|
||||||
"companyFk": {
|
"companyFk": {
|
||||||
"type": "number",
|
"type": "number",
|
||||||
|
@ -73,12 +74,6 @@
|
||||||
},
|
},
|
||||||
"finalTemperature": {
|
"finalTemperature": {
|
||||||
"type": "number"
|
"type": "number"
|
||||||
},
|
|
||||||
"lockerUserFk":{
|
|
||||||
"type": "number"
|
|
||||||
},
|
|
||||||
"locked":{
|
|
||||||
"type": "date"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"relations": {
|
"relations": {
|
||||||
|
@ -112,16 +107,6 @@
|
||||||
"type": "belongsTo",
|
"type": "belongsTo",
|
||||||
"model": "EntryType",
|
"model": "EntryType",
|
||||||
"foreignKey": "typeFk"
|
"foreignKey": "typeFk"
|
||||||
},
|
|
||||||
"invoiceIn": {
|
|
||||||
"type": "belongsTo",
|
|
||||||
"model": "InvoiceIn",
|
|
||||||
"foreignKey": "invoiceInFk"
|
|
||||||
},
|
|
||||||
"user": {
|
|
||||||
"type": "belongsTo",
|
|
||||||
"model": "VnUser",
|
|
||||||
"foreignKey": "lockerUserFk"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,9 +29,9 @@ describe('entry_isEditable trigger', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
async function prepareEntry(isBooked, typeFk) {
|
async function prepareEntry(isBooked, typeFk) {
|
||||||
const companyFk = 69;
|
let newCreated = Date.vnNew();
|
||||||
await entry.updateAttributes({isBooked, typeFk}, options);
|
await entry.updateAttributes({isBooked, typeFk}, options);
|
||||||
await entry.updateAttributes({companyFk}, options);
|
await entry.updateAttributes({dated: newCreated}, options);
|
||||||
}
|
}
|
||||||
|
|
||||||
it('should throw an error when entry is booked and typeFk is null', async() => {
|
it('should throw an error when entry is booked and typeFk is null', async() => {
|
||||||
|
|
|
@ -48,10 +48,12 @@ module.exports = Self => {
|
||||||
}, myOptions);
|
}, myOptions);
|
||||||
|
|
||||||
let asien = bookEntry?.ASIEN;
|
let asien = bookEntry?.ASIEN;
|
||||||
const invoiceIn = await Self.findById(invoiceInId, myOptions);
|
|
||||||
if (asien) {
|
if (asien) {
|
||||||
accountingEntries = await models.Xdiario.count({ASIEN: asien}, myOptions);
|
accountingEntries = await models.Xdiario.count({ASIEN: asien}, myOptions);
|
||||||
|
|
||||||
await models.Xdiario.destroyAll({ASIEN: asien}, myOptions);
|
await models.Xdiario.destroyAll({ASIEN: asien}, myOptions);
|
||||||
|
const invoiceIn = await Self.findById(invoiceInId, myOptions);
|
||||||
|
await invoiceIn.updateAttribute('isBooked', false, myOptions);
|
||||||
} else {
|
} else {
|
||||||
const linkedBookEntry = await models.Xdiario.findOne({
|
const linkedBookEntry = await models.Xdiario.findOne({
|
||||||
fields: ['ASIEN'],
|
fields: ['ASIEN'],
|
||||||
|
@ -64,8 +66,6 @@ module.exports = Self => {
|
||||||
asien = linkedBookEntry?.ASIEN;
|
asien = linkedBookEntry?.ASIEN;
|
||||||
isLinked = true;
|
isLinked = true;
|
||||||
}
|
}
|
||||||
await invoiceIn.updateAttribute('isBooked', false, myOptions);
|
|
||||||
|
|
||||||
if (tx) await tx.commit();
|
if (tx) await tx.commit();
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|
|
@ -32,12 +32,6 @@ module.exports = Self => {
|
||||||
description: 'The client id',
|
description: 'The client id',
|
||||||
http: {source: 'query'}
|
http: {source: 'query'}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
arg: 'companyFk',
|
|
||||||
type: 'integer',
|
|
||||||
description: 'The company id',
|
|
||||||
http: {source: 'query'}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
arg: 'fi',
|
arg: 'fi',
|
||||||
type: 'string',
|
type: 'string',
|
||||||
|
@ -154,7 +148,6 @@ module.exports = Self => {
|
||||||
i.hasPdf,
|
i.hasPdf,
|
||||||
i.customsAgentFk,
|
i.customsAgentFk,
|
||||||
c.socialName AS clientSocialName,
|
c.socialName AS clientSocialName,
|
||||||
i.companyFk,
|
|
||||||
co.code AS companyCode,
|
co.code AS companyCode,
|
||||||
ca.fiscalName AS customsAgentName
|
ca.fiscalName AS customsAgentName
|
||||||
FROM invoiceOut i
|
FROM invoiceOut i
|
||||||
|
|
|
@ -22,11 +22,6 @@ module.exports = Self => {
|
||||||
type: 'integer',
|
type: 'integer',
|
||||||
description: 'The item id',
|
description: 'The item id',
|
||||||
},
|
},
|
||||||
{
|
|
||||||
arg: 'name',
|
|
||||||
type: 'string',
|
|
||||||
description: 'The item name',
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
arg: 'typeFk',
|
arg: 'typeFk',
|
||||||
type: 'integer',
|
type: 'integer',
|
||||||
|
@ -117,8 +112,6 @@ module.exports = Self => {
|
||||||
: {'it.code': {like: `%${value}%`}};
|
: {'it.code': {like: `%${value}%`}};
|
||||||
case 'categoryFk':
|
case 'categoryFk':
|
||||||
return {'it.categoryFk': value};
|
return {'it.categoryFk': value};
|
||||||
case 'name':
|
|
||||||
return {'i.name': {like: `%${value}%`}};
|
|
||||||
case 'buyerFk':
|
case 'buyerFk':
|
||||||
return {'it.workerFk': value};
|
return {'it.workerFk': value};
|
||||||
case 'warehouseFk':
|
case 'warehouseFk':
|
||||||
|
|
|
@ -1,43 +0,0 @@
|
||||||
module.exports = Self => {
|
|
||||||
Self.remoteMethodCtx('getSimilar', {
|
|
||||||
description: 'Returns list of items with similar item requested',
|
|
||||||
accessType: 'READ',
|
|
||||||
accepts: [
|
|
||||||
{
|
|
||||||
arg: 'filter',
|
|
||||||
type: 'Object',
|
|
||||||
required: true,
|
|
||||||
description: 'Filter defining where and paginated data',
|
|
||||||
http: {source: 'query'}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
returns: {
|
|
||||||
type: ['Object'],
|
|
||||||
root: true
|
|
||||||
},
|
|
||||||
http: {
|
|
||||||
path: `/getSimilar`,
|
|
||||||
verb: 'GET'
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
Self.getSimilar = async(ctx, filter, options) => {
|
|
||||||
const myOptions = {userId: ctx.req.accessToken.userId};
|
|
||||||
|
|
||||||
if (typeof options == 'object')
|
|
||||||
Object.assign(myOptions, options);
|
|
||||||
|
|
||||||
const {where} = filter;
|
|
||||||
|
|
||||||
const query = [
|
|
||||||
filter.itemFk,
|
|
||||||
where.warehouseFk,
|
|
||||||
where.date,
|
|
||||||
where.showType,
|
|
||||||
where.scopeDays
|
|
||||||
];
|
|
||||||
const [results] = await Self.rawSql('CALL vn.item_getSimilar(?, ?, ?, ?, ?)', query, myOptions);
|
|
||||||
|
|
||||||
return results;
|
|
||||||
};
|
|
||||||
};
|
|
|
@ -1,38 +0,0 @@
|
||||||
const ParameterizedSQL = require('loopback-connector').ParameterizedSQL;
|
|
||||||
|
|
||||||
module.exports = Self => {
|
|
||||||
Self.remoteMethodCtx('search', {
|
|
||||||
description: 'Returns an array of search results for a specified item',
|
|
||||||
accepts: [{
|
|
||||||
arg: 'filter',
|
|
||||||
type: 'object',
|
|
||||||
description: 'Filter to define conditions and paginate the data.',
|
|
||||||
required: true
|
|
||||||
}],
|
|
||||||
returns: {
|
|
||||||
type: ['object'],
|
|
||||||
root: true
|
|
||||||
},
|
|
||||||
http: {
|
|
||||||
path: `/search`,
|
|
||||||
verb: 'GET'
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
Self.search = async(ctx, filter) => {
|
|
||||||
const conn = Self.dataSource.connector;
|
|
||||||
|
|
||||||
const stmt = new ParameterizedSQL(`
|
|
||||||
SELECT *
|
|
||||||
FROM(
|
|
||||||
SELECT i.id, i.name, i.size, p.name producerName
|
|
||||||
FROM item i
|
|
||||||
LEFT JOIN producer p ON p.id = i.producerFk
|
|
||||||
) sub
|
|
||||||
`);
|
|
||||||
|
|
||||||
stmt.merge(conn.makeSuffix(filter));
|
|
||||||
|
|
||||||
return conn.executeStmt(stmt);
|
|
||||||
};
|
|
||||||
};
|
|
|
@ -89,7 +89,7 @@ describe('item filter()', () => {
|
||||||
const ctx = {args: {filter: filter, workerFk: 16}, req: {accessToken: {userId: 1}}};
|
const ctx = {args: {filter: filter, workerFk: 16}, req: {accessToken: {userId: 1}}};
|
||||||
const result = await models.Item.filter(ctx, filter, options);
|
const result = await models.Item.filter(ctx, filter, options);
|
||||||
|
|
||||||
expect(result.length).toEqual(3);
|
expect(result.length).toEqual(2);
|
||||||
expect(result[0].id).toEqual(16);
|
expect(result[0].id).toEqual(16);
|
||||||
expect(result[1].id).toEqual(71);
|
expect(result[1].id).toEqual(71);
|
||||||
|
|
||||||
|
|
|
@ -1,49 +0,0 @@
|
||||||
const models = require('vn-loopback/server/server').models;
|
|
||||||
|
|
||||||
describe('Item get similar', () => {
|
|
||||||
let options;
|
|
||||||
let tx;
|
|
||||||
const ctx = beforeAll.getCtx();
|
|
||||||
beforeAll.mockLoopBackContext();
|
|
||||||
beforeEach(async() => {
|
|
||||||
tx = await models.Item.beginTransaction({});
|
|
||||||
options = {transaction: tx};
|
|
||||||
});
|
|
||||||
|
|
||||||
afterEach(async() => {
|
|
||||||
if (tx)
|
|
||||||
await tx.rollback();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should return similar items', async() => {
|
|
||||||
const filter = {
|
|
||||||
itemFk: 88, sales: 43,
|
|
||||||
where: {
|
|
||||||
'scopeDays': '2',
|
|
||||||
'showType': true,
|
|
||||||
'alertLevelCode': 'FREE',
|
|
||||||
'date': '2001-01-01T11:00:00.000Z',
|
|
||||||
'warehouseFk': 1
|
|
||||||
}
|
|
||||||
};
|
|
||||||
const result = await models.Item.getSimilar(ctx, filter, options);
|
|
||||||
|
|
||||||
expect(result.length).toEqual(2);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should return empty array is if not exists', async() => {
|
|
||||||
const filter = {
|
|
||||||
itemFk: 88, sales: 43,
|
|
||||||
where: {
|
|
||||||
'scopeDays': '2',
|
|
||||||
'showType': true,
|
|
||||||
'alertLevelCode': 'FREE',
|
|
||||||
'date': '2001-01-01T11:00:00.000Z',
|
|
||||||
'warehouseFk': 60
|
|
||||||
}
|
|
||||||
};
|
|
||||||
const result = await models.Item.getSimilar(ctx, filter, options);
|
|
||||||
|
|
||||||
expect(result.length).toEqual(0);
|
|
||||||
});
|
|
||||||
});
|
|
|
@ -26,7 +26,7 @@ describe('tag filterValue()', () => {
|
||||||
const filter = {where: {value: 'Blue'}, limit: 5};
|
const filter = {where: {value: 'Blue'}, limit: 5};
|
||||||
const result = await models.Tag.filterValue(colorTagId, filter, options);
|
const result = await models.Tag.filterValue(colorTagId, filter, options);
|
||||||
|
|
||||||
expect(result.length).toEqual(3);
|
expect(result.length).toEqual(2);
|
||||||
expect(result[0].value).toEqual('Blue');
|
expect(result[0].value).toEqual('Blue');
|
||||||
expect(result[1].value).toEqual('Blue/Silver');
|
expect(result[1].value).toEqual('Blue/Silver');
|
||||||
|
|
||||||
|
|
|
@ -17,9 +17,6 @@
|
||||||
},
|
},
|
||||||
"showOrder": {
|
"showOrder": {
|
||||||
"type": "number"
|
"type": "number"
|
||||||
},
|
|
||||||
"hexJson": {
|
|
||||||
"type": "string"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"acls": [
|
"acls": [
|
||||||
|
|
|
@ -5,7 +5,6 @@ module.exports = Self => {
|
||||||
require('../methods/item/clone')(Self);
|
require('../methods/item/clone')(Self);
|
||||||
require('../methods/item/updateTaxes')(Self);
|
require('../methods/item/updateTaxes')(Self);
|
||||||
require('../methods/item/getBalance')(Self);
|
require('../methods/item/getBalance')(Self);
|
||||||
require('../methods/item/getSimilar')(Self);
|
|
||||||
require('../methods/item/lastEntriesFilter')(Self);
|
require('../methods/item/lastEntriesFilter')(Self);
|
||||||
require('../methods/item/getSummary')(Self);
|
require('../methods/item/getSummary')(Self);
|
||||||
require('../methods/item/getCard')(Self);
|
require('../methods/item/getCard')(Self);
|
||||||
|
@ -18,7 +17,6 @@ module.exports = Self => {
|
||||||
require('../methods/item/buyerWasteEmail')(Self);
|
require('../methods/item/buyerWasteEmail')(Self);
|
||||||
require('../methods/item/setVisibleDiscard')(Self);
|
require('../methods/item/setVisibleDiscard')(Self);
|
||||||
require('../methods/item/get')(Self);
|
require('../methods/item/get')(Self);
|
||||||
require('../methods/item/search')(Self);
|
|
||||||
|
|
||||||
Self.validatesPresenceOf('originFk', {message: 'Cannot be blank'});
|
Self.validatesPresenceOf('originFk', {message: 'Cannot be blank'});
|
||||||
|
|
||||||
|
|
|
@ -31,9 +31,9 @@ describe('route getSuggestedTickets()', () => {
|
||||||
const length = result.length;
|
const length = result.length;
|
||||||
const anyResult = result[Math.floor(Math.random() * Math.floor(length))];
|
const anyResult = result[Math.floor(Math.random() * Math.floor(length))];
|
||||||
|
|
||||||
expect(result.length).toEqual(5);
|
expect(result.length).toEqual(4);
|
||||||
expect(anyResult.zoneFk).toEqual(1);
|
expect(anyResult.zoneFk).toEqual(1);
|
||||||
expect([1, 8]).toContain(anyResult.agencyModeFk);
|
expect(anyResult.agencyModeFk).toEqual(8);
|
||||||
|
|
||||||
await tx.rollback();
|
await tx.rollback();
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|
|
@ -14,7 +14,7 @@ describe('route unlink()', () => {
|
||||||
let tickets = await models.Route.getSuggestedTickets(routeId, options);
|
let tickets = await models.Route.getSuggestedTickets(routeId, options);
|
||||||
|
|
||||||
expect(zoneAgencyModes.length).toEqual(4);
|
expect(zoneAgencyModes.length).toEqual(4);
|
||||||
expect(tickets.length).toEqual(4);
|
expect(tickets.length).toEqual(3);
|
||||||
|
|
||||||
await models.Route.unlink(agencyModeId, zoneId, options);
|
await models.Route.unlink(agencyModeId, zoneId, options);
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
"observations": {
|
"observations": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"editorFk": {
|
"userFk": {
|
||||||
"type": "number"
|
"type": "number"
|
||||||
},
|
},
|
||||||
"price": {
|
"price": {
|
||||||
|
|
|
@ -15,13 +15,16 @@
|
||||||
"roadmapFk": {
|
"roadmapFk": {
|
||||||
"type": "number"
|
"type": "number"
|
||||||
},
|
},
|
||||||
|
"addressFk": {
|
||||||
|
"type": "number"
|
||||||
|
},
|
||||||
"eta": {
|
"eta": {
|
||||||
"type": "date"
|
"type": "date"
|
||||||
},
|
},
|
||||||
"description": {
|
"description": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"editorFk": {
|
"userFk": {
|
||||||
"type": "number"
|
"type": "number"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -34,7 +37,7 @@
|
||||||
"address": {
|
"address": {
|
||||||
"type": "belongsTo",
|
"type": "belongsTo",
|
||||||
"model": "RoadmapAddress",
|
"model": "RoadmapAddress",
|
||||||
"foreignKey": "roadmapAddressFk"
|
"foreignKey": "addressFk"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,6 +12,14 @@
|
||||||
"id": true,
|
"id": true,
|
||||||
"description": "Identifier"
|
"description": "Identifier"
|
||||||
},
|
},
|
||||||
|
"column": {
|
||||||
|
"type": "string",
|
||||||
|
"required": true
|
||||||
|
},
|
||||||
|
"row": {
|
||||||
|
"type": "string",
|
||||||
|
"required": true
|
||||||
|
},
|
||||||
"code": {
|
"code": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
|
|
|
@ -7,6 +7,6 @@ describe('Supplier getItemsPackaging()', () => {
|
||||||
expect(item.id).toEqual(1);
|
expect(item.id).toEqual(1);
|
||||||
expect(item.name).toEqual('Ranged weapon longbow 200cm');
|
expect(item.name).toEqual('Ranged weapon longbow 200cm');
|
||||||
expect(item.quantity).toEqual(5000);
|
expect(item.quantity).toEqual(5000);
|
||||||
expect(item.quantityTotal).toEqual(5200);
|
expect(item.quantityTotal).toEqual(5100);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -19,6 +19,7 @@ describe('Supplier updateFiscalData()', () => {
|
||||||
const countryFk = 1;
|
const countryFk = 1;
|
||||||
const supplierActivityFk = 'animals';
|
const supplierActivityFk = 'animals';
|
||||||
const healthRegister = '400664487H';
|
const healthRegister = '400664487H';
|
||||||
|
const viesCode = 'ES';
|
||||||
|
|
||||||
let ctx;
|
let ctx;
|
||||||
let options;
|
let options;
|
||||||
|
@ -120,7 +121,7 @@ describe('Supplier updateFiscalData()', () => {
|
||||||
supplierActivityFk,
|
supplierActivityFk,
|
||||||
healthRegister,
|
healthRegister,
|
||||||
undefined,
|
undefined,
|
||||||
undefined,
|
viesCode,
|
||||||
options);
|
options);
|
||||||
|
|
||||||
expect(supplier.name).toEqual(name);
|
expect(supplier.name).toEqual(name);
|
||||||
|
@ -137,5 +138,6 @@ describe('Supplier updateFiscalData()', () => {
|
||||||
expect(supplier.countryFk).toEqual(countryFk);
|
expect(supplier.countryFk).toEqual(countryFk);
|
||||||
expect(supplier.supplierActivityFk).toEqual(supplierActivityFk);
|
expect(supplier.supplierActivityFk).toEqual(supplierActivityFk);
|
||||||
expect(supplier.healthRegister).toEqual(healthRegister);
|
expect(supplier.healthRegister).toEqual(healthRegister);
|
||||||
|
expect(supplier.viesCode).toEqual(viesCode);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -50,12 +50,12 @@ module.exports = Self => {
|
||||||
}, {
|
}, {
|
||||||
arg: 'healthRegister',
|
arg: 'healthRegister',
|
||||||
type: 'any'
|
type: 'any'
|
||||||
}, {
|
|
||||||
arg: 'isVies',
|
|
||||||
type: 'boolean'
|
|
||||||
}, {
|
}, {
|
||||||
arg: 'isTrucker',
|
arg: 'isTrucker',
|
||||||
type: 'boolean'
|
type: 'boolean'
|
||||||
|
}, {
|
||||||
|
arg: 'viesCode',
|
||||||
|
type: 'any'
|
||||||
}],
|
}],
|
||||||
returns: {
|
returns: {
|
||||||
arg: 'res',
|
arg: 'res',
|
||||||
|
@ -68,7 +68,7 @@ module.exports = Self => {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
Self.updateFiscalData = async(ctx, supplierId, name, nif, account, phone, sageTaxTypeFk, sageWithholdingFk, sageTransactionTypeFk, postCode, street, city, provinceFk, countryFk, supplierActivityFk, healthRegister, isVies, isTrucker, options) => {
|
Self.updateFiscalData = async(ctx, supplierId, name, nif, account, phone, sageTaxTypeFk, sageWithholdingFk, sageTransactionTypeFk, postCode, street, city, provinceFk, countryFk, supplierActivityFk, healthRegister, isTrucker, viesCode, options) => {
|
||||||
const models = Self.app.models;
|
const models = Self.app.models;
|
||||||
const {args} = ctx;
|
const {args} = ctx;
|
||||||
const myOptions = {};
|
const myOptions = {};
|
||||||
|
@ -102,8 +102,8 @@ module.exports = Self => {
|
||||||
countryFk,
|
countryFk,
|
||||||
supplierActivityFk,
|
supplierActivityFk,
|
||||||
healthRegister,
|
healthRegister,
|
||||||
isVies,
|
isTrucker,
|
||||||
isTrucker
|
viesCode
|
||||||
}, myOptions);
|
}, myOptions);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -74,7 +74,7 @@ module.exports = Self => {
|
||||||
const code = country ? country.code.toLowerCase() : null;
|
const code = country ? country.code.toLowerCase() : null;
|
||||||
const countryCode = this.nif?.toLowerCase().substring(0, 2);
|
const countryCode = this.nif?.toLowerCase().substring(0, 2);
|
||||||
|
|
||||||
if (!validateTin(this.nif, code) || (this.isVies && countryCode == code))
|
if (!validateTin(this.nif, code) || (this.viesCode && countryCode == code))
|
||||||
err();
|
err();
|
||||||
done();
|
done();
|
||||||
}
|
}
|
||||||
|
|
|
@ -111,8 +111,8 @@
|
||||||
"healthRegister": {
|
"healthRegister": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"isVies": {
|
"viesCode": {
|
||||||
"type": "boolean"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"companySize": {
|
"companySize": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
|
|
|
@ -49,7 +49,7 @@ module.exports = Self => {
|
||||||
ps.monitorId,
|
ps.monitorId,
|
||||||
e.created
|
e.created
|
||||||
FROM expedition e
|
FROM expedition e
|
||||||
JOIN host h ON h.code = e.hostFk
|
JOIN host h ON Convert(h.code USING utf8mb3) COLLATE utf8mb3_unicode_ci = e.hostFk
|
||||||
JOIN packingSite ps ON ps.hostFk = h.id
|
JOIN packingSite ps ON ps.hostFk = h.id
|
||||||
WHERE e.id = ?;`;
|
WHERE e.id = ?;`;
|
||||||
const [expedition] = await models.Expedition.rawSql(query, [id]);
|
const [expedition] = await models.Expedition.rawSql(query, [id]);
|
||||||
|
|
|
@ -44,14 +44,12 @@ module.exports = Self => {
|
||||||
ps.monitorId,
|
ps.monitorId,
|
||||||
e.created
|
e.created
|
||||||
FROM expedition e
|
FROM expedition e
|
||||||
JOIN host h ON h.code = e.hostFk
|
JOIN host h ON Convert(h.code USING utf8mb3) COLLATE utf8mb3_unicode_ci = e.hostFk
|
||||||
JOIN packingSite ps ON ps.hostFk = h.id
|
JOIN packingSite ps ON ps.hostFk = h.id
|
||||||
WHERE e.id = ?;`;
|
WHERE e.id = ?;`;
|
||||||
|
const [expedition] = await models.PackingSiteConfig.rawSql(query, [id]);
|
||||||
const [expedition] = await models.PackingSiteConfig.rawSql(query, [id], myOptions);
|
|
||||||
|
|
||||||
if (!from && !expedition) return [];
|
if (!from && !expedition) return [];
|
||||||
|
|
||||||
let start = new Date(expedition.created);
|
let start = new Date(expedition.created);
|
||||||
let end = new Date(start.getTime() + (packingSiteConfig.avgBoxingTime * 1000));
|
let end = new Date(start.getTime() + (packingSiteConfig.avgBoxingTime * 1000));
|
||||||
|
|
||||||
|
@ -59,13 +57,9 @@ module.exports = Self => {
|
||||||
start.setHours(from, 0, 0);
|
start.setHours(from, 0, 0);
|
||||||
end.setHours(to, 0, 0);
|
end.setHours(to, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
const offset = start.getTimezoneOffset();
|
const offset = start.getTimezoneOffset();
|
||||||
start = new Date(start.getTime() - (offset * 60 * 1000));
|
start = new Date(start.getTime() - (offset * 60 * 1000));
|
||||||
end = new Date(end.getTime() - (offset * 60 * 1000));
|
end = new Date(end.getTime() - (offset * 60 * 1000));
|
||||||
const minutes = start.getMinutes();
|
|
||||||
const roundedMinutes = minutes - (minutes % 15);
|
|
||||||
start.setMinutes(roundedMinutes, 0, 0);
|
|
||||||
|
|
||||||
const videoUrl =
|
const videoUrl =
|
||||||
`/${packingSiteConfig.shinobiToken}/videos/${packingSiteConfig.shinobiGroupKey}/${expedition.monitorId}`;
|
`/${packingSiteConfig.shinobiToken}/videos/${packingSiteConfig.shinobiGroupKey}/${expedition.monitorId}`;
|
||||||
|
@ -79,7 +73,6 @@ module.exports = Self => {
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
return response.data.videos.map(video => video.filename);
|
return response.data.videos.map(video => video.filename);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -2,28 +2,35 @@ const models = require('vn-loopback/server/server').models;
|
||||||
const axios = require('axios');
|
const axios = require('axios');
|
||||||
|
|
||||||
describe('boxing getVideoList()', () => {
|
describe('boxing getVideoList()', () => {
|
||||||
let tx;
|
it('should return video list', async() => {
|
||||||
let options;
|
const tx = await models.PackingSiteConfig.beginTransaction({});
|
||||||
|
|
||||||
beforeEach(async() => {
|
try {
|
||||||
tx = await models.PackingSiteConfig.beginTransaction({});
|
const options = {transaction: tx};
|
||||||
options = {transaction: tx};
|
|
||||||
});
|
const id = 1;
|
||||||
|
const from = 1;
|
||||||
|
const to = 2;
|
||||||
|
|
||||||
|
const response = {
|
||||||
|
data: {
|
||||||
|
videos: [{
|
||||||
|
id: 1,
|
||||||
|
filename: 'video1.mp4'
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
spyOn(axios, 'get').and.returnValue(new Promise(resolve => resolve(response)));
|
||||||
|
|
||||||
|
const result = await models.Boxing.getVideoList(id, from, to, options);
|
||||||
|
|
||||||
|
expect(result[0]).toEqual(response.data.videos[0].filename);
|
||||||
|
|
||||||
afterEach(async() => {
|
|
||||||
await tx.rollback();
|
await tx.rollback();
|
||||||
});
|
} catch (e) {
|
||||||
|
await tx.rollback();
|
||||||
it('should make the correct API call', async() => {
|
throw e;
|
||||||
const expedition = await models.Expedition.findById(15, null, options);
|
}
|
||||||
await expedition.updateAttribute('created', '2000-12-01 07:07:00', options);
|
|
||||||
|
|
||||||
const axiosSpy = spyOn(axios, 'get').and.callThrough();
|
|
||||||
await models.Boxing.getVideoList(expedition.id, undefined, undefined, options);
|
|
||||||
|
|
||||||
const expectedStartTime = '2000-12-01T07:00:00';
|
|
||||||
const calledUrl = axiosSpy.calls.mostRecent().args[0];
|
|
||||||
|
|
||||||
expect(calledUrl).toContain(`start=${expectedStartTime}`);
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue