7729-devToTest_2430 #2739
79
CHANGELOG.md
79
CHANGELOG.md
|
@ -1,3 +1,82 @@
|
||||||
|
# Version 24.24 - 2024-06-11
|
||||||
|
|
||||||
|
### Added 🆕
|
||||||
|
|
||||||
|
- 6281 feat:buyFk in itemShekving by:sergiodt
|
||||||
|
- 6281 feat:buyFk in itemShelving by:sergiodt
|
||||||
|
- feat: #6408 tests by:jgallego
|
||||||
|
- feat: packaging refs #4021 (origin/4021_packaging) by:sergiodt
|
||||||
|
- feat: refs #6021 add new field by:pablone
|
||||||
|
- feat: refs #6281 change fixtures by:robert
|
||||||
|
- feat: refs # 6408 test ok (origin/6408-rocketChat) by:jgallego
|
||||||
|
- feat: refs #6477 productionConfig add column by:robert
|
||||||
|
- feat: refs #6600 add column (origin/6600-createItemPhotoComment) by:jorgep
|
||||||
|
- feat: refs #6600 Add photoMotivation column to item table and create itemPhotoComment table by:jorgep
|
||||||
|
- feat: refs #6889 add back tests by:jorgep
|
||||||
|
- feat: refs #6889 fixtures & models by:jorgep
|
||||||
|
- feat : refs #6889 wip: check if is productionReviewer or owner by:jorgep
|
||||||
|
- feat: refs #6942 set false isBooed & ledger by:jorgep
|
||||||
|
- feat: refs #6942 toUnbook by:jorgep
|
||||||
|
- feat: refs #6942 xdiario fixtures by:jorgep
|
||||||
|
- feat: refs #7398 Change by:guillermo
|
||||||
|
- feat: refs #7438 Added volume to item_valuateInventory by:guillermo
|
||||||
|
- feat: refs #7438 Requested changes and little changes by:guillermo
|
||||||
|
- refs #6281 feat:buyFk in itemShelving by:sergiodt
|
||||||
|
|
||||||
|
### Changed 📦
|
||||||
|
|
||||||
|
- refactor: refs #6600 add space by:jorgep
|
||||||
|
- refactor: refs #6889 improve file loading logic by:jorgep
|
||||||
|
- refactor: refs #6889 sale tests e2e by:jorgep
|
||||||
|
- refactor: refs #6889 script sql (origin/6889-dropAddSaleByCode) by:jorgep
|
||||||
|
- refactor: refs #6889 use addSale by:jorgep
|
||||||
|
- refactor: refs #6942 toUnbook & drop buyer acls by:jorgep
|
||||||
|
- refactor: refs #7398 Refactor and change ekt_scan (origin/7398-ektScan) by:guillermo
|
||||||
|
- refactor: refs #7486 Optimized procs by:guillermo
|
||||||
|
|
||||||
|
### Fixed 🛠️
|
||||||
|
|
||||||
|
- feat: refs #6281 change fixtures by:robert
|
||||||
|
- feat: refs #6889 fixtures & models by:jorgep
|
||||||
|
- feat: refs #6942 xdiario fixtures by:jorgep
|
||||||
|
- fix: checking process.env.NODE_ENV by:alexm
|
||||||
|
- fix: en translations by:alexm
|
||||||
|
- fix: move to boot (origin/7421-fix_checking_NODE_ENV, 7421-fix_checking_NODE_ENV) by:alexm
|
||||||
|
- fix: refs #6095 filter by refFk null by:pablone
|
||||||
|
- fix: refs #6600 rollback by:jorgep
|
||||||
|
- fix: refs #6889 allocate 'productionReviewer' role to revision dep. workers & check if is owner or reviewer by:jorgep
|
||||||
|
- fix: refs #6889 check if has collection or sectorCollection by:jorgep
|
||||||
|
- fix: refs #6889 e2e tests by:jorgep
|
||||||
|
- fix: refs #6889 fix back tests by:jorgep
|
||||||
|
- fix: refs #6889 modify fixtures by:jorgep
|
||||||
|
- fix: refs #6889 rollback by:jorgep
|
||||||
|
- fix: refs #6942 acls & back by:jorgep
|
||||||
|
- fix: refs #6942 add deleteById acl by:jorgep
|
||||||
|
- fix: refs #6942 add test & change column name by:jorgep
|
||||||
|
- fix: refs #6942 create invoiceIn acl by:jorgep
|
||||||
|
- fix: refs #6942 delete by:jorgep
|
||||||
|
- fix: refs #6942 drop quotes by:jorgep
|
||||||
|
- fix : refs #6942 remove grafana update priv by:jorgep
|
||||||
|
- fix: refs #6942 revoke update isBooked by:jorgep
|
||||||
|
- fix: refs #6942 toBook/toUnbook by:jorgep
|
||||||
|
- fix: refs #7442 Fix kubernetes deploy by:Juan Ferrer Toribio
|
||||||
|
- fix(salix): refs #7272 #7272 Add aclService in routes.js by:Javier Segarra
|
||||||
|
- fix(salix): refs #7272 #7272 Back validateToken endpoint by:Javier Segarra
|
||||||
|
- fix(salix): refs #7272 #7272 Bug when acl not loaded by:Javier Segarra
|
||||||
|
- fix(salix): refs #7272 #7272 Call validateToken by:Javier Segarra
|
||||||
|
- fix(salix): refs #7272 #7272 Errors when Token not exists by:Javier Segarra
|
||||||
|
- fix(salix): refs #7272 #7272 Front retry calls by:Javier Segarra
|
||||||
|
- fix(salix): refs #7272 #7272 i18n Error by:Javier Segarra
|
||||||
|
- fix(salix): refs #7272 #7272 Remove aclService from auth.js by:Javier Segarra
|
||||||
|
- fix: simplify by:alexm
|
||||||
|
- fix traduction & e2e by:carlossa
|
||||||
|
- refs #6820 fix back by:carlossa
|
||||||
|
- refs #6820 fix pr by:carlossa
|
||||||
|
- refs #6832 fix: ToItem (origin/6832_refactorBackToItem) by:Sergio De la torre
|
||||||
|
- refs #7292 fix tback by:carlossa
|
||||||
|
- refs #7296 fix pr errors, trad by:carlossa
|
||||||
|
- test(salix): refs #7272 #7272 fix renew-token.spec by:Javier Segarra
|
||||||
|
|
||||||
|
|
||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
|
|
@ -121,7 +121,7 @@ pipeline {
|
||||||
steps {
|
steps {
|
||||||
script {
|
script {
|
||||||
def packageJson = readJSON file: 'package.json'
|
def packageJson = readJSON file: 'package.json'
|
||||||
env.VERSION = "${packageJson.version}-vn${env.BUILD_ID}"
|
env.VERSION = "${packageJson.version}-build${env.BUILD_ID}"
|
||||||
}
|
}
|
||||||
sh 'docker-compose build back'
|
sh 'docker-compose build back'
|
||||||
}
|
}
|
||||||
|
@ -159,7 +159,7 @@ pipeline {
|
||||||
steps {
|
steps {
|
||||||
script {
|
script {
|
||||||
def packageJson = readJSON file: 'package.json'
|
def packageJson = readJSON file: 'package.json'
|
||||||
env.VERSION = "${packageJson.version}-vn${env.BUILD_ID}"
|
env.VERSION = "${packageJson.version}-build${env.BUILD_ID}"
|
||||||
}
|
}
|
||||||
sh 'gulp build'
|
sh 'gulp build'
|
||||||
sh 'docker-compose build front'
|
sh 'docker-compose build front'
|
||||||
|
@ -179,7 +179,7 @@ pipeline {
|
||||||
steps {
|
steps {
|
||||||
script {
|
script {
|
||||||
def packageJson = readJSON file: 'package.json'
|
def packageJson = readJSON file: 'package.json'
|
||||||
env.VERSION = "${packageJson.version}-vn${env.BUILD_ID}"
|
env.VERSION = "${packageJson.version}-build${env.BUILD_ID}"
|
||||||
}
|
}
|
||||||
sh 'docker login --username $CREDENTIALS_USR --password $CREDENTIALS_PSW $REGISTRY'
|
sh 'docker login --username $CREDENTIALS_USR --password $CREDENTIALS_PSW $REGISTRY'
|
||||||
sh 'docker-compose push'
|
sh 'docker-compose push'
|
||||||
|
@ -210,7 +210,7 @@ pipeline {
|
||||||
steps {
|
steps {
|
||||||
script {
|
script {
|
||||||
def packageJson = readJSON file: 'package.json'
|
def packageJson = readJSON file: 'package.json'
|
||||||
env.VERSION = "${packageJson.version}-vn${env.BUILD_ID}"
|
env.VERSION = "${packageJson.version}-build${env.BUILD_ID}"
|
||||||
}
|
}
|
||||||
withKubeConfig([
|
withKubeConfig([
|
||||||
serverUrl: "$KUBERNETES_API",
|
serverUrl: "$KUBERNETES_API",
|
||||||
|
|
|
@ -0,0 +1,72 @@
|
||||||
|
module.exports = Self => {
|
||||||
|
Self.remoteMethodCtx('acls', {
|
||||||
|
description: 'Get all of the current user acls',
|
||||||
|
returns: {
|
||||||
|
type: 'Object',
|
||||||
|
root: true
|
||||||
|
},
|
||||||
|
http: {
|
||||||
|
path: '/acls',
|
||||||
|
verb: 'GET'
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
const staticAcls = new Map();
|
||||||
|
const app = require('vn-loopback/server/server');
|
||||||
|
app.on('started', function() {
|
||||||
|
for (const model of app.models()) {
|
||||||
|
for (const acl of model.settings.acls) {
|
||||||
|
if (acl.principalType == 'ROLE' && acl.permission == 'ALLOW') {
|
||||||
|
const staticAcl = {
|
||||||
|
model: model.name,
|
||||||
|
property: '*',
|
||||||
|
accessType: acl.accessType,
|
||||||
|
permission: acl.permission,
|
||||||
|
principalType: acl.principalType,
|
||||||
|
principalId: acl.principalId,
|
||||||
|
};
|
||||||
|
if (staticAcls.has(acl.principalId))
|
||||||
|
staticAcls.get(acl.principalId).push(staticAcl);
|
||||||
|
else
|
||||||
|
staticAcls.set(acl.principalId, [staticAcl]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
Self.acls = async function(ctx) {
|
||||||
|
const models = Self.app.models;
|
||||||
|
const acls = [];
|
||||||
|
const userId = ctx.req.accessToken.userId;
|
||||||
|
if (userId) {
|
||||||
|
const roleMapping = await models.RoleMapping.find({
|
||||||
|
where: {
|
||||||
|
principalId: userId
|
||||||
|
},
|
||||||
|
include: [
|
||||||
|
{
|
||||||
|
relation: 'role',
|
||||||
|
scope: {
|
||||||
|
fields: [
|
||||||
|
'name'
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
});
|
||||||
|
const dynamicAcls = await models.ACL.find({
|
||||||
|
where: {
|
||||||
|
principalId: {
|
||||||
|
inq: roleMapping.map(rm => rm.role().name)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
dynamicAcls.forEach(acl => acls.push(acl));
|
||||||
|
staticAcls.get('$authenticated').forEach(acl => acls.push(acl));
|
||||||
|
} else
|
||||||
|
staticAcls.get('$unauthenticated').forEach(acl => acls.push(acl));
|
||||||
|
|
||||||
|
staticAcls.get('$everyone').forEach(acl => acls.push(acl));
|
||||||
|
return acls;
|
||||||
|
};
|
||||||
|
};
|
|
@ -0,0 +1,27 @@
|
||||||
|
const {models} = require('vn-loopback/server/server');
|
||||||
|
const id = {administrative: 5, employee: 1, productionBoss: 50};
|
||||||
|
|
||||||
|
describe('VnUser acls()', () => {
|
||||||
|
it('should get its owns acls', async() => {
|
||||||
|
expect(await hasAcl('administrative', id.administrative)).toBeTruthy();
|
||||||
|
expect(await hasAcl('productionBoss', id.productionBoss)).toBeTruthy();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should not get administrative acls', async() => {
|
||||||
|
expect(await hasAcl('administrative', id.employee)).toBeFalsy();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should get the $authenticated acls', async() => {
|
||||||
|
expect(await hasAcl('$authenticated', id.employee)).toBeTruthy();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should get the $everyone acls', async() => {
|
||||||
|
expect(await hasAcl('$everyone', id.employee)).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
const hasAcl = async(role, userId) => {
|
||||||
|
const ctx = {req: {accessToken: {userId}, headers: {origin: 'http://localhost'}}};
|
||||||
|
const acls = await models.VnUser.acls(ctx);
|
||||||
|
return Object.values(acls).some(acl => acl.principalId === role);
|
||||||
|
};
|
|
@ -16,6 +16,7 @@ module.exports = function(Self) {
|
||||||
require('../methods/vn-user/share-token')(Self);
|
require('../methods/vn-user/share-token')(Self);
|
||||||
require('../methods/vn-user/update-user')(Self);
|
require('../methods/vn-user/update-user')(Self);
|
||||||
require('../methods/vn-user/validate-token')(Self);
|
require('../methods/vn-user/validate-token')(Self);
|
||||||
|
require('../methods/vn-user/acls')(Self);
|
||||||
|
|
||||||
Self.definition.settings.acls = Self.definition.settings.acls.filter(acl => acl.property !== 'create');
|
Self.definition.settings.acls = Self.definition.settings.acls.filter(acl => acl.property !== 'create');
|
||||||
|
|
||||||
|
|
|
@ -140,6 +140,13 @@
|
||||||
"principalType": "ROLE",
|
"principalType": "ROLE",
|
||||||
"principalId": "$authenticated",
|
"principalId": "$authenticated",
|
||||||
"permission": "ALLOW"
|
"permission": "ALLOW"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"property": "acls",
|
||||||
|
"accessType": "*",
|
||||||
|
"principalType": "ROLE",
|
||||||
|
"principalId": "$everyone",
|
||||||
|
"permission": "ALLOW"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"scopes": {
|
"scopes": {
|
||||||
|
|
|
@ -17,6 +17,7 @@ async function init() {
|
||||||
err => err ? reject(err) : resolve());
|
err => err ? reject(err) : resolve());
|
||||||
});
|
});
|
||||||
// FIXME: Workaround to wait for loopback to be ready
|
// FIXME: Workaround to wait for loopback to be ready
|
||||||
|
app.emit('started');
|
||||||
await app.models.Application.status();
|
await app.models.Application.status();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
},
|
},
|
||||||
"vn": {
|
"vn": {
|
||||||
"view": {
|
"view": {
|
||||||
"expeditionPallet_Print": "06613719475fcdba8309607c38cc78efc2e348cca7bc96b48dc3ae3c12426f54"
|
"expeditionPallet_Print": "ced2b84a114fcb99fce05f0c34f4fc03f3fa387bef92621be1bc306608a84345"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,7 @@ USE `util`;
|
||||||
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
|
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
|
||||||
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
|
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
|
||||||
|
|
||||||
INSERT INTO `version` VALUES ('vn-database','11071','60ac8cf6fc77b99b199b27866011b1efe8c961e8','2024-05-28 07:32:50','11074');
|
INSERT INTO `version` VALUES ('vn-database','11090','7adf4a373d19ce126adbc7b1077f69a74559c09a','2024-06-11 08:32:36','11094');
|
||||||
|
|
||||||
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);
|
||||||
|
@ -775,6 +775,7 @@ INSERT INTO `versionLog` VALUES ('vn-database','10975','00-action.sql','jenkins@
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','10975','01-expeditionFk.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-04-03 12:04:52',NULL,NULL);
|
INSERT INTO `versionLog` VALUES ('vn-database','10975','01-expeditionFk.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-04-03 12:04:52',NULL,NULL);
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','10976','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-04-18 07:40:57',NULL,NULL);
|
INSERT INTO `versionLog` VALUES ('vn-database','10976','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-04-18 07:40:57',NULL,NULL);
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','10977','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-04-18 07:40:57',NULL,NULL);
|
INSERT INTO `versionLog` VALUES ('vn-database','10977','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-04-18 07:40:57',NULL,NULL);
|
||||||
|
INSERT INTO `versionLog` VALUES ('vn-database','10978','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-06-11 08:32:33',NULL,NULL);
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','10984','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-05-07 07:31:59',NULL,NULL);
|
INSERT INTO `versionLog` VALUES ('vn-database','10984','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-05-07 07:31:59',NULL,NULL);
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','10988','00-pbx_prefix.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-04-11 17:00:16',NULL,NULL);
|
INSERT INTO `versionLog` VALUES ('vn-database','10988','00-pbx_prefix.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-04-11 17:00:16',NULL,NULL);
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','10990','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-05-07 07:31:59',NULL,NULL);
|
INSERT INTO `versionLog` VALUES ('vn-database','10990','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-05-07 07:31:59',NULL,NULL);
|
||||||
|
@ -800,6 +801,7 @@ INSERT INTO `versionLog` VALUES ('vn-database','11010','00-firstScript.sql','jen
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11012','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-05-14 07:45:27',NULL,NULL);
|
INSERT INTO `versionLog` VALUES ('vn-database','11012','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-05-14 07:45:27',NULL,NULL);
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11013','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-05-28 07:32:17',NULL,NULL);
|
INSERT INTO `versionLog` VALUES ('vn-database','11013','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-05-28 07:32:17',NULL,NULL);
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11014','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-05-14 07:45:27',NULL,NULL);
|
INSERT INTO `versionLog` VALUES ('vn-database','11014','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-05-14 07:45:27',NULL,NULL);
|
||||||
|
INSERT INTO `versionLog` VALUES ('vn-database','11015','00-photoMotivation.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-06-11 08:32:34',NULL,NULL);
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11016','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-04-27 13:16:09',NULL,NULL);
|
INSERT INTO `versionLog` VALUES ('vn-database','11016','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-04-27 13:16:09',NULL,NULL);
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11018','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-05-07 07:34:21',NULL,NULL);
|
INSERT INTO `versionLog` VALUES ('vn-database','11018','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-05-07 07:34:21',NULL,NULL);
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11019','00-locker.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-05-28 07:32:17',NULL,NULL);
|
INSERT INTO `versionLog` VALUES ('vn-database','11019','00-locker.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-05-28 07:32:17',NULL,NULL);
|
||||||
|
@ -819,6 +821,8 @@ INSERT INTO `versionLog` VALUES ('vn-database','11040','00-firstScript.sql','jen
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11044','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-05-28 07:32:31',NULL,NULL);
|
INSERT INTO `versionLog` VALUES ('vn-database','11044','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-05-28 07:32:31',NULL,NULL);
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11045','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-05-10 14:53:29',NULL,NULL);
|
INSERT INTO `versionLog` VALUES ('vn-database','11045','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-05-10 14:53:29',NULL,NULL);
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11046','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-05-28 07:32:46',NULL,NULL);
|
INSERT INTO `versionLog` VALUES ('vn-database','11046','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-05-28 07:32:46',NULL,NULL);
|
||||||
|
INSERT INTO `versionLog` VALUES ('vn-database','11050','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-06-11 08:32:34',NULL,NULL);
|
||||||
|
INSERT INTO `versionLog` VALUES ('vn-database','11050','01-elementFilter.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-06-11 08:32:34',NULL,NULL);
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11051','00-sipConfig_callLimit.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-05-14 14:31:10',NULL,NULL);
|
INSERT INTO `versionLog` VALUES ('vn-database','11051','00-sipConfig_callLimit.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-05-14 14:31:10',NULL,NULL);
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11054','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-05-28 07:32:46',NULL,NULL);
|
INSERT INTO `versionLog` VALUES ('vn-database','11054','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-05-28 07:32:46',NULL,NULL);
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11055','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-05-28 07:32:46',NULL,NULL);
|
INSERT INTO `versionLog` VALUES ('vn-database','11055','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-05-28 07:32:46',NULL,NULL);
|
||||||
|
@ -827,8 +831,22 @@ INSERT INTO `versionLog` VALUES ('vn-database','11057','01-part.sql','jenkins@db
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11057','02-part.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-05-28 07:32:47',NULL,NULL);
|
INSERT INTO `versionLog` VALUES ('vn-database','11057','02-part.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-05-28 07:32:47',NULL,NULL);
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11057','03-part.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-05-28 07:32:48',NULL,NULL);
|
INSERT INTO `versionLog` VALUES ('vn-database','11057','03-part.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-05-28 07:32:48',NULL,NULL);
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11058','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-05-28 07:32:48',NULL,NULL);
|
INSERT INTO `versionLog` VALUES ('vn-database','11058','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-05-28 07:32:48',NULL,NULL);
|
||||||
|
INSERT INTO `versionLog` VALUES ('vn-database','11059','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-06-11 08:32:34',NULL,NULL);
|
||||||
|
INSERT INTO `versionLog` VALUES ('vn-database','11060','00-createRoleReviewer.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-06-11 08:32:34',NULL,NULL);
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11061','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-05-28 07:32:48',NULL,NULL);
|
INSERT INTO `versionLog` VALUES ('vn-database','11061','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-05-28 07:32:48',NULL,NULL);
|
||||||
|
INSERT INTO `versionLog` VALUES ('vn-database','11065','00-modifyInvoiceInPrivileges.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-06-11 08:32:34',NULL,NULL);
|
||||||
|
INSERT INTO `versionLog` VALUES ('vn-database','11065','01-modifyInvoiceInAcls.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-06-11 08:32:34',NULL,NULL);
|
||||||
|
INSERT INTO `versionLog` VALUES ('vn-database','11068','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-06-11 08:32:34',NULL,NULL);
|
||||||
|
INSERT INTO `versionLog` VALUES ('vn-database','11069','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-06-11 08:32:34',NULL,NULL);
|
||||||
INSERT INTO `versionLog` VALUES ('vn-database','11071','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-05-28 07:32:48',NULL,NULL);
|
INSERT INTO `versionLog` VALUES ('vn-database','11071','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-05-28 07:32:48',NULL,NULL);
|
||||||
|
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','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','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','11083','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-06-03 10:46:36',NULL,NULL);
|
||||||
|
INSERT INTO `versionLog` VALUES ('vn-database','11090','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-06-11 08:32:35',NULL,NULL);
|
||||||
|
INSERT INTO `versionLog` VALUES ('vn-database','11092','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-06-07 08:21:23',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 */;
|
||||||
|
@ -924,6 +942,7 @@ INSERT INTO `role` VALUES (125,'claimViewer','Trabajadores que consulta las recl
|
||||||
INSERT INTO `role` VALUES (126,'greenhouseBoss','Jefe de invernadero',1,'2023-11-16 14:32:13','2023-11-16 14:32:13',NULL);
|
INSERT INTO `role` VALUES (126,'greenhouseBoss','Jefe de invernadero',1,'2023-11-16 14:32:13','2023-11-16 14:32:13',NULL);
|
||||||
INSERT INTO `role` VALUES (127,'timeControl','Tablet para fichar',1,'2024-01-09 16:36:56','2024-01-09 16:36:56',NULL);
|
INSERT INTO `role` VALUES (127,'timeControl','Tablet para fichar',1,'2024-01-09 16:36:56','2024-01-09 16:36:56',NULL);
|
||||||
INSERT INTO `role` VALUES (129,'buyerAssistant','Comprador que tienes mas permisos para ayudar al buyerBoss en algunas tareas',1,'2024-02-06 06:59:12','2024-02-06 06:59:12',783);
|
INSERT INTO `role` VALUES (129,'buyerAssistant','Comprador que tienes mas permisos para ayudar al buyerBoss en algunas tareas',1,'2024-02-06 06:59:12','2024-02-06 06:59:12',783);
|
||||||
|
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 `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);
|
||||||
|
@ -950,7 +969,6 @@ INSERT INTO `roleInherit` VALUES (27,21,53,NULL);
|
||||||
INSERT INTO `roleInherit` VALUES (28,22,13,NULL);
|
INSERT INTO `roleInherit` VALUES (28,22,13,NULL);
|
||||||
INSERT INTO `roleInherit` VALUES (29,22,21,NULL);
|
INSERT INTO `roleInherit` VALUES (29,22,21,NULL);
|
||||||
INSERT INTO `roleInherit` VALUES (30,30,5,NULL);
|
INSERT INTO `roleInherit` VALUES (30,30,5,NULL);
|
||||||
INSERT INTO `roleInherit` VALUES (31,30,20,NULL);
|
|
||||||
INSERT INTO `roleInherit` VALUES (32,30,22,NULL);
|
INSERT INTO `roleInherit` VALUES (32,30,22,NULL);
|
||||||
INSERT INTO `roleInherit` VALUES (33,30,53,NULL);
|
INSERT INTO `roleInherit` VALUES (33,30,53,NULL);
|
||||||
INSERT INTO `roleInherit` VALUES (34,30,64,NULL);
|
INSERT INTO `roleInherit` VALUES (34,30,64,NULL);
|
||||||
|
@ -1182,7 +1200,6 @@ INSERT INTO `roleInherit` VALUES (353,110,49,NULL);
|
||||||
INSERT INTO `roleInherit` VALUES (354,103,119,NULL);
|
INSERT INTO `roleInherit` VALUES (354,103,119,NULL);
|
||||||
INSERT INTO `roleInherit` VALUES (355,127,11,NULL);
|
INSERT INTO `roleInherit` VALUES (355,127,11,NULL);
|
||||||
INSERT INTO `roleInherit` VALUES (356,123,125,NULL);
|
INSERT INTO `roleInherit` VALUES (356,123,125,NULL);
|
||||||
INSERT INTO `roleInherit` VALUES (357,36,35,NULL);
|
|
||||||
INSERT INTO `roleInherit` VALUES (358,36,49,NULL);
|
INSERT INTO `roleInherit` VALUES (358,36,49,NULL);
|
||||||
INSERT INTO `roleInherit` VALUES (359,129,35,NULL);
|
INSERT INTO `roleInherit` VALUES (359,129,35,NULL);
|
||||||
INSERT INTO `roleInherit` VALUES (360,101,129,NULL);
|
INSERT INTO `roleInherit` VALUES (360,101,129,NULL);
|
||||||
|
@ -1190,6 +1207,11 @@ INSERT INTO `roleInherit` VALUES (361,50,112,NULL);
|
||||||
INSERT INTO `roleInherit` VALUES (362,122,15,NULL);
|
INSERT INTO `roleInherit` VALUES (362,122,15,NULL);
|
||||||
INSERT INTO `roleInherit` VALUES (364,35,18,NULL);
|
INSERT INTO `roleInherit` VALUES (364,35,18,NULL);
|
||||||
INSERT INTO `roleInherit` VALUES (365,123,119,NULL);
|
INSERT INTO `roleInherit` VALUES (365,123,119,NULL);
|
||||||
|
INSERT INTO `roleInherit` VALUES (366,30,37,NULL);
|
||||||
|
INSERT INTO `roleInherit` VALUES (367,30,73,NULL);
|
||||||
|
INSERT INTO `roleInherit` VALUES (368,130,49,10578);
|
||||||
|
INSERT INTO `roleInherit` VALUES (369,50,130,10578);
|
||||||
|
INSERT INTO `roleInherit` VALUES (370,72,130,10578);
|
||||||
|
|
||||||
INSERT INTO `userPassword` VALUES (1,7,1,0,2,1);
|
INSERT INTO `userPassword` VALUES (1,7,1,0,2,1);
|
||||||
|
|
||||||
|
@ -1373,7 +1395,7 @@ INSERT INTO `ACL` VALUES (213,'TravelThermograph','*','WRITE','ALLOW','ROLE','bu
|
||||||
INSERT INTO `ACL` VALUES (214,'Entry','*','*','ALLOW','ROLE','buyer');
|
INSERT INTO `ACL` VALUES (214,'Entry','*','*','ALLOW','ROLE','buyer');
|
||||||
INSERT INTO `ACL` VALUES (216,'TravelThermograph','*','READ','ALLOW','ROLE','employee');
|
INSERT INTO `ACL` VALUES (216,'TravelThermograph','*','READ','ALLOW','ROLE','employee');
|
||||||
INSERT INTO `ACL` VALUES (218,'Intrastat','*','*','ALLOW','ROLE','buyer');
|
INSERT INTO `ACL` VALUES (218,'Intrastat','*','*','ALLOW','ROLE','buyer');
|
||||||
INSERT INTO `ACL` VALUES (221,'UserConfig','getUserConfig','READ','ALLOW','ROLE','account');
|
INSERT INTO `ACL` VALUES (221,'UserConfig','getUserConfig','READ','ALLOW','ROLE','guest');
|
||||||
INSERT INTO `ACL` VALUES (226,'ClientObservation','*','READ','ALLOW','ROLE','trainee');
|
INSERT INTO `ACL` VALUES (226,'ClientObservation','*','READ','ALLOW','ROLE','trainee');
|
||||||
INSERT INTO `ACL` VALUES (227,'Address','*','READ','ALLOW','ROLE','trainee');
|
INSERT INTO `ACL` VALUES (227,'Address','*','READ','ALLOW','ROLE','trainee');
|
||||||
INSERT INTO `ACL` VALUES (228,'AddressObservation','*','READ','ALLOW','ROLE','trainee');
|
INSERT INTO `ACL` VALUES (228,'AddressObservation','*','READ','ALLOW','ROLE','trainee');
|
||||||
|
@ -1402,7 +1424,7 @@ INSERT INTO `ACL` VALUES (259,'Client','createReceipt','*','ALLOW','ROLE','sales
|
||||||
INSERT INTO `ACL` VALUES (260,'PrintServerQueue','*','WRITE','ALLOW','ROLE','employee');
|
INSERT INTO `ACL` VALUES (260,'PrintServerQueue','*','WRITE','ALLOW','ROLE','employee');
|
||||||
INSERT INTO `ACL` VALUES (261,'SupplierAccount','*','*','ALLOW','ROLE','administrative');
|
INSERT INTO `ACL` VALUES (261,'SupplierAccount','*','*','ALLOW','ROLE','administrative');
|
||||||
INSERT INTO `ACL` VALUES (262,'Entry','*','*','ALLOW','ROLE','administrative');
|
INSERT INTO `ACL` VALUES (262,'Entry','*','*','ALLOW','ROLE','administrative');
|
||||||
INSERT INTO `ACL` VALUES (263,'InvoiceIn','*','*','ALLOW','ROLE','administrative');
|
INSERT INTO `ACL` VALUES (263,'InvoiceIn','*','READ','ALLOW','ROLE','administrative');
|
||||||
INSERT INTO `ACL` VALUES (264,'StarredModule','*','*','ALLOW','ROLE','employee');
|
INSERT INTO `ACL` VALUES (264,'StarredModule','*','*','ALLOW','ROLE','employee');
|
||||||
INSERT INTO `ACL` VALUES (265,'ItemBotanical','*','WRITE','ALLOW','ROLE','logisticBoss');
|
INSERT INTO `ACL` VALUES (265,'ItemBotanical','*','WRITE','ALLOW','ROLE','logisticBoss');
|
||||||
INSERT INTO `ACL` VALUES (266,'ZoneLog','*','READ','ALLOW','ROLE','employee');
|
INSERT INTO `ACL` VALUES (266,'ZoneLog','*','READ','ALLOW','ROLE','employee');
|
||||||
|
@ -1469,7 +1491,6 @@ INSERT INTO `ACL` VALUES (338,'Shelving','*','*','ALLOW','ROLE','employee');
|
||||||
INSERT INTO `ACL` VALUES (339,'OsTicket','*','*','ALLOW','ROLE','employee');
|
INSERT INTO `ACL` VALUES (339,'OsTicket','*','*','ALLOW','ROLE','employee');
|
||||||
INSERT INTO `ACL` VALUES (340,'OsTicketConfig','*','*','ALLOW','ROLE','it');
|
INSERT INTO `ACL` VALUES (340,'OsTicketConfig','*','*','ALLOW','ROLE','it');
|
||||||
INSERT INTO `ACL` VALUES (341,'ClientConsumptionQueue','*','WRITE','ALLOW','ROLE','employee');
|
INSERT INTO `ACL` VALUES (341,'ClientConsumptionQueue','*','WRITE','ALLOW','ROLE','employee');
|
||||||
INSERT INTO `ACL` VALUES (342,'Ticket','deliveryNotePdf','READ','ALLOW','ROLE','employee');
|
|
||||||
INSERT INTO `ACL` VALUES (343,'Ticket','deliveryNoteEmail','WRITE','ALLOW','ROLE','employee');
|
INSERT INTO `ACL` VALUES (343,'Ticket','deliveryNoteEmail','WRITE','ALLOW','ROLE','employee');
|
||||||
INSERT INTO `ACL` VALUES (344,'Ticket','deliveryNoteCsvPdf','READ','ALLOW','ROLE','employee');
|
INSERT INTO `ACL` VALUES (344,'Ticket','deliveryNoteCsvPdf','READ','ALLOW','ROLE','employee');
|
||||||
INSERT INTO `ACL` VALUES (345,'Ticket','deliveryNoteCsvEmail','READ','ALLOW','ROLE','employee');
|
INSERT INTO `ACL` VALUES (345,'Ticket','deliveryNoteCsvEmail','READ','ALLOW','ROLE','employee');
|
||||||
|
@ -1644,7 +1665,7 @@ INSERT INTO `ACL` VALUES (522,'Client','replaceOrCreate','*','ALLOW','ROLE','emp
|
||||||
INSERT INTO `ACL` VALUES (523,'Client','updateAll','*','ALLOW','ROLE','employee');
|
INSERT INTO `ACL` VALUES (523,'Client','updateAll','*','ALLOW','ROLE','employee');
|
||||||
INSERT INTO `ACL` VALUES (524,'Client','upsertWithWhere','*','ALLOW','ROLE','employee');
|
INSERT INTO `ACL` VALUES (524,'Client','upsertWithWhere','*','ALLOW','ROLE','employee');
|
||||||
INSERT INTO `ACL` VALUES (525,'Defaulter','observationEmail','WRITE','ALLOW','ROLE','employee');
|
INSERT INTO `ACL` VALUES (525,'Defaulter','observationEmail','WRITE','ALLOW','ROLE','employee');
|
||||||
INSERT INTO `ACL` VALUES (527,'VnUser','acl','READ','ALLOW','ROLE','account');
|
INSERT INTO `ACL` VALUES (527,'VnUser','acl','READ','ALLOW','ROLE','guest');
|
||||||
INSERT INTO `ACL` VALUES (528,'VnUser','getCurrentUserData','READ','ALLOW','ROLE','account');
|
INSERT INTO `ACL` VALUES (528,'VnUser','getCurrentUserData','READ','ALLOW','ROLE','account');
|
||||||
INSERT INTO `ACL` VALUES (530,'Account','exists','READ','ALLOW','ROLE','account');
|
INSERT INTO `ACL` VALUES (530,'Account','exists','READ','ALLOW','ROLE','account');
|
||||||
INSERT INTO `ACL` VALUES (531,'Account','exists','READ','ALLOW','ROLE','account');
|
INSERT INTO `ACL` VALUES (531,'Account','exists','READ','ALLOW','ROLE','account');
|
||||||
|
@ -1690,7 +1711,7 @@ INSERT INTO `ACL` VALUES (570,'InvoiceOut','canCreatePdf','WRITE','ALLOW','ROLE'
|
||||||
INSERT INTO `ACL` VALUES (571,'Supplier','editPayMethodCheck','WRITE','ALLOW','ROLE','financial');
|
INSERT INTO `ACL` VALUES (571,'Supplier','editPayMethodCheck','WRITE','ALLOW','ROLE','financial');
|
||||||
INSERT INTO `ACL` VALUES (572,'Worker','isTeamBoss','WRITE','ALLOW','ROLE','teamBoss');
|
INSERT INTO `ACL` VALUES (572,'Worker','isTeamBoss','WRITE','ALLOW','ROLE','teamBoss');
|
||||||
INSERT INTO `ACL` VALUES (573,'Worker','forceIsSubordinate','READ','ALLOW','ROLE','hr');
|
INSERT INTO `ACL` VALUES (573,'Worker','forceIsSubordinate','READ','ALLOW','ROLE','hr');
|
||||||
INSERT INTO `ACL` VALUES (574,'Claim','editState','WRITE','ALLOW','ROLE','claimManager');
|
INSERT INTO `ACL` VALUES (574,'Claim','editPickup','WRITE','ALLOW','ROLE','claimManager');
|
||||||
INSERT INTO `ACL` VALUES (577,'Claim','findOne','READ','ALLOW','ROLE','salesPerson');
|
INSERT INTO `ACL` VALUES (577,'Claim','findOne','READ','ALLOW','ROLE','salesPerson');
|
||||||
INSERT INTO `ACL` VALUES (579,'Claim','updateClaim','WRITE','ALLOW','ROLE','salesPerson');
|
INSERT INTO `ACL` VALUES (579,'Claim','updateClaim','WRITE','ALLOW','ROLE','salesPerson');
|
||||||
INSERT INTO `ACL` VALUES (580,'Claim','regularizeClaim','WRITE','ALLOW','ROLE','claimManager');
|
INSERT INTO `ACL` VALUES (580,'Claim','regularizeClaim','WRITE','ALLOW','ROLE','claimManager');
|
||||||
|
@ -1772,8 +1793,8 @@ INSERT INTO `ACL` VALUES (688,'ClientSms','create','WRITE','ALLOW','ROLE','emplo
|
||||||
INSERT INTO `ACL` VALUES (689,'Vehicle','sorted','WRITE','ALLOW','ROLE','employee');
|
INSERT INTO `ACL` VALUES (689,'Vehicle','sorted','WRITE','ALLOW','ROLE','employee');
|
||||||
INSERT INTO `ACL` VALUES (690,'Roadmap','*','*','ALLOW','ROLE','palletizerBoss');
|
INSERT INTO `ACL` VALUES (690,'Roadmap','*','*','ALLOW','ROLE','palletizerBoss');
|
||||||
INSERT INTO `ACL` VALUES (691,'Roadmap','*','*','ALLOW','ROLE','productionBoss');
|
INSERT INTO `ACL` VALUES (691,'Roadmap','*','*','ALLOW','ROLE','productionBoss');
|
||||||
INSERT INTO `ACL` VALUES (692,'ExpeditionTruck','*','*','ALLOW','ROLE','production');
|
INSERT INTO `ACL` VALUES (692,'RoadmapStop','*','*','ALLOW','ROLE','production');
|
||||||
INSERT INTO `ACL` VALUES (693,'ExpeditionTruck','*','*','ALLOW','ROLE','productionBoss');
|
INSERT INTO `ACL` VALUES (693,'RoadmapStop','*','*','ALLOW','ROLE','productionBoss');
|
||||||
INSERT INTO `ACL` VALUES (695,'ViaexpressConfig','internationalExpedition','WRITE','ALLOW','ROLE','employee');
|
INSERT INTO `ACL` VALUES (695,'ViaexpressConfig','internationalExpedition','WRITE','ALLOW','ROLE','employee');
|
||||||
INSERT INTO `ACL` VALUES (696,'ViaexpressConfig','renderer','READ','ALLOW','ROLE','employee');
|
INSERT INTO `ACL` VALUES (696,'ViaexpressConfig','renderer','READ','ALLOW','ROLE','employee');
|
||||||
INSERT INTO `ACL` VALUES (697,'Ticket','transferClient','WRITE','ALLOW','ROLE','administrative');
|
INSERT INTO `ACL` VALUES (697,'Ticket','transferClient','WRITE','ALLOW','ROLE','administrative');
|
||||||
|
@ -1809,7 +1830,7 @@ INSERT INTO `ACL` VALUES (727,'Account','find','READ','ALLOW','ROLE','employee')
|
||||||
INSERT INTO `ACL` VALUES (728,'Account','exists','READ','ALLOW','ROLE','employee');
|
INSERT INTO `ACL` VALUES (728,'Account','exists','READ','ALLOW','ROLE','employee');
|
||||||
INSERT INTO `ACL` VALUES (729,'Sale','clone','WRITE','ALLOW','ROLE','buyer');
|
INSERT INTO `ACL` VALUES (729,'Sale','clone','WRITE','ALLOW','ROLE','buyer');
|
||||||
INSERT INTO `ACL` VALUES (730,'Ticket','setDeleted','WRITE','ALLOW','ROLE','deliveryAssistant');
|
INSERT INTO `ACL` VALUES (730,'Ticket','setDeleted','WRITE','ALLOW','ROLE','deliveryAssistant');
|
||||||
INSERT INTO `ACL` VALUES (732,'Sale','isInPreparing','*','ALLOW','ROLE','production');
|
INSERT INTO `ACL` VALUES (732,'Sale','isInPreparing','*','ALLOW','ROLE','reviewer');
|
||||||
INSERT INTO `ACL` VALUES (733,'Train','*','READ','ALLOW','ROLE','production');
|
INSERT INTO `ACL` VALUES (733,'Train','*','READ','ALLOW','ROLE','production');
|
||||||
INSERT INTO `ACL` VALUES (734,'WorkerDepartment','*','*','ALLOW','ROLE','employee');
|
INSERT INTO `ACL` VALUES (734,'WorkerDepartment','*','*','ALLOW','ROLE','employee');
|
||||||
INSERT INTO `ACL` VALUES (735,'VnUser','higherPrivileges','*','ALLOW','ROLE','itManagement');
|
INSERT INTO `ACL` VALUES (735,'VnUser','higherPrivileges','*','ALLOW','ROLE','itManagement');
|
||||||
|
@ -1866,7 +1887,7 @@ INSERT INTO `ACL` VALUES (785,'VnRole','*','WRITE','ALLOW','ROLE','it');
|
||||||
INSERT INTO `ACL` VALUES (786,'State','isAllEditable','READ','ALLOW','ROLE','delivery');
|
INSERT INTO `ACL` VALUES (786,'State','isAllEditable','READ','ALLOW','ROLE','delivery');
|
||||||
INSERT INTO `ACL` VALUES (787,'Ticket','makePdfList','*','ALLOW','ROLE','employee');
|
INSERT INTO `ACL` VALUES (787,'Ticket','makePdfList','*','ALLOW','ROLE','employee');
|
||||||
INSERT INTO `ACL` VALUES (788,'Ticket','invoiceTicketsAndPdf','*','ALLOW','ROLE','employee');
|
INSERT INTO `ACL` VALUES (788,'Ticket','invoiceTicketsAndPdf','*','ALLOW','ROLE','employee');
|
||||||
INSERT INTO `ACL` VALUES (789,'InvoiceIn','*','*','ALLOW','ROLE','buyer');
|
INSERT INTO `ACL` VALUES (789,'InvoiceIn','*','READ','ALLOW','ROLE','buyer');
|
||||||
INSERT INTO `ACL` VALUES (790,'InvoiceIn','getSerial','READ','ALLOW','ROLE','buyer');
|
INSERT INTO `ACL` VALUES (790,'InvoiceIn','getSerial','READ','ALLOW','ROLE','buyer');
|
||||||
INSERT INTO `ACL` VALUES (791,'InvoiceIn','corrective','WRITE','ALLOW','ROLE','administrative');
|
INSERT INTO `ACL` VALUES (791,'InvoiceIn','corrective','WRITE','ALLOW','ROLE','administrative');
|
||||||
INSERT INTO `ACL` VALUES (792,'InvoiceInCorrection','*','*','ALLOW','ROLE','administrative');
|
INSERT INTO `ACL` VALUES (792,'InvoiceInCorrection','*','*','ALLOW','ROLE','administrative');
|
||||||
|
@ -1920,6 +1941,25 @@ INSERT INTO `ACL` VALUES (842,'Worker','__get__locker','READ','ALLOW','ROLE','hr
|
||||||
INSERT INTO `ACL` VALUES (843,'Worker','__get__locker','READ','ALLOW','ROLE','productionBoss');
|
INSERT INTO `ACL` VALUES (843,'Worker','__get__locker','READ','ALLOW','ROLE','productionBoss');
|
||||||
INSERT INTO `ACL` VALUES (844,'RoadmapStop','*','*','ALLOW','ROLE','production');
|
INSERT INTO `ACL` VALUES (844,'RoadmapStop','*','*','ALLOW','ROLE','production');
|
||||||
INSERT INTO `ACL` VALUES (845,'RoadmapStop','*','*','ALLOW','ROLE','productionBoss');
|
INSERT INTO `ACL` VALUES (845,'RoadmapStop','*','*','ALLOW','ROLE','productionBoss');
|
||||||
|
INSERT INTO `ACL` VALUES (846,'Ticket','refund','WRITE','ALLOW','ROLE','logistic');
|
||||||
|
INSERT INTO `ACL` VALUES (847,'RouteConfig','*','READ','ALLOW','ROLE','employee');
|
||||||
|
INSERT INTO `ACL` VALUES (848,'InvoiceIn','updateInvoiceIn','WRITE','ALLOW','ROLE','administrative');
|
||||||
|
INSERT INTO `ACL` VALUES (849,'InvoiceIn','clone','WRITE','ALLOW','ROLE','administrative');
|
||||||
|
INSERT INTO `ACL` VALUES (850,'InvoiceIn','corrective','WRITE','ALLOW','ROLE','administrative');
|
||||||
|
INSERT INTO `ACL` VALUES (851,'InvoiceIn','exchangeRateUpdate','WRITE','ALLOW','ROLE','administrative');
|
||||||
|
INSERT INTO `ACL` VALUES (852,'InvoiceIn','invoiceInEmail','WRITE','ALLOW','ROLE','administrative');
|
||||||
|
INSERT INTO `ACL` VALUES (853,'InvoiceIn','toBook','WRITE','ALLOW','ROLE','administrative');
|
||||||
|
INSERT INTO `ACL` VALUES (854,'InvoiceIn','toUnbook','WRITE','ALLOW','ROLE','administrative');
|
||||||
|
INSERT INTO `ACL` VALUES (855,'InvoiceIn','deleteById','WRITE','ALLOW','ROLE','administrative');
|
||||||
|
INSERT INTO `ACL` VALUES (856,'InvoiceIn','updateInvoiceIn','WRITE','ALLOW','ROLE','buyer');
|
||||||
|
INSERT INTO `ACL` VALUES (857,'InvoiceIn','clone','WRITE','ALLOW','ROLE','buyer');
|
||||||
|
INSERT INTO `ACL` VALUES (858,'InvoiceIn','corrective','WRITE','ALLOW','ROLE','buyer');
|
||||||
|
INSERT INTO `ACL` VALUES (859,'InvoiceIn','exchangeRateUpdate','WRITE','ALLOW','ROLE','buyer');
|
||||||
|
INSERT INTO `ACL` VALUES (860,'InvoiceIn','invoiceInEmail','WRITE','ALLOW','ROLE','buyer');
|
||||||
|
INSERT INTO `ACL` VALUES (861,'InvoiceIn','toBook','WRITE','ALLOW','ROLE','buyer');
|
||||||
|
INSERT INTO `ACL` VALUES (862,'InvoiceIn','deleteById','WRITE','ALLOW','ROLE','buyer');
|
||||||
|
INSERT INTO `ACL` VALUES (863,'InvoiceIn','create','WRITE','ALLOW','ROLE','administrative');
|
||||||
|
INSERT INTO `ACL` VALUES (864,'InvoiceIn','create','WRITE','ALLOW','ROLE','buyer');
|
||||||
|
|
||||||
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');
|
||||||
|
@ -2008,6 +2048,7 @@ INSERT INTO `defaultViewConfig` VALUES ('itemsIndex','{\"intrastat\":false,\"ste
|
||||||
INSERT INTO `defaultViewConfig` VALUES ('latestBuys','{\"intrastat\":false,\"description\":false,\"density\":false,\"isActive\":false,\n \"freightValue\":false,\"packageValue\":false,\"isIgnored\":false,\"price2\":false,\"ektFk\":false,\"weight\":false,\n \"size\":false,\"comissionValue\":false,\"landing\":false}');
|
INSERT INTO `defaultViewConfig` VALUES ('latestBuys','{\"intrastat\":false,\"description\":false,\"density\":false,\"isActive\":false,\n \"freightValue\":false,\"packageValue\":false,\"isIgnored\":false,\"price2\":false,\"ektFk\":false,\"weight\":false,\n \"size\":false,\"comissionValue\":false,\"landing\":false}');
|
||||||
INSERT INTO `defaultViewConfig` VALUES ('ticketsMonitor','{\"id\":false}');
|
INSERT INTO `defaultViewConfig` VALUES ('ticketsMonitor','{\"id\":false}');
|
||||||
INSERT INTO `defaultViewConfig` VALUES ('clientsDetail','{\"id\":true,\"phone\":true,\"city\":true,\"socialName\":true,\"salesPersonFk\":true,\"email\":true,\"name\":false,\"fi\":false,\"credit\":false,\"creditInsurance\":false,\"mobile\":false,\"street\":false,\"countryFk\":false,\"provinceFk\":false,\"postcode\":false,\"created\":false,\"businessTypeFk\":false,\"payMethodFk\":false,\"sageTaxTypeFk\":false,\"sageTransactionTypeFk\":false,\"isActive\":false,\"isVies\":false,\"isTaxDataChecked\":false,\"isEqualizated\":false,\"isFreezed\":false,\"hasToInvoice\":false,\"hasToInvoiceByAddress\":false,\"isToBeMailed\":false,\"hasLcr\":false,\"hasCoreVnl\":false,\"hasSepaVnl\":false}');
|
INSERT INTO `defaultViewConfig` VALUES ('clientsDetail','{\"id\":true,\"phone\":true,\"city\":true,\"socialName\":true,\"salesPersonFk\":true,\"email\":true,\"name\":false,\"fi\":false,\"credit\":false,\"creditInsurance\":false,\"mobile\":false,\"street\":false,\"countryFk\":false,\"provinceFk\":false,\"postcode\":false,\"created\":false,\"businessTypeFk\":false,\"payMethodFk\":false,\"sageTaxTypeFk\":false,\"sageTransactionTypeFk\":false,\"isActive\":false,\"isVies\":false,\"isTaxDataChecked\":false,\"isEqualizated\":false,\"isFreezed\":false,\"hasToInvoice\":false,\"hasToInvoiceByAddress\":false,\"isToBeMailed\":false,\"hasLcr\":false,\"hasCoreVnl\":false,\"hasSepaVnl\":false}');
|
||||||
|
INSERT INTO `defaultViewConfig` VALUES ('routesList','{\"ID\":true,\"worker\":true,\"agency\":true,\"vehicle\":true,\"date\":true,\"volume\":true,\"description\":true,\"started\":true,\"finished\":true,\"actions\":true}');
|
||||||
|
|
||||||
/*!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 */;
|
||||||
|
|
|
@ -303,7 +303,6 @@ INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','claimManager','jerarquia'
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','workerBusinessAgreement','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','workerBusinessAgreement','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyer','tarifa_componentes','alexm@%','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyer','tarifa_componentes','alexm@%','0000-00-00 00:00:00','Select','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyer','tarifa_componentes_series','alexm@%','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyer','tarifa_componentes_series','alexm@%','0000-00-00 00:00:00','Select','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','claimManager','Entradas','alexm@%','0000-00-00 00:00:00','Insert,Update','');
|
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','itemType','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','itemType','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','logistic','cl_main','alexm@%','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','logistic','cl_main','alexm@%','0000-00-00 00:00:00','Select','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','salesPerson','cl_main','alexm@%','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','salesPerson','cl_main','alexm@%','0000-00-00 00:00:00','Select','');
|
||||||
|
@ -349,7 +348,7 @@ INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','employee','empresa','alex
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','sectorType','guillermo@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','sectorType','guillermo@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyer','Tintas','alexm@%','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyer','Tintas','alexm@%','0000-00-00 00:00:00','Select','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','claimManager','Movimientos','juan@%','0000-00-00 00:00:00','Insert,Delete','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','claimManager','Movimientos','juan@%','0000-00-00 00:00:00','Insert,Delete','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','employee','Entradas','alexm@%','0000-00-00 00:00:00','Select,Insert,Update','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','employee','Entradas','guillermo@10.5.1.3','0000-00-00 00:00:00','Select','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','salesPerson','ticket_observation','juan@%','0000-00-00 00:00:00','Insert,Update','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','salesPerson','ticket_observation','juan@%','0000-00-00 00:00:00','Insert,Update','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','employee','Entradas_dits','alexm@%','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','employee','Entradas_dits','alexm@%','0000-00-00 00:00:00','Select','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','sale','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','sale','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||||
|
@ -365,9 +364,7 @@ INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','administrative','tickets_
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','hrBoss','tickets_gestdoc','alexm@%','0000-00-00 00:00:00','Delete','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','hrBoss','tickets_gestdoc','alexm@%','0000-00-00 00:00:00','Delete','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','employee','tickets_gestdoc','alexm@%','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','employee','tickets_gestdoc','alexm@%','0000-00-00 00:00:00','Select','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','employee','Tickets','alexm@%','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','employee','Tickets','alexm@%','0000-00-00 00:00:00','Select','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyer','Entradas','root@localhost','0000-00-00 00:00:00','Update','');
|
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','administrative','Entradas','alexm@%','0000-00-00 00:00:00','Update','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','administrative','Entradas','alexm@%','0000-00-00 00:00:00','Update','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','logistic','Entradas','alexm@%','0000-00-00 00:00:00','Update','');
|
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyerBoss','Tintas','alexm@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Insert,Update,Delete','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyerBoss','Tintas','alexm@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Insert,Update,Delete','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyer','filtros','alexm@%','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyer','filtros','alexm@%','0000-00-00 00:00:00','Select','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','logistic','Entradas_kop','alexm@%','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','logistic','Entradas_kop','alexm@%','0000-00-00 00:00:00','Select','');
|
||||||
|
@ -600,7 +597,7 @@ INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logistic','ektEntryAssign','a
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','productionBoss','itemShelving','root@localhost','0000-00-00 00:00:00','Update','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','productionBoss','itemShelving','root@localhost','0000-00-00 00:00:00','Update','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','financial','propertyDms','juan@%','0000-00-00 00:00:00','Select,Insert,Update,Delete','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','financial','propertyDms','juan@%','0000-00-00 00:00:00','Select,Insert,Update,Delete','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','workerTimeControlConfig','juan@%','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','workerTimeControlConfig','juan@%','0000-00-00 00:00:00','Select','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','entry','juan@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select','Update');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','entry','guillermo@10.5.1.3','0000-00-00 00:00:00','Select','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','businessType','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','businessType','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','entryLog','juan@10.5.1.2','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','entryLog','juan@10.5.1.2','0000-00-00 00:00:00','Select','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','projectState','alexm@%','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','projectState','alexm@%','0000-00-00 00:00:00','Select','');
|
||||||
|
@ -627,7 +624,7 @@ INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','logistic','wks','alexm@%'
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','entryObservation','alexm@%','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','entryObservation','alexm@%','0000-00-00 00:00:00','Select','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','production','itemShelvingList','guillermo@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','production','itemShelvingList','guillermo@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','deliveryAssistant','cmrConfig','guillermo@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','deliveryAssistant','cmrConfig','guillermo@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','productionAssi','expeditionTruck','alexm@%','0000-00-00 00:00:00','Insert,Update','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','productionAssi','expeditionTruck','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Insert','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','alertLevel','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','alertLevel','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','expeditionSticker','alexm@%','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','expeditionSticker','alexm@%','0000-00-00 00:00:00','Select','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','artificialBoss','entryObservation','alexm@%','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','artificialBoss','entryObservation','alexm@%','0000-00-00 00:00:00','Select','');
|
||||||
|
@ -650,9 +647,9 @@ INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','pgcMaster','
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','itemBarcode','alexm@%','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','itemBarcode','alexm@%','0000-00-00 00:00:00','Select','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','host','alexm@%','0000-00-00 00:00:00','Select,Update','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','host','alexm@%','0000-00-00 00:00:00','Select,Update','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','ticket','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','ticket','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','invoiceIn','alexm@%','0000-00-00 00:00:00','Select,Insert,Update,Delete','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','invoiceIn','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Delete','Update');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hrBoss','invoiceIn','alexm@%','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hrBoss','invoiceIn','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','Update');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','invoiceIn','alexm@%','0000-00-00 00:00:00','Select,Insert','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','invoiceIn','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert','Update');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','claimManager','inventoryFailure','alexm@%','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','claimManager','inventoryFailure','alexm@%','0000-00-00 00:00:00','Select','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','salesPerson','intrastat','alexm@%','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','salesPerson','intrastat','alexm@%','0000-00-00 00:00:00','Select','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','inventoryFailure','alexm@%','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','inventoryFailure','alexm@%','0000-00-00 00:00:00','Select','');
|
||||||
|
@ -660,7 +657,7 @@ INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','inventoryFailureCause
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','salesPerson','invoiceCorrection','alexm@%','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','salesPerson','invoiceCorrection','alexm@%','0000-00-00 00:00:00','Select','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','invoiceCorrectionDataSource','alexm@%','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','invoiceCorrectionDataSource','alexm@%','0000-00-00 00:00:00','Select','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','salesPerson','invoiceCorrectionType','alexm@%','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','salesPerson','invoiceCorrectionType','alexm@%','0000-00-00 00:00:00','Select','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logistic','invoiceIn','alexm@%','0000-00-00 00:00:00','Insert','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logistic','invoiceIn','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Insert','Update');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','invoiceInDueDay','alexm@%','0000-00-00 00:00:00','Select,Insert,Update,Delete','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','invoiceInDueDay','alexm@%','0000-00-00 00:00:00','Select,Insert,Update,Delete','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','adminOfficer','invoiceInDueDay','alexm@%','0000-00-00 00:00:00','Insert,Delete','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','adminOfficer','invoiceInDueDay','alexm@%','0000-00-00 00:00:00','Insert,Delete','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','invoiceInIntrastat__','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Insert,Update,Delete','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','invoiceInIntrastat__','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Insert,Update,Delete','');
|
||||||
|
@ -751,7 +748,6 @@ INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','buy','alexm@%','0000-
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logistic','buy','alexm@%','0000-00-00 00:00:00','Delete','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logistic','buy','alexm@%','0000-00-00 00:00:00','Delete','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','saleGoal','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','saleGoal','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','packager','packingSiteLog','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Insert','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','packager','packingSiteLog','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Insert','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','hrBoss','Entradas','alexm@%','0000-00-00 00:00:00','Update','');
|
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','productionAssi','saleComponent','alexm@%','0000-00-00 00:00:00','Insert,Update','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','productionAssi','saleComponent','alexm@%','0000-00-00 00:00:00','Insert,Update','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','arcRead','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','arcRead','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','salesAssistant','clientProtected','alexm@%','0000-00-00 00:00:00','Select,Insert,Update,Delete','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','salesAssistant','clientProtected','alexm@%','0000-00-00 00:00:00','Select,Insert,Update,Delete','');
|
||||||
|
@ -773,7 +769,7 @@ INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','logistic','PreciosEspecia
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','srt','maintenance','movingState','alexm@%','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','srt','maintenance','movingState','alexm@%','0000-00-00 00:00:00','Select','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','srt','maintenance','bufferType','alexm@%','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','srt','maintenance','bufferType','alexm@%','0000-00-00 00:00:00','Select','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','srt','maintenance','bufferState','alexm@%','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','srt','maintenance','bufferState','alexm@%','0000-00-00 00:00:00','Select','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','srt','maintenance','buffer','alexm@%','0000-00-00 00:00:00','Select,Insert,Update','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','srt','maintenance','buffer','guillermo@10.5.1.3','0000-00-00 00:00:00','Insert,Update','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','srt','maintenance','bufferGroup','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','srt','maintenance','bufferGroup','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','srt','maintenance','lastRFID','alexm@%','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','srt','maintenance','lastRFID','alexm@%','0000-00-00 00:00:00','Select','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','person__','alexm@%','0000-00-00 00:00:00','Select,Insert,Update,Delete','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','person__','alexm@%','0000-00-00 00:00:00','Select,Insert,Update,Delete','');
|
||||||
|
@ -788,7 +784,6 @@ INSERT IGNORE INTO `tables_priv` VALUES ('','vn','productionAssi','vehicleState
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','productionAssi','vehicleEvent','alexm@%','0000-00-00 00:00:00','Select,Insert','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','productionAssi','vehicleEvent','alexm@%','0000-00-00 00:00:00','Select,Insert','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','cooler','Tintas','alexm@%','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','cooler','Tintas','alexm@%','0000-00-00 00:00:00','Select','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','itemBotanical','alexm@%','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','itemBotanical','alexm@%','0000-00-00 00:00:00','Select','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','cooler','Entradas','alexm@%','0000-00-00 00:00:00','Insert','');
|
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','account','developer','signInLog','juan@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','account','developer','signInLog','juan@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','ticketTracking','alexm@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','ticketTracking','alexm@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','productionAssi','deviceProductionState','alexm@%','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','productionAssi','deviceProductionState','alexm@%','0000-00-00 00:00:00','Select','');
|
||||||
|
@ -1190,7 +1185,7 @@ INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','businessCalendar','
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','edi','employee','item','alexm@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','edi','employee','item','alexm@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','vehicleNotes','alexm@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','vehicleNotes','alexm@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','vehicleDms','alexm@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','vehicleDms','alexm@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','palletizerBoss','expeditionTruck','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Update','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','invoiceInConfig','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','palletizerBoss','zoneEvent','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Insert,Delete','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','palletizerBoss','zoneEvent','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Insert,Delete','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','palletizerBoss','routesMonitor','alexm@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Insert,Update,Delete','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','palletizerBoss','routesMonitor','alexm@db-proxy1.static.verdnatura.es','0000-00-00 00:00:00','Insert,Update,Delete','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','propertyNotes','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','propertyNotes','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update','');
|
||||||
|
@ -1224,7 +1219,7 @@ INSERT IGNORE INTO `tables_priv` VALUES ('','salix','developer','module','juan@
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','salix','developer','printConfig','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','salix','developer','printConfig','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','salix','developer','url','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','salix','developer','url','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','salix','developer','userConfigView','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','salix','developer','userConfigView','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','claimRedelivery','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','claimRedelivery','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','clientRisk','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','clientRisk','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','supplierDms','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Delete','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','supplierDms','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Delete','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','bs','buyer','sale','guillermo@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','bs','buyer','sale','guillermo@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||||
|
@ -1252,7 +1247,7 @@ INSERT IGNORE INTO `tables_priv` VALUES ('','vn','deliveryAssistant','expeditio
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','deliveryAssistant','expeditionScan','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','deliveryAssistant','expeditionScan','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','deliveryAssistant','expeditionPallet','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','deliveryAssistant','expeditionPallet','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','province','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','province','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','deliveryAssistant','expeditionTruck','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Update','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','hedera','grafana','visitAccess','root@localhost','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 ('','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','');
|
||||||
|
@ -1309,6 +1304,7 @@ INSERT IGNORE INTO `tables_priv` VALUES ('','vn','maintenanceBos','project','gu
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','ink','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Insert,Update,Delete','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','ink','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Insert,Update,Delete','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','supplierDms','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','supplierDms','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','supplierDms','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','hr','supplierDms','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert','');
|
||||||
|
INSERT IGNORE INTO `tables_priv` VALUES ('','hedera','grafana','visitAgent','root@localhost','0000-00-00 00:00:00','Select','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','financial','remittance','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','financial','remittance','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','adminOfficer','vehicleConsumption','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','adminOfficer','vehicleConsumption','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','productionAssi','vehicleConsumption','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Insert,Update,Delete','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','productionAssi','vehicleConsumption','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Insert,Update,Delete','');
|
||||||
|
@ -1398,14 +1394,27 @@ INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','farmingDeliv
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','sage','grafana','TiposIva','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','sage','grafana','TiposIva','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','bs','buyer','waste','alexm@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','bs','buyer','waste','alexm@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','clientObservation','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','clientObservation','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','invoiceInConfig','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','hedera','grafana','visit','root@localhost','0000-00-00 00:00:00','Select','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','workerActivity','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','workerActivity','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','financial','bankPolicy','alexm@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Delete','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','financial','bankPolicy','alexm@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Delete','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','financial','bankPolicyDetail','alexm@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Delete','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','financial','bankPolicyDetail','alexm@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Delete','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','financial','bankPolicyReview','alexm@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Delete','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','financial','bankPolicyReview','alexm@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Delete','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','chat','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','roadmapStop','guillermo@10.5.1.3','0000-00-00 00:00:00','Select','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','production','roadmapStop','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','production','roadmapStop','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','agencyWorkCenter','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','agencyWorkCenter','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||||
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','roadmapStop','guillermo@10.5.1.3','0000-00-00 00:00:00','Insert,Update,Delete','');
|
||||||
|
INSERT IGNORE INTO `tables_priv` VALUES ('','srt','maintenanceBos','antenna','guillermo@10.5.1.3','0000-00-00 00:00:00','Select','');
|
||||||
|
INSERT IGNORE INTO `tables_priv` VALUES ('','srt','maintenanceBos','bufferPool','guillermo@10.5.1.3','0000-00-00 00:00:00','Select','');
|
||||||
|
INSERT IGNORE INTO `tables_priv` VALUES ('','srt','maintenanceBos','enteringLog','guillermo@10.5.1.3','0000-00-00 00:00:00','Select','');
|
||||||
|
INSERT IGNORE INTO `tables_priv` VALUES ('','srt','maintenanceBos','expeditionLoading','guillermo@10.5.1.3','0000-00-00 00:00:00','Select','');
|
||||||
|
INSERT IGNORE INTO `tables_priv` VALUES ('','srt','maintenanceBos','failureLog','guillermo@10.5.1.3','0000-00-00 00:00:00','Select','');
|
||||||
|
INSERT IGNORE INTO `tables_priv` VALUES ('','srt','maintenanceBos','movingLog','guillermo@10.5.1.3','0000-00-00 00:00:00','Select','');
|
||||||
|
INSERT IGNORE INTO `tables_priv` VALUES ('','srt','maintenanceBos','sorterLog','guillermo@10.5.1.3','0000-00-00 00:00:00','Select','');
|
||||||
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','entryEditor','Entradas','guillermo@10.5.1.3','0000-00-00 00:00:00','Insert','Update');
|
||||||
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','clientInforma','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||||
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','solunionCAP','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||||
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','clientUnpaid','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||||
|
INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','administrative','pay_dem','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||||
/*!40000 ALTER TABLE `tables_priv` ENABLE KEYS */;
|
/*!40000 ALTER TABLE `tables_priv` ENABLE KEYS */;
|
||||||
|
|
||||||
/*!40000 ALTER TABLE `columns_priv` DISABLE KEYS */;
|
/*!40000 ALTER TABLE `columns_priv` DISABLE KEYS */;
|
||||||
|
@ -1465,35 +1474,28 @@ INSERT IGNORE INTO `columns_priv` VALUES ('','pbx','grafana','sip','user_id','0
|
||||||
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','employee','entry','id','0000-00-00 00:00:00','Update');
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','administrative','invoiceIn','editorFk','0000-00-00 00:00:00','Update');
|
||||||
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','entry','supplierFk','0000-00-00 00:00:00','Update');
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','administrative','invoiceIn','expenseFkDeductible','0000-00-00 00:00:00','Update');
|
||||||
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','entry','dated','0000-00-00 00:00:00','Update');
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','administrative','invoiceIn','withholdingSageFk','0000-00-00 00:00:00','Update');
|
||||||
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','entry','invoiceNumber','0000-00-00 00:00:00','Update');
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','administrative','invoiceIn','isVatDeductible','0000-00-00 00:00:00','Update');
|
||||||
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','entry','isExcludedFromAvailable','0000-00-00 00:00:00','Update');
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','administrative','invoiceIn','bookEntried','0000-00-00 00:00:00','Update');
|
||||||
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','entry','notes','0000-00-00 00:00:00','Update');
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','administrative','invoiceIn','siiTrascendencyInvoiceInFk','0000-00-00 00:00:00','Update');
|
||||||
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','entry','isConfirmed','0000-00-00 00:00:00','Update');
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','administrative','invoiceIn','cplusTaxBreakFk','0000-00-00 00:00:00','Update');
|
||||||
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','entry','isOrdered','0000-00-00 00:00:00','Update');
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','administrative','invoiceIn','cplusSubjectOpFk','0000-00-00 00:00:00','Update');
|
||||||
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','entry','isRaid','0000-00-00 00:00:00','Update');
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','administrative','invoiceIn','cplusRectificationTypeFk','0000-00-00 00:00:00','Update');
|
||||||
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','entry','commission','0000-00-00 00:00:00','Update');
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','administrative','invoiceIn','siiTypeInvoiceInFk','0000-00-00 00:00:00','Update');
|
||||||
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','entry','created','0000-00-00 00:00:00','Update');
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','administrative','invoiceIn','operated','0000-00-00 00:00:00','Update');
|
||||||
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','entry','evaNotes','0000-00-00 00:00:00','Update');
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','administrative','invoiceIn','booked','0000-00-00 00:00:00','Update');
|
||||||
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','entry','travelFk','0000-00-00 00:00:00','Update');
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','administrative','invoiceIn','docFk','0000-00-00 00:00:00','Update');
|
||||||
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','entry','currencyFk','0000-00-00 00:00:00','Update');
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','administrative','invoiceIn','companyFk','0000-00-00 00:00:00','Update');
|
||||||
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','entry','companyFk','0000-00-00 00:00:00','Update');
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','administrative','invoiceIn','created','0000-00-00 00:00:00','Update');
|
||||||
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','entry','gestDocFk','0000-00-00 00:00:00','Update');
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','administrative','invoiceIn','currencyFk','0000-00-00 00:00:00','Update');
|
||||||
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','entry','invoiceInFk','0000-00-00 00:00:00','Update');
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','administrative','invoiceIn','supplierRef','0000-00-00 00:00:00','Update');
|
||||||
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','entry','isBlocked','0000-00-00 00:00:00','Update');
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','administrative','invoiceIn','issued','0000-00-00 00:00:00','Update');
|
||||||
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','entry','loadPriority','0000-00-00 00:00:00','Update');
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','administrative','invoiceIn','supplierFk','0000-00-00 00:00:00','Update');
|
||||||
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','entry','kop','0000-00-00 00:00:00','Update');
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','administrative','invoiceIn','serial','0000-00-00 00:00:00','Update');
|
||||||
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','entry','sub','0000-00-00 00:00:00','Update');
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','administrative','invoiceIn','serialNumber','0000-00-00 00:00:00','Update');
|
||||||
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','entry','pro','0000-00-00 00:00:00','Update');
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','administrative','invoiceIn','id','0000-00-00 00:00:00','Update');
|
||||||
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','entry','auction','0000-00-00 00:00:00','Update');
|
|
||||||
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','entry','invoiceAmount','0000-00-00 00:00:00','Update');
|
|
||||||
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','entry','buyerFk','0000-00-00 00:00:00','Update');
|
|
||||||
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','entry','typeFk','0000-00-00 00:00:00','Update');
|
|
||||||
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','entry','reference','0000-00-00 00:00:00','Update');
|
|
||||||
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','entry','observationEditorFk','0000-00-00 00:00:00','Update');
|
|
||||||
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','entry','clonedFrom','0000-00-00 00:00:00','Update');
|
|
||||||
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','routesMonitor','routeFk','0000-00-00 00:00:00','Update');
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','routesMonitor','routeFk','0000-00-00 00:00:00','Update');
|
||||||
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','routesMonitor','name','0000-00-00 00:00:00','Update');
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','routesMonitor','name','0000-00-00 00:00:00','Update');
|
||||||
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','routesMonitor','beachFk','0000-00-00 00:00:00','Update');
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','routesMonitor','beachFk','0000-00-00 00:00:00','Update');
|
||||||
|
@ -1601,7 +1603,10 @@ INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','editorFk',
|
||||||
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','recycledPlastic','0000-00-00 00:00:00','Update');
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','recycledPlastic','0000-00-00 00:00:00','Update');
|
||||||
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','nonRecycledPlastic','0000-00-00 00:00:00','Update');
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','nonRecycledPlastic','0000-00-00 00:00:00','Update');
|
||||||
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','minQuantity','0000-00-00 00:00:00','Update');
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','item','minQuantity','0000-00-00 00:00:00','Update');
|
||||||
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn2008','entryEditor','Entradas','Id_Entrada','0000-00-00 00:00:00','Update');
|
||||||
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','buyer','item','originFk','0000-00-00 00:00:00','Select,Update');
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','buyer','item','originFk','0000-00-00 00:00:00','Select,Update');
|
||||||
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn2008','entryEditor','Entradas','Id_Proveedor','0000-00-00 00:00:00','Update');
|
||||||
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn2008','entryEditor','Entradas','Fecha','0000-00-00 00:00:00','Update');
|
||||||
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','ticket','id','0000-00-00 00:00:00','Update');
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','ticket','id','0000-00-00 00:00:00','Update');
|
||||||
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','ticket','warehouseFk','0000-00-00 00:00:00','Update');
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','ticket','warehouseFk','0000-00-00 00:00:00','Update');
|
||||||
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','ticket','shipped','0000-00-00 00:00:00','Update');
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','employee','ticket','shipped','0000-00-00 00:00:00','Update');
|
||||||
|
@ -1668,6 +1673,93 @@ INSERT IGNORE INTO `columns_priv` VALUES ('','vn','entryEditor','entry','cloned
|
||||||
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','entryEditor','entry','editorFk','0000-00-00 00:00:00','Update');
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','entryEditor','entry','editorFk','0000-00-00 00:00:00','Update');
|
||||||
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','entryEditor','entry','lockerUserFk','0000-00-00 00:00:00','Update');
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','entryEditor','entry','lockerUserFk','0000-00-00 00:00:00','Update');
|
||||||
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','entryEditor','entry','locked','0000-00-00 00:00:00','Update');
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','entryEditor','entry','locked','0000-00-00 00:00:00','Update');
|
||||||
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn2008','entryEditor','Entradas','Referencia','0000-00-00 00:00:00','Update');
|
||||||
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn2008','entryEditor','Entradas','Inventario','0000-00-00 00:00:00','Update');
|
||||||
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn2008','entryEditor','Entradas','Confirmada','0000-00-00 00:00:00','Update');
|
||||||
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn2008','entryEditor','Entradas','Pedida','0000-00-00 00:00:00','Update');
|
||||||
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn2008','entryEditor','Entradas','Redada','0000-00-00 00:00:00','Update');
|
||||||
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn2008','entryEditor','Entradas','comision','0000-00-00 00:00:00','Update');
|
||||||
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn2008','entryEditor','Entradas','odbc_date','0000-00-00 00:00:00','Update');
|
||||||
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn2008','entryEditor','Entradas','Notas_Eva','0000-00-00 00:00:00','Update');
|
||||||
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn2008','entryEditor','Entradas','travel_id','0000-00-00 00:00:00','Update');
|
||||||
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn2008','entryEditor','Entradas','Id_Moneda','0000-00-00 00:00:00','Update');
|
||||||
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn2008','entryEditor','Entradas','empresa_id','0000-00-00 00:00:00','Update');
|
||||||
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn2008','entryEditor','Entradas','gestdoc_id','0000-00-00 00:00:00','Update');
|
||||||
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn2008','entryEditor','Entradas','recibida_id','0000-00-00 00:00:00','Update');
|
||||||
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn2008','entryEditor','Entradas','loadPriority','0000-00-00 00:00:00','Update');
|
||||||
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn2008','entryEditor','Entradas','kop','0000-00-00 00:00:00','Update');
|
||||||
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn2008','entryEditor','Entradas','sub','0000-00-00 00:00:00','Update');
|
||||||
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn2008','entryEditor','Entradas','pro','0000-00-00 00:00:00','Update');
|
||||||
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn2008','entryEditor','Entradas','invoiceAmount','0000-00-00 00:00:00','Update');
|
||||||
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn2008','entryEditor','Entradas','buyerFk','0000-00-00 00:00:00','Update');
|
||||||
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn2008','entryEditor','Entradas','typeFk','0000-00-00 00:00:00','Update');
|
||||||
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn2008','entryEditor','Entradas','reference','0000-00-00 00:00:00','Update');
|
||||||
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','hrBoss','invoiceIn','id','0000-00-00 00:00:00','Update');
|
||||||
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','hrBoss','invoiceIn','serialNumber','0000-00-00 00:00:00','Update');
|
||||||
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','hrBoss','invoiceIn','serial','0000-00-00 00:00:00','Update');
|
||||||
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','hrBoss','invoiceIn','supplierFk','0000-00-00 00:00:00','Update');
|
||||||
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','hrBoss','invoiceIn','issued','0000-00-00 00:00:00','Update');
|
||||||
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','hrBoss','invoiceIn','supplierRef','0000-00-00 00:00:00','Update');
|
||||||
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','hrBoss','invoiceIn','currencyFk','0000-00-00 00:00:00','Update');
|
||||||
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','hrBoss','invoiceIn','created','0000-00-00 00:00:00','Update');
|
||||||
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','hrBoss','invoiceIn','companyFk','0000-00-00 00:00:00','Update');
|
||||||
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','hrBoss','invoiceIn','docFk','0000-00-00 00:00:00','Update');
|
||||||
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','hrBoss','invoiceIn','booked','0000-00-00 00:00:00','Update');
|
||||||
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','hrBoss','invoiceIn','operated','0000-00-00 00:00:00','Update');
|
||||||
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','hrBoss','invoiceIn','siiTypeInvoiceInFk','0000-00-00 00:00:00','Update');
|
||||||
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','hrBoss','invoiceIn','cplusRectificationTypeFk','0000-00-00 00:00:00','Update');
|
||||||
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','hrBoss','invoiceIn','cplusSubjectOpFk','0000-00-00 00:00:00','Update');
|
||||||
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','hrBoss','invoiceIn','cplusTaxBreakFk','0000-00-00 00:00:00','Update');
|
||||||
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','hrBoss','invoiceIn','siiTrascendencyInvoiceInFk','0000-00-00 00:00:00','Update');
|
||||||
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','hrBoss','invoiceIn','bookEntried','0000-00-00 00:00:00','Update');
|
||||||
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','hrBoss','invoiceIn','isVatDeductible','0000-00-00 00:00:00','Update');
|
||||||
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','hrBoss','invoiceIn','withholdingSageFk','0000-00-00 00:00:00','Update');
|
||||||
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','hrBoss','invoiceIn','expenseFkDeductible','0000-00-00 00:00:00','Update');
|
||||||
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','hrBoss','invoiceIn','editorFk','0000-00-00 00:00:00','Update');
|
||||||
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','buyer','invoiceIn','id','0000-00-00 00:00:00','Update');
|
||||||
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','buyer','invoiceIn','serialNumber','0000-00-00 00:00:00','Update');
|
||||||
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','buyer','invoiceIn','serial','0000-00-00 00:00:00','Update');
|
||||||
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','buyer','invoiceIn','supplierFk','0000-00-00 00:00:00','Update');
|
||||||
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','buyer','invoiceIn','issued','0000-00-00 00:00:00','Update');
|
||||||
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','buyer','invoiceIn','supplierRef','0000-00-00 00:00:00','Update');
|
||||||
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','buyer','invoiceIn','currencyFk','0000-00-00 00:00:00','Update');
|
||||||
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','buyer','invoiceIn','created','0000-00-00 00:00:00','Update');
|
||||||
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','buyer','invoiceIn','companyFk','0000-00-00 00:00:00','Update');
|
||||||
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','buyer','invoiceIn','docFk','0000-00-00 00:00:00','Update');
|
||||||
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','buyer','invoiceIn','booked','0000-00-00 00:00:00','Update');
|
||||||
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','buyer','invoiceIn','operated','0000-00-00 00:00:00','Update');
|
||||||
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','buyer','invoiceIn','siiTypeInvoiceInFk','0000-00-00 00:00:00','Update');
|
||||||
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','buyer','invoiceIn','cplusRectificationTypeFk','0000-00-00 00:00:00','Update');
|
||||||
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','buyer','invoiceIn','cplusSubjectOpFk','0000-00-00 00:00:00','Update');
|
||||||
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','buyer','invoiceIn','cplusTaxBreakFk','0000-00-00 00:00:00','Update');
|
||||||
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','buyer','invoiceIn','siiTrascendencyInvoiceInFk','0000-00-00 00:00:00','Update');
|
||||||
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','buyer','invoiceIn','bookEntried','0000-00-00 00:00:00','Update');
|
||||||
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','buyer','invoiceIn','isVatDeductible','0000-00-00 00:00:00','Update');
|
||||||
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','buyer','invoiceIn','withholdingSageFk','0000-00-00 00:00:00','Update');
|
||||||
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','buyer','invoiceIn','expenseFkDeductible','0000-00-00 00:00:00','Update');
|
||||||
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','buyer','invoiceIn','editorFk','0000-00-00 00:00:00','Update');
|
||||||
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','logistic','invoiceIn','id','0000-00-00 00:00:00','Update');
|
||||||
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','logistic','invoiceIn','serialNumber','0000-00-00 00:00:00','Update');
|
||||||
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','logistic','invoiceIn','serial','0000-00-00 00:00:00','Update');
|
||||||
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','logistic','invoiceIn','supplierFk','0000-00-00 00:00:00','Update');
|
||||||
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','logistic','invoiceIn','issued','0000-00-00 00:00:00','Update');
|
||||||
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','logistic','invoiceIn','supplierRef','0000-00-00 00:00:00','Update');
|
||||||
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','logistic','invoiceIn','currencyFk','0000-00-00 00:00:00','Update');
|
||||||
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','logistic','invoiceIn','created','0000-00-00 00:00:00','Update');
|
||||||
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','logistic','invoiceIn','companyFk','0000-00-00 00:00:00','Update');
|
||||||
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','logistic','invoiceIn','docFk','0000-00-00 00:00:00','Update');
|
||||||
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','logistic','invoiceIn','booked','0000-00-00 00:00:00','Update');
|
||||||
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','logistic','invoiceIn','operated','0000-00-00 00:00:00','Update');
|
||||||
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','logistic','invoiceIn','siiTypeInvoiceInFk','0000-00-00 00:00:00','Update');
|
||||||
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','logistic','invoiceIn','cplusRectificationTypeFk','0000-00-00 00:00:00','Update');
|
||||||
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','logistic','invoiceIn','cplusSubjectOpFk','0000-00-00 00:00:00','Update');
|
||||||
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','logistic','invoiceIn','cplusTaxBreakFk','0000-00-00 00:00:00','Update');
|
||||||
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','logistic','invoiceIn','siiTrascendencyInvoiceInFk','0000-00-00 00:00:00','Update');
|
||||||
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','logistic','invoiceIn','bookEntried','0000-00-00 00:00:00','Update');
|
||||||
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','logistic','invoiceIn','isVatDeductible','0000-00-00 00:00:00','Update');
|
||||||
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','logistic','invoiceIn','withholdingSageFk','0000-00-00 00:00:00','Update');
|
||||||
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','logistic','invoiceIn','expenseFkDeductible','0000-00-00 00:00:00','Update');
|
||||||
|
INSERT IGNORE INTO `columns_priv` VALUES ('','vn','logistic','invoiceIn','editorFk','0000-00-00 00:00:00','Update');
|
||||||
/*!40000 ALTER TABLE `columns_priv` ENABLE KEYS */;
|
/*!40000 ALTER TABLE `columns_priv` ENABLE KEYS */;
|
||||||
|
|
||||||
/*!40000 ALTER TABLE `procs_priv` DISABLE KEYS */;
|
/*!40000 ALTER TABLE `procs_priv` DISABLE KEYS */;
|
||||||
|
@ -1732,8 +1824,10 @@ INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','barcodeToItem','FUN
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','ticket_splititempackingtype','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','ticket_splititempackingtype','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00');
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','entry_getCommission','FUNCTION','alexm@%','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','entry_getCommission','FUNCTION','alexm@%','Execute','0000-00-00 00:00:00');
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','deliveryAssistant','expeditionstate_addbypallet','PROCEDURE','alexm@db-proxy2.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','deliveryAssistant','expeditionstate_addbypallet','PROCEDURE','alexm@db-proxy2.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||||
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','administrative','ledger_nextTx','PROCEDURE','guillermo@10.5.1.3','Execute','0000-00-00 00:00:00');
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','hr','mail_insert','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','hr','mail_insert','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00');
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','entry_fixMisfit','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','entry_fixMisfit','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00');
|
||||||
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','financial','entry_updateComission','PROCEDURE','guillermo@db-proxy2.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','util','guest','VN_CURDATE','FUNCTION','juan@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','util','guest','VN_CURDATE','FUNCTION','juan@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','marketingBoss','clientTaxArea','FUNCTION','alexm@%','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','marketingBoss','clientTaxArea','FUNCTION','alexm@%','Execute','0000-00-00 00:00:00');
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','administrative','clientTaxArea','FUNCTION','alexm@%','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','administrative','clientTaxArea','FUNCTION','alexm@%','Execute','0000-00-00 00:00:00');
|
||||||
|
@ -1761,7 +1855,7 @@ INSERT IGNORE INTO `procs_priv` VALUES ('','vn','manager','collection_make','PR
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','util','android','debugadd','PROCEDURE','jenkins@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','util','android','debugadd','PROCEDURE','jenkins@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','administrative','copyComponentsFromSaleList','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','administrative','copyComponentsFromSaleList','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00');
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','administrative','duaEntryValueUpdate','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','administrative','duaEntryValueUpdate','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00');
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','administrative','duaInvoiceInBooking','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','administrative','duaInvoiceInBooking','PROCEDURE','carlosap@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','itemshelvinglog_get','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','itemshelvinglog_get','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','expedition_getstate','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','expedition_getstate','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','srt','production','expedition_scan','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','srt','production','expedition_scan','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||||
|
@ -1861,7 +1955,6 @@ INSERT IGNORE INTO `procs_priv` VALUES ('','vn','hr','workercalendar_calculateb
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','ticketparking_findskipped','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','ticketparking_findskipped','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00');
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','ticketcollection_getnopacked','FUNCTION','alexm@%','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','ticketcollection_getnopacked','FUNCTION','alexm@%','Execute','0000-00-00 00:00:00');
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','administrative','supplier_checkbalance','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','administrative','supplier_checkbalance','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00');
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','buyer','item_valuateinventory','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00');
|
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','administrative','ledger_docompensation','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','administrative','ledger_docompensation','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00');
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','administrative','ledger_next','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','administrative','ledger_next','PROCEDURE','alexm@%','Execute','0000-00-00 00:00:00');
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','administrative','invoicein_booking','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','administrative','invoicein_booking','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||||
|
@ -2055,10 +2148,9 @@ INSERT IGNORE INTO `procs_priv` VALUES ('','vn','claimManager','entry_getTransf
|
||||||
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','financial','remittance_calc','PROCEDURE','jenkins@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','financial','remittance_calc','PROCEDURE','alexm@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 ('','vn','grafana','item_ValuateInventory','PROCEDURE','guillermo@db-proxy2.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00');
|
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','financialBoss','balance_create','PROCEDURE','jenkins@db-proxy2.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','financialBoss','balance_create','PROCEDURE','jenkins@db-proxy2.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','hrBoss','balance_create','PROCEDURE','jenkins@db-proxy2.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','hrBoss','balance_create','PROCEDURE','jenkins@db-proxy2.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','claimManager','buy_recalcPricesByEntry','PROCEDURE','jenkins@db-proxy2.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','claimManager','buy_recalcPricesByEntry','PROCEDURE','jenkins@db-proxy2.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||||
|
@ -2066,6 +2158,8 @@ INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','buy_recalcPricesByE
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','entryEditor','buy_recalcPricesByBuy','PROCEDURE','jenkins@db-proxy2.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','entryEditor','buy_recalcPricesByBuy','PROCEDURE','jenkins@db-proxy2.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','claimManager','buy_recalcPricesByBuy','PROCEDURE','jenkins@db-proxy2.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','claimManager','buy_recalcPricesByBuy','PROCEDURE','jenkins@db-proxy2.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','buy_recalcPricesByBuy','PROCEDURE','jenkins@db-proxy2.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00');
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','buy_recalcPricesByBuy','PROCEDURE','jenkins@db-proxy2.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||||
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','hr','ledger_nextTx','PROCEDURE','guillermo@db-proxy2.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||||
|
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','hr','ledger_docompensation','PROCEDURE','guillermo@db-proxy2.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||||
/*!40000 ALTER TABLE `procs_priv` ENABLE KEYS */;
|
/*!40000 ALTER TABLE `procs_priv` ENABLE KEYS */;
|
||||||
|
|
||||||
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
|
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
|
||||||
|
@ -2090,7 +2184,7 @@ INSERT IGNORE INTO `global_priv` VALUES ('','buyer','{\"access\": 0, \"version_
|
||||||
INSERT IGNORE INTO `global_priv` VALUES ('','buyerAssistant','{\"access\":0,\"version_id\":101106,\"is_role\":true}');
|
INSERT IGNORE INTO `global_priv` VALUES ('','buyerAssistant','{\"access\":0,\"version_id\":101106,\"is_role\":true}');
|
||||||
INSERT IGNORE INTO `global_priv` VALUES ('','buyerBoss','{\"access\": 0, \"version_id\": 101106, \"is_role\": true}');
|
INSERT IGNORE INTO `global_priv` VALUES ('','buyerBoss','{\"access\": 0, \"version_id\": 101106, \"is_role\": true}');
|
||||||
INSERT IGNORE INTO `global_priv` VALUES ('','claimManager','{\"access\":0,\"version_id\":101106,\"is_role\":true}');
|
INSERT IGNORE INTO `global_priv` VALUES ('','claimManager','{\"access\":0,\"version_id\":101106,\"is_role\":true}');
|
||||||
INSERT IGNORE INTO `global_priv` VALUES ('','cooler','{\"access\":0,\"version_id\":100707,\"is_role\":true}');
|
INSERT IGNORE INTO `global_priv` VALUES ('','cooler','{\"access\":0,\"version_id\":101106,\"is_role\":true}');
|
||||||
INSERT IGNORE INTO `global_priv` VALUES ('','coolerAssist','{\"access\":0,\"version_id\":100707,\"is_role\":true}');
|
INSERT IGNORE INTO `global_priv` VALUES ('','coolerAssist','{\"access\":0,\"version_id\":100707,\"is_role\":true}');
|
||||||
INSERT IGNORE INTO `global_priv` VALUES ('','coolerBoss','{\"access\":0,\"version_id\":101106,\"is_role\":true}');
|
INSERT IGNORE INTO `global_priv` VALUES ('','coolerBoss','{\"access\":0,\"version_id\":101106,\"is_role\":true}');
|
||||||
INSERT IGNORE INTO `global_priv` VALUES ('','customer','{\"access\": 0, \"max_questions\": 0, \"max_updates\": 30000, \"max_connections\": 300000, \"max_user_connections\": 400, \"max_statement_time\": 0.000000, \"is_role\": true,\"version_id\":100707}');
|
INSERT IGNORE INTO `global_priv` VALUES ('','customer','{\"access\": 0, \"max_questions\": 0, \"max_updates\": 30000, \"max_connections\": 300000, \"max_user_connections\": 400, \"max_statement_time\": 0.000000, \"is_role\": true,\"version_id\":100707}');
|
||||||
|
@ -2128,7 +2222,7 @@ INSERT IGNORE INTO `global_priv` VALUES ('','marketingBoss','{\"access\":0,\"ve
|
||||||
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 ('','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\":100707,\"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}');
|
||||||
INSERT IGNORE INTO `global_priv` VALUES ('','production','{\"access\":0,\"version_id\":101106,\"is_role\":true}');
|
INSERT IGNORE INTO `global_priv` VALUES ('','production','{\"access\":0,\"version_id\":101106,\"is_role\":true}');
|
||||||
INSERT IGNORE INTO `global_priv` VALUES ('','productionAssi','{\"access\": 0, \"version_id\": 101106, \"is_role\": true}');
|
INSERT IGNORE INTO `global_priv` VALUES ('','productionAssi','{\"access\": 0, \"version_id\": 101106, \"is_role\": true}');
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -2239,7 +2239,7 @@ trig: BEGIN
|
||||||
LEAVE trig;
|
LEAVE trig;
|
||||||
END IF;
|
END IF;
|
||||||
|
|
||||||
CALL entry_checkBooked(NEW.entryFk);
|
CALL entry_isEditable(NEW.entryFk);
|
||||||
IF NEW.printedStickers <> 0 THEN
|
IF NEW.printedStickers <> 0 THEN
|
||||||
CALL util.throw('it is not possible to create buy lines with printedstickers other than 0');
|
CALL util.throw('it is not possible to create buy lines with printedstickers other than 0');
|
||||||
END IF;
|
END IF;
|
||||||
|
@ -2366,7 +2366,7 @@ trig:BEGIN
|
||||||
LEAVE trig;
|
LEAVE trig;
|
||||||
END IF;
|
END IF;
|
||||||
|
|
||||||
CALL entry_checkBooked(OLD.entryFk);
|
CALL entry_isEditable(OLD.entryFk);
|
||||||
SET NEW.editorFk = account.myUser_getId();
|
SET NEW.editorFk = account.myUser_getId();
|
||||||
|
|
||||||
SELECT defaultEntry INTO vDefaultEntry
|
SELECT defaultEntry INTO vDefaultEntry
|
||||||
|
@ -2515,7 +2515,7 @@ DELIMITER ;;
|
||||||
BEFORE DELETE ON `buy`
|
BEFORE DELETE ON `buy`
|
||||||
FOR EACH ROW
|
FOR EACH ROW
|
||||||
BEGIN
|
BEGIN
|
||||||
CALL entry_checkBooked(OLD.entryFk);
|
CALL entry_isEditable(OLD.entryFk);
|
||||||
IF OLD.printedStickers <> 0 THEN
|
IF OLD.printedStickers <> 0 THEN
|
||||||
CALL util.throw("it is not possible to delete buys with printed labels ");
|
CALL util.throw("it is not possible to delete buys with printed labels ");
|
||||||
END IF;
|
END IF;
|
||||||
|
@ -4591,8 +4591,8 @@ BEGIN
|
||||||
CALL supplier_checkIsActive(NEW.supplierFk);
|
CALL supplier_checkIsActive(NEW.supplierFk);
|
||||||
SET NEW.currencyFk = entry_getCurrency(NEW.currencyFk, NEW.supplierFk);
|
SET NEW.currencyFk = entry_getCurrency(NEW.currencyFk, NEW.supplierFk);
|
||||||
SET NEW.commission = entry_getCommission(NEW.travelFk, NEW.currencyFk,NEW.supplierFk);
|
SET NEW.commission = entry_getCommission(NEW.travelFk, NEW.currencyFk,NEW.supplierFk);
|
||||||
IF NEW.travelFk IS NOT NULL AND NOT travel_hasUniqueAwb(NEW.travelFk) THEN
|
IF NEW.travelFk IS NOT NULL THEN
|
||||||
CALL util.throw('The travel is incorrect, there is a different AWB in the associated entries');
|
CALL travel_throwAwb(NEW.travelFk);
|
||||||
END IF;
|
END IF;
|
||||||
END */;;
|
END */;;
|
||||||
DELIMITER ;
|
DELIMITER ;
|
||||||
|
@ -4619,7 +4619,7 @@ BEGIN
|
||||||
DECLARE vTotalBuy INT;
|
DECLARE vTotalBuy INT;
|
||||||
|
|
||||||
IF NEW.isBooked = OLD.isBooked THEN
|
IF NEW.isBooked = OLD.isBooked THEN
|
||||||
CALL entry_checkBooked(OLD.id);
|
CALL entry_isEditable(OLD.id);
|
||||||
ELSE
|
ELSE
|
||||||
IF NEW.isBooked THEN
|
IF NEW.isBooked THEN
|
||||||
SELECT COUNT(*) INTO vTotalBuy
|
SELECT COUNT(*) INTO vTotalBuy
|
||||||
|
@ -4635,8 +4635,8 @@ BEGIN
|
||||||
|
|
||||||
IF NOT (NEW.travelFk <=> OLD.travelFk) THEN
|
IF NOT (NEW.travelFk <=> OLD.travelFk) THEN
|
||||||
|
|
||||||
IF NEW.travelFk IS NOT NULL AND NOT travel_hasUniqueAwb(NEW.travelFk) THEN
|
IF NEW.travelFk IS NOT NULL THEN
|
||||||
CALL util.throw('The travel is incorrect, there is a different AWB in the associated entries');
|
CALL travel_throwAwb(NEW.travelFk);
|
||||||
END IF;
|
END IF;
|
||||||
|
|
||||||
SELECT COUNT(*) > 0 INTO vIsVirtual
|
SELECT COUNT(*) > 0 INTO vIsVirtual
|
||||||
|
@ -4721,7 +4721,7 @@ DELIMITER ;;
|
||||||
BEFORE DELETE ON `entry`
|
BEFORE DELETE ON `entry`
|
||||||
FOR EACH ROW
|
FOR EACH ROW
|
||||||
BEGIN
|
BEGIN
|
||||||
CALL entry_checkBooked(OLD.id);
|
CALL entry_isEditable(OLD.id);
|
||||||
DELETE FROM buy WHERE entryFk = OLD.id;
|
DELETE FROM buy WHERE entryFk = OLD.id;
|
||||||
END */;;
|
END */;;
|
||||||
DELIMITER ;
|
DELIMITER ;
|
||||||
|
@ -6783,13 +6783,12 @@ BEGIN
|
||||||
DECLARE vIsCash BOOLEAN;
|
DECLARE vIsCash BOOLEAN;
|
||||||
DECLARE vIsSupplierActive BOOLEAN;
|
DECLARE vIsSupplierActive BOOLEAN;
|
||||||
|
|
||||||
-- PAK 10/02/15 No se asientan los pagos directamente, salvo en el caso de las cajas de CASH
|
|
||||||
SELECT (at2.code = 'cash') INTO vIsCash
|
SELECT (at2.code = 'cash') INTO vIsCash
|
||||||
FROM accounting a
|
FROM accounting a
|
||||||
JOIN accountingType at2 ON at2.id = a.accountingTypeFk
|
JOIN accountingType at2 ON at2.id = a.accountingTypeFk
|
||||||
WHERE a.id = NEW.bankFk;
|
WHERE a.id = NEW.bankFk;
|
||||||
|
|
||||||
IF vIsCash THEN
|
IF vIsCash THEN
|
||||||
SELECT account INTO vBankAccount
|
SELECT account INTO vBankAccount
|
||||||
FROM accounting
|
FROM accounting
|
||||||
WHERE id = NEW.bankFk;
|
WHERE id = NEW.bankFk;
|
||||||
|
@ -6798,7 +6797,7 @@ BEGIN
|
||||||
FROM supplier
|
FROM supplier
|
||||||
WHERE id = NEW.supplierFk;
|
WHERE id = NEW.supplierFk;
|
||||||
|
|
||||||
CALL ledger_next(YEAR(NEW.received), NEW.companyFk, vNewBookEntry);
|
CALL ledger_next(YEAR(NEW.received), vNewBookEntry);
|
||||||
|
|
||||||
INSERT INTO XDiario (
|
INSERT INTO XDiario (
|
||||||
ASIEN,
|
ASIEN,
|
||||||
|
@ -8986,7 +8985,9 @@ BEGIN
|
||||||
SET hasNewRoute = TRUE
|
SET hasNewRoute = TRUE
|
||||||
WHERE ticketFk = NEW.id;
|
WHERE ticketFk = NEW.id;
|
||||||
|
|
||||||
CALL ticket_doCmr(NEW.id);
|
IF NEW.cmrFk THEN
|
||||||
|
CALL ticket_doCmr(NEW.id);
|
||||||
|
END IF;
|
||||||
END IF;
|
END IF;
|
||||||
END */;;
|
END */;;
|
||||||
DELIMITER ;
|
DELIMITER ;
|
||||||
|
@ -9897,8 +9898,8 @@ BEGIN
|
||||||
|
|
||||||
CALL travel_checkWarehouseIsFeedStock(NEW.warehouseInFk);
|
CALL travel_checkWarehouseIsFeedStock(NEW.warehouseInFk);
|
||||||
|
|
||||||
IF NEW.awbFk IS NOT NULL AND NOT travel_hasUniqueAwb(NEW.id) THEN
|
IF NEW.awbFk IS NOT NULL THEN
|
||||||
CALL util.throw('The AWB is incorrect, there is a different AWB in the associated entries');
|
CALL travel_throwAwb(NEW.id);
|
||||||
END IF;
|
END IF;
|
||||||
END */;;
|
END */;;
|
||||||
DELIMITER ;
|
DELIMITER ;
|
||||||
|
@ -9949,8 +9950,8 @@ BEGIN
|
||||||
END IF;
|
END IF;
|
||||||
END IF;
|
END IF;
|
||||||
|
|
||||||
IF (NOT(NEW.awbFk <=> OLD.awbFk)) AND NEW.awbFk IS NOT NULL AND NOT travel_hasUniqueAwb(NEW.id) THEN
|
IF (NOT(NEW.awbFk <=> OLD.awbFk)) AND NEW.awbFk IS NOT NULL THEN
|
||||||
CALL util.throw('The AWB is incorrect, there is a different AWB in the associated entries');
|
CALL travel_throwAwb(NEW.id);
|
||||||
END IF;
|
END IF;
|
||||||
END */;;
|
END */;;
|
||||||
DELIMITER ;
|
DELIMITER ;
|
||||||
|
@ -10824,4 +10825,4 @@ USE `vn2008`;
|
||||||
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
|
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
|
||||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||||
|
|
||||||
-- Dump completed on 2024-05-28 6:58:42
|
-- Dump completed on 2024-06-11 6:35:55
|
||||||
|
|
|
@ -2687,13 +2687,20 @@ INSERT INTO `vn`.`zoneAgencyMode`(`id`, `agencyModeFk`, `zoneFk`)
|
||||||
(3, 6, 5),
|
(3, 6, 5),
|
||||||
(4, 7, 1);
|
(4, 7, 1);
|
||||||
|
|
||||||
|
INSERT INTO `vn`.`roadmapAddress` (`addressFk`)
|
||||||
|
VALUES
|
||||||
|
(1),
|
||||||
|
(2),
|
||||||
|
(3),
|
||||||
|
(4);
|
||||||
|
|
||||||
INSERT INTO `vn`.`roadmap` (`id`, `name`, `tractorPlate`, `trailerPlate`, `phone`, `supplierFk`, `etd`, `observations`, `userFk`, `price`, `driverName`)
|
INSERT INTO `vn`.`roadmap` (`id`, `name`, `tractorPlate`, `trailerPlate`, `phone`, `supplierFk`, `etd`, `observations`, `userFk`, `price`, `driverName`)
|
||||||
VALUES
|
VALUES
|
||||||
(1, 'val-algemesi', 'RE-001', 'PO-001', '111111111', 1, util.VN_NOW(), 'this is test observation', 1, 15, 'Batman'),
|
(1, 'val-algemesi', '1234-BCD', '9876-BCD', '111111111', 1, util.VN_NOW(), 'this is test observation', 1, 15, 'Batman'),
|
||||||
(2, 'alg-valencia', 'RE-002', 'PO-002', '111111111', 1, util.VN_NOW(), 'test observation', 1, 20, 'Robin'),
|
(2, 'alg-valencia', '2345-CDF', '8765-BCD', '111111111', 1, util.VN_NOW(), 'test observation', 1, 20, 'Robin'),
|
||||||
(3, 'alz-algemesi', 'RE-003', 'PO-003', '222222222', 2, DATE_ADD(util.VN_NOW(), INTERVAL 2 DAY), 'observations...', 2, 25, 'Driverman');
|
(3, 'alz-algemesi', '3456-DFG', '7654-BCD', '222222222', 2, DATE_ADD(util.VN_NOW(), INTERVAL 2 DAY), 'observations...', 2, 25, 'Driverman');
|
||||||
|
|
||||||
INSERT INTO `vn`.`expeditionTruck` (`id`, `roadmapFk`, `warehouseFk`, `eta`, `description`, `userFk`)
|
INSERT INTO `vn`.`roadmapStop` (`id`, `roadmapFk`, `addressFk`, `eta`, `description`, `userFk`)
|
||||||
VALUES
|
VALUES
|
||||||
(1, 1, 1, DATE_ADD(util.VN_NOW(), INTERVAL 1 DAY), 'Best truck in fleet', 1),
|
(1, 1, 1, DATE_ADD(util.VN_NOW(), INTERVAL 1 DAY), 'Best truck in fleet', 1),
|
||||||
(2, 1, 2, DATE_ADD(util.VN_NOW(), INTERVAL '1 2' DAY_HOUR), 'Second truck in fleet', 1),
|
(2, 1, 2, DATE_ADD(util.VN_NOW(), INTERVAL '1 2' DAY_HOUR), 'Second truck in fleet', 1),
|
||||||
|
@ -3119,6 +3126,18 @@ INSERT INTO `vn`.`entryDms`(`entryFk`, `dmsFk`, `editorFk`)
|
||||||
VALUES
|
VALUES
|
||||||
(1, 9, 9);
|
(1, 9, 9);
|
||||||
|
|
||||||
|
INSERT INTO vn.entryType (code,description,isInformal)
|
||||||
|
VALUES ('devaluation','Devaluation',0),
|
||||||
|
('internal','Internal',1),
|
||||||
|
('inventory','Inventory',1),
|
||||||
|
('life','Life',1),
|
||||||
|
('packaging','Packaging',0),
|
||||||
|
('payment','Refund',0),
|
||||||
|
('product','Product',0),
|
||||||
|
('regularization','Regularization',1),
|
||||||
|
('return','Return',0),
|
||||||
|
('transport','Delivery',0);
|
||||||
|
|
||||||
INSERT INTO `vn`.`cmr` (id,truckPlate,observations,senderInstruccions,paymentInstruccions,specialAgreements,companyFk,addressToFk,addressFromFk,supplierFk,packagesList,merchandiseDetail,state)
|
INSERT INTO `vn`.`cmr` (id,truckPlate,observations,senderInstruccions,paymentInstruccions,specialAgreements,companyFk,addressToFk,addressFromFk,supplierFk,packagesList,merchandiseDetail,state)
|
||||||
VALUES (1,'123456A','Lorem ipsum dolor sit amet','Lorem ipsum dolor sit amet','Lorem ipsum dolor sit amet','Lorem ipsum dolor sit amet',442,1,2,1,'Lorem ipsum dolor sit amet','Lorem ipsum dolor sit amet','Lorem ipsum dolor sit amet'),
|
VALUES (1,'123456A','Lorem ipsum dolor sit amet','Lorem ipsum dolor sit amet','Lorem ipsum dolor sit amet','Lorem ipsum dolor sit amet',442,1,2,1,'Lorem ipsum dolor sit amet','Lorem ipsum dolor sit amet','Lorem ipsum dolor sit amet'),
|
||||||
(2,'123456N','Lorem ipsum dolor sit amet','Lorem ipsum dolor sit amet','Lorem ipsum dolor sit amet','Lorem ipsum dolor sit amet',69,3,4,2,'Lorem ipsum dolor sit amet','Lorem ipsum dolor sit amet','Lorem ipsum dolor sit amet'),
|
(2,'123456N','Lorem ipsum dolor sit amet','Lorem ipsum dolor sit amet','Lorem ipsum dolor sit amet','Lorem ipsum dolor sit amet',69,3,4,2,'Lorem ipsum dolor sit amet','Lorem ipsum dolor sit amet','Lorem ipsum dolor sit amet'),
|
||||||
|
|
|
@ -65,11 +65,12 @@ BEGIN
|
||||||
JOIN vn.ticketLastState ts ON ts.ticketFk = t.id
|
JOIN vn.ticketLastState ts ON ts.ticketFk = t.id
|
||||||
JOIN vn.ticketTracking tt ON tt.id = ts.ticketTrackingFk
|
JOIN vn.ticketTracking tt ON tt.id = ts.ticketTrackingFk
|
||||||
JOIN vn.state st ON st.id = tt.stateFk
|
JOIN vn.state st ON st.id = tt.stateFk
|
||||||
|
JOIN vn.alertLevel al ON al.code = 'DELIVERED'
|
||||||
WHERE sc.componentFk = 17
|
WHERE sc.componentFk = 17
|
||||||
AND sc.isGreuge = 0
|
AND sc.isGreuge = 0
|
||||||
AND t.shipped >= '2016-10-01'
|
AND t.shipped >= '2016-10-01'
|
||||||
AND t.shipped < util.VN_CURDATE()
|
AND t.shipped < util.VN_CURDATE()
|
||||||
AND st.alertLevel >= 3;
|
AND st.alertLevel >= al.id;
|
||||||
|
|
||||||
DELETE g.*
|
DELETE g.*
|
||||||
FROM vn.greuge g
|
FROM vn.greuge g
|
||||||
|
|
|
@ -5,7 +5,7 @@ CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `hedera`.`item_getVisible
|
||||||
vType INT,
|
vType INT,
|
||||||
vPrefix VARCHAR(255))
|
vPrefix VARCHAR(255))
|
||||||
BEGIN
|
BEGIN
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets visible items of the specified type at specified date.
|
* Gets visible items of the specified type at specified date.
|
||||||
*
|
*
|
||||||
|
@ -14,7 +14,7 @@ BEGIN
|
||||||
* @param vType The type id
|
* @param vType The type id
|
||||||
* @param vPrefix The article prefix to filter or %NULL for all
|
* @param vPrefix The article prefix to filter or %NULL for all
|
||||||
* @return tmp.itemVisible Visible items
|
* @return tmp.itemVisible Visible items
|
||||||
*/
|
*/
|
||||||
DECLARE vPrefixLen SMALLINT;
|
DECLARE vPrefixLen SMALLINT;
|
||||||
DECLARE vFilter VARCHAR(255) DEFAULT NULL;
|
DECLARE vFilter VARCHAR(255) DEFAULT NULL;
|
||||||
DECLARE vDateInv DATE DEFAULT vn.getInventoryDate();
|
DECLARE vDateInv DATE DEFAULT vn.getInventoryDate();
|
||||||
|
@ -23,13 +23,13 @@ BEGIN
|
||||||
GET DIAGNOSTICS CONDITION 1
|
GET DIAGNOSTICS CONDITION 1
|
||||||
@message = MESSAGE_TEXT;
|
@message = MESSAGE_TEXT;
|
||||||
CALL vn.mail_insert(
|
CALL vn.mail_insert(
|
||||||
'cau@verdnatura.es',
|
'cau@verdnatura.es',
|
||||||
NULL,
|
NULL,
|
||||||
CONCAT('hedera.item_getVisible error: ', @message),
|
CONCAT('hedera.item_getVisible error: ', @message),
|
||||||
CONCAT(
|
CONCAT(
|
||||||
'warehouse: ', IFNULL(vWarehouse, ''),
|
'warehouse: ', IFNULL(vWarehouse, ''),
|
||||||
', Fecha:', IFNULL(vDate, ''),
|
', Fecha:', IFNULL(vDate, ''),
|
||||||
', tipo: ', IFNULL(vType,''),
|
', tipo: ', IFNULL(vType,''),
|
||||||
', prefijo: ', IFNULL(vPrefix,'')));
|
', prefijo: ', IFNULL(vPrefix,'')));
|
||||||
RESIGNAL;
|
RESIGNAL;
|
||||||
END;
|
END;
|
||||||
|
@ -74,9 +74,10 @@ BEGIN
|
||||||
FROM vn.sale m
|
FROM vn.sale m
|
||||||
JOIN vn.ticket t ON t.id = m.ticketFk
|
JOIN vn.ticket t ON t.id = m.ticketFk
|
||||||
JOIN vn.ticketState s ON s.ticketFk = t.id
|
JOIN vn.ticketState s ON s.ticketFk = t.id
|
||||||
|
JOIN vn.alertLevel al ON al.code = 'DELIVERED'
|
||||||
WHERE t.shipped BETWEEN vDateInv AND util.VN_CURDATE()
|
WHERE t.shipped BETWEEN vDateInv AND util.VN_CURDATE()
|
||||||
AND t.warehouseFk = vWarehouse
|
AND t.warehouseFk = vWarehouse
|
||||||
AND s.alertLevel = 3
|
AND s.alertLevel = al.id
|
||||||
) t
|
) t
|
||||||
GROUP BY itemFk
|
GROUP BY itemFk
|
||||||
HAVING quantity > 0;
|
HAVING quantity > 0;
|
||||||
|
@ -108,7 +109,7 @@ BEGIN
|
||||||
IF(p.depth > 0, p.depth, 0) depth, p.width, p.height,
|
IF(p.depth > 0, p.depth, 0) depth, p.width, p.height,
|
||||||
CEIL(s.quantity / t.packing) etiquetas
|
CEIL(s.quantity / t.packing) etiquetas
|
||||||
FROM vn.item i
|
FROM vn.item i
|
||||||
JOIN `filter` f ON f.itemFk = i.id
|
JOIN `filter` f ON f.itemFk = i.id
|
||||||
JOIN currentStock s ON s.itemFk = i.id
|
JOIN currentStock s ON s.itemFk = i.id
|
||||||
LEFT JOIN tmp t ON t.itemFk = i.id
|
LEFT JOIN tmp t ON t.itemFk = i.id
|
||||||
LEFT JOIN vn.packaging p ON p.id = t.packagingFk
|
LEFT JOIN vn.packaging p ON p.id = t.packagingFk
|
||||||
|
|
|
@ -62,7 +62,7 @@ BEGIN
|
||||||
END;
|
END;
|
||||||
|
|
||||||
-- Carga los datos del pedido
|
-- Carga los datos del pedido
|
||||||
SELECT o.date_send, o.address_id, o.note, a.clientFk,
|
SELECT o.date_send, o.address_id, o.note, a.clientFk,
|
||||||
o.company_id, o.agency_id, c.isTaxDataChecked
|
o.company_id, o.agency_id, c.isTaxDataChecked
|
||||||
INTO vDelivery, vAddress, vNotes, vClientId,
|
INTO vDelivery, vAddress, vNotes, vClientId,
|
||||||
vCompanyId, vAgencyModeId, vIsTaxDataChecked
|
vCompanyId, vAgencyModeId, vIsTaxDataChecked
|
||||||
|
@ -121,6 +121,7 @@ BEGIN
|
||||||
)
|
)
|
||||||
SELECT t.id INTO vTicket
|
SELECT t.id INTO vTicket
|
||||||
FROM vn.ticket t
|
FROM vn.ticket t
|
||||||
|
JOIN vn.alertLevel al ON al.code = 'FREE'
|
||||||
LEFT JOIN tPrevia tp ON tp.ticketFk = t.id
|
LEFT JOIN tPrevia tp ON tp.ticketFk = t.id
|
||||||
LEFT JOIN vn.ticketState tls on tls.ticketFk = t.id
|
LEFT JOIN vn.ticketState tls on tls.ticketFk = t.id
|
||||||
JOIN hedera.`order` o
|
JOIN hedera.`order` o
|
||||||
|
@ -131,7 +132,7 @@ BEGIN
|
||||||
WHERE o.id = vSelf
|
WHERE o.id = vSelf
|
||||||
AND t.refFk IS NULL
|
AND t.refFk IS NULL
|
||||||
AND tp.ticketFk IS NULL
|
AND tp.ticketFk IS NULL
|
||||||
AND IFNULL(tls.alertLevel,0) = 0
|
AND (tls.alertLevel IS NULL OR tls.alertLevel = al.id)
|
||||||
LIMIT 1;
|
LIMIT 1;
|
||||||
|
|
||||||
-- Crea el ticket en el caso de no existir uno adecuado
|
-- Crea el ticket en el caso de no existir uno adecuado
|
||||||
|
|
|
@ -16,12 +16,13 @@ BEGIN
|
||||||
m.created,
|
m.created,
|
||||||
TIMESTAMPADD(DAY, tp.life, t.shipped) expired,
|
TIMESTAMPADD(DAY, tp.life, t.shipped) expired,
|
||||||
m.quantity < 0 isIn,
|
m.quantity < 0 isIn,
|
||||||
m.isPicked OR s.alertLevel > 1 isPicked
|
m.isPicked OR s.alertLevel > al.id isPicked
|
||||||
FROM vn.sale m
|
FROM vn.sale m
|
||||||
JOIN vn.ticket t ON t.id = m.ticketFk
|
JOIN vn.ticket t ON t.id = m.ticketFk
|
||||||
JOIN vn.ticketState s ON s.ticketFk = t.id
|
JOIN vn.ticketState s ON s.ticketFk = t.id
|
||||||
JOIN vn.item i ON i.id = m.itemFk
|
JOIN vn.item i ON i.id = m.itemFk
|
||||||
JOIN vn.itemType tp ON tp.id = i.typeFk
|
JOIN vn.itemType tp ON tp.id = i.typeFk
|
||||||
|
JOIN vn.alertLevel al ON al.code = 'ON_PREPARATION'
|
||||||
WHERE (
|
WHERE (
|
||||||
vTableId IS NULL
|
vTableId IS NULL
|
||||||
OR (vTableName = 'ticket' AND t.id = vTableId)
|
OR (vTableName = 'ticket' AND t.id = vTableId)
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
DELIMITER $$
|
DELIMITER $$
|
||||||
CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `util`.`midnight`()
|
CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `util`.`midnight`()
|
||||||
RETURNS datetime
|
RETURNS datetime
|
||||||
NOT DETERMINISTIC
|
DETERMINISTIC
|
||||||
READS SQL DATA
|
READS SQL DATA
|
||||||
BEGIN
|
BEGIN
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ BEGIN
|
||||||
DECLARE vIsTooLittle TINYINT(1);
|
DECLARE vIsTooLittle TINYINT(1);
|
||||||
|
|
||||||
SELECT (SUM(IFNULL(sv.litros, 0)) < vc.minTicketVolume
|
SELECT (SUM(IFNULL(sv.litros, 0)) < vc.minTicketVolume
|
||||||
OR IFNULL(t.totalWithoutVat, 0) < vc.minTicketValue) INTO vIsTooLittle
|
AND IFNULL(t.totalWithoutVat, 0) < vc.minTicketValue) INTO vIsTooLittle
|
||||||
FROM ticket t
|
FROM ticket t
|
||||||
LEFT JOIN saleVolume sv ON sv.ticketFk = t.id
|
LEFT JOIN saleVolume sv ON sv.ticketFk = t.id
|
||||||
JOIN volumeConfig vc
|
JOIN volumeConfig vc
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
DELIMITER $$
|
DELIMITER $$
|
||||||
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`buy_afterUpsert`(vSelf INT)
|
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`buy_afterUpsert`(
|
||||||
|
vSelf INT
|
||||||
|
)
|
||||||
BEGIN
|
BEGIN
|
||||||
/**
|
/**
|
||||||
* Triggered actions when a buy is updated or inserted.
|
* Triggered actions when a buy is updated or inserted.
|
||||||
|
@ -16,7 +18,7 @@ BEGIN
|
||||||
DECLARE vIsFeedStock BOOL;
|
DECLARE vIsFeedStock BOOL;
|
||||||
DECLARE vWeight DECIMAL(10,2);
|
DECLARE vWeight DECIMAL(10,2);
|
||||||
DECLARE vPacking INT;
|
DECLARE vPacking INT;
|
||||||
|
|
||||||
SELECT b.entryFk,
|
SELECT b.entryFk,
|
||||||
b.itemFk,
|
b.itemFk,
|
||||||
i.packingOut,
|
i.packingOut,
|
||||||
|
@ -47,8 +49,11 @@ BEGIN
|
||||||
WHERE e.id = vEntryFk;
|
WHERE e.id = vEntryFk;
|
||||||
|
|
||||||
IF vIsMerchandise THEN
|
IF vIsMerchandise THEN
|
||||||
|
IF vWarehouse IS NULL THEN
|
||||||
|
CALL util.throw('The entry does not have travel');
|
||||||
|
END IF;
|
||||||
|
|
||||||
REPLACE itemCost SET
|
REPLACE itemCost SET
|
||||||
itemFk = vItemFk,
|
itemFk = vItemFk,
|
||||||
warehouseFk = vWarehouse,
|
warehouseFk = vWarehouse,
|
||||||
cm3 = buy_getUnitVolume(vSelf),
|
cm3 = buy_getUnitVolume(vSelf),
|
||||||
|
@ -74,7 +79,7 @@ BEGIN
|
||||||
WHERE b.id = vSelf;
|
WHERE b.id = vSelf;
|
||||||
|
|
||||||
END IF;
|
END IF;
|
||||||
CREATE OR REPLACE TEMPORARY TABLE tmp.buysToCheck
|
CREATE OR REPLACE TEMPORARY TABLE tmp.buysToCheck
|
||||||
SELECT vSelf id;
|
SELECT vSelf id;
|
||||||
CALL buy_checkItem();
|
CALL buy_checkItem();
|
||||||
END$$
|
END$$
|
||||||
|
|
|
@ -49,7 +49,10 @@ BEGIN
|
||||||
BEGIN
|
BEGIN
|
||||||
IF vLockName IS NOT NULL THEN
|
IF vLockName IS NOT NULL THEN
|
||||||
DO RELEASE_LOCK(vLockName);
|
DO RELEASE_LOCK(vLockName);
|
||||||
CALL util.debugAdd('releaseLock', vLockName); -- Tmp
|
CALL util.debugAdd(JSON_OBJECT(
|
||||||
|
'type', 'releaseLock',
|
||||||
|
'userFk', vUserFk
|
||||||
|
), vLockName); -- Tmp
|
||||||
END IF;
|
END IF;
|
||||||
|
|
||||||
RESIGNAL;
|
RESIGNAL;
|
||||||
|
|
|
@ -1,22 +0,0 @@
|
||||||
DELIMITER $$
|
|
||||||
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`entry_checkBooked`(
|
|
||||||
vSelf INT
|
|
||||||
)
|
|
||||||
BEGIN
|
|
||||||
/**
|
|
||||||
* Comprueba si una entrada está contabilizada,
|
|
||||||
* y si lo está retorna un throw.
|
|
||||||
*
|
|
||||||
* @param vSelf Id de entrada
|
|
||||||
*/
|
|
||||||
DECLARE vIsBooked BOOL;
|
|
||||||
|
|
||||||
SELECT isBooked INTO vIsBooked
|
|
||||||
FROM `entry`
|
|
||||||
WHERE id = vSelf;
|
|
||||||
|
|
||||||
IF vIsBooked AND NOT IFNULL(@isModeInventory, FALSE) THEN
|
|
||||||
CALL util.throw('Entry is already booked');
|
|
||||||
END IF;
|
|
||||||
END$$
|
|
||||||
DELIMITER ;
|
|
|
@ -0,0 +1,24 @@
|
||||||
|
DELIMITER $$
|
||||||
|
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`entry_isEditable`(
|
||||||
|
vSelf INT
|
||||||
|
)
|
||||||
|
BEGIN
|
||||||
|
/**
|
||||||
|
* Comprueba si una entrada se puede actualizar
|
||||||
|
* si no se puede retorna un throw.
|
||||||
|
*
|
||||||
|
* @param vSelf Id de entrada
|
||||||
|
*/
|
||||||
|
DECLARE vIsEditable BOOL;
|
||||||
|
|
||||||
|
SELECT e.isBooked INTO vIsEditable
|
||||||
|
FROM `entry` e
|
||||||
|
JOIN entryType et ON et.code = e.typeFk
|
||||||
|
WHERE NOT et.isInformal
|
||||||
|
AND e.id = vSelf;
|
||||||
|
|
||||||
|
IF vIsEditable AND NOT IFNULL(@isModeInventory, FALSE) THEN
|
||||||
|
CALL util.throw('Entry is not editable');
|
||||||
|
END IF;
|
||||||
|
END$$
|
||||||
|
DELIMITER ;
|
|
@ -1,9 +0,0 @@
|
||||||
DELIMITER $$
|
|
||||||
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`expeditionTruck_Add`(vHour VARCHAR(5), vDescription VARCHAR(45))
|
|
||||||
BEGIN
|
|
||||||
|
|
||||||
INSERT INTO vn.roadmapStop(eta,description)
|
|
||||||
VALUES(CONCAT(util.VN_CURDATE(), ' ', vHour), vDescription);
|
|
||||||
|
|
||||||
END$$
|
|
||||||
DELIMITER ;
|
|
|
@ -1,12 +0,0 @@
|
||||||
DELIMITER $$
|
|
||||||
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`expeditionTruck_List`()
|
|
||||||
BEGIN
|
|
||||||
|
|
||||||
SELECT id truckFk,
|
|
||||||
eta,
|
|
||||||
description Destino
|
|
||||||
FROM roadmapStop
|
|
||||||
WHERE eta BETWEEN util.VN_CURDATE() AND util.dayend(util.VN_CURDATE())
|
|
||||||
ORDER BY eta;
|
|
||||||
END$$
|
|
||||||
DELIMITER ;
|
|
|
@ -15,7 +15,8 @@ BEGIN
|
||||||
t.addressFk,
|
t.addressFk,
|
||||||
a.nickname,
|
a.nickname,
|
||||||
sub2.itemPackingTypeConcat,
|
sub2.itemPackingTypeConcat,
|
||||||
est.code
|
est.code,
|
||||||
|
es.isScanned
|
||||||
FROM expedition e
|
FROM expedition e
|
||||||
JOIN ticket t ON t.id = e.ticketFk
|
JOIN ticket t ON t.id = e.ticketFk
|
||||||
JOIN ticketState ts ON ts.ticketFk = e.ticketFk
|
JOIN ticketState ts ON ts.ticketFk = e.ticketFk
|
||||||
|
@ -33,6 +34,10 @@ BEGIN
|
||||||
GROUP BY sub.ticketFk
|
GROUP BY sub.ticketFk
|
||||||
) sub2 ON sub2.ticketFk = t.id
|
) sub2 ON sub2.ticketFk = t.id
|
||||||
LEFT JOIN expeditionStateType est ON est.id = e.stateTypeFk
|
LEFT JOIN expeditionStateType est ON est.id = e.stateTypeFk
|
||||||
|
LEFT JOIN expeditionState es ON es.id = (
|
||||||
|
SELECT MAX(id)
|
||||||
|
FROM expeditionState es
|
||||||
|
WHERE expeditionFk = e.id)
|
||||||
WHERE t.routeFk = vRouteFk AND e.freightItemFk <> FALSE
|
WHERE t.routeFk = vRouteFk AND e.freightItemFk <> FALSE
|
||||||
ORDER BY r.created, t.priority DESC;
|
ORDER BY r.created, t.priority DESC;
|
||||||
END$$
|
END$$
|
||||||
|
|
|
@ -80,8 +80,8 @@ BEGIN
|
||||||
OR t.isDeleted
|
OR t.isDeleted
|
||||||
OR c.hasToInvoice = FALSE
|
OR c.hasToInvoice = FALSE
|
||||||
OR itc.id IS NULL
|
OR itc.id IS NULL
|
||||||
OR a.id IS NULL
|
OR a.id IS NULL
|
||||||
OR (vTaxArea = 'WORLD'
|
OR (vTaxArea = 'WORLD'
|
||||||
AND (a.customsAgentFk IS NULL OR a.incotermsFk IS NULL));
|
AND (a.customsAgentFk IS NULL OR a.incotermsFk IS NULL));
|
||||||
|
|
||||||
SELECT SUM(s.quantity * s.price * (100 - s.discount)/100) <> 0
|
SELECT SUM(s.quantity * s.price * (100 - s.discount)/100) <> 0
|
||||||
|
@ -153,7 +153,9 @@ BEGIN
|
||||||
FROM tmp.ticketToInvoice ti
|
FROM tmp.ticketToInvoice ti
|
||||||
LEFT JOIN ticketState ts ON ti.id = ts.ticketFk
|
LEFT JOIN ticketState ts ON ti.id = ts.ticketFk
|
||||||
JOIN state s
|
JOIN state s
|
||||||
WHERE IFNULL(ts.alertLevel, 0) < 3 and s.`code` = getAlert3State(ti.id);
|
JOIN alertLevel al ON al.code = 'DELIVERED'
|
||||||
|
WHERE (ts.alertLevel IS NULL OR ts.alertLevel < al.id)
|
||||||
|
AND s.`code` = getAlert3State(ti.id);
|
||||||
|
|
||||||
INSERT INTO ticketTracking(stateFk, ticketFk, userFk)
|
INSERT INTO ticketTracking(stateFk, ticketFk, userFk)
|
||||||
SELECT * FROM tmp.updateInter;
|
SELECT * FROM tmp.updateInter;
|
||||||
|
|
|
@ -49,7 +49,7 @@ BEGIN
|
||||||
ish.isChecked,
|
ish.isChecked,
|
||||||
sub.isAllChecked
|
sub.isAllChecked
|
||||||
FROM itemShelvingStock iss
|
FROM itemShelvingStock iss
|
||||||
JOIN itemShelving ish ON ish.shelvingFk = iss.shelvingFk
|
JOIN itemShelving ish ON ish.id = iss.itemShelvingFk
|
||||||
LEFT JOIN (
|
LEFT JOIN (
|
||||||
SELECT itemFk,
|
SELECT itemFk,
|
||||||
IF(
|
IF(
|
||||||
|
|
|
@ -6,14 +6,16 @@ BEGIN
|
||||||
(PRIMARY KEY (ticketFk))
|
(PRIMARY KEY (ticketFk))
|
||||||
ENGINE = MEMORY
|
ENGINE = MEMORY
|
||||||
SELECT t.id ticketFk, t.clientFk
|
SELECT t.id ticketFk, t.clientFk
|
||||||
FROM vn.ticket t
|
FROM ticket t
|
||||||
LEFT JOIN vn.ticketState ts ON ts.ticketFk = t.id
|
JOIN alertLevel al ON al.code = 'DELIVERED'
|
||||||
JOIN vn.client c ON c.id = t.clientFk
|
LEFT JOIN ticketState ts ON ts.ticketFk = t.id
|
||||||
|
JOIN client c ON c.id = t.clientFk
|
||||||
|
|
||||||
WHERE c.typeFk IN ('normal','handMaking','internalUse')
|
WHERE c.typeFk IN ('normal','handMaking','internalUse')
|
||||||
AND (
|
AND (
|
||||||
t.shipped BETWEEN util.VN_CURDATE() AND vEndingDate
|
t.shipped BETWEEN util.VN_CURDATE() AND vEndingDate
|
||||||
OR (
|
OR (
|
||||||
ts.alertLevel < 3
|
ts.alertLevel < al.id
|
||||||
AND t.shipped >= vStartingDate
|
AND t.shipped >= vStartingDate
|
||||||
AND t.shipped < util.VN_CURDATE()
|
AND t.shipped < util.VN_CURDATE()
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
DELIMITER $$
|
DELIMITER $$
|
||||||
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`productionControl`(
|
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`productionControl`(
|
||||||
vWarehouseFk INT,
|
vWarehouseFk INT,
|
||||||
vScopeDays INT
|
vScopeDays INT
|
||||||
)
|
)
|
||||||
proc: BEGIN
|
proc: BEGIN
|
||||||
|
@ -67,7 +67,7 @@ proc: BEGIN
|
||||||
wk.code salesPersonCode,
|
wk.code salesPersonCode,
|
||||||
p.id provinceFk,
|
p.id provinceFk,
|
||||||
tls.productionOrder,
|
tls.productionOrder,
|
||||||
IFNULL(tls.alertLevel, 0) alertLevel,
|
IFNULL(tls.alertLevel, al.id) alertLevel,
|
||||||
t.isBoxed palletized,
|
t.isBoxed palletized,
|
||||||
IF(rm.isPickingAllowed, rm.bufferFk, NULL) ubicacion,
|
IF(rm.isPickingAllowed, rm.bufferFk, NULL) ubicacion,
|
||||||
tlu.lastUpdated,
|
tlu.lastUpdated,
|
||||||
|
@ -81,6 +81,7 @@ proc: BEGIN
|
||||||
rm.bufferFk
|
rm.bufferFk
|
||||||
FROM tmp.productionTicket tt
|
FROM tmp.productionTicket tt
|
||||||
JOIN ticket t ON tt.ticketFk = t.id
|
JOIN ticket t ON tt.ticketFk = t.id
|
||||||
|
JOIN alertLevel al ON al.code = 'FREE'
|
||||||
LEFT JOIN ticketStateToday tst ON tst.ticketFk = t.id
|
LEFT JOIN ticketStateToday tst ON tst.ticketFk = t.id
|
||||||
LEFT JOIN `state` st ON st.id = tst.state
|
LEFT JOIN `state` st ON st.id = tst.state
|
||||||
LEFT JOIN client c ON c.id = t.clientFk
|
LEFT JOIN client c ON c.id = t.clientFk
|
||||||
|
@ -101,7 +102,7 @@ proc: BEGIN
|
||||||
LEFT JOIN parking pk ON pk.id = tp.parkingFk
|
LEFT JOIN parking pk ON pk.id = tp.parkingFk
|
||||||
WHERE t.warehouseFk = vWarehouseFk
|
WHERE t.warehouseFk = vWarehouseFk
|
||||||
AND dm.code IN ('AGENCY', 'DELIVERY', 'PICKUP');
|
AND dm.code IN ('AGENCY', 'DELIVERY', 'PICKUP');
|
||||||
|
|
||||||
UPDATE tmp.productionBuffer pb
|
UPDATE tmp.productionBuffer pb
|
||||||
JOIN (
|
JOIN (
|
||||||
SELECT pb.ticketFk, GROUP_CONCAT(p.code) previaParking
|
SELECT pb.ticketFk, GROUP_CONCAT(p.code) previaParking
|
||||||
|
@ -109,12 +110,12 @@ proc: BEGIN
|
||||||
JOIN sale s ON s.ticketFk = pb.ticketFk
|
JOIN sale s ON s.ticketFk = pb.ticketFk
|
||||||
JOIN saleGroupDetail sgd ON sgd.saleFk = s.id
|
JOIN saleGroupDetail sgd ON sgd.saleFk = s.id
|
||||||
JOIN saleGroup sg ON sg.id = sgd.saleGroupFk
|
JOIN saleGroup sg ON sg.id = sgd.saleGroupFk
|
||||||
JOIN parking p ON p.id = sg.parkingFk
|
JOIN parking p ON p.id = sg.parkingFk
|
||||||
GROUP BY pb.ticketFk
|
GROUP BY pb.ticketFk
|
||||||
) t ON t.ticketFk = pb.ticketFk
|
) t ON t.ticketFk = pb.ticketFk
|
||||||
SET pb.previaParking = t.previaParking;
|
SET pb.previaParking = t.previaParking;
|
||||||
|
|
||||||
-- Problemas por ticket
|
-- Problemas por ticket
|
||||||
ALTER TABLE tmp.productionBuffer
|
ALTER TABLE tmp.productionBuffer
|
||||||
CHANGE COLUMN `problem` `problem` VARCHAR(255),
|
CHANGE COLUMN `problem` `problem` VARCHAR(255),
|
||||||
ADD COLUMN `collectionH` INT,
|
ADD COLUMN `collectionH` INT,
|
||||||
|
@ -145,13 +146,19 @@ proc: BEGIN
|
||||||
-- Líneas y volumen por ticket
|
-- Líneas y volumen por ticket
|
||||||
UPDATE tmp.productionBuffer pb
|
UPDATE tmp.productionBuffer pb
|
||||||
JOIN (
|
JOIN (
|
||||||
SELECT tt.ticketFk,
|
SELECT tt.ticketFk,
|
||||||
COUNT(*) `lines`,
|
COUNT(*) `lines`,
|
||||||
SUM(sv.volume) m3,
|
SUM(s.quantity * ic.cm3delivery / 1000000) m3,
|
||||||
IFNULL(SUM(IF(sv.isPicked, sv.volume, 0)) / SUM(sv.volume), 0) rate
|
IFNULL(SUM(IF(s.isPicked,
|
||||||
FROM tmp.productionTicket tt
|
(s.quantity * ic.cm3delivery / 1000000),
|
||||||
JOIN saleVolume sv ON sv.ticketFk = tt.ticketFk
|
0)) / SUM(s.quantity * ic.cm3delivery / 1000000),
|
||||||
GROUP BY tt.ticketFk
|
0) rate
|
||||||
|
FROM tmp.productionTicket tt
|
||||||
|
JOIN sale s ON s.ticketFk = tt.ticketFk
|
||||||
|
AND s.quantity > 0
|
||||||
|
JOIN itemCost ic ON ic.itemFk = s.itemFk
|
||||||
|
AND ic.warehouseFk = vWarehouseFk
|
||||||
|
GROUP BY tt.ticketFk
|
||||||
) m ON m.ticketFk = pb.ticketFk
|
) m ON m.ticketFk = pb.ticketFk
|
||||||
SET pb.`lines` = m.`lines`,
|
SET pb.`lines` = m.`lines`,
|
||||||
pb.m3 = m.m3,
|
pb.m3 = m.m3,
|
||||||
|
@ -218,6 +225,8 @@ proc: BEGIN
|
||||||
AND ish.visible
|
AND ish.visible
|
||||||
GROUP BY ish.itemFk, p.sectorFk;
|
GROUP BY ish.itemFk, p.sectorFk;
|
||||||
|
|
||||||
|
CREATE INDEX idxItem ON tItemShelvingStock (itemFk);
|
||||||
|
|
||||||
INSERT INTO tmp.ticketWithPrevia(ticketFk, salesCount)
|
INSERT INTO tmp.ticketWithPrevia(ticketFk, salesCount)
|
||||||
SELECT pb.ticketFk, COUNT(DISTINCT s.id)
|
SELECT pb.ticketFk, COUNT(DISTINCT s.id)
|
||||||
FROM tmp.productionBuffer pb
|
FROM tmp.productionBuffer pb
|
||||||
|
|
|
@ -64,10 +64,15 @@ BEGIN
|
||||||
FROM tmp.sale_getProblems tp
|
FROM tmp.sale_getProblems tp
|
||||||
JOIN ticket t ON t.id = tp.ticketFk
|
JOIN ticket t ON t.id = tp.ticketFk
|
||||||
JOIN (
|
JOIN (
|
||||||
SELECT t.addressFk, SUM(sv.litros) litros, t.totalWithoutVat
|
SELECT t.addressFk,
|
||||||
|
SUM(ROUND(`ic`.`cm3delivery` * `s`.`quantity` / 1000, 0)) litros,
|
||||||
|
t.totalWithoutVat
|
||||||
FROM tmp.ticket_list tl
|
FROM tmp.ticket_list tl
|
||||||
JOIN saleVolume sv ON sv.ticketFk = tl.ticketFk
|
|
||||||
JOIN ticket t ON t.id = tl.ticketFk
|
JOIN ticket t ON t.id = tl.ticketFk
|
||||||
|
JOIN sale s ON s.ticketFk = t.id
|
||||||
|
AND s.quantity > 0
|
||||||
|
JOIN itemCost ic ON ic.itemFk = s.itemFk
|
||||||
|
AND ic.warehouseFk = t.warehouseFk
|
||||||
JOIN zoneClosure zc ON zc.zoneFk = t.zoneFk
|
JOIN zoneClosure zc ON zc.zoneFk = t.zoneFk
|
||||||
AND zc.dated = util.VN_CURDATE()
|
AND zc.dated = util.VN_CURDATE()
|
||||||
JOIN agencyMode am ON am.id = t.agencyModeFk
|
JOIN agencyMode am ON am.id = t.agencyModeFk
|
||||||
|
@ -95,12 +100,12 @@ BEGIN
|
||||||
FROM (
|
FROM (
|
||||||
SELECT COUNT(s.id) nComp, tl.ticketFk, s.id saleFk
|
SELECT COUNT(s.id) nComp, tl.ticketFk, s.id saleFk
|
||||||
FROM tmp.ticket_list tl
|
FROM tmp.ticket_list tl
|
||||||
JOIN vn.sale s ON s.ticketFk = tl.ticketFk
|
JOIN sale s ON s.ticketFk = tl.ticketFk
|
||||||
LEFT JOIN vn.saleComponent sc ON sc.saleFk = s.id
|
LEFT JOIN saleComponent sc ON sc.saleFk = s.id
|
||||||
LEFT JOIN vn.component c ON c.id = sc.componentFk AND c.isRequired
|
LEFT JOIN component c ON c.id = sc.componentFk AND c.isRequired
|
||||||
JOIN vn.ticket t ON t.id = tl.ticketFk
|
JOIN ticket t ON t.id = tl.ticketFk
|
||||||
JOIN vn.agencyMode am ON am.id = t.agencyModeFk
|
JOIN agencyMode am ON am.id = t.agencyModeFk
|
||||||
JOIN vn.deliveryMethod dm ON dm.id = am.deliveryMethodFk
|
JOIN deliveryMethod dm ON dm.id = am.deliveryMethodFk
|
||||||
WHERE dm.code IN ('AGENCY','DELIVERY','PICKUP')
|
WHERE dm.code IN ('AGENCY','DELIVERY','PICKUP')
|
||||||
AND s.quantity > 0
|
AND s.quantity > 0
|
||||||
GROUP BY s.id
|
GROUP BY s.id
|
||||||
|
|
|
@ -18,7 +18,7 @@ BEGIN
|
||||||
FROM ticket t
|
FROM ticket t
|
||||||
JOIN sale s ON s.ticketFk = t.id
|
JOIN sale s ON s.ticketFk = t.id
|
||||||
LEFT JOIN saleComponent sc ON sc.saleFk = s.id
|
LEFT JOIN saleComponent sc ON sc.saleFk = s.id
|
||||||
WHERE t.shipped >= util.midnight()
|
WHERE t.shipped >= util.VN_CURDATE()
|
||||||
AND (vComponentFk IS NULL OR sc.componentFk = vComponentFk)
|
AND (vComponentFk IS NULL OR sc.componentFk = vComponentFk)
|
||||||
GROUP BY s.id) sub;
|
GROUP BY s.id) sub;
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
DELIMITER $$
|
DELIMITER $$
|
||||||
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`sales_merge`(vTicketFk INT)
|
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`sales_merge`(vTicketFk INT)
|
||||||
BEGIN
|
BEGIN
|
||||||
DECLARE EXIT HANDLER FOR SQLEXCEPTION
|
DECLARE EXIT HANDLER FOR SQLEXCEPTION
|
||||||
BEGIN
|
BEGIN
|
||||||
|
@ -8,19 +8,21 @@ BEGIN
|
||||||
END;
|
END;
|
||||||
|
|
||||||
CREATE OR REPLACE TEMPORARY TABLE tSalesToPreserve
|
CREATE OR REPLACE TEMPORARY TABLE tSalesToPreserve
|
||||||
|
(PRIMARY KEY (id))
|
||||||
|
ENGINE = MEMORY
|
||||||
SELECT s.id, s.itemFk, SUM(s.quantity) newQuantity
|
SELECT s.id, s.itemFk, SUM(s.quantity) newQuantity
|
||||||
FROM sale s
|
FROM sale s
|
||||||
JOIN item i ON i.id = s.itemFk
|
JOIN item i ON i.id = s.itemFk
|
||||||
JOIN itemType it ON it.id = i.typeFk
|
JOIN itemType it ON it.id = i.typeFk
|
||||||
WHERE s.ticketFk = vTicketFk
|
WHERE s.ticketFk = vTicketFk
|
||||||
AND it.isMergeable
|
AND it.isMergeable
|
||||||
GROUP BY s.itemFk, s.price, s.discount;
|
GROUP BY s.itemFk, s.price, s.discount;
|
||||||
|
|
||||||
START TRANSACTION;
|
START TRANSACTION;
|
||||||
|
|
||||||
UPDATE sale s
|
UPDATE sale s
|
||||||
JOIN tSalesToPreserve stp ON stp.id = s.id
|
JOIN tSalesToPreserve stp ON stp.id = s.id
|
||||||
SET quantity = newQuantity
|
SET s.quantity = newQuantity
|
||||||
WHERE s.ticketFk = vTicketFk;
|
WHERE s.ticketFk = vTicketFk;
|
||||||
|
|
||||||
DELETE s.*
|
DELETE s.*
|
||||||
|
@ -35,5 +37,5 @@ BEGIN
|
||||||
COMMIT;
|
COMMIT;
|
||||||
|
|
||||||
DROP TEMPORARY TABLE tSalesToPreserve;
|
DROP TEMPORARY TABLE tSalesToPreserve;
|
||||||
END$$
|
END$$
|
||||||
DELIMITER ;
|
DELIMITER ;
|
||||||
|
|
|
@ -7,13 +7,16 @@ BEGIN
|
||||||
DECLARE vShipped DATE;
|
DECLARE vShipped DATE;
|
||||||
DECLARE vWarehouse TINYINT;
|
DECLARE vWarehouse TINYINT;
|
||||||
DECLARE vAlertLevel INT;
|
DECLARE vAlertLevel INT;
|
||||||
|
DECLARE vAlertLevelFree INT;
|
||||||
|
|
||||||
SELECT t.warehouseFk, t.shipped, ts.alertLevel INTO vWarehouse, vShipped, vAlertLevel
|
SELECT t.warehouseFk, t.shipped, ts.alertLevel, al.id
|
||||||
|
INTO vWarehouse, vShipped, vAlertLevel, vAlertLevelFree
|
||||||
FROM ticket t
|
FROM ticket t
|
||||||
|
JOIN alertLevel al ON al.code = 'FREE'
|
||||||
LEFT JOIN ticketState ts ON ts.ticketFk = vTicket
|
LEFT JOIN ticketState ts ON ts.ticketFk = vTicket
|
||||||
WHERE t.id = vTicket;
|
WHERE t.id = vTicket;
|
||||||
|
|
||||||
IF vAlertLevel IS NULL OR vAlertLevel = 0 THEN
|
IF vAlertLevel IS NULL OR vAlertLevel = vAlertLevelFree THEN
|
||||||
IF vShipped >= util.VN_CURDATE() THEN
|
IF vShipped >= util.VN_CURDATE() THEN
|
||||||
CALL cache.available_refresh(vAvailableCalc, FALSE, vWarehouse, vShipped);
|
CALL cache.available_refresh(vAvailableCalc, FALSE, vWarehouse, vShipped);
|
||||||
END IF;
|
END IF;
|
||||||
|
|
|
@ -1,49 +0,0 @@
|
||||||
DELIMITER $$
|
|
||||||
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ticketMissed_List`(vTicketFk INT)
|
|
||||||
BEGIN
|
|
||||||
|
|
||||||
DECLARE vParkingFk INT;
|
|
||||||
DECLARE vParked DATETIME;
|
|
||||||
DECLARE vLevel INT;
|
|
||||||
DECLARE vCollectionFk INT;
|
|
||||||
|
|
||||||
SELECT IFNULL(`level`,0), IFNULL(collectionFk,0)
|
|
||||||
INTO vLevel, vCollectionFk
|
|
||||||
FROM vn.ticketCollection
|
|
||||||
WHERE ticketFk = vTicketFk
|
|
||||||
LIMIT 1;
|
|
||||||
|
|
||||||
SELECT created, parkingFk
|
|
||||||
INTO vParked, vParkingFk
|
|
||||||
FROM vn.ticketParking
|
|
||||||
WHERE ticketFk = vTicketFk;
|
|
||||||
|
|
||||||
SELECT tp.ticketFk, CONCAT(tc.collectionFk, ' - ', tc.level) coleccion, tp.created, p.code, am.name as Agencia
|
|
||||||
FROM vn.ticketParking tp
|
|
||||||
JOIN vn.parking p ON p.id = tp.parkingFk
|
|
||||||
JOIN vn.sector sc ON sc.id = p.sectorFk
|
|
||||||
LEFT JOIN vn.ticketCollection tc ON tc.ticketFk = tp.ticketFk
|
|
||||||
JOIN vn.ticketStateToday tst ON tst.ticketFk = tp.ticketFk
|
|
||||||
JOIN vn.ticket t ON t.id = tp.ticketFk
|
|
||||||
JOIN vn.zone z ON z.id = t.zoneFk
|
|
||||||
JOIN vn.agencyMode am ON am.id = z.agencyModeFk
|
|
||||||
JOIN vn.state s ON s.id = tst.state
|
|
||||||
WHERE (s.alertLevel < 2
|
|
||||||
AND tp.parkingFk = vParkingFk
|
|
||||||
AND sc.isPackagingArea
|
|
||||||
AND (
|
|
||||||
(
|
|
||||||
( IFNULL(tc.collectionFk,-1) != IFNULL(@vCollectionFk,0) AND tp.created < vParked )
|
|
||||||
OR
|
|
||||||
( tc.collectionFk = vCollectionFk AND LEFT(tc.level,1) < LEFT(vLevel,1) )
|
|
||||||
)
|
|
||||||
)) -- Etiquetas que no se han escaneado y ya estamos con una posterior
|
|
||||||
OR
|
|
||||||
(s.alertLevel > 1
|
|
||||||
AND tp.parkingFk = vParkingFk
|
|
||||||
AND sc.isPackagingArea
|
|
||||||
AND tp.created < vParked
|
|
||||||
AND t.packages <=> 0);
|
|
||||||
|
|
||||||
END$$
|
|
||||||
DELIMITER ;
|
|
|
@ -1,64 +1,66 @@
|
||||||
DELIMITER $$
|
DELIMITER $$
|
||||||
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ticketParking_findSkipped`(vTicketFk INT, vItemPackingTypeFk VARCHAR(1))
|
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ticketParking_findSkipped`(vTicketFk INT, vItemPackingTypeFk VARCHAR(1))
|
||||||
BEGIN
|
BEGIN
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Averigua los tickets que se han saltado por un error en el proceso encajado
|
* Averigua los tickets que se han saltado por un error en el proceso encajado
|
||||||
* @param vTicketFk Ticket
|
* @param vTicketFk Ticket
|
||||||
* @param vItemPackingTypeFk Modo de encajado
|
* @param vItemPackingTypeFk Modo de encajado
|
||||||
* @return un select con los tickets afectados
|
* @return un select con los tickets afectados
|
||||||
*/
|
*/
|
||||||
|
|
||||||
DECLARE vParkingFk INT;
|
DECLARE vParkingFk INT;
|
||||||
DECLARE vParked DATETIME;
|
DECLARE vParked DATETIME;
|
||||||
DECLARE vLevel INT;
|
DECLARE vLevel INT;
|
||||||
DECLARE vWagon INT;
|
DECLARE vWagon INT;
|
||||||
DECLARE vCollectionFk INT;
|
DECLARE vCollectionFk INT;
|
||||||
|
|
||||||
SELECT IFNULL(`level`,0), IFNULL(`wagon`,0),IFNULL(collectionFk,0)
|
SELECT IFNULL(`level`,0), IFNULL(`wagon`,0),IFNULL(collectionFk,0)
|
||||||
INTO vLevel, vWagon, vCollectionFk
|
INTO vLevel, vWagon, vCollectionFk
|
||||||
FROM vn.ticketCollection tc
|
FROM vn.ticketCollection tc
|
||||||
JOIN vn.collection c ON c.id = tc.collectionFk AND c.itemPackingTypeFk = vItemPackingTypeFk
|
JOIN vn.collection c ON c.id = tc.collectionFk AND c.itemPackingTypeFk = vItemPackingTypeFk
|
||||||
WHERE ticketFk = vTicketFk
|
WHERE ticketFk = vTicketFk
|
||||||
ORDER BY c.id DESC
|
ORDER BY c.id DESC
|
||||||
LIMIT 1;
|
LIMIT 1;
|
||||||
|
|
||||||
SELECT created, parkingFk
|
SELECT created, parkingFk
|
||||||
INTO vParked, vParkingFk
|
INTO vParked, vParkingFk
|
||||||
FROM vn.ticketParking tp
|
FROM vn.ticketParking tp
|
||||||
JOIN vn.parking p ON p.id = tp.parkingFk
|
JOIN vn.parking p ON p.id = tp.parkingFk
|
||||||
JOIN vn.sector s ON s.id = p.sectorFk
|
JOIN vn.sector s ON s.id = p.sectorFk
|
||||||
WHERE ticketFk = vTicketFk
|
WHERE ticketFk = vTicketFk
|
||||||
AND s.itemPackingTypeFk = vItemPackingTypeFk
|
AND s.itemPackingTypeFk = vItemPackingTypeFk
|
||||||
AND s.isPackagingArea ;
|
AND s.isPackagingArea ;
|
||||||
|
|
||||||
SELECT tp.ticketFk, CONCAT(tc.collectionFk, ' ', tc.wagon, ' - ', tc.level) coleccion, tp.created, p.code, am.name as Agencia
|
SELECT tp.ticketFk, CONCAT(tc.collectionFk, ' ', tc.wagon, ' - ', tc.level) coleccion, tp.created, p.code, am.name as Agencia
|
||||||
FROM vn.ticketParking tp
|
FROM vn.ticketParking tp
|
||||||
JOIN vn.parking p ON p.id = tp.parkingFk
|
JOIN vn.parking p ON p.id = tp.parkingFk
|
||||||
JOIN vn.sector sc ON sc.id = p.sectorFk
|
JOIN vn.sector sc ON sc.id = p.sectorFk
|
||||||
LEFT JOIN vn.ticketCollection tc ON tc.ticketFk = tp.ticketFk
|
LEFT JOIN vn.ticketCollection tc ON tc.ticketFk = tp.ticketFk
|
||||||
JOIN vn.ticketStateToday tst ON tst.ticketFk = tp.ticketFk
|
JOIN vn.ticketStateToday tst ON tst.ticketFk = tp.ticketFk
|
||||||
JOIN vn.ticket t ON t.id = tp.ticketFk
|
JOIN vn.ticket t ON t.id = tp.ticketFk
|
||||||
JOIN vn.zone z ON z.id = t.zoneFk
|
JOIN vn.zone z ON z.id = t.zoneFk
|
||||||
JOIN vn.agencyMode am ON am.id = z.agencyModeFk
|
JOIN vn.agencyMode am ON am.id = z.agencyModeFk
|
||||||
JOIN vn.state s ON s.id = tst.state
|
JOIN vn.state s ON s.id = tst.state
|
||||||
WHERE (s.alertLevel < 2
|
JOIN vn.alertLevel alPacked ON alPacked.code = 'PACKED'
|
||||||
|
JOIN vn.alertLevel alOnPreparation ON alOnPreparation.code = 'ON_PREPARATION'
|
||||||
|
WHERE (s.alertLevel < alPacked.id
|
||||||
AND tp.parkingFk = vParkingFk
|
AND tp.parkingFk = vParkingFk
|
||||||
AND sc.isPackagingArea
|
AND sc.isPackagingArea
|
||||||
AND (
|
AND (
|
||||||
( IFNULL(tc.collectionFk,-1) != IFNULL(@vCollectionFk,0) AND tp.created < vParked )
|
( IFNULL(tc.collectionFk,-1) != IFNULL(@vCollectionFk,0) AND tp.created < vParked )
|
||||||
OR
|
OR
|
||||||
( tc.collectionFk = vCollectionFk
|
( tc.collectionFk = vCollectionFk
|
||||||
AND (LEFT(tc.wagon,1) < LEFT(vWagon,1)
|
AND (LEFT(tc.wagon,1) < LEFT(vWagon,1)
|
||||||
OR (LEFT(tc.wagon,1) = LEFT(vWagon,1) AND LEFT(tc.level,1) < LEFT(vLevel,1)))
|
OR (LEFT(tc.wagon,1) = LEFT(vWagon,1) AND LEFT(tc.level,1) < LEFT(vLevel,1)))
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
) -- Etiquetas que no se han escaneado y ya estamos con una posterior
|
) -- Etiquetas que no se han escaneado y ya estamos con una posterior
|
||||||
OR
|
OR
|
||||||
(s.alertLevel > 1
|
(s.alertLevel > alOnPreparation.id
|
||||||
AND tp.parkingFk = vParkingFk
|
AND tp.parkingFk = vParkingFk
|
||||||
AND sc.isPackagingArea
|
AND sc.isPackagingArea
|
||||||
AND tp.created < vParked
|
AND tp.created < vParked
|
||||||
AND t.packages <=> 0);
|
AND t.packages <=> 0);
|
||||||
END$$
|
END$$
|
||||||
DELIMITER ;
|
DELIMITER ;
|
||||||
|
|
|
@ -1,26 +1,29 @@
|
||||||
DELIMITER $$
|
DELIMITER $$
|
||||||
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ticketStateToday_setState`(vTicketFk INT, vStateCode VARCHAR(45))
|
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ticketStateToday_setState`(vTicketFk INT, vStateCode VARCHAR(45))
|
||||||
BEGIN
|
BEGIN
|
||||||
|
|
||||||
/* Modifica el estado de un ticket de hoy
|
/* Modifica el estado de un ticket de hoy
|
||||||
*
|
*
|
||||||
* @param vTicketFk el id del ticket
|
* @param vTicketFk el id del ticket
|
||||||
* @param vStateCode estado a modificar del ticket
|
* @param vStateCode estado a modificar del ticket
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
DECLARE vAlertLevel INT;
|
DECLARE vAlertLevel INT;
|
||||||
|
DECLARE vAlertLevelPacked INT;
|
||||||
SELECT s.alertLevel INTO vAlertLevel
|
|
||||||
FROM state s
|
SELECT s.alertLevel, al.id
|
||||||
JOIN ticketStateToday tst ON tst.state = s.id
|
INTO vAlertLevel, vAlertLevelPacked
|
||||||
|
FROM state s
|
||||||
|
JOIN ticketStateToday tst ON tst.state = s.id
|
||||||
|
JOIN alertLevel al ON al.code = 'PACKED'
|
||||||
WHERE tst.ticketFk = vTicketFk
|
WHERE tst.ticketFk = vTicketFk
|
||||||
LIMIT 1;
|
LIMIT 1;
|
||||||
|
|
||||||
IF vAlertLevel < 2 THEN
|
IF vAlertLevel < vAlertLevelPacked THEN
|
||||||
|
|
||||||
CALL vn.ticket_setState(vTicketFk, vStateCode);
|
CALL vn.ticket_setState(vTicketFk, vStateCode);
|
||||||
|
|
||||||
END IF;
|
END IF;
|
||||||
|
|
||||||
END$$
|
END$$
|
||||||
|
|
|
@ -1,26 +0,0 @@
|
||||||
DELIMITER $$
|
|
||||||
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ticketStateUpdate`(vTicketFk INT, vStateCode VARCHAR(45))
|
|
||||||
BEGIN
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @deprecated:utilizar ticket_setState
|
|
||||||
*/
|
|
||||||
|
|
||||||
DECLARE vAlertLevel INT;
|
|
||||||
|
|
||||||
SELECT s.alertLevel INTO vAlertLevel
|
|
||||||
FROM vn.state s
|
|
||||||
JOIN vn.ticketState ts ON ts.stateFk = s.id
|
|
||||||
WHERE ts.ticketFk = vTicketFk;
|
|
||||||
|
|
||||||
IF !(vStateCode = 'ON_CHECKING' AND vAlertLevel > 1) THEN
|
|
||||||
|
|
||||||
INSERT INTO ticketTracking(stateFk, ticketFk, userFk)
|
|
||||||
SELECT id, vTicketFk, account.myUser_getId()
|
|
||||||
FROM vn.state
|
|
||||||
WHERE `code` = vStateCode collate utf8_unicode_ci;
|
|
||||||
|
|
||||||
END IF;
|
|
||||||
|
|
||||||
END$$
|
|
||||||
DELIMITER ;
|
|
|
@ -13,10 +13,11 @@ BEGIN
|
||||||
CREATE TEMPORARY TABLE tmp.ticket
|
CREATE TEMPORARY TABLE tmp.ticket
|
||||||
SELECT ticketFk
|
SELECT ticketFk
|
||||||
FROM tmp.productionBuffer
|
FROM tmp.productionBuffer
|
||||||
|
JOIN alertLevel al ON al.code = 'FREE'
|
||||||
WHERE shipped = util.VN_CURDATE()
|
WHERE shipped = util.VN_CURDATE()
|
||||||
AND problem LIKE '%I:%'
|
AND problem LIKE '%I:%'
|
||||||
AND (HH <= vHour OR HH = vHour AND mm < vMinute)
|
AND (HH <= vHour OR HH = vHour AND mm < vMinute)
|
||||||
AND alertLevel = 0;
|
AND alertLevel = al.id;
|
||||||
|
|
||||||
OPEN cur1;
|
OPEN cur1;
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@ BEGIN
|
||||||
com.id companyFk,
|
com.id companyFk,
|
||||||
a.id addressFk,
|
a.id addressFk,
|
||||||
c2.defaultAddressFk,
|
c2.defaultAddressFk,
|
||||||
su.id supplierFk,
|
IFNULL(sat.supplierFk, su.id) supplierFk,
|
||||||
t.landed
|
t.landed
|
||||||
FROM ticket t
|
FROM ticket t
|
||||||
JOIN ticketState ts ON ts.ticketFk = t.id
|
JOIN ticketState ts ON ts.ticketFk = t.id
|
||||||
|
@ -28,15 +28,18 @@ BEGIN
|
||||||
JOIN `address` a ON a.id = t.addressFk
|
JOIN `address` a ON a.id = t.addressFk
|
||||||
JOIN province p ON p.id = a.provinceFk
|
JOIN province p ON p.id = a.provinceFk
|
||||||
JOIN country co ON co.id = p.countryFk
|
JOIN country co ON co.id = p.countryFk
|
||||||
JOIN agencyMode am ON am.id = t.agencyModeFk
|
|
||||||
JOIN warehouse w ON w.id = t.warehouseFk
|
JOIN warehouse w ON w.id = t.warehouseFk
|
||||||
JOIN company com ON com.id = t.companyFk
|
JOIN company com ON com.id = t.companyFk
|
||||||
JOIN client c2 ON c2.id = com.clientFk
|
JOIN client c2 ON c2.id = com.clientFk
|
||||||
JOIN supplierAccount sa ON sa.id = com.supplierAccountFk
|
JOIN supplierAccount sa ON sa.id = com.supplierAccountFk
|
||||||
JOIN supplier su ON su.id = sa.supplierFk
|
JOIN supplier su ON su.id = sa.supplierFk
|
||||||
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 = r.agencyModeFk
|
||||||
|
LEFT JOIN agency ag ON ag.id = am.agencyFk
|
||||||
|
LEFT JOIN supplierAgencyTerm sat ON sat.agencyFk = ag.id
|
||||||
|
AND wo.isFreelance
|
||||||
WHERE al.code IN ('PACKED', 'DELIVERED')
|
WHERE al.code IN ('PACKED', 'DELIVERED')
|
||||||
AND co.code <> 'ES'
|
AND co.code <> 'ES'
|
||||||
AND am.name <> 'ABONO'
|
AND am.name <> 'ABONO'
|
||||||
|
|
|
@ -13,7 +13,7 @@ BEGIN
|
||||||
ENGINE = MEMORY
|
ENGINE = MEMORY
|
||||||
SELECT t.id ticketFk, FALSE hasProblem
|
SELECT t.id ticketFk, FALSE hasProblem
|
||||||
FROM ticket t
|
FROM ticket t
|
||||||
WHERE t.shipped >= util.midnight()
|
WHERE t.shipped >= util.VN_CURDATE()
|
||||||
AND (vClientFk IS NULL OR t.clientFk = vClientFk);
|
AND (vClientFk IS NULL OR t.clientFk = vClientFk);
|
||||||
|
|
||||||
UPDATE tmp.ticket t
|
UPDATE tmp.ticket t
|
||||||
|
|
|
@ -13,7 +13,7 @@ BEGIN
|
||||||
ENGINE = MEMORY
|
ENGINE = MEMORY
|
||||||
SELECT t.id ticketFk, FALSE hasProblem
|
SELECT t.id ticketFk, FALSE hasProblem
|
||||||
FROM ticket t
|
FROM ticket t
|
||||||
WHERE t.shipped >= util.midnight()
|
WHERE t.shipped >= util.VN_CURDATE()
|
||||||
AND (vSelf IS NULL OR t.id = vSelf);
|
AND (vSelf IS NULL OR t.id = vSelf);
|
||||||
|
|
||||||
UPDATE tmp.ticket t
|
UPDATE tmp.ticket t
|
||||||
|
|
|
@ -14,7 +14,7 @@ BEGIN
|
||||||
SELECT t.id ticketFk, IF(c.isTaxDataChecked, FALSE, TRUE) hasProblem
|
SELECT t.id ticketFk, IF(c.isTaxDataChecked, FALSE, TRUE) hasProblem
|
||||||
FROM ticket t
|
FROM ticket t
|
||||||
JOIN client c ON c.id = t.clientFk
|
JOIN client c ON c.id = t.clientFk
|
||||||
WHERE t.shipped >= util.midnight()
|
WHERE t.shipped >= util.VN_CURDATE()
|
||||||
AND (c.id = vClientFk OR vClientFk IS NULL);
|
AND (c.id = vClientFk OR vClientFk IS NULL);
|
||||||
|
|
||||||
CALL ticket_setProblem('isTaxDataChecked');
|
CALL ticket_setProblem('isTaxDataChecked');
|
||||||
|
|
|
@ -16,7 +16,7 @@ BEGIN
|
||||||
SELECT t.id ticketFk
|
SELECT t.id ticketFk
|
||||||
FROM vn.ticket t
|
FROM vn.ticket t
|
||||||
LEFT JOIN vn.sale s ON s.ticketFk = t.id
|
LEFT JOIN vn.sale s ON s.ticketFk = t.id
|
||||||
WHERE t.shipped >= util.midnight()
|
WHERE t.shipped >= util.VN_CURDATE()
|
||||||
AND (s.itemFk = vItemFk OR vItemFk IS NULL)
|
AND (s.itemFk = vItemFk OR vItemFk IS NULL)
|
||||||
GROUP BY t.id
|
GROUP BY t.id
|
||||||
)SELECT ticketFk, ticket_isTooLittle(ticketFk) hasProblem
|
)SELECT ticketFk, ticket_isTooLittle(ticketFk) hasProblem
|
||||||
|
|
|
@ -3,7 +3,7 @@ CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`buy_beforeDelete`
|
||||||
BEFORE DELETE ON `buy`
|
BEFORE DELETE ON `buy`
|
||||||
FOR EACH ROW
|
FOR EACH ROW
|
||||||
BEGIN
|
BEGIN
|
||||||
CALL entry_checkBooked(OLD.entryFk);
|
CALL entry_isEditable(OLD.entryFk);
|
||||||
IF OLD.printedStickers <> 0 THEN
|
IF OLD.printedStickers <> 0 THEN
|
||||||
CALL util.throw("it is not possible to delete buys with printed labels ");
|
CALL util.throw("it is not possible to delete buys with printed labels ");
|
||||||
END IF;
|
END IF;
|
||||||
|
|
|
@ -15,7 +15,7 @@ trig: BEGIN
|
||||||
LEAVE trig;
|
LEAVE trig;
|
||||||
END IF;
|
END IF;
|
||||||
|
|
||||||
CALL entry_checkBooked(NEW.entryFk);
|
CALL entry_isEditable(NEW.entryFk);
|
||||||
IF NEW.printedStickers <> 0 THEN
|
IF NEW.printedStickers <> 0 THEN
|
||||||
CALL util.throw('it is not possible to create buy lines with printedstickers other than 0');
|
CALL util.throw('it is not possible to create buy lines with printedstickers other than 0');
|
||||||
END IF;
|
END IF;
|
||||||
|
|
|
@ -13,7 +13,15 @@ trig:BEGIN
|
||||||
LEAVE trig;
|
LEAVE trig;
|
||||||
END IF;
|
END IF;
|
||||||
|
|
||||||
CALL entry_checkBooked(OLD.entryFk);
|
IF NOT (NEW.entryFk <=> OLD.entryFk) OR
|
||||||
|
NOT (NEW.quantity <=> OLD.quantity) OR
|
||||||
|
NOT (NEW.buyingValue <=> OLD.buyingValue) OR
|
||||||
|
NOT (NEW.packing <=> OLD.packing)
|
||||||
|
THEN
|
||||||
|
|
||||||
|
CALL entry_isEditable(OLD.entryFk);
|
||||||
|
END IF;
|
||||||
|
|
||||||
SET NEW.editorFk = account.myUser_getId();
|
SET NEW.editorFk = account.myUser_getId();
|
||||||
|
|
||||||
SELECT defaultEntry INTO vDefaultEntry
|
SELECT defaultEntry INTO vDefaultEntry
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
DELIMITER $$
|
||||||
|
CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`claimRatio_afterUpdate`
|
||||||
|
AFTER UPDATE ON `claimRatio`
|
||||||
|
FOR EACH ROW
|
||||||
|
BEGIN
|
||||||
|
INSERT INTO clientRate(clientFk, `value`)
|
||||||
|
VALUES(NEW.clientFk, NEW.priceIncreasing)
|
||||||
|
ON DUPLICATE KEY UPDATE
|
||||||
|
`value` = VALUES(`value`);
|
||||||
|
END$$
|
||||||
|
DELIMITER ;
|
|
@ -3,7 +3,7 @@ CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`entry_beforeDelete`
|
||||||
BEFORE DELETE ON `entry`
|
BEFORE DELETE ON `entry`
|
||||||
FOR EACH ROW
|
FOR EACH ROW
|
||||||
BEGIN
|
BEGIN
|
||||||
CALL entry_checkBooked(OLD.id);
|
CALL entry_isEditable(OLD.id);
|
||||||
DELETE FROM buy WHERE entryFk = OLD.id;
|
DELETE FROM buy WHERE entryFk = OLD.id;
|
||||||
END$$
|
END$$
|
||||||
DELIMITER ;
|
DELIMITER ;
|
||||||
|
|
|
@ -7,10 +7,21 @@ BEGIN
|
||||||
DECLARE vPrintedCount INT;
|
DECLARE vPrintedCount INT;
|
||||||
DECLARE vHasDistinctWarehouses BOOL;
|
DECLARE vHasDistinctWarehouses BOOL;
|
||||||
DECLARE vTotalBuy INT;
|
DECLARE vTotalBuy INT;
|
||||||
|
|
||||||
IF NEW.isBooked = OLD.isBooked THEN
|
IF NEW.isBooked = OLD.isBooked AND (
|
||||||
CALL entry_checkBooked(OLD.id);
|
NOT (NEW.supplierFk <=> OLD.supplierFk) OR
|
||||||
|
NOT (NEW.dated <=> OLD.dated) OR
|
||||||
|
NOT (NEW.invoiceNumber <=> OLD.invoiceNumber) OR
|
||||||
|
NOT (NEW.travelFk <=> OLD.travelFk) OR
|
||||||
|
NOT (NEW.companyFk <=> OLD.companyFk) OR
|
||||||
|
NOT (NEW.invoiceInFk <=> OLD.invoiceInFk) OR
|
||||||
|
NOT (NEW.invoiceAmount <=> OLD.invoiceAmount) OR
|
||||||
|
NOT (NEW.typeFk <=> OLD.typeFk)
|
||||||
|
) THEN
|
||||||
|
|
||||||
|
CALL entry_isEditable(OLD.id);
|
||||||
ELSE
|
ELSE
|
||||||
|
|
||||||
IF NEW.isBooked THEN
|
IF NEW.isBooked THEN
|
||||||
SELECT COUNT(*) INTO vTotalBuy
|
SELECT COUNT(*) INTO vTotalBuy
|
||||||
FROM buy
|
FROM buy
|
||||||
|
|
|
@ -3,25 +3,25 @@ CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`expedition_beforeInse
|
||||||
BEFORE INSERT ON `expedition`
|
BEFORE INSERT ON `expedition`
|
||||||
FOR EACH ROW
|
FOR EACH ROW
|
||||||
BEGIN
|
BEGIN
|
||||||
DECLARE intcounter INT;
|
DECLARE vMaxCounter INT;
|
||||||
DECLARE vShipFk INT;
|
|
||||||
|
|
||||||
SET NEW.editorFk = account.myUser_getId();
|
SET NEW.editorFk = account.myUser_getId();
|
||||||
|
|
||||||
IF NEW.freightItemFk IS NOT NULL THEN
|
IF NEW.freightItemFk IS NOT NULL THEN
|
||||||
|
|
||||||
UPDATE ticket SET packages = IFNULL(packages, 0) + 1 WHERE id = NEW.ticketFk;
|
UPDATE ticket SET packages = IFNULL(packages, 0) + 1 WHERE id = NEW.ticketFk;
|
||||||
|
|
||||||
SELECT IFNULL(MAX(counter),0) +1 INTO intcounter
|
SELECT IFNULL(MAX(counter),0) + 1 INTO vMaxCounter
|
||||||
FROM expedition e
|
FROM expedition e
|
||||||
INNER JOIN ticket t1 ON e.ticketFk = t1.id
|
JOIN alertLevel al ON al.code = 'DELIVERED'
|
||||||
|
JOIN ticket t1 ON e.ticketFk = t1.id
|
||||||
LEFT JOIN ticketState ts ON ts.ticketFk = t1.id
|
LEFT JOIN ticketState ts ON ts.ticketFk = t1.id
|
||||||
INNER JOIN ticket t2 ON t2.addressFk = t1.addressFk AND DATE(t2.shipped) = DATE(t1.shipped)
|
JOIN ticket t2 ON t2.addressFk = t1.addressFk AND DATE(t2.shipped) = DATE(t1.shipped)
|
||||||
AND t1.warehouseFk = t2.warehouseFk
|
AND t1.warehouseFk = t2.warehouseFk
|
||||||
WHERE t2.id = NEW.ticketFk AND ts.alertLevel < 3 AND t1.companyFk = t2.companyFk
|
WHERE t2.id = NEW.ticketFk AND ts.alertLevel < al.id AND t1.companyFk = t2.companyFk
|
||||||
AND t1.agencyModeFk = t2.agencyModeFk;
|
AND t1.agencyModeFk = t2.agencyModeFk;
|
||||||
|
|
||||||
SET NEW.`counter` = intcounter;
|
SET NEW.`counter` = vMaxCounter;
|
||||||
END IF;
|
END IF;
|
||||||
END$$
|
END$$
|
||||||
DELIMITER ;
|
DELIMITER ;
|
||||||
|
|
|
@ -1,19 +0,0 @@
|
||||||
CREATE OR REPLACE DEFINER=`root`@`localhost`
|
|
||||||
SQL SECURITY DEFINER
|
|
||||||
VIEW `vn`.`expeditionTruck_Control`
|
|
||||||
AS SELECT `e`.`truckFk` AS `id`,
|
|
||||||
`e`.`eta` AS `ETD`,
|
|
||||||
`e`.`description` AS `description`,
|
|
||||||
COUNT(
|
|
||||||
DISTINCT IF(`e`.`expeditionFk` IS NULL, `e`.`ticketFk`, NULL)
|
|
||||||
) AS `ticketsSinBultos`,
|
|
||||||
COUNT(DISTINCT `e`.`palletFk`) AS `pallets`,
|
|
||||||
COUNT(DISTINCT `e`.`routeFk`) AS `routes`,
|
|
||||||
COUNT(DISTINCT `e`.`scanFk`) AS `scans`,
|
|
||||||
COUNT(DISTINCT `e`.`expeditionFk`) AS `expeditions`,
|
|
||||||
sum(`e`.`truckFk` <> `e`.`roadmapStopFk`) AS `fallos`,
|
|
||||||
max(`e`.`lastPacked`) AS `lastPacked`
|
|
||||||
FROM `vn`.`expeditionCommon` `e`
|
|
||||||
GROUP BY `e`.`truckFk`
|
|
||||||
ORDER BY sum(`e`.`truckFk` <> `e`.`roadmapStopFk`) DESC,
|
|
||||||
`e`.`eta`
|
|
|
@ -1,18 +0,0 @@
|
||||||
CREATE OR REPLACE DEFINER=`root`@`localhost`
|
|
||||||
SQL SECURITY DEFINER
|
|
||||||
VIEW `vn`.`expeditionTruck_Control_Detail`
|
|
||||||
AS SELECT `e`.`truckFk` AS `id`,
|
|
||||||
`e`.`eta` AS `eta`,
|
|
||||||
`e`.`description` AS `destino`,
|
|
||||||
`e`.`palletFk` AS `pallet`,
|
|
||||||
COUNT(DISTINCT `e`.`routeFk`) AS `routes`,
|
|
||||||
COUNT(DISTINCT `e`.`scanFk`) AS `scans`,
|
|
||||||
COUNT(DISTINCT `e`.`roadmapStopFk`) AS `destinos`,
|
|
||||||
sum(`e`.`truckFk` <> `e`.`roadmapStopFk`) AS `fallos`,
|
|
||||||
max(`e`.`lastPacked`) AS `lastPacked`
|
|
||||||
FROM `vn`.`expeditionCommon` `e`
|
|
||||||
GROUP BY `e`.`truckFk`,
|
|
||||||
`e`.`palletFk`
|
|
||||||
ORDER BY sum(`e`.`truckFk` <> `e`.`roadmapStopFk`) DESC,
|
|
||||||
`e`.`eta`,
|
|
||||||
`e`.`truckFk`
|
|
|
@ -1,22 +0,0 @@
|
||||||
CREATE OR REPLACE DEFINER=`root`@`localhost`
|
|
||||||
SQL SECURITY DEFINER
|
|
||||||
VIEW `vn`.`expeditionTruck_Control_Detail_Pallet`
|
|
||||||
AS SELECT `e`.`truckFk` AS `id`,
|
|
||||||
`e`.`eta` AS `eta`,
|
|
||||||
`e`.`description` AS `destino`,
|
|
||||||
`e`.`palletFk` AS `pallet`,
|
|
||||||
`e`.`routeFk` AS `route`,
|
|
||||||
COUNT(DISTINCT `e`.`scanFk`) AS `scans`,
|
|
||||||
`rs`.`description` AS `destinos`,
|
|
||||||
SUM(`e`.`truckFk` <> `e`.`roadmapStopFk`) AS `fallos`,
|
|
||||||
`e`.`roadmapStopFk` AS `roadmapStopFk`,
|
|
||||||
MAX(`e`.`lastPacked`) AS `lastPacked`
|
|
||||||
FROM (
|
|
||||||
`vn`.`expeditionCommon` `e`
|
|
||||||
LEFT JOIN `vn`.`roadmapStop` `rs` ON(`rs`.`id` = `e`.`roadmapStopFk`)
|
|
||||||
)
|
|
||||||
GROUP BY `e`.`truckFk`,
|
|
||||||
`e`.`palletFk`,
|
|
||||||
`e`.`routeFk`
|
|
||||||
ORDER BY SUM(`e`.`truckFk` <> `e`.`roadmapStopFk`) DESC,
|
|
||||||
`e`.`palletFk`
|
|
|
@ -20,7 +20,7 @@ FROM (
|
||||||
`vn`.`saleGroup` `sg`
|
`vn`.`saleGroup` `sg`
|
||||||
JOIN `vn`.`saleGroupDetail` `sgd` ON(`sgd`.`saleGroupFk` = `sg`.`id`)
|
JOIN `vn`.`saleGroupDetail` `sgd` ON(`sgd`.`saleGroupFk` = `sg`.`id`)
|
||||||
)
|
)
|
||||||
JOIN `vn`.`sale` `s` ON(`s`.`id` = `sgd`.`saleFk`)
|
JOIN `vn`.`sale` `s` FORCE INDEX (PRIMARY) ON(`s`.`id` = `sgd`.`saleFk`)
|
||||||
)
|
)
|
||||||
JOIN `vn`.`ticketState` `tls` ON(`tls`.`ticketFk` = `s`.`ticketFk`)
|
JOIN `vn`.`ticketState` `tls` ON(`tls`.`ticketFk` = `s`.`ticketFk`)
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,10 +0,0 @@
|
||||||
CREATE OR REPLACE DEFINER=`root`@`localhost`
|
|
||||||
SQL SECURITY DEFINER
|
|
||||||
VIEW `vn2008`.`Saldos_Prevision`
|
|
||||||
AS SELECT `fb`.`id` AS `Saldos_Prevision_id`,
|
|
||||||
`fb`.`description` AS `Descripcion`,
|
|
||||||
`fb`.`amount` AS `Importe`,
|
|
||||||
`fb`.`dated` AS `Fecha`,
|
|
||||||
`fb`.`accountingFk` AS `Id_Banco`,
|
|
||||||
`fb`.`companyFk` AS `empresa_id`
|
|
||||||
FROM `vn`.`forecastedBalance` `fb`
|
|
|
@ -21,7 +21,6 @@ AS SELECT `t`.`id` AS `Id_Ticket`,
|
||||||
`t`.`workerFk` AS `Id_Trabajador`,
|
`t`.`workerFk` AS `Id_Trabajador`,
|
||||||
`t`.`observations` AS `Observaciones`,
|
`t`.`observations` AS `Observaciones`,
|
||||||
`t`.`isSigned` AS `Firmado`,
|
`t`.`isSigned` AS `Firmado`,
|
||||||
`t`.`isLabeled` AS `Etiquetasemitidas`,
|
|
||||||
`t`.`isPrinted` AS `PedidoImpreso`,
|
`t`.`isPrinted` AS `PedidoImpreso`,
|
||||||
`t`.`hour` AS `Hora`,
|
`t`.`hour` AS `Hora`,
|
||||||
`t`.`isBlocked` AS `blocked`,
|
`t`.`isBlocked` AS `blocked`,
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
CREATE TABLE `vn`.`roadmapAddress` (
|
||||||
|
addressFk int(11) NULL,
|
||||||
|
isActive TINYINT DEFAULT 1 NULL,
|
||||||
|
PRIMARY KEY (addressFk)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci COMMENT='Direcciones de los troncales';
|
||||||
|
|
||||||
|
ALTER TABLE vn.roadmapAddress
|
||||||
|
ADD CONSTRAINT roadmapAddress_address_FK FOREIGN KEY (addressFk) REFERENCES vn.address(id) ON DELETE RESTRICT ON UPDATE CASCADE;
|
|
@ -0,0 +1,7 @@
|
||||||
|
ALTER TABLE vn.roadmapStop DROP FOREIGN KEY expeditionTruck_FK_1;
|
||||||
|
ALTER TABLE vn.roadmapStop DROP COLUMN warehouseFk;
|
||||||
|
ALTER TABLE vn.roadmapStop ADD addressFk int(11) NULL;
|
||||||
|
ALTER TABLE vn.roadmapStop CHANGE addressFk addressFk int(11) DEFAULT NULL NULL AFTER roadmapFk;
|
||||||
|
|
||||||
|
ALTER TABLE vn.roadmapStop
|
||||||
|
ADD CONSTRAINT roadmapStop_roadmapAddress_FK FOREIGN KEY (addressFk) REFERENCES vn.roadmapAddress(addressFk) ON DELETE RESTRICT ON UPDATE CASCADE;
|
|
@ -0,0 +1,11 @@
|
||||||
|
DELETE FROM salix.ACL
|
||||||
|
WHERE model in ('expeditionTruck', 'Roadmap', 'roadmapStop', 'roadmapAddress');
|
||||||
|
|
||||||
|
INSERT INTO salix.ACL (model, property, accessType, permission, principalType, principalId)
|
||||||
|
VALUES
|
||||||
|
('RoadmapAddress', '*', 'WRITE', 'ALLOW', 'ROLE', 'palletizerBoss'),
|
||||||
|
('RoadmapAddress', '*', 'READ', 'ALLOW', 'ROLE', 'production'),
|
||||||
|
('Roadmap', '*', 'WRITE', 'ALLOW', 'ROLE', 'palletizerBoss'),
|
||||||
|
('Roadmap', '*', 'READ', 'ALLOW', 'ROLE', 'production'),
|
||||||
|
('RoadmapStop', '*', 'WRITE', 'ALLOW', 'ROLE', 'palletizerBoss'),
|
||||||
|
('RoadmapStop', '*', 'READ', 'ALLOW', 'ROLE', 'production');
|
|
@ -0,0 +1,4 @@
|
||||||
|
ALTER TABLE vn.ticket MODIFY COLUMN IF EXISTS isLabeled__ tinyint(1) DEFAULT 0 NOT NULL COMMENT 'refs #7496 deprecated 2024-06-20';
|
||||||
|
|
||||||
|
ALTER TABLE IF EXISTS vn.forecastedBalance RENAME vn.forecastedBalance__ ;
|
||||||
|
ALTER TABLE IF EXISTS vn.forecastedBalance__ COMMENT='@deprecated 2024-05-21';
|
|
@ -0,0 +1,5 @@
|
||||||
|
-- Place your SQL code here
|
||||||
|
|
||||||
|
USE vn;
|
||||||
|
|
||||||
|
ALTER TABLE vn.expeditionState ADD isScanned tinyint(1) DEFAULT false NOT NULL;
|
|
@ -0,0 +1,3 @@
|
||||||
|
INSERT INTO salix.ACL(model,property,accessType,permission,principalType,principalId)
|
||||||
|
VALUES('InvoiceIn', 'create', 'WRITE', 'ALLOW', 'ROLE', 'administrative'),
|
||||||
|
('InvoiceIn', 'create', 'WRITE', 'ALLOW', 'ROLE', 'buyer');
|
|
@ -0,0 +1 @@
|
||||||
|
CREATE INDEX ticketLog_creationDate_IDX USING BTREE ON vn.ticketLog (creationDate,changedModel,`action`);
|
|
@ -0,0 +1,4 @@
|
||||||
|
UPDATE salix.ACL
|
||||||
|
SET property = 'cmrs'
|
||||||
|
WHERE property = 'getExternalCmrs'
|
||||||
|
AND model = 'Route';
|
|
@ -0,0 +1,8 @@
|
||||||
|
INSERT INTO salix.ACL
|
||||||
|
SET
|
||||||
|
model = 'Ticket',
|
||||||
|
property = 'editZone',
|
||||||
|
accessType = 'WRITE',
|
||||||
|
permission = 'ALLOW',
|
||||||
|
principalType = 'ROLE',
|
||||||
|
principalId = 'buyer';
|
|
@ -229,5 +229,8 @@
|
||||||
"InvoiceIn is already booked": "InvoiceIn is already booked",
|
"InvoiceIn is already booked": "InvoiceIn is already booked",
|
||||||
"This workCenter is already assigned to this agency": "This workCenter is already assigned to this agency",
|
"This workCenter is already assigned to this agency": "This workCenter is already assigned to this agency",
|
||||||
"You can only have one PDA": "You can only have one PDA",
|
"You can only have one PDA": "You can only have one PDA",
|
||||||
"Incoterms and Customs agent are required for a non UEE member": "Incoterms and Customs agent are required for a non UEE member"
|
"Incoterms and Customs agent are required for a non UEE member": "Incoterms and Customs agent are required for a non UEE member",
|
||||||
|
"It has been invoiced but the PDF could not be generated": "It has been invoiced but the PDF could 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"
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -359,8 +359,11 @@
|
||||||
"Select ticket or client": "Elija un ticket o un client",
|
"Select ticket or client": "Elija un ticket o un client",
|
||||||
"It was not able to create the invoice": "No se pudo crear la factura",
|
"It was not able to create the invoice": "No se pudo crear la factura",
|
||||||
"ticketCommercial": "El ticket {{ ticket }} para el vendedor {{ salesMan }} está en preparación. (mensaje generado automáticamente)",
|
"ticketCommercial": "El ticket {{ ticket }} para el vendedor {{ salesMan }} está en preparación. (mensaje generado automáticamente)",
|
||||||
"This PDA is already assigned to another user": "Esta PDA ya está asignado a otro usuario",
|
"Incoterms and Customs agent are required for a non UEE member": "Se requieren Incoterms y agente de aduanas para un no miembro de la UEE",
|
||||||
"You can only have one PDA": "Solo puedes tener una PDA",
|
"You can not use the same password": "No puedes usar la misma contraseña",
|
||||||
"Incoterms and Customs agent are required for a non UEE member": "Se requieren Incoterms y agente de aduanas para un no miembro de la UEE",
|
"This PDA is already assigned to another user": "Este PDA ya está asignado a otro usuario",
|
||||||
"You can not use the same password": "No puedes usar la misma contraseña"
|
"You can only have one PDA": "Solo puedes tener un PDA",
|
||||||
}
|
"It has been invoiced but the PDF could not be generated": "Se ha facturado pero no se ha podido generar el PDF",
|
||||||
|
"It has been invoiced but the PDF of refund not be generated": "Se ha facturado pero no se ha podido generar el PDF del abono",
|
||||||
|
"Payment method is required": "El método de pago es obligatorio"
|
||||||
|
}
|
|
@ -357,5 +357,7 @@
|
||||||
"InvoiceIn is already booked": "La facture reçue est déjà comptabilisée",
|
"InvoiceIn is already booked": "La facture reçue est déjà comptabilisée",
|
||||||
"This workCenter is already assigned to this agency": "Ce centre de travail est déjà assigné à cette agence",
|
"This workCenter is already assigned to this agency": "Ce centre de travail est déjà assigné à cette agence",
|
||||||
"Select ticket or client": "Choisissez un ticket ou un client",
|
"Select ticket or client": "Choisissez un ticket ou un client",
|
||||||
"It was not able to create the invoice": "Il n'a pas été possible de créer la facture"
|
"It was not able to create the invoice": "Il n'a pas été possible de créer la facture",
|
||||||
|
"It has been invoiced but the PDF could not be generated": "La facture a été émise mais le PDF n'a pas pu être généré",
|
||||||
|
"It has been invoiced but the PDF of refund not be generated": "Il a été facturé mais le PDF de remboursement n'a pas été généré"
|
||||||
}
|
}
|
||||||
|
|
|
@ -357,5 +357,7 @@
|
||||||
"InvoiceIn is already booked": "InvoiceIn já está reservado",
|
"InvoiceIn is already booked": "InvoiceIn já está reservado",
|
||||||
"This workCenter is already assigned to this agency": "Este centro de trabalho já está atribuído a esta agência",
|
"This workCenter is already assigned to this agency": "Este centro de trabalho já está atribuído a esta agência",
|
||||||
"Select ticket or client": "Selecione um ticket ou cliente",
|
"Select ticket or client": "Selecione um ticket ou cliente",
|
||||||
"It was not able to create the invoice": "Não foi possível criar a fatura"
|
"It was not able to create the invoice": "Não foi possível criar a fatura",
|
||||||
|
"It has been invoiced but the PDF could not be generated": "Foi faturado, mas o PDF não pôde ser gerado",
|
||||||
|
"It has been invoiced but the PDF of refund not be generated": "Foi faturado mas não foi gerado o PDF do reembolso"
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
{
|
{
|
||||||
"name": "RoleInherit",
|
"name": "RoleInherit",
|
||||||
"base": "VnModel",
|
"base": "VnModel",
|
||||||
|
"mixins": {
|
||||||
|
"Loggable": true
|
||||||
|
},
|
||||||
"options": {
|
"options": {
|
||||||
"mysql": {
|
"mysql": {
|
||||||
"table": "account.roleInherit"
|
"table": "account.roleInherit"
|
||||||
|
|
|
@ -69,30 +69,26 @@ module.exports = Self => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, myOptions);
|
}, myOptions);
|
||||||
// Get sales person from claim client
|
|
||||||
const salesPerson = claim.client().salesPersonUser();
|
|
||||||
|
|
||||||
const changedPickup = args.pickup != claim.pickup;
|
const changedPickup = args.pickup && args.pickup != claim.pickup;
|
||||||
|
|
||||||
// Validate when claimState has been changed
|
|
||||||
if (args.claimStateFk) {
|
if (args.claimStateFk) {
|
||||||
const canEditOldState = await models.ClaimState.isEditable(ctx, claim.claimStateFk, myOptions);
|
const canEditOldState = await models.ClaimState.isEditable(ctx, claim.claimStateFk, myOptions);
|
||||||
const canEditNewState = await models.ClaimState.isEditable(ctx, args.claimStateFk, myOptions);
|
const canEditNewState = await models.ClaimState.isEditable(ctx, args.claimStateFk, myOptions);
|
||||||
const canEditState = await models.ACL.checkAccessAcl(ctx, 'Claim', 'editState', 'WRITE');
|
const canEditPickup = await models.ACL.checkAccessAcl(ctx, 'Claim', 'editPickup', 'WRITE');
|
||||||
|
|
||||||
if (!canEditOldState || !canEditNewState || changedPickup && !canEditState)
|
if (!canEditOldState || !canEditNewState || (changedPickup && !canEditPickup))
|
||||||
throw new UserError(`You don't have enough privileges to change that field`);
|
throw new UserError(`You don't have enough privileges to change that field`);
|
||||||
}
|
}
|
||||||
|
|
||||||
delete args.ctx;
|
delete args.ctx;
|
||||||
const updatedClaim = await claim.updateAttributes(args, myOptions);
|
const updatedClaim = await claim.updateAttributes(args, myOptions);
|
||||||
|
|
||||||
// When pickup has been changed
|
const salesPerson = claim.client().salesPersonUser();
|
||||||
if (salesPerson) {
|
if (salesPerson) {
|
||||||
if (changedPickup && updatedClaim.pickup)
|
if (changedPickup && updatedClaim.pickup)
|
||||||
await notifyPickUp(ctx, salesPerson.id, claim);
|
await notifyPickUp(ctx, salesPerson.id, claim);
|
||||||
|
|
||||||
// When claimState has been changed
|
|
||||||
if (args.claimStateFk) {
|
if (args.claimStateFk) {
|
||||||
const newState = await models.ClaimState.findById(args.claimStateFk, null, myOptions);
|
const newState = await models.ClaimState.findById(args.claimStateFk, null, myOptions);
|
||||||
await notifyStateChange(ctx, salesPerson.id, claim, newState.description);
|
await notifyStateChange(ctx, salesPerson.id, claim, newState.description);
|
||||||
|
@ -113,7 +109,7 @@ module.exports = Self => {
|
||||||
async function notifyStateChange(ctx, workerId, claim, newState) {
|
async function notifyStateChange(ctx, workerId, claim, newState) {
|
||||||
const models = Self.app.models;
|
const models = Self.app.models;
|
||||||
const url = await models.Url.getUrl();
|
const url = await models.Url.getUrl();
|
||||||
const $t = ctx.req.__; // $translate
|
const $t = ctx.req.__;
|
||||||
|
|
||||||
const message = $t(`Claim state has changed to`, {
|
const message = $t(`Claim state has changed to`, {
|
||||||
claimId: claim.id,
|
claimId: claim.id,
|
||||||
|
|
|
@ -48,7 +48,8 @@ module.exports = Self => {
|
||||||
'weight',
|
'weight',
|
||||||
'buyingValue',
|
'buyingValue',
|
||||||
'price2',
|
'price2',
|
||||||
'price3'
|
'price3',
|
||||||
|
'printedStickers'
|
||||||
],
|
],
|
||||||
include: {
|
include: {
|
||||||
relation: 'item',
|
relation: 'item',
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
const models = require('vn-loopback/server/server').models;
|
const models = require('vn-loopback/server/server').models;
|
||||||
const LoopBackContext = require('loopback-context');
|
const LoopBackContext = require('loopback-context');
|
||||||
|
|
||||||
|
@ -17,26 +16,27 @@ describe('InvoiceOut transferInvoice()', () => {
|
||||||
spyOn(LoopBackContext, 'getCurrentContext').and.returnValue({
|
spyOn(LoopBackContext, 'getCurrentContext').and.returnValue({
|
||||||
active: activeCtx
|
active: activeCtx
|
||||||
});
|
});
|
||||||
spyOn(models.InvoiceOut, 'makePdfAndNotify');
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should return the id of the created issued invoice', async() => {
|
it('should return the id of the created issued invoice', async() => {
|
||||||
const tx = await models.InvoiceOut.beginTransaction({});
|
const tx = await models.InvoiceOut.beginTransaction({});
|
||||||
const options = {transaction: tx};
|
const options = {transaction: tx};
|
||||||
const args = {
|
const id = 4;
|
||||||
id: '4',
|
const newClient = 1;
|
||||||
refFk: 'T4444444',
|
spyOn(models.InvoiceOut, 'makePdfList');
|
||||||
newClientFk: 1,
|
|
||||||
cplusRectificationTypeFk: 1,
|
|
||||||
siiTypeInvoiceOutFk: 1,
|
|
||||||
invoiceCorrectionTypeFk: 1
|
|
||||||
};
|
|
||||||
ctx.args = args;
|
|
||||||
try {
|
try {
|
||||||
const {clientFk: oldClient} = await models.InvoiceOut.findById(args.id, {fields: ['clientFk']});
|
const {clientFk: oldClient} = await models.InvoiceOut.findById(id, {fields: ['clientFk']});
|
||||||
const invoicesBefore = await models.InvoiceOut.find({}, options);
|
const invoicesBefore = await models.InvoiceOut.find({}, options);
|
||||||
const result = await models.InvoiceOut.transferInvoice(
|
const result = await models.InvoiceOut.transferInvoice(
|
||||||
ctx,
|
ctx,
|
||||||
|
id,
|
||||||
|
'T4444444',
|
||||||
|
newClient,
|
||||||
|
1,
|
||||||
|
1,
|
||||||
|
1,
|
||||||
|
true,
|
||||||
options);
|
options);
|
||||||
const invoicesAfter = await models.InvoiceOut.find({}, options);
|
const invoicesAfter = await models.InvoiceOut.find({}, options);
|
||||||
const rectificativeInvoice = invoicesAfter[invoicesAfter.length - 2];
|
const rectificativeInvoice = invoicesAfter[invoicesAfter.length - 2];
|
||||||
|
@ -45,7 +45,7 @@ describe('InvoiceOut transferInvoice()', () => {
|
||||||
expect(result).toBeDefined();
|
expect(result).toBeDefined();
|
||||||
expect(invoicesAfter.length - invoicesBefore.length).toEqual(2);
|
expect(invoicesAfter.length - invoicesBefore.length).toEqual(2);
|
||||||
expect(rectificativeInvoice.clientFk).toEqual(oldClient);
|
expect(rectificativeInvoice.clientFk).toEqual(oldClient);
|
||||||
expect(newInvoice.clientFk).toEqual(args.newClientFk);
|
expect(newInvoice.clientFk).toEqual(newClient);
|
||||||
|
|
||||||
await tx.rollback();
|
await tx.rollback();
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
@ -54,22 +54,13 @@ describe('InvoiceOut transferInvoice()', () => {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should throw an UserError when it is the same client', async() => {
|
it('should throw an error when it is the same client', async() => {
|
||||||
const tx = await models.InvoiceOut.beginTransaction({});
|
const tx = await models.InvoiceOut.beginTransaction({});
|
||||||
const options = {transaction: tx};
|
const options = {transaction: tx};
|
||||||
const args = {
|
spyOn(models.InvoiceOut, 'makePdfList');
|
||||||
id: '1',
|
|
||||||
refFk: 'T1111111',
|
|
||||||
newClientFk: 1101,
|
|
||||||
cplusRectificationTypeFk: 1,
|
|
||||||
siiTypeInvoiceOutFk: 1,
|
|
||||||
invoiceCorrectionTypeFk: 1
|
|
||||||
};
|
|
||||||
ctx.args = args;
|
|
||||||
try {
|
try {
|
||||||
await models.InvoiceOut.transferInvoice(
|
await models.InvoiceOut.transferInvoice(ctx, '1', 'T1111111', 1101, 1, 1, 1, true, options);
|
||||||
ctx,
|
|
||||||
options);
|
|
||||||
await tx.rollback();
|
await tx.rollback();
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
expect(e.message).toBe(`Select a different client`);
|
expect(e.message).toBe(`Select a different client`);
|
||||||
|
@ -77,26 +68,49 @@ describe('InvoiceOut transferInvoice()', () => {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should throw an UserError when it is refund', async() => {
|
it('should throw an error when it is refund', async() => {
|
||||||
const tx = await models.InvoiceOut.beginTransaction({});
|
const tx = await models.InvoiceOut.beginTransaction({});
|
||||||
const options = {transaction: tx};
|
const options = {transaction: tx};
|
||||||
const args = {
|
spyOn(models.InvoiceOut, 'makePdfList');
|
||||||
id: '1',
|
|
||||||
refFk: 'T1111111',
|
|
||||||
newClientFk: 1102,
|
|
||||||
cplusRectificationTypeFk: 1,
|
|
||||||
siiTypeInvoiceOutFk: 1,
|
|
||||||
invoiceCorrectionTypeFk: 1
|
|
||||||
};
|
|
||||||
ctx.args = args;
|
|
||||||
try {
|
try {
|
||||||
await models.InvoiceOut.transferInvoice(
|
await models.InvoiceOut.transferInvoice(ctx, '1', 'T1111111', 1102, 1, 1, 1, true, options);
|
||||||
ctx,
|
|
||||||
options);
|
|
||||||
await tx.rollback();
|
await tx.rollback();
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
expect(e.message).toContain(`This ticket is already a refund`);
|
expect(e.message).toContain(`This ticket is already a refund`);
|
||||||
await tx.rollback();
|
await tx.rollback();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('should throw an error when pdf failed', async() => {
|
||||||
|
const tx = await models.InvoiceOut.beginTransaction({});
|
||||||
|
const options = {transaction: tx};
|
||||||
|
spyOn(models.InvoiceOut, 'makePdfList').and.returnValue(() => {
|
||||||
|
throw new Error('test');
|
||||||
|
});
|
||||||
|
|
||||||
|
try {
|
||||||
|
await models.InvoiceOut.transferInvoice(ctx, '1', 'T1111111', 1102, 1, 1, 1, true, options);
|
||||||
|
await tx.rollback();
|
||||||
|
} catch (e) {
|
||||||
|
expect(e.message).toContain(`It has been invoiced but the PDF could not be generated`);
|
||||||
|
await tx.rollback();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should not generate an invoice', async() => {
|
||||||
|
const tx = await models.InvoiceOut.beginTransaction({});
|
||||||
|
const options = {transaction: tx};
|
||||||
|
spyOn(models.InvoiceOut, 'makePdfList');
|
||||||
|
|
||||||
|
let response;
|
||||||
|
try {
|
||||||
|
response = await models.InvoiceOut.transferInvoice(ctx, '1', 'T1111111', 1102, 1, 1, 1, false, options);
|
||||||
|
await tx.rollback();
|
||||||
|
} catch (e) {
|
||||||
|
await tx.rollback();
|
||||||
|
throw e;
|
||||||
|
}
|
||||||
|
|
||||||
|
expect(response).not.toBeDefined();
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -37,13 +37,13 @@ module.exports = Self => {
|
||||||
required: true
|
required: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
arg: 'checked',
|
arg: 'makeInvoice',
|
||||||
type: 'boolean',
|
type: 'boolean',
|
||||||
required: true
|
required: true
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
returns: {
|
returns: {
|
||||||
type: 'boolean',
|
type: 'object',
|
||||||
root: true
|
root: true
|
||||||
},
|
},
|
||||||
http: {
|
http: {
|
||||||
|
@ -52,11 +52,22 @@ module.exports = Self => {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
Self.transferInvoice = async(ctx, options) => {
|
Self.transferInvoice = async(
|
||||||
|
ctx,
|
||||||
|
id,
|
||||||
|
refFk,
|
||||||
|
newClientFk,
|
||||||
|
cplusRectificationTypeFk,
|
||||||
|
siiTypeInvoiceOutFk,
|
||||||
|
invoiceCorrectionTypeFk,
|
||||||
|
makeInvoice,
|
||||||
|
options
|
||||||
|
) => {
|
||||||
const models = Self.app.models;
|
const models = Self.app.models;
|
||||||
const myOptions = {userId: ctx.req.accessToken.userId};
|
const myOptions = {userId: ctx.req.accessToken.userId};
|
||||||
const {id, refFk, newClientFk, cplusRectificationTypeFk, siiTypeInvoiceOutFk, invoiceCorrectionTypeFk} = ctx.args;
|
let invoiceId;
|
||||||
const checked = ctx.args.checked;
|
let refundId;
|
||||||
|
|
||||||
let tx;
|
let tx;
|
||||||
if (typeof options == 'object')
|
if (typeof options == 'object')
|
||||||
Object.assign(myOptions, options);
|
Object.assign(myOptions, options);
|
||||||
|
@ -100,15 +111,29 @@ module.exports = Self => {
|
||||||
};
|
};
|
||||||
const refundTicketIds = refundTickets.map(ticket => ticket.id);
|
const refundTicketIds = refundTickets.map(ticket => ticket.id);
|
||||||
|
|
||||||
await models.Ticket.invoiceTickets(ctx, refundTicketIds, invoiceCorrection, myOptions);
|
refundId = await models.Ticket.invoiceTickets(ctx, refundTicketIds, invoiceCorrection, myOptions);
|
||||||
|
|
||||||
if (!checked) {
|
if (makeInvoice)
|
||||||
const [invoiceId] = await models.Ticket.invoiceTicketsAndPdf(ctx, clonedTicketIds, null, myOptions);
|
invoiceId = await models.Ticket.invoiceTickets(ctx, clonedTicketIds, null, myOptions);
|
||||||
return invoiceId;
|
|
||||||
}
|
tx && await tx.commit();
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
if (tx) await tx.rollback();
|
if (tx) await tx.rollback();
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (tx && makeInvoice) {
|
||||||
|
try {
|
||||||
|
await models.InvoiceOut.makePdfList(ctx, invoiceId);
|
||||||
|
} catch (e) {
|
||||||
|
throw new UserError('It has been invoiced but the PDF could not be generated');
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
await models.InvoiceOut.makePdfList(ctx, refundId);
|
||||||
|
} catch (e) {
|
||||||
|
throw new UserError('It has been invoiced but the PDF of refund not be generated');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return invoiceId;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -44,6 +44,11 @@
|
||||||
"model": "Client",
|
"model": "Client",
|
||||||
"foreignKey": "clientFk"
|
"foreignKey": "clientFk"
|
||||||
},
|
},
|
||||||
|
"user": {
|
||||||
|
"type": "belongsTo",
|
||||||
|
"model": "VnUser",
|
||||||
|
"foreignKey": "clientFk"
|
||||||
|
},
|
||||||
"company": {
|
"company": {
|
||||||
"type": "belongsTo",
|
"type": "belongsTo",
|
||||||
"model": "Company",
|
"model": "Company",
|
||||||
|
|
|
@ -158,7 +158,7 @@ class Controller extends Section {
|
||||||
cplusRectificationTypeFk: this.cplusRectificationType,
|
cplusRectificationTypeFk: this.cplusRectificationType,
|
||||||
siiTypeInvoiceOutFk: this.siiTypeInvoiceOut,
|
siiTypeInvoiceOutFk: this.siiTypeInvoiceOut,
|
||||||
invoiceCorrectionTypeFk: this.invoiceCorrectionType,
|
invoiceCorrectionTypeFk: this.invoiceCorrectionType,
|
||||||
checked: this.checked
|
makeInvoice: this.checked
|
||||||
};
|
};
|
||||||
|
|
||||||
this.$http.get(`Clients/${this.clientId}`).then(response => {
|
this.$http.get(`Clients/${this.clientId}`).then(response => {
|
||||||
|
|
|
@ -11,7 +11,7 @@ export default class Controller extends Section {
|
||||||
fields: ['id', 'countryFk', 'taxClassFk'],
|
fields: ['id', 'countryFk', 'taxClassFk'],
|
||||||
include: [{
|
include: [{
|
||||||
relation: 'country',
|
relation: 'country',
|
||||||
scope: {fields: ['country']}
|
scope: {fields: ['name']}
|
||||||
}]
|
}]
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,6 @@ columns:
|
||||||
m3: m3
|
m3: m3
|
||||||
priority: priority
|
priority: priority
|
||||||
etd: etd
|
etd: etd
|
||||||
expeditionTruckFk: truck
|
|
||||||
m3boxes: m3 boxes
|
m3boxes: m3 boxes
|
||||||
bufferFk: buffer
|
bufferFk: buffer
|
||||||
isPickingAllowed: is picking allowed
|
isPickingAllowed: is picking allowed
|
||||||
|
|
|
@ -13,7 +13,6 @@ columns:
|
||||||
m3: m3
|
m3: m3
|
||||||
priority: prioridad
|
priority: prioridad
|
||||||
etd: etd
|
etd: etd
|
||||||
expeditionTruckFk: camión
|
|
||||||
m3boxes: m3 cajas
|
m3boxes: m3 cajas
|
||||||
bufferFk: buffer
|
bufferFk: buffer
|
||||||
isPickingAllowed: está permitido recoger
|
isPickingAllowed: está permitido recoger
|
||||||
|
|
|
@ -37,17 +37,12 @@ module.exports = Self => {
|
||||||
fields: [
|
fields: [
|
||||||
'id',
|
'id',
|
||||||
'name',
|
'name',
|
||||||
'tractorPlate',
|
|
||||||
'trailerPlate',
|
|
||||||
'phone',
|
|
||||||
'supplierFk',
|
'supplierFk',
|
||||||
'etd',
|
'etd'],
|
||||||
'observations',
|
|
||||||
'price'],
|
|
||||||
include: [{
|
include: [{
|
||||||
relation: 'expeditionTruck',
|
relation: 'roadmapStop',
|
||||||
scope: {
|
scope: {
|
||||||
fields: ['roadmapFk', 'warehouseFk', 'eta', 'description']
|
fields: ['roadmapFk', 'addressFk', 'eta', 'description']
|
||||||
}
|
}
|
||||||
}]
|
}]
|
||||||
|
|
||||||
|
|
|
@ -3,8 +3,8 @@ const buildFilter = require('vn-loopback/util/filter').buildFilter;
|
||||||
const mergeFilters = require('vn-loopback/util/filter').mergeFilters;
|
const mergeFilters = require('vn-loopback/util/filter').mergeFilters;
|
||||||
|
|
||||||
module.exports = Self => {
|
module.exports = Self => {
|
||||||
Self.remoteMethod('getExternalCmrs', {
|
Self.remoteMethod('cmrs', {
|
||||||
description: 'Returns an array of external cmrs',
|
description: 'Returns an array of cmrs',
|
||||||
accessType: 'READ',
|
accessType: 'READ',
|
||||||
accepts: [
|
accepts: [
|
||||||
{
|
{
|
||||||
|
@ -47,37 +47,25 @@ module.exports = Self => {
|
||||||
type: 'date',
|
type: 'date',
|
||||||
description: 'The to date filter',
|
description: 'The to date filter',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
arg: 'warehouseFk',
|
||||||
|
type: 'integer',
|
||||||
|
}
|
||||||
],
|
],
|
||||||
returns: {
|
returns: {
|
||||||
type: ['object'],
|
type: ['object'],
|
||||||
root: true
|
root: true
|
||||||
},
|
},
|
||||||
http: {
|
http: {
|
||||||
path: `/getExternalCmrs`,
|
path: `/cmrs`,
|
||||||
verb: 'GET'
|
verb: 'GET'
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
Self.getExternalCmrs = async(
|
Self.cmrs = async(
|
||||||
filter,
|
filter, cmrFk, ticketFk, routeFk, country, clientFk, hasCmrDms, shipped, warehouseFk, options
|
||||||
cmrFk,
|
|
||||||
ticketFk,
|
|
||||||
routeFk,
|
|
||||||
country,
|
|
||||||
clientFk,
|
|
||||||
hasCmrDms,
|
|
||||||
shipped,
|
|
||||||
options
|
|
||||||
) => {
|
) => {
|
||||||
const params = {
|
const params = {cmrFk, ticketFk, routeFk, country, clientFk, hasCmrDms, warehouseFk, shipped};
|
||||||
cmrFk,
|
|
||||||
ticketFk,
|
|
||||||
routeFk,
|
|
||||||
country,
|
|
||||||
clientFk,
|
|
||||||
hasCmrDms,
|
|
||||||
shipped,
|
|
||||||
};
|
|
||||||
const conn = Self.dataSource.connector;
|
const conn = Self.dataSource.connector;
|
||||||
|
|
||||||
let where = buildFilter(params, (param, value) => {
|
let where = buildFilter(params, (param, value) => {
|
||||||
|
@ -106,7 +94,8 @@ module.exports = Self => {
|
||||||
co.name country,
|
co.name country,
|
||||||
t.clientFk,
|
t.clientFk,
|
||||||
IF(sub.id, TRUE, FALSE) hasCmrDms,
|
IF(sub.id, TRUE, FALSE) hasCmrDms,
|
||||||
DATE(t.shipped) shipped
|
DATE(t.shipped) shipped,
|
||||||
|
t.warehouseFk
|
||||||
FROM ticket t
|
FROM ticket t
|
||||||
JOIN ticketState ts ON ts.ticketFk = t.id
|
JOIN ticketState ts ON ts.ticketFk = t.id
|
||||||
JOIN state s ON s.id = ts.stateFk
|
JOIN state s ON s.id = ts.stateFk
|
||||||
|
@ -124,8 +113,7 @@ module.exports = Self => {
|
||||||
JOIN dmsType dt ON dt.id = d.dmsTypeFk
|
JOIN dmsType dt ON dt.id = d.dmsTypeFk
|
||||||
WHERE dt.name = 'cmr'
|
WHERE dt.name = 'cmr'
|
||||||
) sub ON sub.ticketFk = t.id
|
) sub ON sub.ticketFk = t.id
|
||||||
WHERE co.code <> 'ES'
|
WHERE am.name <> 'ABONO'
|
||||||
AND am.name <> 'ABONO'
|
|
||||||
AND w.code = 'ALG'
|
AND w.code = 'ALG'
|
||||||
AND t.cmrFk
|
AND t.cmrFk
|
||||||
) sub
|
) sub
|
|
@ -8,6 +8,9 @@
|
||||||
"DeliveryPoint": {
|
"DeliveryPoint": {
|
||||||
"dataSource": "vn"
|
"dataSource": "vn"
|
||||||
},
|
},
|
||||||
|
"RoadmapAddress": {
|
||||||
|
"dataSource": "vn"
|
||||||
|
},
|
||||||
"RoadmapStop": {
|
"RoadmapStop": {
|
||||||
"dataSource": "vn"
|
"dataSource": "vn"
|
||||||
},
|
},
|
||||||
|
@ -25,8 +28,5 @@
|
||||||
},
|
},
|
||||||
"RoutesMonitor": {
|
"RoutesMonitor": {
|
||||||
"dataSource": "vn"
|
"dataSource": "vn"
|
||||||
},
|
|
||||||
"ExpeditionTruck": {
|
|
||||||
"dataSource": "vn"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +0,0 @@
|
||||||
{
|
|
||||||
"name": "ExpeditionTruck",
|
|
||||||
"base": "RoadmapStop",
|
|
||||||
"options": {
|
|
||||||
"mysql": {
|
|
||||||
"table": "expeditionTruck"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -0,0 +1,26 @@
|
||||||
|
{
|
||||||
|
"name": "RoadmapAddress",
|
||||||
|
"base": "VnModel",
|
||||||
|
"options": {
|
||||||
|
"mysql": {
|
||||||
|
"table": "roadmapAddress"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"properties": {
|
||||||
|
"addressFk": {
|
||||||
|
"type": "number",
|
||||||
|
"id": true,
|
||||||
|
"description": "Identifier"
|
||||||
|
},
|
||||||
|
"isActive": {
|
||||||
|
"type": "number"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"relations": {
|
||||||
|
"address": {
|
||||||
|
"type": "belongsTo",
|
||||||
|
"model": "Address",
|
||||||
|
"foreignKey": "addressFk"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -15,7 +15,7 @@
|
||||||
"roadmapFk": {
|
"roadmapFk": {
|
||||||
"type": "number"
|
"type": "number"
|
||||||
},
|
},
|
||||||
"warehouseFk": {
|
"addressFk": {
|
||||||
"type": "number"
|
"type": "number"
|
||||||
},
|
},
|
||||||
"eta": {
|
"eta": {
|
||||||
|
@ -34,10 +34,10 @@
|
||||||
"model": "Roadmap",
|
"model": "Roadmap",
|
||||||
"foreignKey": "roadmapFk"
|
"foreignKey": "roadmapFk"
|
||||||
},
|
},
|
||||||
"warehouse": {
|
"address": {
|
||||||
"type": "belongsTo",
|
"type": "belongsTo",
|
||||||
"model": "Warehouse",
|
"model": "Address",
|
||||||
"foreignKey": "warehouseFk"
|
"foreignKey": "addressFk"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,7 +15,7 @@ module.exports = Self => {
|
||||||
require('../methods/route/sendSms')(Self);
|
require('../methods/route/sendSms')(Self);
|
||||||
require('../methods/route/downloadZip')(Self);
|
require('../methods/route/downloadZip')(Self);
|
||||||
require('../methods/route/cmr')(Self);
|
require('../methods/route/cmr')(Self);
|
||||||
require('../methods/route/getExternalCmrs')(Self);
|
require('../methods/route/cmrs')(Self);
|
||||||
require('../methods/route/downloadCmrsZip')(Self);
|
require('../methods/route/downloadCmrsZip')(Self);
|
||||||
require('../methods/route/cmrEmail')(Self);
|
require('../methods/route/cmrEmail')(Self);
|
||||||
require('../methods/route/getExpeditionSummary')(Self);
|
require('../methods/route/getExpeditionSummary')(Self);
|
||||||
|
|
|
@ -48,9 +48,6 @@
|
||||||
"priority": {
|
"priority": {
|
||||||
"type": "number"
|
"type": "number"
|
||||||
},
|
},
|
||||||
"expeditionTruckFk": {
|
|
||||||
"type": "number"
|
|
||||||
},
|
|
||||||
"m3boxes": {
|
"m3boxes": {
|
||||||
"type": "number"
|
"type": "number"
|
||||||
},
|
},
|
||||||
|
|
|
@ -35,7 +35,7 @@
|
||||||
label="Country"
|
label="Country"
|
||||||
ng-model="filter.countryFk"
|
ng-model="filter.countryFk"
|
||||||
url="countries"
|
url="countries"
|
||||||
show-field="country"
|
show-field="name"
|
||||||
value-field="id">
|
value-field="id">
|
||||||
</vn-autocomplete>
|
</vn-autocomplete>
|
||||||
</vn-horizontal>
|
</vn-horizontal>
|
||||||
|
|
|
@ -44,11 +44,13 @@ module.exports = Self => {
|
||||||
|
|
||||||
const typeFk = expeditionStateType.id;
|
const typeFk = expeditionStateType.id;
|
||||||
expeditionId = expedition.expeditionFk;
|
expeditionId = expedition.expeditionFk;
|
||||||
|
const isScannedExpedition = expedition.isScanned ?? false;
|
||||||
|
|
||||||
await models.ExpeditionState.create({
|
await models.ExpeditionState.create({
|
||||||
expeditionFk: expedition.expeditionFk,
|
expeditionFk: expedition.expeditionFk,
|
||||||
typeFk,
|
typeFk,
|
||||||
userFk: userId,
|
userFk: userId,
|
||||||
|
isScanned: isScannedExpedition,
|
||||||
}, myOptions);
|
}, myOptions);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -135,6 +135,7 @@ module.exports = Self => {
|
||||||
const now = Date.vnNew();
|
const now = Date.vnNew();
|
||||||
|
|
||||||
const ticket = await models.Ticket.findById(ticketId, null, myOptions);
|
const ticket = await models.Ticket.findById(ticketId, null, myOptions);
|
||||||
|
if (!ctx.args) ctx.args = {};
|
||||||
ctx.args.clientId = ticket.clientFk;
|
ctx.args.clientId = ticket.clientFk;
|
||||||
ctx.args.shipped = now;
|
ctx.args.shipped = now;
|
||||||
ctx.args.landed = now;
|
ctx.args.landed = now;
|
||||||
|
|
|
@ -72,16 +72,20 @@ module.exports = Self => {
|
||||||
const salesPerson = sale.ticket().client().salesPersonUser();
|
const salesPerson = sale.ticket().client().salesPersonUser();
|
||||||
if (salesPerson) {
|
if (salesPerson) {
|
||||||
const url = await Self.app.models.Url.getUrl();
|
const url = await Self.app.models.Url.getUrl();
|
||||||
const message = $t('Changed sale quantity', {
|
const change = $t('Changes in sales', {
|
||||||
ticketId: sale.ticket().id,
|
|
||||||
itemId: sale.itemFk,
|
itemId: sale.itemFk,
|
||||||
concept: sale.concept,
|
concept: sale.concept,
|
||||||
oldQuantity: oldQuantity,
|
oldQuantity: oldQuantity,
|
||||||
newQuantity: newQuantity,
|
newQuantity: newQuantity,
|
||||||
ticketUrl: `${url}ticket/${sale.ticket().id}/sale`,
|
|
||||||
itemUrl: `${url}item/${sale.itemFk}/summary`
|
itemUrl: `${url}item/${sale.itemFk}/summary`
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const message = $t('Changed sale quantity', {
|
||||||
|
ticketId: sale.ticket().id,
|
||||||
|
changes: change,
|
||||||
|
ticketUrl: `${url}ticket/${sale.ticket().id}/sale`,
|
||||||
|
});
|
||||||
|
|
||||||
await models.Chat.sendCheckingPresence(ctx, salesPerson.id, message, myOptions);
|
await models.Chat.sendCheckingPresence(ctx, salesPerson.id, message, myOptions);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -140,14 +140,7 @@ module.exports = Self => {
|
||||||
await models.TicketDms.create({ticketFk: ticket.id, dmsFk: dms[0].id}, myOptions);
|
await models.TicketDms.create({ticketFk: ticket.id, dmsFk: dms[0].id}, myOptions);
|
||||||
await ticket.updateAttribute('isSigned', true, myOptions);
|
await ticket.updateAttribute('isSigned', true, myOptions);
|
||||||
|
|
||||||
const deliveryState = await models.State.findOne({
|
await Self.rawSql(`CALL vn.ticket_setState(?, ?)`, [params.ticketFk, params.code], myOptions);
|
||||||
where: {code: 'DELIVERED'}
|
|
||||||
}, myOptions);
|
|
||||||
|
|
||||||
await models.Ticket.state(ctx, {
|
|
||||||
ticketFk: ticketId,
|
|
||||||
stateFk: deliveryState.id
|
|
||||||
}, myOptions);
|
|
||||||
|
|
||||||
if (ticket?.address()?.province()?.country()?.code != 'ES' && ticket.cmrFk) {
|
if (ticket?.address()?.province()?.country()?.code != 'ES' && ticket.cmrFk) {
|
||||||
await models.Ticket.saveCmr(ctx, [ticketId], myOptions);
|
await models.Ticket.saveCmr(ctx, [ticketId], myOptions);
|
||||||
|
|
|
@ -26,6 +26,7 @@ module.exports = Self => {
|
||||||
const models = Self.app.models;
|
const models = Self.app.models;
|
||||||
const myOptions = {};
|
const myOptions = {};
|
||||||
let tx;
|
let tx;
|
||||||
|
let newStateOrder;
|
||||||
|
|
||||||
if (typeof options == 'object')
|
if (typeof options == 'object')
|
||||||
Object.assign(myOptions, options);
|
Object.assign(myOptions, options);
|
||||||
|
@ -40,11 +41,16 @@ module.exports = Self => {
|
||||||
throw new UserError('State cannot be blank');
|
throw new UserError('State cannot be blank');
|
||||||
|
|
||||||
if (params.stateFk) {
|
if (params.stateFk) {
|
||||||
const {code} = await models.State.findById(params.stateFk, {fields: ['code']}, myOptions);
|
const {code, order} = await models.State.findById(
|
||||||
|
params.stateFk,
|
||||||
|
{fields: ['code', 'order']},
|
||||||
|
myOptions);
|
||||||
params.code = code;
|
params.code = code;
|
||||||
|
newStateOrder = order;
|
||||||
} else {
|
} else {
|
||||||
const {id} = await models.State.findOne({where: {code: params.code}}, myOptions);
|
const {id, order} = await models.State.findOne({where: {code: params.code}}, myOptions);
|
||||||
params.stateFk = id;
|
params.stateFk = id;
|
||||||
|
newStateOrder = order;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!params.userFk) {
|
if (!params.userFk) {
|
||||||
|
@ -75,50 +81,46 @@ module.exports = Self => {
|
||||||
}, myOptions);
|
}, myOptions);
|
||||||
|
|
||||||
const salesPersonFk = ticket.client().salesPersonFk;
|
const salesPersonFk = ticket.client().salesPersonFk;
|
||||||
if (salesPersonFk) {
|
const stateChecked = await models.State.findOne({fields: ['order'], where: {code: 'CHECKED'}});
|
||||||
|
|
||||||
|
if (salesPersonFk && newStateOrder >= stateChecked.order) {
|
||||||
const sales = await Self.rawSql(`
|
const sales = await Self.rawSql(`
|
||||||
SELECT DISTINCT s.id,
|
SELECT DISTINCT s.id,
|
||||||
s.itemFk,
|
s.itemFk,
|
||||||
s.concept,
|
s.concept,
|
||||||
s.originalQuantity AS oldQuantity,
|
s.originalQuantity AS oldQuantity,
|
||||||
s.quantity AS newQuantity
|
s.quantity AS newQuantity
|
||||||
FROM vn.sale s
|
FROM vn.sale s
|
||||||
JOIN vn.saleTracking st ON st.saleFk = s.id
|
WHERE s.ticketFk = ?
|
||||||
JOIN vn.ticket t ON t.id = s.ticketFk
|
AND s.originalQuantity IS NOT NULL
|
||||||
JOIN vn.client c ON c.id = t.clientFk
|
AND s.originalQuantity <> s.quantity
|
||||||
JOIN vn.ticketState ts ON ts.ticketFk = t.id
|
|
||||||
JOIN vn.state s2 ON s2.id = ts.stateFk
|
|
||||||
WHERE s.ticketFk = ?
|
|
||||||
AND st.isChecked
|
|
||||||
AND s.originalQuantity IS NOT NULL
|
|
||||||
AND s.originalQuantity <> s.quantity
|
|
||||||
AND s2.\`order\` < (SELECT \`order\` FROM vn.state WHERE code = 'CHECKED')
|
|
||||||
ORDER BY st.created DESC
|
|
||||||
`, [params.ticketFk], myOptions);
|
`, [params.ticketFk], myOptions);
|
||||||
|
|
||||||
let changes = '';
|
if (sales.length) {
|
||||||
const url = await models.Url.getUrl();
|
let changes = '';
|
||||||
const $t = ctx.req.__;
|
const url = await models.Url.getUrl();
|
||||||
for (let sale of sales) {
|
const $t = ctx.req.__;
|
||||||
changes += `\r\n-` + $t('Changes in sales', {
|
for (let sale of sales) {
|
||||||
itemId: sale.itemFk,
|
changes += `\r\n-` + $t('Changes in sales', {
|
||||||
concept: sale.concept,
|
itemId: sale.itemFk,
|
||||||
oldQuantity: sale.oldQuantity,
|
concept: sale.concept,
|
||||||
newQuantity: sale.newQuantity,
|
oldQuantity: sale.oldQuantity,
|
||||||
itemUrl: `${url}item/${sale.itemFk}/summary`
|
newQuantity: sale.newQuantity,
|
||||||
});
|
itemUrl: `${url}item/${sale.itemFk}/summary`
|
||||||
const currentSale = await models.Sale.findById(sale.id, null, myOptions);
|
});
|
||||||
await currentSale.updateAttributes({
|
const currentSale = await models.Sale.findById(sale.id, null, myOptions);
|
||||||
originalQuantity: currentSale.quantity
|
await currentSale.updateAttributes({
|
||||||
}, myOptions);
|
originalQuantity: currentSale.quantity
|
||||||
}
|
}, myOptions);
|
||||||
|
}
|
||||||
|
|
||||||
const message = $t('Changed sale quantity', {
|
const message = $t('Changed sale quantity', {
|
||||||
ticketId: ticket.id,
|
ticketId: ticket.id,
|
||||||
changes: changes,
|
changes: changes,
|
||||||
ticketUrl: `${url}ticket/${ticket.id}/sale`
|
ticketUrl: `${url}ticket/${ticket.id}/sale`
|
||||||
});
|
});
|
||||||
await models.Chat.sendCheckingPresence(ctx, salesPersonFk, message, myOptions);
|
await models.Chat.sendCheckingPresence(ctx, salesPersonFk, message, myOptions);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
await Self.rawSql(`CALL vn.ticket_setState(?, ?)`, [ticket.id, params.code], myOptions);
|
await Self.rawSql(`CALL vn.ticket_setState(?, ?)`, [ticket.id, params.code], myOptions);
|
||||||
|
|
||||||
|
|
|
@ -56,6 +56,7 @@ module.exports = Self => {
|
||||||
const filter = {
|
const filter = {
|
||||||
include: [
|
include: [
|
||||||
{relation: 'warehouse', scope: {fields: ['name']}},
|
{relation: 'warehouse', scope: {fields: ['name']}},
|
||||||
|
{relation: 'ticketCollections', scope: {fields: ['collectionFk']}},
|
||||||
{relation: 'agencyMode', scope: {fields: ['name']}},
|
{relation: 'agencyMode', scope: {fields: ['name']}},
|
||||||
{relation: 'zone', scope: {fields: ['name']}},
|
{relation: 'zone', scope: {fields: ['name']}},
|
||||||
{relation: 'client',
|
{relation: 'client',
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
"base": "VnModel",
|
"base": "VnModel",
|
||||||
"options": {
|
"options": {
|
||||||
"mysql": {
|
"mysql": {
|
||||||
"table": "expeditionState"
|
"table": "expeditionState"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"properties": {
|
"properties": {
|
||||||
|
@ -23,13 +23,16 @@
|
||||||
},
|
},
|
||||||
"userFk": {
|
"userFk": {
|
||||||
"type": "number"
|
"type": "number"
|
||||||
|
},
|
||||||
|
"isScanned": {
|
||||||
|
"type": "boolean"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"relations": {
|
"relations": {
|
||||||
"expeditionStateType": {
|
"expeditionStateType": {
|
||||||
"type": "belongsTo",
|
"type": "belongsTo",
|
||||||
"model": "ExpeditionStateType",
|
"model": "ExpeditionStateType",
|
||||||
"foreignKey": "typeFk"
|
"foreignKey": "typeFk"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -77,6 +77,11 @@
|
||||||
"model": "Client",
|
"model": "Client",
|
||||||
"foreignKey": "clientFk"
|
"foreignKey": "clientFk"
|
||||||
},
|
},
|
||||||
|
"user": {
|
||||||
|
"type": "belongsTo",
|
||||||
|
"model": "VnUser",
|
||||||
|
"foreignKey": "clientFk"
|
||||||
|
},
|
||||||
"warehouse": {
|
"warehouse": {
|
||||||
"type": "belongsTo",
|
"type": "belongsTo",
|
||||||
"model": "Warehouse",
|
"model": "Warehouse",
|
||||||
|
@ -147,6 +152,11 @@
|
||||||
"type": "belongsTo",
|
"type": "belongsTo",
|
||||||
"model": "Cmr",
|
"model": "Cmr",
|
||||||
"foreignKey": "cmrFk"
|
"foreignKey": "cmrFk"
|
||||||
|
},
|
||||||
|
"ticketCollections": {
|
||||||
|
"type": "hasMany",
|
||||||
|
"model": "TicketCollection",
|
||||||
|
"foreignKey": "ticketFk"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,108 +5,80 @@ module.exports = Self => {
|
||||||
Self.remoteMethodCtx('new', {
|
Self.remoteMethodCtx('new', {
|
||||||
description: 'Creates a new worker and returns the id',
|
description: 'Creates a new worker and returns the id',
|
||||||
accessType: 'WRITE',
|
accessType: 'WRITE',
|
||||||
accepts: [
|
accepts: [{
|
||||||
{
|
arg: 'fi',
|
||||||
arg: 'fi',
|
type: 'string',
|
||||||
type: 'string',
|
description: `The worker fi`,
|
||||||
description: `The worker fi`,
|
}, {
|
||||||
required: true,
|
arg: 'name',
|
||||||
},
|
type: 'string',
|
||||||
{
|
description: `The user name`,
|
||||||
arg: 'name',
|
}, {
|
||||||
type: 'string',
|
arg: 'firstName',
|
||||||
description: `The user name`,
|
type: 'string',
|
||||||
required: true,
|
description: `The worker firstname`,
|
||||||
},
|
}, {
|
||||||
{
|
arg: 'lastNames',
|
||||||
arg: 'firstName',
|
type: 'string',
|
||||||
type: 'string',
|
description: `The worker lastnames`,
|
||||||
description: `The worker firstname`,
|
}, {
|
||||||
required: true,
|
arg: 'email',
|
||||||
},
|
type: 'string',
|
||||||
{
|
description: `The worker email`,
|
||||||
arg: 'lastNames',
|
required: true,
|
||||||
type: 'string',
|
}, {
|
||||||
description: `The worker lastnames`,
|
arg: 'street',
|
||||||
required: true,
|
type: 'string',
|
||||||
},
|
description: `The worker address`,
|
||||||
{
|
}, {
|
||||||
arg: 'email',
|
arg: 'city',
|
||||||
type: 'string',
|
type: 'string',
|
||||||
description: `The worker email`,
|
description: `The worker city`,
|
||||||
required: true,
|
}, {
|
||||||
},
|
arg: 'provinceFk',
|
||||||
{
|
type: 'number',
|
||||||
arg: 'street',
|
description: `The worker province`,
|
||||||
type: 'string',
|
}, {
|
||||||
description: `The worker address`,
|
arg: 'companyFk',
|
||||||
required: true,
|
type: 'number',
|
||||||
},
|
description: `The worker company`,
|
||||||
{
|
}, {
|
||||||
arg: 'city',
|
arg: 'postcode',
|
||||||
type: 'string',
|
type: 'string',
|
||||||
description: `The worker city`,
|
description: `The worker postcode`,
|
||||||
required: true,
|
}, {
|
||||||
},
|
arg: 'phone',
|
||||||
{
|
type: 'string',
|
||||||
arg: 'provinceFk',
|
description: `The worker phone`,
|
||||||
type: 'number',
|
}, {
|
||||||
description: `The worker province`,
|
arg: 'code',
|
||||||
required: true,
|
type: 'string',
|
||||||
},
|
description: `The worker code`,
|
||||||
{
|
}, {
|
||||||
arg: 'companyFk',
|
arg: 'bossFk',
|
||||||
type: 'number',
|
type: 'number',
|
||||||
description: `The worker company`,
|
description: `The worker boss`,
|
||||||
required: true,
|
required: true,
|
||||||
},
|
}, {
|
||||||
{
|
arg: 'birth',
|
||||||
arg: 'postcode',
|
type: 'date',
|
||||||
type: 'string',
|
description: `The worker birth`,
|
||||||
description: `The worker postcode`,
|
}, {
|
||||||
required: true,
|
arg: 'payMethodFk',
|
||||||
},
|
type: 'number',
|
||||||
{
|
description: `The client payMethod`,
|
||||||
arg: 'phone',
|
}, {
|
||||||
type: 'string',
|
arg: 'iban',
|
||||||
description: `The worker phone`,
|
type: 'string',
|
||||||
required: true,
|
description: `The client iban`,
|
||||||
},
|
}, {
|
||||||
{
|
arg: 'bankEntityFk',
|
||||||
arg: 'code',
|
type: 'number',
|
||||||
type: 'string',
|
description: `The client bank entity`,
|
||||||
description: `The worker code`,
|
}, {
|
||||||
required: true,
|
arg: 'isFreelance',
|
||||||
},
|
type: 'boolean',
|
||||||
{
|
}],
|
||||||
arg: 'bossFk',
|
|
||||||
type: 'number',
|
|
||||||
description: `The worker boss`,
|
|
||||||
required: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
arg: 'birth',
|
|
||||||
type: 'date',
|
|
||||||
description: `The worker birth`,
|
|
||||||
required: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
arg: 'payMethodFk',
|
|
||||||
type: 'number',
|
|
||||||
description: `The client payMethod`,
|
|
||||||
required: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
arg: 'iban',
|
|
||||||
type: 'string',
|
|
||||||
description: `The client iban`,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
arg: 'bankEntityFk',
|
|
||||||
type: 'number',
|
|
||||||
description: `The client bank entity`,
|
|
||||||
}
|
|
||||||
],
|
|
||||||
returns: {
|
returns: {
|
||||||
type: 'number',
|
type: 'number',
|
||||||
root: true,
|
root: true,
|
||||||
|
@ -117,11 +89,30 @@ module.exports = Self => {
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
Self.new = async(ctx, options) => {
|
Self.new = async(
|
||||||
|
ctx,
|
||||||
|
fi,
|
||||||
|
name,
|
||||||
|
firstName,
|
||||||
|
lastNames,
|
||||||
|
email,
|
||||||
|
street,
|
||||||
|
city,
|
||||||
|
provinceFk,
|
||||||
|
companyFk,
|
||||||
|
postcode,
|
||||||
|
phone,
|
||||||
|
code,
|
||||||
|
bossFk,
|
||||||
|
birth,
|
||||||
|
payMethodFk,
|
||||||
|
iban,
|
||||||
|
bankEntityFk,
|
||||||
|
isFreelance,
|
||||||
|
options
|
||||||
|
) => {
|
||||||
const models = Self.app.models;
|
const models = Self.app.models;
|
||||||
const myOptions = {userId: ctx.req.accessToken.userId};
|
const myOptions = {userId: ctx.req.accessToken.userId};
|
||||||
const args = ctx.args;
|
|
||||||
|
|
||||||
let tx;
|
let tx;
|
||||||
|
|
||||||
if (typeof options == 'object') Object.assign(myOptions, options);
|
if (typeof options == 'object') Object.assign(myOptions, options);
|
||||||
|
@ -132,132 +123,105 @@ module.exports = Self => {
|
||||||
}
|
}
|
||||||
|
|
||||||
let client;
|
let client;
|
||||||
|
let user;
|
||||||
try {
|
try {
|
||||||
client = await models.Client.findOne(
|
client = await models.Client.findOne({where: {fi}}, myOptions);
|
||||||
{
|
const nickname = firstName.concat(' ', lastNames);
|
||||||
where: {fi: args.fi},
|
const {roleFk, businessTypeFk} = await models.WorkerConfig.findOne({fields: ['roleFk', 'businessTypeFk']});
|
||||||
},
|
|
||||||
myOptions
|
|
||||||
);
|
|
||||||
|
|
||||||
if (!client) {
|
if (!isFreelance && !payMethodFk) throw new UserError('Payment method is required');
|
||||||
const nickname = args.firstName.concat(' ', args.lastNames);
|
|
||||||
const workerConfig = await models.WorkerConfig.findOne({fields: ['roleFk', 'businessTypeFk']});
|
|
||||||
const [randomPassword] = await models.Worker.rawSql(
|
|
||||||
'SELECT account.passwordGenerate() as password;'
|
|
||||||
);
|
|
||||||
|
|
||||||
const user = await models.VnUser.create(
|
if (isFreelance || !client) {
|
||||||
{
|
const [{password}] = await models.Worker.rawSql('SELECT account.passwordGenerate() as password;');
|
||||||
name: args.name,
|
const freelancer = isFreelance && await models.VnRole.findOne({fields: ['id'], where: {name: 'freelancer'}});
|
||||||
nickname,
|
|
||||||
password: randomPassword.password,
|
|
||||||
email: args.email,
|
|
||||||
roleFk: workerConfig.roleFk,
|
|
||||||
},
|
|
||||||
myOptions
|
|
||||||
);
|
|
||||||
|
|
||||||
await models.Account.create(
|
user = await models.VnUser.create({
|
||||||
{
|
name,
|
||||||
id: user.id,
|
nickname,
|
||||||
},
|
password,
|
||||||
myOptions
|
email,
|
||||||
);
|
roleFk: freelancer ? freelancer.id : roleFk,
|
||||||
|
}, myOptions);
|
||||||
|
|
||||||
const payMethod = await models.PayMethod.findById(args.payMethodFk, {fields: ['isIbanRequiredForClients']});
|
await models.Account.create({
|
||||||
if (payMethod.isIbanRequiredForClients && !args.iban)
|
id: user.id
|
||||||
throw new UserError(`That payment method requires an IBAN`);
|
}, myOptions);
|
||||||
|
} else if (client) user = await models.VnUser.findById(client.id, null, myOptions);
|
||||||
|
|
||||||
await models.Worker.rawSql(
|
if (!client && !isFreelance) {
|
||||||
'CALL vn.client_create(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)',
|
const payMethod = await models.PayMethod.findById(payMethodFk, {fields: ['isIbanRequiredForClients']});
|
||||||
|
if (payMethod.isIbanRequiredForClients && !iban) throw new UserError('That payment method requires an IBAN');
|
||||||
|
|
||||||
|
await models.Worker.rawSql('CALL vn.client_create(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)',
|
||||||
[
|
[
|
||||||
args.firstName,
|
firstName,
|
||||||
args.lastNames,
|
lastNames,
|
||||||
args.fi,
|
fi,
|
||||||
args.street,
|
street,
|
||||||
args.postcode,
|
postcode,
|
||||||
args.city,
|
city,
|
||||||
args.provinceFk,
|
provinceFk,
|
||||||
args.companyFk,
|
companyFk,
|
||||||
args.phone,
|
phone,
|
||||||
args.email,
|
email,
|
||||||
user.id,
|
user.id,
|
||||||
],
|
],
|
||||||
myOptions
|
myOptions);
|
||||||
);
|
|
||||||
|
|
||||||
const address = await models.Address.create(
|
const address = await models.Address.create({
|
||||||
{
|
clientFk: user.id,
|
||||||
clientFk: user.id,
|
street: street,
|
||||||
street: args.street,
|
city: city,
|
||||||
city: args.city,
|
provinceFk: provinceFk,
|
||||||
provinceFk: args.provinceFk,
|
postalCode: postcode,
|
||||||
postalCode: args.postcode,
|
mobile: phone,
|
||||||
mobile: args.phone,
|
nickname: nickname,
|
||||||
nickname: nickname,
|
isDefaultAddress: true,
|
||||||
isDefaultAddress: true,
|
}, myOptions);
|
||||||
},
|
|
||||||
myOptions
|
|
||||||
);
|
|
||||||
|
|
||||||
client = await models.Client.findById(
|
client = await models.Client.findById(user.id, {
|
||||||
user.id,
|
fields: ['id', 'name', 'socialName', 'street', 'city', 'iban', 'bankEntityFk', 'defaultAddressFk', 'businessTypeFk', 'fi']
|
||||||
{fields: ['id', 'name', 'socialName', 'street', 'city', 'iban', 'bankEntityFk', 'defaultAddressFk', 'businessTypeFk', 'fi']},
|
}, myOptions);
|
||||||
myOptions
|
|
||||||
);
|
|
||||||
|
|
||||||
await client.updateAttributes(
|
await client.updateAttributes({
|
||||||
{
|
payMethod: payMethodFk,
|
||||||
payMethod: args.payMethod,
|
iban,
|
||||||
iban: args.iban,
|
bankEntityFk,
|
||||||
bankEntityFk: args.bankEntityFk,
|
defaultAddressFk: address.id,
|
||||||
defaultAddressFk: address.id,
|
businessTypeFk,
|
||||||
businessTypeFk: workerConfig.businessTypeFk,
|
}, myOptions);
|
||||||
},
|
|
||||||
myOptions
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const user = await models.VnUser.findById(client.id, null, myOptions);
|
await user.updateAttribute('email', email, myOptions);
|
||||||
await user.updateAttribute('email', args.email, myOptions);
|
|
||||||
|
|
||||||
await models.Worker.create({
|
await models.Worker.create({
|
||||||
id: client.id,
|
id: user.id,
|
||||||
code: args.code,
|
firstName,
|
||||||
firstName: args.firstName,
|
lastName: lastNames,
|
||||||
lastName: args.lastNames,
|
code,
|
||||||
bossFk: args.bossFk,
|
bossFk,
|
||||||
fi: args.fi,
|
fi,
|
||||||
birth: args.birth,
|
birth,
|
||||||
|
|
||||||
}, myOptions);
|
}, myOptions);
|
||||||
|
|
||||||
if (tx) await tx.commit();
|
if (tx) await tx.commit();
|
||||||
} catch (error) {
|
} catch (e) {
|
||||||
if (tx) await tx.rollback();
|
if (tx) await tx.rollback();
|
||||||
const code = error.code;
|
const code = e.code;
|
||||||
const message = error.sqlMessage;
|
const message = e.sqlMessage;
|
||||||
|
|
||||||
if (error.message && error.message.includes(`Email already exists`))
|
if (e.message && e.message.includes(`Email already exists`)) throw new UserError(`This personal mail already exists`);
|
||||||
throw new UserError(`This personal mail already exists`);
|
|
||||||
|
|
||||||
if (code === 'ER_DUP_ENTRY' && message.includes(`CodigoTrabajador_UNIQUE`))
|
if (code === 'ER_DUP_ENTRY' && message.includes(`CodigoTrabajador_UNIQUE`)) throw new UserError(`This worker code already exists`);
|
||||||
throw new UserError(`This worker code already exists`);
|
|
||||||
|
|
||||||
if (code === 'ER_DUP_ENTRY' && message.includes(`PRIMARY`))
|
if (code === 'ER_DUP_ENTRY' && message.includes(`PRIMARY`)) throw new UserError(`This worker already exists`);
|
||||||
throw new UserError(`This worker already exists`);
|
|
||||||
|
|
||||||
throw error;
|
throw e;
|
||||||
}
|
}
|
||||||
|
|
||||||
await models.VnUser.resetPassword({
|
await models.VnUser.resetPassword({email, emailTemplate: 'worker-welcome', id: user.id});
|
||||||
email: args.email,
|
|
||||||
emailTemplate: 'worker-welcome',
|
|
||||||
id: client.id
|
|
||||||
});
|
|
||||||
|
|
||||||
return {id: client.id};
|
return {id: user.id};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,189 +1,114 @@
|
||||||
const models = require('vn-loopback/server/server').models;
|
const {models} = require('vn-loopback/server/server');
|
||||||
const LoopBackContext = require('loopback-context');
|
const LoopBackContext = require('loopback-context');
|
||||||
|
|
||||||
describe('Worker new', () => {
|
describe('Worker new', () => {
|
||||||
beforeAll(async() => {
|
const developerId = 9;
|
||||||
const activeCtx = {
|
|
||||||
accessToken: {userId: 9},
|
|
||||||
http: {
|
|
||||||
req: {
|
|
||||||
headers: {origin: 'http://localhost'}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
spyOn(LoopBackContext, 'getCurrentContext').and.returnValue({
|
|
||||||
active: activeCtx
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
const employeeId = 1;
|
const employeeId = 1;
|
||||||
const defaultWorker = {
|
const bruceWayneId = 1101;
|
||||||
fi: '78457139E',
|
const accessToken = {accessToken: {userId: developerId}};
|
||||||
name: 'defaulterworker',
|
const ctx = {req: accessToken};
|
||||||
firstName: 'DEFAULT',
|
let tx;
|
||||||
lastNames: 'WORKER',
|
let opts;
|
||||||
email: 'defaultWorker@mydomain.com',
|
|
||||||
street: 'S/ DEFAULTWORKERSTREET',
|
|
||||||
city: 'defaultWorkerCity',
|
|
||||||
provinceFk: 1,
|
|
||||||
companyFk: 442,
|
|
||||||
postcode: '46680',
|
|
||||||
phone: '123456789',
|
|
||||||
code: 'DWW',
|
|
||||||
bossFk: 9,
|
|
||||||
birth: '2022-12-11T23:00:00.000Z',
|
|
||||||
payMethodFk: 1,
|
|
||||||
roleFk: 1
|
|
||||||
};
|
|
||||||
|
|
||||||
const req = {accessToken: {userId: 9}};
|
beforeAll(async() => {
|
||||||
|
const activeCtx = {accessToken, http: {req: {headers: {origin: 'http://localhost'}}}};
|
||||||
it('should return error if personal mail already exists', async() => {
|
spyOn(LoopBackContext, 'getCurrentContext').and.returnValue({active: activeCtx});
|
||||||
const user = await models.VnUser.findById(employeeId, {fields: ['email']});
|
|
||||||
|
|
||||||
const tx = await models.Worker.beginTransaction({});
|
|
||||||
|
|
||||||
let error;
|
|
||||||
try {
|
|
||||||
const options = {transaction: tx};
|
|
||||||
const ctx = {
|
|
||||||
args: Object.assign({}, defaultWorker, {email: user.email}),
|
|
||||||
req
|
|
||||||
};
|
|
||||||
|
|
||||||
await models.Worker.new(ctx, options);
|
|
||||||
|
|
||||||
await tx.rollback();
|
|
||||||
} catch (e) {
|
|
||||||
error = e;
|
|
||||||
await tx.rollback();
|
|
||||||
}
|
|
||||||
|
|
||||||
expect(error.message).toEqual('This personal mail already exists');
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should return error if worker code already exists', async() => {
|
describe('should return error', () => {
|
||||||
const worker = await models.Worker.findById(employeeId, {fields: ['code']});
|
beforeEach(async() => {
|
||||||
|
tx = await models.Worker.beginTransaction({});
|
||||||
const tx = await models.Worker.beginTransaction({});
|
opts = {transaction: tx};
|
||||||
|
|
||||||
let error;
|
|
||||||
try {
|
|
||||||
const options = {transaction: tx};
|
|
||||||
const ctx = {
|
|
||||||
args: Object.assign({}, defaultWorker, {code: worker.code}),
|
|
||||||
req
|
|
||||||
};
|
|
||||||
|
|
||||||
await models.Worker.new(ctx, options);
|
|
||||||
|
|
||||||
await tx.rollback();
|
|
||||||
} catch (e) {
|
|
||||||
error = e;
|
|
||||||
await tx.rollback();
|
|
||||||
}
|
|
||||||
|
|
||||||
expect(error.message).toEqual('This worker code already exists');
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should return error if worker already exists', async() => {
|
|
||||||
const worker = await models.Client.findById(employeeId, {fields: ['fi']});
|
|
||||||
|
|
||||||
const tx = await models.Worker.beginTransaction({});
|
|
||||||
|
|
||||||
let error;
|
|
||||||
try {
|
|
||||||
const options = {transaction: tx};
|
|
||||||
const ctx = {
|
|
||||||
args: Object.assign({}, defaultWorker, {fi: worker.fi}),
|
|
||||||
req
|
|
||||||
};
|
|
||||||
await models.Worker.new(ctx, options);
|
|
||||||
|
|
||||||
await tx.rollback();
|
|
||||||
} catch (e) {
|
|
||||||
error = e;
|
|
||||||
await tx.rollback();
|
|
||||||
}
|
|
||||||
|
|
||||||
expect(error.message).toEqual('This worker already exists');
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should return error if payMethod require iban', async() => {
|
|
||||||
const payMethodIbanRequired = await models.PayMethod.findOne({
|
|
||||||
where: {
|
|
||||||
isIbanRequiredForClients: true
|
|
||||||
},
|
|
||||||
fields: ['id']
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const tx = await models.Worker.beginTransaction({});
|
afterEach(async() => await tx.rollback());
|
||||||
|
|
||||||
let error;
|
it('if personal mail already exists', async() => {
|
||||||
try {
|
const user = await models.VnUser.findById(employeeId, {fields: ['email']});
|
||||||
const options = {transaction: tx};
|
try {
|
||||||
const ctx = {
|
await createWorker(ctx, opts, {email: user.email});
|
||||||
args: Object.assign({}, defaultWorker, {payMethodFk: payMethodIbanRequired.id}),
|
} catch (e) {
|
||||||
req
|
expect(e.message).toEqual('This personal mail already exists');
|
||||||
};
|
}
|
||||||
await models.Worker.new(ctx, options);
|
});
|
||||||
|
|
||||||
await tx.rollback();
|
it('if worker code already exists', async() => {
|
||||||
} catch (e) {
|
const worker = await models.Worker.findById(employeeId, {fields: ['code']});
|
||||||
error = e;
|
try {
|
||||||
await tx.rollback();
|
await createWorker(ctx, opts, {code: worker.code});
|
||||||
}
|
} catch (e) {
|
||||||
|
expect(e.message).toEqual('This worker code already exists');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
expect(error.message).toEqual('That payment method requires an IBAN');
|
it('if worker already exists', async() => {
|
||||||
|
const worker = await models.Client.findById(employeeId, {fields: ['fi']});
|
||||||
|
try {
|
||||||
|
await createWorker(ctx, opts, {fi: worker.fi});
|
||||||
|
} catch (e) {
|
||||||
|
expect(e.message).toEqual('This worker already exists');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
it('if payMethod require iban', async() => {
|
||||||
|
const payMethodIbanRequired = await models.PayMethod.findOne({
|
||||||
|
fields: ['id'], where: {isIbanRequiredForClients: true}
|
||||||
|
});
|
||||||
|
|
||||||
|
try {
|
||||||
|
await createWorker(ctx, opts, {payMethodFk: payMethodIbanRequired.id});
|
||||||
|
} catch (e) {
|
||||||
|
expect(e.message).toEqual('That payment method requires an IBAN');
|
||||||
|
}
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should create a new worker', async() => {
|
it('should create a new worker', async() => {
|
||||||
let newWorker;
|
let newWorker;
|
||||||
try {
|
try {
|
||||||
newWorker = await models.Worker.new({args: defaultWorker, req});
|
newWorker = await createWorker(ctx);
|
||||||
|
|
||||||
|
expect(newWorker.id).toBeDefined();
|
||||||
} finally {
|
} finally {
|
||||||
await removeWorker(newWorker.id);
|
await removeWorker(newWorker.id);
|
||||||
}
|
}
|
||||||
|
|
||||||
expect(newWorker.id).toBeDefined();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should create a new client', async() => {
|
it('should create a new client', async() => {
|
||||||
let newWorker;
|
let newWorker;
|
||||||
let client;
|
|
||||||
try {
|
try {
|
||||||
newWorker = await models.Worker.new({args: defaultWorker, req});
|
newWorker = await createWorker(ctx);
|
||||||
client = await models.Client.findById(newWorker.id);
|
let client = await models.Client.findById(newWorker.id);
|
||||||
|
|
||||||
|
expect(client).toBeDefined();
|
||||||
} finally {
|
} finally {
|
||||||
await removeWorker(newWorker.id);
|
await removeWorker(newWorker.id);
|
||||||
}
|
}
|
||||||
|
|
||||||
expect(client).toBeDefined();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should create a new worker in client', async() => {
|
it('should create a new worker in client', async() => {
|
||||||
const bruceWayneId = 1101;
|
|
||||||
const client = await models.Client.findById(bruceWayneId, {fields: ['fi', 'email']});
|
const client = await models.Client.findById(bruceWayneId, {fields: ['fi', 'email']});
|
||||||
|
|
||||||
const newWorkerData = {
|
|
||||||
args: Object.assign(
|
|
||||||
{},
|
|
||||||
defaultWorker,
|
|
||||||
{
|
|
||||||
fi: client.fi,
|
|
||||||
email: client.email
|
|
||||||
}),
|
|
||||||
req
|
|
||||||
};
|
|
||||||
let newWorker;
|
let newWorker;
|
||||||
try {
|
try {
|
||||||
newWorker = await models.Worker.new(newWorkerData);
|
newWorker = await createWorker(ctx, undefined, {fi: client.fi, email: client.email});
|
||||||
|
|
||||||
|
expect(newWorker.id).toEqual(bruceWayneId);
|
||||||
} finally {
|
} finally {
|
||||||
await models.Worker.destroyById(newWorker.id);
|
await models.Worker.destroyById(newWorker.id);
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
|
||||||
expect(newWorker.id).toEqual(bruceWayneId);
|
it('should create a new external worker', async() => {
|
||||||
|
let newWorker;
|
||||||
|
try {
|
||||||
|
newWorker = await createWorker(ctx, undefined, {isFreelance: true});
|
||||||
|
const client = await models.Client.findById(newWorker.id);
|
||||||
|
|
||||||
|
expect(newWorker.id).toBeDefined();
|
||||||
|
expect(client).toBeNull();
|
||||||
|
} finally {
|
||||||
|
await removeWorker(newWorker.id);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -194,3 +119,28 @@ async function removeWorker(id) {
|
||||||
await models.Client.destroyById(id);
|
await models.Client.destroyById(id);
|
||||||
await models.VnUser.destroyById(id);
|
await models.VnUser.destroyById(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function createWorker(ctx, opts = undefined, params = {}) {
|
||||||
|
return models.Worker.new(
|
||||||
|
ctx,
|
||||||
|
params.fi ?? '78457139E',
|
||||||
|
params.name ?? 'defaulterworker',
|
||||||
|
params.firstName ?? 'DEFAULT',
|
||||||
|
params.lastNames ?? 'WORKER',
|
||||||
|
params.email ?? 'defaultWorker@mydomain.com',
|
||||||
|
params.street ?? 'S/ DEFAULTWORKERSTREET',
|
||||||
|
params.city ?? 'defaultWorkerCity',
|
||||||
|
params.provinceFk ?? 1,
|
||||||
|
params.companyFk ?? 442,
|
||||||
|
params.postcode ?? '46680',
|
||||||
|
params.phone ?? '123456789',
|
||||||
|
params.code ?? 'DWW',
|
||||||
|
params.bossFk ?? 9,
|
||||||
|
params.birth ?? '2022-12-11T23:00:00.000Z',
|
||||||
|
params.payMethodFk ?? 1,
|
||||||
|
undefined,
|
||||||
|
undefined,
|
||||||
|
params.isFreelance ?? false,
|
||||||
|
opts
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
|
@ -25,43 +25,44 @@
|
||||||
"required": true
|
"required": true
|
||||||
},
|
},
|
||||||
"phone": {
|
"phone": {
|
||||||
"type" : "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"bossFk": {
|
"bossFk": {
|
||||||
"type" : "number"
|
"type": "number"
|
||||||
},
|
},
|
||||||
"maritalStatus": {
|
"maritalStatus": {
|
||||||
"type" : "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"originCountryFk": {
|
"originCountryFk": {
|
||||||
"type" : "number"
|
"type": "number"
|
||||||
},
|
},
|
||||||
"educationLevelFk": {
|
"educationLevelFk": {
|
||||||
"type" : "number"
|
"type": "number"
|
||||||
},
|
},
|
||||||
"SSN": {
|
"SSN": {
|
||||||
"type" : "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"mobileExtension": {
|
"mobileExtension": {
|
||||||
"type" : "number"
|
"type": "number"
|
||||||
},
|
},
|
||||||
"code": {
|
"code": {
|
||||||
"type" : "string"
|
"type": "string",
|
||||||
|
"required": true
|
||||||
},
|
},
|
||||||
"fi": {
|
"fi": {
|
||||||
"type" : "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"birth": {
|
"birth": {
|
||||||
"type" : "date"
|
"type": "date"
|
||||||
},
|
},
|
||||||
"isF11Allowed": {
|
"isF11Allowed": {
|
||||||
"type" : "boolean"
|
"type": "boolean"
|
||||||
},
|
},
|
||||||
"sex": {
|
"sex": {
|
||||||
"type" : "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"isFreelance": {
|
"isFreelance": {
|
||||||
"type" : "boolean"
|
"type": "boolean"
|
||||||
},
|
},
|
||||||
"fiDueDate": {
|
"fiDueDate": {
|
||||||
"type": "date"
|
"type": "date"
|
||||||
|
@ -78,7 +79,6 @@
|
||||||
"isSsDiscounted": {
|
"isSsDiscounted": {
|
||||||
"type": "boolean"
|
"type": "boolean"
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
"relations": {
|
"relations": {
|
||||||
"user": {
|
"user": {
|
||||||
|
@ -117,7 +117,7 @@
|
||||||
"foreignKey": "workerFk"
|
"foreignKey": "workerFk"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"acls":[
|
"acls": [
|
||||||
{
|
{
|
||||||
"property": "__get__locker",
|
"property": "__get__locker",
|
||||||
"accessType": "READ",
|
"accessType": "READ",
|
||||||
|
@ -126,4 +126,4 @@
|
||||||
"principalId": "$owner"
|
"principalId": "$owner"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue