Merge branch 'master' into 7781-fixPalletMerge
gitea/salix/pipeline/pr-master Build queued...
Details
gitea/salix/pipeline/pr-master Build queued...
Details
This commit is contained in:
commit
25ff498a0b
110
CHANGELOG.md
110
CHANGELOG.md
|
@ -1,3 +1,113 @@
|
|||
# Version 24.36 - 2024-09-03
|
||||
|
||||
### Added 🆕
|
||||
|
||||
- chore: refs #7524 WIP limit call by:jorgep
|
||||
- chore: refs #7524 modify ormConfig table col (origin/7524-warmfix-modifyColumn) by:jorgep
|
||||
- feat(update-user): refs #7848 add twoFactor by:alexm
|
||||
- feat: #3199 Requested changes by:guillermo
|
||||
- feat: refs #3199 Added more scopes ticket_recalcByScope by:guillermo
|
||||
- feat: refs #3199 Added one more scope ticket_recalcByScope by:guillermo
|
||||
- feat: refs #3199 Created ticket_recalcItemTaxCountryByScope by:guillermo
|
||||
- feat: refs #3199 Requested changes by:guillermo
|
||||
- feat: refs #7346 add multiple feature by:jgallego
|
||||
- feat: refs #7346 backTest checks new implementation by:jgallego
|
||||
- feat: refs #7346 mas intuitivo by:jgallego
|
||||
- feat: refs #7514 Changes to put srt log (origin/7514-srtLog) by:guillermo
|
||||
- feat: refs #7524 add default limit (origin/7524-limitSelect) by:jorgep
|
||||
- feat: refs #7524 add mock limit on find query by:jorgep
|
||||
- feat: refs #7524 wip remote hooks by:jorgep
|
||||
- feat: refs #7562 Requested changes by:guillermo
|
||||
- feat: refs #7567 Changed time to call event by:guillermo
|
||||
- feat: refs #7567 Requested changes by:guillermo
|
||||
- feat: refs #7710 pr revision by:jgallego
|
||||
- feat: refs #7710 test fixed (origin/7710-cloneWithTicketPackaging, 7710-cloneWithTicketPackaging) by:jgallego
|
||||
- feat: refs #7712 Fix by:guillermo
|
||||
- feat: refs #7712 Unify by:guillermo
|
||||
- feat: refs #7712 sizeLimit (origin/7712-sizeLimit) by:guillermo
|
||||
- feat: refs #7758 Add code mandateType and accountDetailType by:ivanm
|
||||
- feat: refs #7758 Modify code lowerCamelCase and UNIQUE by:ivanm
|
||||
- feat: refs #7758 accountDetailType fix deploy error by:ivanm
|
||||
- feat: refs #7784 Changes in entry-order-pdf by:guillermo
|
||||
- feat: refs #7784 Requested changes by:guillermo
|
||||
- feat: refs #7799 Added Fk in vn.item.itemPackingTypeFk by:guillermo
|
||||
- feat: refs #7800 Added company Fk by:guillermo
|
||||
- feat: refs #7842 Added editorFk in vn.host by:guillermo
|
||||
- feat: refs #7860 Update new packagings (origin/7860-newPackaging) by:guillermo
|
||||
- feat: refs #7862 roadmap new fields by:ivanm
|
||||
- feat: refs #7882 Added quadMindsConfig table by:guillermo
|
||||
|
||||
### Changed 📦
|
||||
|
||||
- refactor: refs #7567 Fix and improvement by:guillermo
|
||||
- refactor: refs #7567 Minor change by:guillermo
|
||||
- refactor: refs #7756 Fix tests by:guillermo
|
||||
- refactor: refs #7798 Drop bi.Greuges_comercial_detail by:guillermo
|
||||
- refactor: refs #7848 adapt to lilium by:alexm
|
||||
|
||||
### Fixed 🛠️
|
||||
|
||||
- feat: refs #7710 test fixed (origin/7710-cloneWithTicketPackaging, 7710-cloneWithTicketPackaging) by:jgallego
|
||||
- feat: refs #7758 accountDetailType fix deploy error by:ivanm
|
||||
- fix(salix): #7283 ItemFixedPrice duplicated (origin/7283_itemFixedPrice_duplicated) by:Javier Segarra
|
||||
- fix: refs #7346 minor error (origin/7346, 7346) by:jgallego
|
||||
- fix: refs #7355 remove and tests accounts (origin/7355-accountMigration2) by:carlossa
|
||||
- fix: refs #7355 remove and tests accounts by:carlossa
|
||||
- fix: refs #7524 default limit select by:jorgep
|
||||
- fix: refs #7756 Foreign keys invoiceOut (origin/7756-fixRefFk) by:guillermo
|
||||
- fix: refs #7756 id 0 by:guillermo
|
||||
- fix: refs #7800 tpvMerchantEnable PRIMARY KEY (origin/7800-tpvMerchantEnable) by:guillermo
|
||||
- fix: refs #7800 tpvMerchantEnable PRIMARY KEY by:guillermo
|
||||
- fix: refs #7916 itemShelving_transfer (origin/test, test) by:guillermo
|
||||
- fix: refs #pako Deleted duplicated version by:guillermo
|
||||
|
||||
# Version 24.34 - 2024-08-20
|
||||
|
||||
### Added 🆕
|
||||
|
||||
- #6900 feat: clear empty by:jorgep
|
||||
- #6900 feat: empty commit by:jorgep
|
||||
- chore: refs #6900 beautify code by:jorgep
|
||||
- chore: refs #6989 add config model by:jorgep
|
||||
- feat workerActivity refs #6078 by:sergiodt
|
||||
- feat: #6453 Refactor (origin/6453-orderConfirm) by:guillermo
|
||||
- feat: #6453 Rollback always split by itemPackingType by:guillermo
|
||||
- feat: deleted worker module code & redirect to Lilium by:Jon
|
||||
- feat: refs #6453 Added new ticket search by:guillermo
|
||||
- feat: refs #6453 Fixes by:guillermo
|
||||
- feat: refs #6453 Minor changes by:guillermo
|
||||
- feat: refs #6453 Requested changes by:guillermo
|
||||
- feat: refs #6900 drop section by:jorgep
|
||||
- feat: refs #7283 order by desc date by:jorgep
|
||||
- feat: refs #7323 add locale by:jorgep
|
||||
- feat: refs #7323 redirect to lilium by:jorgep
|
||||
- feat: refs #7646 delete scannableCodeType by:robert
|
||||
- feat: refs #7713 Created ACLLog by:guillermo
|
||||
- feat: refs #7774 (origin/7774-ticket_cloneWeekly) by:robert
|
||||
- feat: refs #7774 #7774 Changes ticket_cloneWeekly by:guillermo
|
||||
- feat: refs #7774 ticket_cloneWeekly by:robert
|
||||
|
||||
### Changed 📦
|
||||
|
||||
- refactor: refs #6453 Major changes by:guillermo
|
||||
- refactor: refs #6453 Minor changes by:guillermo
|
||||
- refactor: refs #6453 order_confirmWithUser by:guillermo
|
||||
- refactor: refs #7646 #7646 Deleted scannable* variables productionConfig by:guillermo
|
||||
- refactor: refs #7820 Deprecated silexACL by:guillermo
|
||||
|
||||
### Fixed 🛠️
|
||||
|
||||
- #6900 fix: #6900 rectificative filter by:jorgep
|
||||
- #6900 fix: empty commit by:jorgep
|
||||
- fix(orders_filter): add sourceApp accepts by:alexm
|
||||
- fix: refs #6130 commit lint by:pablone
|
||||
- fix: refs #6453 order_confirmWithUser by:guillermo
|
||||
- fix: refs #7283 sql by:jorgep
|
||||
- fix: refs #7713 ACL Log by:guillermo
|
||||
- test: fix claim descriptor redirect to lilium by:alexm
|
||||
- test: fix ticket redirect to lilium by:alexm
|
||||
- test: fix ticket sale e2e by:alexm
|
||||
|
||||
# Version 24.32 - 2024-08-06
|
||||
|
||||
### Added 🆕
|
||||
|
|
|
@ -24,6 +24,10 @@ module.exports = Self => {
|
|||
arg: 'lang',
|
||||
type: 'string',
|
||||
description: 'The user lang'
|
||||
}, {
|
||||
arg: 'twoFactor',
|
||||
type: 'string',
|
||||
description: 'The user twoFactor'
|
||||
}
|
||||
],
|
||||
http: {
|
||||
|
@ -32,8 +36,8 @@ module.exports = Self => {
|
|||
}
|
||||
});
|
||||
|
||||
Self.updateUser = async(ctx, id, name, nickname, email, lang) => {
|
||||
Self.updateUser = async(ctx, id, name, nickname, email, lang, twoFactor) => {
|
||||
await Self.userSecurity(ctx, id);
|
||||
await Self.upsertWithWhere({id}, {name, nickname, email, lang});
|
||||
await Self.upsertWithWhere({id}, {name, nickname, email, lang, twoFactor});
|
||||
};
|
||||
};
|
||||
|
|
|
@ -118,6 +118,9 @@
|
|||
"NotificationSubscription": {
|
||||
"dataSource": "vn"
|
||||
},
|
||||
"OrmConfig": {
|
||||
"dataSource": "vn"
|
||||
},
|
||||
"Province": {
|
||||
"dataSource": "vn"
|
||||
},
|
||||
|
|
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
"name": "OrmConfig",
|
||||
"base": "VnModel",
|
||||
"options": {
|
||||
"mysql": {
|
||||
"table": "ormConfig"
|
||||
}
|
||||
},
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "number",
|
||||
"id": true
|
||||
},
|
||||
"selectLimit": {
|
||||
"type": "number"
|
||||
}
|
||||
},
|
||||
"acls": [
|
||||
{
|
||||
"accessType": "*",
|
||||
"principalType": "ROLE",
|
||||
"principalId": "$authenticated",
|
||||
"permission": "ALLOW"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -101,9 +101,10 @@ module.exports = function(Self) {
|
|||
const headers = httpRequest.headers;
|
||||
const origin = headers.origin;
|
||||
|
||||
const defaultHash = '/reset-password?access_token=$token$';
|
||||
const defaultHash = '!/reset-password?access_token=$token$';
|
||||
const recoverHashes = {
|
||||
hedera: 'verificationToken=$token$'
|
||||
hedera: '!verificationToken=$token$',
|
||||
lilium: '/resetPassword?access_token=$token$'
|
||||
};
|
||||
|
||||
const app = info.options?.app;
|
||||
|
@ -115,7 +116,7 @@ module.exports = function(Self) {
|
|||
const params = {
|
||||
recipient: info.email,
|
||||
lang: user.lang,
|
||||
url: origin + '/#!' + recoverHash
|
||||
url: origin + '/#' + recoverHash
|
||||
};
|
||||
|
||||
const options = Object.assign({}, info.options);
|
||||
|
|
|
@ -3,7 +3,7 @@ USE `util`;
|
|||
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
|
||||
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
|
||||
|
||||
INSERT INTO `version` VALUES ('vn-database','11180','2a5588f013dbb6370e15754e03a6d9f1d74188e2','2024-08-20 08:34:44','11191');
|
||||
INSERT INTO `version` VALUES ('vn-database','11209','3cc19549e4a9d61542b5ba906ccaf9fc90a805ce','2024-09-03 15:04:20','11212');
|
||||
|
||||
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);
|
||||
|
@ -896,6 +896,9 @@ INSERT INTO `versionLog` VALUES ('vn-database','11137','00-firstScript.sql','jen
|
|||
INSERT INTO `versionLog` VALUES ('vn-database','11138','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-07-23 08:23:34',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11139','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-07-08 10:58:01',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11140','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-07-23 08:23:34',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11141','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-09-03 08:39:07',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11142','00-invoiceOutSerialColumn.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-09-03 08:39:07',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11142','01-invoiceOutSerialUpdate.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-09-03 08:39:07',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11145','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-07-09 13:55:46',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11146','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-08-06 07:53:54',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11149','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-07-23 08:23:35',NULL,NULL);
|
||||
|
@ -915,10 +918,45 @@ INSERT INTO `versionLog` VALUES ('vn-database','11166','00-firstScript.sql','jen
|
|||
INSERT INTO `versionLog` VALUES ('vn-database','11168','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-07-25 08:58:34',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11169','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-07-25 12:38:13',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11170','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-08-09 07:12:38',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11171','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-09-03 08:39:07',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11172','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-09-03 08:39:07',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11172','01-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-09-03 08:39:07',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11172','02-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-09-03 08:39:07',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11172','03-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-09-03 08:39:07',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11172','04-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-09-03 08:39:07',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11172','05-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-09-03 08:39:08',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11172','06-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-09-03 08:39:08',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11172','07-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-09-03 08:40:15',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11172','08-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-09-03 08:54:58',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11172','09-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-09-03 08:55:00',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11172','10-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-09-03 08:55:16',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11172','11-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-09-03 08:57:20',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11172','12-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-09-03 08:57:20',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11172','13-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-09-03 08:57:20',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11172','14-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-09-03 08:57:25',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11172','15-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-09-03 08:57:44',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11175','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-09-03 08:57:44',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11177','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-07-30 12:42:28',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11179','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-08-20 08:34:43',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11180','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-08-20 08:34:43',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11182','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-08-09 08:19:36',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11185','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-09-03 08:57:44',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11187','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-09-03 08:57:44',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11189','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-09-03 08:58:00',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11190','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-09-03 08:58:00',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11191','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-09-03 08:58:00',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11191','01-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-09-03 08:58:01',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11191','02-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-09-03 08:58:01',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11192','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-09-03 08:58:01',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11193','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-09-03 08:58:01',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11193','01-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-09-03 08:58:01',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11193','02-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-09-03 08:58:01',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11194','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-09-03 08:58:01',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11195','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-09-03 08:58:01',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11197','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-09-03 08:58:01',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11201','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-08-27 13:04:26',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11204','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-09-03 08:58:01',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11209','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-09-03 08:58:01',NULL,NULL);
|
||||
|
||||
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
|
||||
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
|
||||
|
@ -1428,7 +1466,7 @@ INSERT INTO `ACL` VALUES (157,'Calendar','absences','READ','ALLOW','ROLE','emplo
|
|||
INSERT INTO `ACL` VALUES (158,'ItemTag','*','WRITE','ALLOW','ROLE','accessory',NULL);
|
||||
INSERT INTO `ACL` VALUES (160,'TicketServiceType','*','READ','ALLOW','ROLE','employee',NULL);
|
||||
INSERT INTO `ACL` VALUES (161,'TicketConfig','*','READ','ALLOW','ROLE','employee',NULL);
|
||||
INSERT INTO `ACL` VALUES (162,'InvoiceOut','delete','WRITE','ALLOW','ROLE','invoicing',NULL);
|
||||
INSERT INTO `ACL` VALUES (162,'InvoiceOut','delete','WRITE','ALLOW','ROLE','adminBoss',783);
|
||||
INSERT INTO `ACL` VALUES (163,'InvoiceOut','book','WRITE','ALLOW','ROLE','invoicing',NULL);
|
||||
INSERT INTO `ACL` VALUES (165,'TicketDms','*','*','ALLOW','ROLE','employee',NULL);
|
||||
INSERT INTO `ACL` VALUES (167,'Worker','isSubordinate','READ','ALLOW','ROLE','employee',NULL);
|
||||
|
@ -1551,9 +1589,8 @@ INSERT INTO `ACL` VALUES (320,'ItemType','*','WRITE','ALLOW','ROLE','buyer',NULL
|
|||
INSERT INTO `ACL` VALUES (321,'InvoiceOut','refund','WRITE','ALLOW','ROLE','invoicing',NULL);
|
||||
INSERT INTO `ACL` VALUES (322,'InvoiceOut','refund','WRITE','ALLOW','ROLE','salesAssistant',NULL);
|
||||
INSERT INTO `ACL` VALUES (323,'InvoiceOut','refund','WRITE','ALLOW','ROLE','claimManager',NULL);
|
||||
INSERT INTO `ACL` VALUES (324,'Ticket','refund','WRITE','ALLOW','ROLE','invoicing',NULL);
|
||||
INSERT INTO `ACL` VALUES (325,'Ticket','refund','WRITE','ALLOW','ROLE','salesAssistant',NULL);
|
||||
INSERT INTO `ACL` VALUES (326,'Ticket','refund','WRITE','ALLOW','ROLE','claimManager',NULL);
|
||||
INSERT INTO `ACL` VALUES (324,'Ticket','cloneAll','WRITE','ALLOW','ROLE','invoicing',10578);
|
||||
INSERT INTO `ACL` VALUES (326,'Ticket','cloneAll','WRITE','ALLOW','ROLE','claimManager',10578);
|
||||
INSERT INTO `ACL` VALUES (327,'Sale','clone','WRITE','ALLOW','ROLE','salesAssistant',NULL);
|
||||
INSERT INTO `ACL` VALUES (328,'Sale','clone','WRITE','ALLOW','ROLE','claimManager',NULL);
|
||||
INSERT INTO `ACL` VALUES (329,'TicketRefund','*','WRITE','ALLOW','ROLE','invoicing',NULL);
|
||||
|
@ -1841,7 +1878,7 @@ INSERT INTO `ACL` VALUES (626,'Ticket','collectionLabel','READ','ALLOW','ROLE','
|
|||
INSERT INTO `ACL` VALUES (628,'Ticket','expeditionPalletLabel','READ','ALLOW','ROLE','employee',NULL);
|
||||
INSERT INTO `ACL` VALUES (629,'Ticket','editDiscount','WRITE','ALLOW','ROLE','artificialBoss',NULL);
|
||||
INSERT INTO `ACL` VALUES (630,'Claim','claimPickupEmail','WRITE','ALLOW','ROLE','salesTeamBoss',NULL);
|
||||
INSERT INTO `ACL` VALUES (635,'Ticket','updateAttributes','WRITE','ALLOW','ROLE','administrative',NULL);
|
||||
INSERT INTO `ACL` VALUES (635,'Ticket','updateAttributes','WRITE','ALLOW','ROLE','administrative',19295);
|
||||
INSERT INTO `ACL` VALUES (636,'Claim','claimPickupEmail','WRITE','ALLOW','ROLE','salesPerson',NULL);
|
||||
INSERT INTO `ACL` VALUES (637,'Claim','downloadFile','READ','ALLOW','ROLE','salesPerson',NULL);
|
||||
INSERT INTO `ACL` VALUES (638,'Agency','seeExpired','READ','ALLOW','ROLE','artificialBoss',NULL);
|
||||
|
@ -1871,7 +1908,7 @@ INSERT INTO `ACL` VALUES (688,'ClientSms','create','WRITE','ALLOW','ROLE','emplo
|
|||
INSERT INTO `ACL` VALUES (689,'Vehicle','sorted','WRITE','ALLOW','ROLE','employee',NULL);
|
||||
INSERT INTO `ACL` VALUES (695,'ViaexpressConfig','internationalExpedition','WRITE','ALLOW','ROLE','employee',NULL);
|
||||
INSERT INTO `ACL` VALUES (696,'ViaexpressConfig','renderer','READ','ALLOW','ROLE','employee',NULL);
|
||||
INSERT INTO `ACL` VALUES (697,'Ticket','transferClient','WRITE','ALLOW','ROLE','administrative',NULL);
|
||||
INSERT INTO `ACL` VALUES (697,'Ticket','transferClient','WRITE','ALLOW','ROLE','claimManager',19295);
|
||||
INSERT INTO `ACL` VALUES (698,'Ticket','canEditWeekly','WRITE','ALLOW','ROLE','buyer',NULL);
|
||||
INSERT INTO `ACL` VALUES (699,'TicketSms','find','READ','ALLOW','ROLE','salesPerson',NULL);
|
||||
INSERT INTO `ACL` VALUES (701,'Docuware','upload','WRITE','ALLOW','ROLE','deliveryAssistant',NULL);
|
||||
|
@ -1991,7 +2028,6 @@ INSERT INTO `ACL` VALUES (817,'ParkingLog','*','READ','ALLOW','ROLE','employee',
|
|||
INSERT INTO `ACL` VALUES (818,'ExpeditionPallet','*','*','ALLOW','ROLE','production',NULL);
|
||||
INSERT INTO `ACL` VALUES (819,'Ticket','addSaleByCode','WRITE','ALLOW','ROLE','production',NULL);
|
||||
INSERT INTO `ACL` VALUES (820,'TicketCollection','*','READ','ALLOW','ROLE','production',NULL);
|
||||
INSERT INTO `ACL` VALUES (821,'Ticket','clone','WRITE','ALLOW','ROLE','administrative',NULL);
|
||||
INSERT INTO `ACL` VALUES (822,'SupplierDms','*','*','ALLOW','ROLE','employee',NULL);
|
||||
INSERT INTO `ACL` VALUES (823,'MailAlias','*','*','ALLOW','ROLE','developerBoss',NULL);
|
||||
INSERT INTO `ACL` VALUES (824,'ItemShelving','hasItemOlder','READ','ALLOW','ROLE','production',NULL);
|
||||
|
@ -2012,7 +2048,7 @@ INSERT INTO `ACL` VALUES (840,'Locker','*','*','ALLOW','ROLE','hr',NULL);
|
|||
INSERT INTO `ACL` VALUES (841,'Locker','*','*','ALLOW','ROLE','productionBoss',NULL);
|
||||
INSERT INTO `ACL` VALUES (842,'Worker','__get__locker','READ','ALLOW','ROLE','hr',NULL);
|
||||
INSERT INTO `ACL` VALUES (843,'Worker','__get__locker','READ','ALLOW','ROLE','productionBoss',NULL);
|
||||
INSERT INTO `ACL` VALUES (846,'Ticket','refund','WRITE','ALLOW','ROLE','logistic',NULL);
|
||||
INSERT INTO `ACL` VALUES (846,'Ticket','cloneAll','WRITE','ALLOW','ROLE','logistic',10578);
|
||||
INSERT INTO `ACL` VALUES (847,'RouteConfig','*','READ','ALLOW','ROLE','employee',NULL);
|
||||
INSERT INTO `ACL` VALUES (848,'InvoiceIn','updateInvoiceIn','WRITE','ALLOW','ROLE','administrative',NULL);
|
||||
INSERT INTO `ACL` VALUES (849,'InvoiceIn','clone','WRITE','ALLOW','ROLE','administrative',NULL);
|
||||
|
@ -2070,6 +2106,7 @@ INSERT INTO `ACL` VALUES (904,'Entry','buyLabel','READ','ALLOW','ROLE','supplier
|
|||
INSERT INTO `ACL` VALUES (905,'AddressWaste','*','READ','ALLOW','ROLE','production',NULL);
|
||||
INSERT INTO `ACL` VALUES (906,'Entry','print','READ','ALLOW','ROLE','supplier',NULL);
|
||||
INSERT INTO `ACL` VALUES (907,'Expedition_PrintOut','*','*','ALLOW','ROLE','production',NULL);
|
||||
INSERT INTO `ACL` VALUES (908,'Docuware','upload','WRITE','ALLOW','ROLE','hrBuyer',13657);
|
||||
|
||||
INSERT INTO `fieldAcl` VALUES (1,'Client','name','update','employee');
|
||||
INSERT INTO `fieldAcl` VALUES (2,'Client','contact','update','employee');
|
||||
|
@ -2364,11 +2401,9 @@ INSERT INTO `component` VALUES (39,'maná auto',7,NULL,NULL,1,'autoMana',0);
|
|||
INSERT INTO `component` VALUES (40,'cambios Santos 2016',4,NULL,NULL,1,NULL,0);
|
||||
INSERT INTO `component` VALUES (41,'bonificacion porte',6,NULL,NULL,1,'freightCharge',0);
|
||||
INSERT INTO `component` VALUES (42,'promocion Francia',4,NULL,NULL,1,'frenchOffer',0);
|
||||
INSERT INTO `component` VALUES (43,'promocion Floramondo',4,NULL,NULL,1,'floramondoPromo',0);
|
||||
INSERT INTO `component` VALUES (44,'rappel cadena',2,NULL,NULL,1,'rappel',0);
|
||||
INSERT INTO `component` VALUES (45,'maná reclamacion',7,4,NULL,0,'manaClaim',0);
|
||||
INSERT INTO `component` VALUES (46,'recargo a particular',2,NULL,0.25,0,'individual',0);
|
||||
INSERT INTO `component` VALUES (47,'promocion Italia',4,NULL,NULL,1,'italianOffer',0);
|
||||
INSERT INTO `component` VALUES (48,'fusión de lineas',4,NULL,NULL,1,'lineFusion',0);
|
||||
INSERT INTO `component` VALUES (49,'sustitución',4,NULL,NULL,1,'substitution',0);
|
||||
|
||||
|
@ -2393,57 +2428,57 @@ INSERT INTO `continent` VALUES (5,'Oceanía','OC');
|
|||
|
||||
INSERT INTO `department` VALUES (1,'VN','VERDNATURA',1,112,763,0,0,0,0,26,NULL,'/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||
INSERT INTO `department` VALUES (22,'shopping','COMPRAS',2,5,NULL,72,0,0,1,1,1,'/1/',NULL,1,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||
INSERT INTO `department` VALUES (23,'CMA','CAMARA',15,16,NULL,72,1,1,2,0,37,'/1/37/',NULL,0,NULL,0,1,1,1,NULL,NULL,NULL,NULL);
|
||||
INSERT INTO `department` VALUES (23,'CMA','CAMARA',15,16,NULL,72,1,1,2,0,37,'/1/37/',NULL,0,NULL,0,1,1,1,NULL,NULL,NULL,'PREVIOUS');
|
||||
INSERT INTO `department` VALUES (31,'it','INFORMATICA',6,7,NULL,72,0,0,1,0,1,'/1/','informatica-cau',1,NULL,1,0,0,0,NULL,NULL,NULL,NULL);
|
||||
INSERT INTO `department` VALUES (34,'accounting','CONTABILIDAD',8,9,NULL,0,0,0,1,0,1,'/1/',NULL,1,NULL,1,0,0,0,NULL,NULL,NULL,NULL);
|
||||
INSERT INTO `department` VALUES (35,'finance','FINANZAS',10,11,NULL,0,0,0,1,0,1,'/1/',NULL,1,'begonya@verdnatura.es',1,0,0,0,NULL,NULL,NULL,NULL);
|
||||
INSERT INTO `department` VALUES (36,'labor','LABORAL',12,13,NULL,0,0,0,1,0,1,'/1/',NULL,1,NULL,1,0,0,0,NULL,NULL,NULL,NULL);
|
||||
INSERT INTO `department` VALUES (37,'PROD','PRODUCCION',14,37,NULL,72,1,1,1,11,1,'/1/',NULL,0,NULL,0,1,1,1,NULL,NULL,NULL,NULL);
|
||||
INSERT INTO `department` VALUES (38,'picking','SACADO',17,18,NULL,72,1,0,2,0,37,'/1/37/',NULL,0,NULL,0,0,0,1,NULL,NULL,NULL,NULL);
|
||||
INSERT INTO `department` VALUES (39,'packing','ENCAJADO',19,20,NULL,72,1,0,2,0,37,'/1/37/',NULL,0,NULL,0,0,0,1,NULL,NULL,NULL,NULL);
|
||||
INSERT INTO `department` VALUES (38,'picking','SACADO',17,18,NULL,72,1,0,2,0,37,'/1/37/',NULL,0,NULL,0,0,0,1,NULL,NULL,NULL,'ON_PREPARATION');
|
||||
INSERT INTO `department` VALUES (39,'packing','ENCAJADO',19,20,NULL,72,1,0,2,0,37,'/1/37/',NULL,0,NULL,0,0,0,1,NULL,NULL,NULL,'PACKING');
|
||||
INSERT INTO `department` VALUES (41,'administration','ADMINISTRACION',38,39,NULL,72,0,0,1,0,1,'/1/',NULL,1,NULL,1,0,0,0,NULL,NULL,NULL,NULL);
|
||||
INSERT INTO `department` VALUES (43,'VT','VENTAS',40,71,NULL,0,0,0,1,15,1,'/1/',NULL,0,NULL,1,0,0,0,NULL,NULL,NULL,NULL);
|
||||
INSERT INTO `department` VALUES (43,'VT','VENTAS',40,71,NULL,0,0,0,1,15,1,'/1/',NULL,1,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||
INSERT INTO `department` VALUES (44,'management','GERENCIA',72,73,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||
INSERT INTO `department` VALUES (45,'logistic','LOGISTICA',74,75,NULL,72,0,0,1,0,1,'/1/',NULL,1,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||
INSERT INTO `department` VALUES (46,'delivery','REPARTO',76,77,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,0,1,0,0,NULL,NULL,NULL,NULL);
|
||||
INSERT INTO `department` VALUES (48,'storage','ALMACENAJE',78,79,NULL,0,1,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||
INSERT INTO `department` VALUES (46,'delivery','REPARTO',76,77,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,0,1,0,0,NULL,NULL,NULL,'DELIVERY');
|
||||
INSERT INTO `department` VALUES (48,'storage','ALMACENAJE',78,79,NULL,0,1,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,'STORAGE');
|
||||
INSERT INTO `department` VALUES (49,NULL,'PROPIEDAD',80,81,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||
INSERT INTO `department` VALUES (52,NULL,'CARGA AEREA',82,83,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||
INSERT INTO `department` VALUES (53,'marketing','MARKETING Y COMUNICACIÓN',41,42,NULL,72,0,0,2,0,43,'/1/43/',NULL,1,NULL,1,0,0,0,NULL,NULL,NULL,NULL);
|
||||
INSERT INTO `department` VALUES (54,NULL,'ORNAMENTALES',84,85,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||
INSERT INTO `department` VALUES (55,NULL,'TALLER NATURAL',21,22,14548,72,0,0,2,0,37,'/1/37/',NULL,0,NULL,0,1,1,0,1118,NULL,NULL,NULL);
|
||||
INSERT INTO `department` VALUES (56,NULL,'TALLER ARTIFICIAL',23,24,8470,72,0,0,2,0,37,'/1/37/',NULL,0,NULL,0,1,1,0,1927,NULL,NULL,NULL);
|
||||
INSERT INTO `department` VALUES (58,'CMP','CAMPOS',86,89,NULL,72,0,0,1,1,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||
INSERT INTO `department` VALUES (58,'CMP','CAMPOS',86,89,NULL,72,0,0,1,1,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,'FIELD');
|
||||
INSERT INTO `department` VALUES (59,'maintenance','MANTENIMIENTO',90,91,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,0,1,0,0,NULL,NULL,NULL,NULL);
|
||||
INSERT INTO `department` VALUES (60,'claims','RECLAMACIONES',43,44,NULL,72,0,0,2,0,43,'/1/43/',NULL,0,NULL,1,1,0,0,NULL,NULL,NULL,NULL);
|
||||
INSERT INTO `department` VALUES (60,'claims','RECLAMACIONES',43,44,NULL,72,0,0,2,0,43,'/1/43/',NULL,0,NULL,1,1,0,0,NULL,NULL,NULL,'CLAIM');
|
||||
INSERT INTO `department` VALUES (61,NULL,'VNH',92,95,NULL,73,0,0,1,1,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||
INSERT INTO `department` VALUES (66,NULL,'VERDNAMADRID',96,97,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||
INSERT INTO `department` VALUES (68,NULL,'COMPLEMENTOS',25,26,NULL,72,1,0,2,0,37,'/1/37/',NULL,0,NULL,0,1,0,0,NULL,NULL,NULL,NULL);
|
||||
INSERT INTO `department` VALUES (69,NULL,'VERDNABARNA',98,99,NULL,74,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||
INSERT INTO `department` VALUES (80,'spainTeam5','EQUIPO ESPAÑA 5',45,46,4250,0,0,0,2,0,43,'/1/43/','es5_equipo',0,'es5@verdnatura.es',0,0,0,0,NULL,NULL,'5300',NULL);
|
||||
INSERT INTO `department` VALUES (80,'spainTeam5','EQUIPO ESPAÑA 5',45,46,4250,0,0,0,2,0,43,'/1/43/','es5_equipo',1,'es5@verdnatura.es',0,0,0,0,NULL,NULL,'5300',NULL);
|
||||
INSERT INTO `department` VALUES (86,NULL,'LIMPIEZA',100,101,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||
INSERT INTO `department` VALUES (89,NULL,'COORDINACION',102,103,NULL,0,1,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||
INSERT INTO `department` VALUES (90,NULL,'TRAILER',93,94,NULL,0,0,0,2,0,61,'/1/61/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||
INSERT INTO `department` VALUES (91,'artificial','ARTIFICIAL',27,28,NULL,0,1,0,2,0,37,'/1/37/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||
INSERT INTO `department` VALUES (91,'artificial','ARTIFICIAL',27,28,NULL,0,1,0,2,0,37,'/1/37/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,'PREVIOUS');
|
||||
INSERT INTO `department` VALUES (92,NULL,'EQUIPO SILVERIO',47,48,1203,0,0,0,2,0,43,'/1/43/','sdc_equipo',0,'gestioncomercial@verdnatura.es',0,0,0,0,NULL,NULL,NULL,NULL);
|
||||
INSERT INTO `department` VALUES (94,'spainTeam2','EQUIPO ESPAÑA 2',49,50,3797,0,0,0,2,0,43,'/1/43/','es2_equipo',0,'es2@verdnatura.es',0,0,0,0,NULL,NULL,'5100',NULL);
|
||||
INSERT INTO `department` VALUES (95,'spainTeam1','EQUIPO ESPAÑA 1',51,52,24065,0,0,0,2,0,43,'/1/43/','es1_equipo',0,'es1@verdnatura.es',0,0,0,0,NULL,NULL,'5000',NULL);
|
||||
INSERT INTO `department` VALUES (94,'spainTeam2','EQUIPO ESPAÑA 2',49,50,3797,0,0,0,2,0,43,'/1/43/','es2_equipo',1,'es2@verdnatura.es',0,0,0,0,NULL,NULL,'5100',NULL);
|
||||
INSERT INTO `department` VALUES (95,'spainTeam1','EQUIPO ESPAÑA 1',51,52,24065,0,0,0,2,0,43,'/1/43/','es1_equipo',1,'es1@verdnatura.es',0,0,0,0,NULL,NULL,'5000',NULL);
|
||||
INSERT INTO `department` VALUES (96,NULL,'EQUIPO C LOPEZ',53,54,4661,0,0,0,2,0,43,'/1/43/','cla_equipo',0,'gestioncomercial@verdnatura.es',0,0,0,0,NULL,NULL,NULL,NULL);
|
||||
INSERT INTO `department` VALUES (115,NULL,'EQUIPO CLAUDI',55,56,3810,0,0,0,2,0,43,'/1/43/','csr_equipo',0,'gestioncomercial@verdnatura.es',0,0,0,0,NULL,NULL,NULL,NULL);
|
||||
INSERT INTO `department` VALUES (123,NULL,'EQUIPO ELENA BASCUÑANA',57,58,7102,0,0,0,2,0,43,'/1/43/','ebt_equipo',0,'gestioncomercial@verdnatura.es',0,0,0,0,NULL,NULL,NULL,NULL);
|
||||
INSERT INTO `department` VALUES (124,NULL,'CONTROL INTERNO',104,105,NULL,72,0,0,1,0,1,'/1/',NULL,0,NULL,1,0,0,0,NULL,NULL,NULL,NULL);
|
||||
INSERT INTO `department` VALUES (125,'spainTeam3','EQUIPO ESPAÑA 3',59,60,1118,0,0,0,2,0,43,'/1/43/','es3_equipo',0,'es3@verdnatura.es',0,0,0,0,NULL,NULL,'5200',NULL);
|
||||
INSERT INTO `department` VALUES (125,'spainTeam3','EQUIPO ESPAÑA 3',59,60,1118,0,0,0,2,0,43,'/1/43/','es3_equipo',1,'es3@verdnatura.es',0,0,0,0,NULL,NULL,'5200',NULL);
|
||||
INSERT INTO `department` VALUES (126,NULL,'PRESERVADO',29,30,NULL,0,0,0,2,0,37,'/1/37/',NULL,0,NULL,0,1,1,0,NULL,NULL,NULL,NULL);
|
||||
INSERT INTO `department` VALUES (128,NULL,'PALETIZADO',31,32,NULL,0,1,0,2,0,37,'/1/37/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||
INSERT INTO `department` VALUES (130,NULL,'REVISION',33,34,NULL,0,1,0,2,0,37,'/1/37/',NULL,0,NULL,0,0,0,1,NULL,NULL,NULL,NULL);
|
||||
INSERT INTO `department` VALUES (128,NULL,'PALETIZADO',31,32,NULL,0,1,0,2,0,37,'/1/37/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,'PALLETIZING');
|
||||
INSERT INTO `department` VALUES (130,NULL,'REVISION',33,34,NULL,0,1,0,2,0,37,'/1/37/',NULL,0,NULL,0,0,0,1,NULL,NULL,NULL,'ON_CHECKING');
|
||||
INSERT INTO `department` VALUES (131,'greenhouse','INVERNADERO',87,88,NULL,0,0,0,2,0,58,'/1/58/',NULL,0,NULL,0,1,0,0,NULL,NULL,NULL,NULL);
|
||||
INSERT INTO `department` VALUES (132,NULL,'EQUIPO DC',61,62,1731,0,0,0,2,0,43,'/1/43/','dc_equipo',1,'gestioncomercial@verdnatura.es',0,0,0,0,NULL,NULL,NULL,NULL);
|
||||
INSERT INTO `department` VALUES (133,'franceTeam','EQUIPO FRANCIA',63,64,1731,72,0,0,2,0,43,'/1/43/','fr_equipo',0,'gestionfrancia@verdnatura.es',0,0,0,0,NULL,NULL,'3300',NULL);
|
||||
INSERT INTO `department` VALUES (134,'portugalTeam','EQUIPO PORTUGAL',65,66,6264,0,0,0,2,0,43,'/1/43/','pt_equipo',0,'portugal@verdnatura.es',0,0,0,0,NULL,NULL,'3500',NULL);
|
||||
INSERT INTO `department` VALUES (133,'franceTeam','EQUIPO FRANCIA',63,64,1731,72,0,0,2,0,43,'/1/43/','fr_equipo',1,'gestionfrancia@verdnatura.es',0,0,0,0,NULL,NULL,'3300',NULL);
|
||||
INSERT INTO `department` VALUES (134,'portugalTeam','EQUIPO PORTUGAL',65,66,6264,0,0,0,2,0,43,'/1/43/','pt_equipo',1,'portugal@verdnatura.es',0,0,0,0,NULL,NULL,'3500',NULL);
|
||||
INSERT INTO `department` VALUES (135,'routers','ENRUTADORES',106,107,NULL,0,0,0,1,0,1,'/1/',NULL,1,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||
INSERT INTO `department` VALUES (136,'heavyVehicles','VEHICULOS PESADOS',108,109,NULL,0,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||
INSERT INTO `department` VALUES (137,'sorter','SORTER',110,111,NULL,0,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||
INSERT INTO `department` VALUES (139,'spainTeam4','EQUIPO ESPAÑA 4',67,68,3803,0,0,0,2,0,43,'/1/43/','es4_equipo',0,'es4@verdnatura.es',0,0,0,0,NULL,NULL,'5400',NULL);
|
||||
INSERT INTO `department` VALUES (139,'spainTeam4','EQUIPO ESPAÑA 4',67,68,3803,0,0,0,2,0,43,'/1/43/','es4_equipo',1,'es4@verdnatura.es',0,0,0,0,NULL,NULL,'5400',NULL);
|
||||
INSERT INTO `department` VALUES (140,'hollandTeam','EQUIPO HOLANDA',69,70,NULL,0,0,0,2,0,43,'/1/43/','nl_equipo',1,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||
INSERT INTO `department` VALUES (141,NULL,'PREVIA',35,36,NULL,0,1,0,2,0,37,'/1/37/',NULL,0,NULL,0,0,0,1,NULL,NULL,NULL,NULL);
|
||||
INSERT INTO `department` VALUES (146,NULL,'VERDNACOLOMBIA',3,4,NULL,72,0,0,2,0,22,'/1/22/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||
|
@ -2575,6 +2610,7 @@ INSERT INTO `state` VALUES (37,'Previa Revisado',3,0,'PREVIOUS_CONTROLLED',2,29,
|
|||
INSERT INTO `state` VALUES (38,'Prep Cámara',6,2,'COOLER_PREPARATION',7,14,0,0,0,2,0,0,2,0,'warning');
|
||||
INSERT INTO `state` VALUES (41,'Prep Parcial',6,2,'PARTIAL_PREPARATION',7,14,0,0,0,2,0,0,2,0,'warning');
|
||||
INSERT INTO `state` VALUES (42,'Entregado en parte',13,3,'PARTIAL_DELIVERED',NULL,16,0,1,0,0,0,0,0,0,NULL);
|
||||
INSERT INTO `state` VALUES (43,'Preparación por caja',6,2,'BOX_PICKING',7,42,0,0,0,2,0,0,2,0,'warning');
|
||||
|
||||
INSERT INTO `ticketUpdateAction` VALUES (1,'Cambiar los precios en el ticket','renewPrices');
|
||||
INSERT INTO `ticketUpdateAction` VALUES (2,'Convertir en maná','mana');
|
||||
|
|
|
@ -929,16 +929,14 @@ INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','tillConfig',
|
|||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','till','juan@%','0000-00-00 00:00:00','Select','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','productionAssi','till','alexm@%','0000-00-00 00:00:00','Select,Insert,Update','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','financial','vehicleState','alexm@%','0000-00-00 00:00:00','Select','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','adminOfficer','vehicleInvoiceIn','alexm@%','0000-00-00 00:00:00','Insert,Delete','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','production','sectorCollectionSaleGroup','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','financial','vehicleEvent','alexm@%','0000-00-00 00:00:00','Select','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','financial','vehicleDms','alexm@%','0000-00-00 00:00:00','Select','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logistic','vehicle','alexm@%','0000-00-00 00:00:00','Select','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','vehicle','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn2008','buyer','Agencias','alexm@%','0000-00-00 00:00:00','Insert,Update','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','adminOfficer','vehicleDms','alexm@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','production','expeditionStateType','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','ticketState','juan@db-proxy2.static.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','administrative','vehicleInvoiceIn','alexm@%','0000-00-00 00:00:00','Select,Insert,Update,Delete','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','financialBoss','vehicleNotes','alexm@%','0000-00-00 00:00:00','Select','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','adminOfficer','vehicleState','alexm@%','0000-00-00 00:00:00','Select','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','volumeConfig','alexm@%','0000-00-00 00:00:00','Select','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','coolerBoss','ticketTrackingState','alexm@%','0000-00-00 00:00:00','Select,Insert,Update','');
|
||||
|
@ -1460,6 +1458,12 @@ INSERT IGNORE INTO `tables_priv` VALUES ('','hedera','salesAssistant','orderCon
|
|||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','itemEntryOut','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','itemEntryIn','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','itemShelvingSale','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','logistic','packaging','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Insert,Update','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyerBoss','rate','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','deliveryBoss','vehicleDms','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','deliveryBoss','vehicleInvoiceIn','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','deliveryBoss','vehicleNotes','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','productionBoss','saleGroup','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Insert,Update,Delete','');
|
||||
/*!40000 ALTER TABLE `tables_priv` ENABLE KEYS */;
|
||||
|
||||
/*!40000 ALTER TABLE `columns_priv` DISABLE KEYS */;
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1502,6 +1502,134 @@ USE `srt`;
|
|||
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
|
||||
/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
|
||||
DELIMITER ;;
|
||||
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `srt`.`buffer_beforeInsert`
|
||||
BEFORE INSERT ON `buffer`
|
||||
FOR EACH ROW
|
||||
BEGIN
|
||||
SET NEW.editorFk = account.myUser_getId();
|
||||
END */;;
|
||||
DELIMITER ;
|
||||
/*!50003 SET sql_mode = @saved_sql_mode */ ;
|
||||
/*!50003 SET character_set_client = @saved_cs_client */ ;
|
||||
/*!50003 SET character_set_results = @saved_cs_results */ ;
|
||||
/*!50003 SET collation_connection = @saved_col_connection */ ;
|
||||
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
||||
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
||||
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
|
||||
/*!50003 SET character_set_client = utf8mb4 */ ;
|
||||
/*!50003 SET character_set_results = utf8mb4 */ ;
|
||||
/*!50003 SET collation_connection = utf8mb4_unicode_ci */ ;
|
||||
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
|
||||
/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
|
||||
DELIMITER ;;
|
||||
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `srt`.`buffer_beforeUpdate`
|
||||
BEFORE UPDATE ON `buffer`
|
||||
FOR EACH ROW
|
||||
BEGIN
|
||||
SET NEW.editorFk = account.myUser_getId();
|
||||
END */;;
|
||||
DELIMITER ;
|
||||
/*!50003 SET sql_mode = @saved_sql_mode */ ;
|
||||
/*!50003 SET character_set_client = @saved_cs_client */ ;
|
||||
/*!50003 SET character_set_results = @saved_cs_results */ ;
|
||||
/*!50003 SET collation_connection = @saved_col_connection */ ;
|
||||
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
||||
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
||||
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
|
||||
/*!50003 SET character_set_client = utf8mb4 */ ;
|
||||
/*!50003 SET character_set_results = utf8mb4 */ ;
|
||||
/*!50003 SET collation_connection = utf8mb4_unicode_ci */ ;
|
||||
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
|
||||
/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
|
||||
DELIMITER ;;
|
||||
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `srt`.`buffer_afterDelete`
|
||||
AFTER DELETE ON `buffer`
|
||||
FOR EACH ROW
|
||||
BEGIN
|
||||
INSERT INTO buffer
|
||||
SET `action` = 'delete',
|
||||
`changedModel` = 'Buffer',
|
||||
`changedModelId` = OLD.id,
|
||||
`userFk` = account.myUser_getId();
|
||||
END */;;
|
||||
DELIMITER ;
|
||||
/*!50003 SET sql_mode = @saved_sql_mode */ ;
|
||||
/*!50003 SET character_set_client = @saved_cs_client */ ;
|
||||
/*!50003 SET character_set_results = @saved_cs_results */ ;
|
||||
/*!50003 SET collation_connection = @saved_col_connection */ ;
|
||||
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
||||
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
||||
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
|
||||
/*!50003 SET character_set_client = utf8mb4 */ ;
|
||||
/*!50003 SET character_set_results = utf8mb4 */ ;
|
||||
/*!50003 SET collation_connection = utf8mb4_unicode_ci */ ;
|
||||
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
|
||||
/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
|
||||
DELIMITER ;;
|
||||
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `srt`.`config_beforeInsert`
|
||||
BEFORE INSERT ON `config`
|
||||
FOR EACH ROW
|
||||
BEGIN
|
||||
SET NEW.editorFk = account.myUser_getId();
|
||||
END */;;
|
||||
DELIMITER ;
|
||||
/*!50003 SET sql_mode = @saved_sql_mode */ ;
|
||||
/*!50003 SET character_set_client = @saved_cs_client */ ;
|
||||
/*!50003 SET character_set_results = @saved_cs_results */ ;
|
||||
/*!50003 SET collation_connection = @saved_col_connection */ ;
|
||||
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
||||
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
||||
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
|
||||
/*!50003 SET character_set_client = utf8mb4 */ ;
|
||||
/*!50003 SET character_set_results = utf8mb4 */ ;
|
||||
/*!50003 SET collation_connection = utf8mb4_unicode_ci */ ;
|
||||
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
|
||||
/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
|
||||
DELIMITER ;;
|
||||
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `srt`.`config_beforeUpdate`
|
||||
BEFORE UPDATE ON `config`
|
||||
FOR EACH ROW
|
||||
BEGIN
|
||||
SET NEW.editorFk = account.myUser_getId();
|
||||
END */;;
|
||||
DELIMITER ;
|
||||
/*!50003 SET sql_mode = @saved_sql_mode */ ;
|
||||
/*!50003 SET character_set_client = @saved_cs_client */ ;
|
||||
/*!50003 SET character_set_results = @saved_cs_results */ ;
|
||||
/*!50003 SET collation_connection = @saved_col_connection */ ;
|
||||
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
||||
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
||||
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
|
||||
/*!50003 SET character_set_client = utf8mb4 */ ;
|
||||
/*!50003 SET character_set_results = utf8mb4 */ ;
|
||||
/*!50003 SET collation_connection = utf8mb4_unicode_ci */ ;
|
||||
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
|
||||
/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
|
||||
DELIMITER ;;
|
||||
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `srt`.`config_afterDelete`
|
||||
AFTER DELETE ON `config`
|
||||
FOR EACH ROW
|
||||
BEGIN
|
||||
INSERT INTO config
|
||||
SET `action` = 'delete',
|
||||
`changedModel` = 'Config',
|
||||
`changedModelId` = OLD.id,
|
||||
`userFk` = account.myUser_getId();
|
||||
END */;;
|
||||
DELIMITER ;
|
||||
/*!50003 SET sql_mode = @saved_sql_mode */ ;
|
||||
/*!50003 SET character_set_client = @saved_cs_client */ ;
|
||||
/*!50003 SET character_set_results = @saved_cs_results */ ;
|
||||
/*!50003 SET collation_connection = @saved_col_connection */ ;
|
||||
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
||||
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
||||
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
|
||||
/*!50003 SET character_set_client = utf8mb4 */ ;
|
||||
/*!50003 SET character_set_results = utf8mb4 */ ;
|
||||
/*!50003 SET collation_connection = utf8mb4_unicode_ci */ ;
|
||||
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
|
||||
/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
|
||||
DELIMITER ;;
|
||||
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `srt`.`expedition_beforeUpdate`
|
||||
BEFORE UPDATE ON `expedition`
|
||||
FOR EACH ROW
|
||||
|
@ -5419,11 +5547,32 @@ DELIMITER ;
|
|||
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
|
||||
/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
|
||||
DELIMITER ;;
|
||||
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `vn`.`host_beforeInsert`
|
||||
BEFORE INSERT ON `host`
|
||||
FOR EACH ROW
|
||||
BEGIN
|
||||
SET NEW.editorFk = account.myUser_getId();
|
||||
END */;;
|
||||
DELIMITER ;
|
||||
/*!50003 SET sql_mode = @saved_sql_mode */ ;
|
||||
/*!50003 SET character_set_client = @saved_cs_client */ ;
|
||||
/*!50003 SET character_set_results = @saved_cs_results */ ;
|
||||
/*!50003 SET collation_connection = @saved_col_connection */ ;
|
||||
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
||||
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
||||
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
|
||||
/*!50003 SET character_set_client = utf8mb4 */ ;
|
||||
/*!50003 SET character_set_results = utf8mb4 */ ;
|
||||
/*!50003 SET collation_connection = utf8mb4_unicode_ci */ ;
|
||||
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
|
||||
/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
|
||||
DELIMITER ;;
|
||||
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `vn`.`host_beforeUpdate`
|
||||
BEFORE UPDATE ON `host`
|
||||
FOR EACH ROW
|
||||
BEGIN
|
||||
SET new.updated = util.VN_NOW();
|
||||
SET NEW.editorFk = account.myUser_getId();
|
||||
END */;;
|
||||
DELIMITER ;
|
||||
/*!50003 SET sql_mode = @saved_sql_mode */ ;
|
||||
|
@ -7793,6 +7942,54 @@ DELIMITER ;
|
|||
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
|
||||
/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
|
||||
DELIMITER ;;
|
||||
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `vn`.`roadmap_beforeInsert`
|
||||
BEFORE INSERT ON `roadmap`
|
||||
FOR EACH ROW
|
||||
BEGIN
|
||||
IF NEW.driver1Fk IS NOT NULL THEN
|
||||
SET NEW.driverName = (SELECT firstName FROM worker WHERE id = NEW.driver1Fk);
|
||||
ELSE
|
||||
SET NEW.driverName = NULL;
|
||||
END IF;
|
||||
END */;;
|
||||
DELIMITER ;
|
||||
/*!50003 SET sql_mode = @saved_sql_mode */ ;
|
||||
/*!50003 SET character_set_client = @saved_cs_client */ ;
|
||||
/*!50003 SET character_set_results = @saved_cs_results */ ;
|
||||
/*!50003 SET collation_connection = @saved_col_connection */ ;
|
||||
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
||||
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
||||
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
|
||||
/*!50003 SET character_set_client = utf8mb4 */ ;
|
||||
/*!50003 SET character_set_results = utf8mb4 */ ;
|
||||
/*!50003 SET collation_connection = utf8mb4_unicode_ci */ ;
|
||||
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
|
||||
/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
|
||||
DELIMITER ;;
|
||||
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `vn`.`roadmap_beforeUpdate`
|
||||
BEFORE UPDATE ON `roadmap`
|
||||
FOR EACH ROW
|
||||
BEGIN
|
||||
IF NEW.driver1Fk IS NOT NULL THEN
|
||||
SET NEW.driverName = (SELECT firstName FROM worker WHERE id = NEW.driver1Fk);
|
||||
ELSE
|
||||
SET NEW.driverName = NULL;
|
||||
END IF;
|
||||
END */;;
|
||||
DELIMITER ;
|
||||
/*!50003 SET sql_mode = @saved_sql_mode */ ;
|
||||
/*!50003 SET character_set_client = @saved_cs_client */ ;
|
||||
/*!50003 SET character_set_results = @saved_cs_results */ ;
|
||||
/*!50003 SET collation_connection = @saved_col_connection */ ;
|
||||
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
||||
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
||||
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
|
||||
/*!50003 SET character_set_client = utf8mb4 */ ;
|
||||
/*!50003 SET character_set_results = utf8mb4 */ ;
|
||||
/*!50003 SET collation_connection = utf8mb4_unicode_ci */ ;
|
||||
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
|
||||
/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
|
||||
DELIMITER ;;
|
||||
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `vn`.`expeditionTruck_beforeInsert`
|
||||
BEFORE INSERT ON `roadmapStop` FOR EACH ROW
|
||||
BEGIN
|
||||
|
@ -11212,4 +11409,4 @@ USE `vn2008`;
|
|||
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
|
||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||
|
||||
-- Dump completed on 2024-08-20 7:45:23
|
||||
-- Dump completed on 2024-09-04 7:01:01
|
||||
|
|
|
@ -412,7 +412,7 @@ INSERT INTO `vn`.`clientManaCache`(`clientFk`, `mana`, `dated`)
|
|||
(1103, 0, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH)),
|
||||
(1104, -30, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH));
|
||||
|
||||
INSERT INTO `vn`.`mandateType`(`id`, `name`)
|
||||
INSERT INTO `vn`.`mandateType`(`id`, `code`)
|
||||
VALUES
|
||||
(1, 'B2B'),
|
||||
(2, 'CORE'),
|
||||
|
@ -632,7 +632,7 @@ INSERT INTO `vn`.`invoiceOutSerial` (`code`, `description`, `isTaxed`, `taxAreaF
|
|||
('A', 'Global nacional', 1, 'NATIONAL', 0, 'global'),
|
||||
('T', 'Española rapida', 1, 'NATIONAL', 0, 'quick'),
|
||||
('V', 'Intracomunitaria global', 0, 'CEE', 1, 'global'),
|
||||
('M', 'Múltiple nacional', 1, 'NATIONAL', 0, 'quick'),
|
||||
('M', 'Múltiple nacional', 1, 'NATIONAL', 0, 'multiple'),
|
||||
('R', 'Rectificativa', 1, 'NATIONAL', 0, NULL),
|
||||
('E', 'Exportación rápida', 0, 'WORLD', 0, 'quick');
|
||||
|
||||
|
@ -743,45 +743,45 @@ INSERT INTO `vn`.`route`(`id`, `time`, `workerFk`, `created`, `vehicleFk`, `agen
|
|||
(6, NULL, 57, util.VN_CURDATE(), 5, 7, 'sixth route', 1.7, 60, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 3),
|
||||
(7, NULL, 57, util.VN_CURDATE(), 6, 8, 'seventh route', 0, 70, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 5);
|
||||
|
||||
INSERT INTO `vn`.`ticket`(`id`, `priority`, `agencyModeFk`,`warehouseFk`,`routeFk`, `shipped`, `landed`, `clientFk`,`nickname`, `addressFk`, `refFk`, `isDeleted`, `zoneFk`, `zonePrice`, `zoneBonus`, `created`, `weight`, `cmrFk`)
|
||||
INSERT INTO `vn`.`ticket`(`id`, `priority`, `agencyModeFk`,`warehouseFk`,`routeFk`, `shipped`, `landed`, `clientFk`,`nickname`, `addressFk`, `refFk`, `isDeleted`, `zoneFk`, `zonePrice`, `zoneBonus`, `created`, `weight`, `cmrFk`, `problem`, `risk`)
|
||||
VALUES
|
||||
(1 , 3, 1, 1, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), DATE_ADD(DATE_ADD(util.VN_CURDATE(),INTERVAL -1 MONTH), INTERVAL +1 DAY), 1101, 'Bat cave', 121, NULL, 0, 1, 5, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 1, 1),
|
||||
(2 , 1, 1, 1, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), DATE_ADD(DATE_ADD(util.VN_CURDATE(),INTERVAL -1 MONTH), INTERVAL +1 DAY), 1101, 'Bat cave', 1, NULL, 0, 1, 5, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 2, 2),
|
||||
(3 , 1, 7, 1, 6, DATE_ADD(util.VN_CURDATE(), INTERVAL -2 MONTH), DATE_ADD(DATE_ADD(util.VN_CURDATE(),INTERVAL -2 MONTH), INTERVAL +1 DAY), 1104, 'Stark tower', 124, NULL, 0, 3, 5, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL -2 MONTH), NULL, 3),
|
||||
(4 , 3, 2, 1, 2, DATE_ADD(util.VN_CURDATE(), INTERVAL -3 MONTH), DATE_ADD(DATE_ADD(util.VN_CURDATE(),INTERVAL -3 MONTH), INTERVAL +1 DAY), 1104, 'Stark tower', 124, NULL, 0, 9, 5, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL -3 MONTH), NULL, NULL),
|
||||
(5 , 3, 3, 3, 3, DATE_ADD(util.VN_CURDATE(), INTERVAL -4 MONTH), DATE_ADD(DATE_ADD(util.VN_CURDATE(),INTERVAL -4 MONTH), INTERVAL +1 DAY), 1104, 'Stark tower', 124, NULL, 0, 10, 5, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL -4 MONTH), NULL, NULL),
|
||||
(6 , 1, 3, 3, 3, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), DATE_ADD(DATE_ADD(util.VN_CURDATE(),INTERVAL -1 MONTH), INTERVAL +1 DAY), 1101, 'Mountain Drive Gotham', 1, NULL, 0, 10, 5, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), NULL, NULL),
|
||||
(7 , NULL, 7, 1, 6, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1101, 'Mountain Drive Gotham', 1, NULL, 0, 3, 5, 1, util.VN_CURDATE(), NULL, NULL),
|
||||
(8 , NULL, 7, 1, 6, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1101, 'Bat cave', 121, NULL, 0, 3, 5, 1, util.VN_CURDATE(), NULL, NULL),
|
||||
(9 , NULL, 7, 1, 6, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1104, 'Stark tower', 124, NULL, 0, 3, 5, 1, util.VN_CURDATE(), NULL, NULL),
|
||||
(10, 1, 1, 5, 1, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1102, 'Ingram Street', 2, NULL, 0, 1, 5, 1, util.VN_CURDATE(), NULL, NULL),
|
||||
(11, 1, 7, 1, 6, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1102, 'NY roofs', 122, NULL, 0, 3, 5, 1, util.VN_CURDATE(), NULL, NULL),
|
||||
(12, 1, 8, 1, 1, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1103, 'Phone Box', 123, NULL, 0, 1, 5, 1, util.VN_CURDATE(), NULL, NULL),
|
||||
(13, 1, 7, 1, 6, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1103, 'Phone Box', 123, NULL, 0, 3, 5, 1, util.VN_CURDATE(), NULL, NULL),
|
||||
(14, 1, 2, 1, NULL, util.VN_CURDATE(), util.VN_CURDATE(), 1104, 'Malibu Point', 4, NULL, 0, 9, 5, 1, util.VN_CURDATE(), NULL, NULL),
|
||||
(15, 1, 7, 1, 6, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1105, 'An incredibly long alias for testing purposes', 125, NULL, 0, 3, 5, 1, util.VN_CURDATE(), NULL, NULL),
|
||||
(16, 1, 7, 1, 6, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1106, 'Many Places', 126, NULL, 0, 3, 5, 1, util.VN_CURDATE(), NULL, NULL),
|
||||
(17, 1, 7, 2, 6, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1106, 'Many Places', 126, NULL, 0, 3, 5, 1, util.VN_CURDATE(), NULL, NULL),
|
||||
(18, 1, 4, 4, 4, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1108, 'Cerebro', 128, NULL, 0, 12, 5, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL +12 HOUR), NULL, NULL),
|
||||
(19, 1, 5, 5, NULL, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1109, 'Somewhere in Thailand', 129, NULL, 1, NULL, 5, 1, util.VN_CURDATE(), NULL, NULL),
|
||||
(20, 1, 5, 5, 3, DATE_ADD(util.VN_CURDATE(), INTERVAL +1 MONTH), DATE_ADD(DATE_ADD(util.VN_CURDATE(),INTERVAL +1 MONTH), INTERVAL +1 DAY), 1109, 'Somewhere in Thailand', 129, NULL, 0, 13, 5, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL +1 MONTH), NULL, NULL),
|
||||
(21, NULL, 5, 5, 5, DATE_ADD(util.VN_CURDATE(), INTERVAL +1 MONTH), DATE_ADD(DATE_ADD(util.VN_CURDATE(),INTERVAL +1 MONTH), INTERVAL +1 DAY), 1109, 'Somewhere in Holland', 102, NULL, 0, 13, 5, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL +1 MONTH), NULL, NULL),
|
||||
(22, NULL, 5, 5, 5, DATE_ADD(util.VN_CURDATE(), INTERVAL +1 MONTH), DATE_ADD(DATE_ADD(util.VN_CURDATE(),INTERVAL +1 MONTH), INTERVAL +1 DAY), 1109, 'Somewhere in Japan', 103, NULL, 0, 13, 5, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL +1 MONTH), NULL, NULL),
|
||||
(23, NULL, 8, 1, 7, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1101, 'address 21', 121, NULL, 0, 5, 5, 1, util.VN_CURDATE(), NULL, NULL),
|
||||
(24 ,NULL, 8, 1, 7, util.VN_CURDATE(), util.VN_CURDATE(), 1101, 'Bruce Wayne', 1, NULL, 0, 5, 5, 1, util.VN_CURDATE(), NULL, NULL),
|
||||
(25 ,NULL, 8, 1, NULL, util.VN_CURDATE(), util.VN_CURDATE(), 1101, 'Bruce Wayne', 1, NULL, 0, 1, 5, 1, util.VN_CURDATE(), NULL, NULL),
|
||||
(26 ,NULL, 8, 1, NULL, util.VN_CURDATE(), util.VN_CURDATE(), 1101, 'An incredibly long alias for testing purposes', 1, NULL, 0, 1, 5, 1, util.VN_CURDATE(), NULL, NULL),
|
||||
(27 ,NULL, 8, 1, NULL, util.VN_CURDATE(), util.VN_CURDATE(), 1101, 'Wolverine', 1, NULL, 0, 1, 5, 1, util.VN_CURDATE(), NULL, NULL),
|
||||
(28, 1, 8, 1, 1, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1103, 'Phone Box', 123, NULL, 0, 1, 5, 1, util.VN_CURDATE(), NULL, NULL),
|
||||
(29, 1, 8, 1, 1, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1103, 'Phone Box', 123, NULL, 0, 1, 5, 1, util.VN_CURDATE(), NULL, NULL),
|
||||
(30, 1, 8, 1, 1, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1103, 'Phone Box', 123, NULL, 0, 1, 5, 1, util.VN_CURDATE(), NULL, NULL),
|
||||
(31, 1, 8, 1, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), DATE_ADD(util.VN_CURDATE(), INTERVAL + 2 DAY), 1103, 'Phone Box', 123, NULL, 0, 1, 5, 1, util.VN_CURDATE(), NULL, NULL),
|
||||
(32, 1, 8, 1, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), DATE_ADD(util.VN_CURDATE(), INTERVAL + 2 DAY), 1103, 'Phone Box', 123, NULL, 0, 1, 5, 1, util.VN_CURDATE(), NULL, NULL),
|
||||
(33, 1, 7, 1, 6, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1102, 'NY roofs', 122, NULL, 0, 3, 5, 1, util.VN_CURDATE(), NULL, NULL),
|
||||
(34, 1, 1, 1, 3, util.VN_CURDATE(), util.VN_CURDATE(), 1103, 'BEJAR', 123, NULL, 0, 1, 16, 0, util.VN_CURDATE(), NULL, NULL),
|
||||
(35, 1, 1, 1, 3, util.VN_CURDATE(), util.VN_CURDATE(), 1102, 'Somewhere in Philippines', 123, NULL, 0, 1, 16, 0, util.VN_CURDATE(), NULL, NULL),
|
||||
(36, 1, 1, 1, 3, util.VN_CURDATE(), util.VN_CURDATE(), 1102, 'Ant-Man Adventure', 123, NULL, 0, 1, 16, 0, util.VN_CURDATE(), NULL, NULL),
|
||||
(37, 1, 1, 1, 3, util.VN_CURDATE(), util.VN_CURDATE(), 1110, 'Deadpool swords', 123, NULL, 0, 1, 16, 0, util.VN_CURDATE(), NULL, NULL);
|
||||
(1 , 3, 1, 1, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), DATE_ADD(DATE_ADD(util.VN_CURDATE(),INTERVAL -1 MONTH), INTERVAL +1 DAY), 1101, 'Bat cave', 121, NULL, 0, 1, 5, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 1, 1, 'hasHighRisk', 901.4),
|
||||
(2 , 1, 1, 1, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), DATE_ADD(DATE_ADD(util.VN_CURDATE(),INTERVAL -1 MONTH), INTERVAL +1 DAY), 1101, 'Bat cave', 1, NULL, 0, 1, 5, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 2, 2, 'hasHighRisk', 901.4),
|
||||
(3 , 1, 7, 1, 6, DATE_ADD(util.VN_CURDATE(), INTERVAL -2 MONTH), DATE_ADD(DATE_ADD(util.VN_CURDATE(),INTERVAL -2 MONTH), INTERVAL +1 DAY), 1104, 'Stark tower', 124, NULL, 0, 3, 5, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL -2 MONTH), NULL, 3, NULL, NULL),
|
||||
(4 , 3, 2, 1, 2, DATE_ADD(util.VN_CURDATE(), INTERVAL -3 MONTH), DATE_ADD(DATE_ADD(util.VN_CURDATE(),INTERVAL -3 MONTH), INTERVAL +1 DAY), 1104, 'Stark tower', 124, NULL, 0, 9, 5, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL -3 MONTH), NULL, NULL, NULL, NULL),
|
||||
(5 , 3, 3, 3, 3, DATE_ADD(util.VN_CURDATE(), INTERVAL -4 MONTH), DATE_ADD(DATE_ADD(util.VN_CURDATE(),INTERVAL -4 MONTH), INTERVAL +1 DAY), 1104, 'Stark tower', 124, NULL, 0, 10, 5, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL -4 MONTH), NULL, NULL, NULL, NULL),
|
||||
(6 , 1, 3, 3, 3, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), DATE_ADD(DATE_ADD(util.VN_CURDATE(),INTERVAL -1 MONTH), INTERVAL +1 DAY), 1101, 'Mountain Drive Gotham', 1, NULL, 0, 10, 5, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), NULL, NULL, 'hasHighRisk', 901.4),
|
||||
(7 , NULL, 7, 1, 6, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1101, 'Mountain Drive Gotham', 1, NULL, 0, 3, 5, 1, util.VN_CURDATE(), NULL, NULL, 'hasHighRisk', 901.4),
|
||||
(8 , NULL, 7, 1, 6, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1101, 'Bat cave', 121, NULL, 0, 3, 5, 1, util.VN_CURDATE(), NULL, NULL, 'hasHighRisk', 901.4),
|
||||
(9 , NULL, 7, 1, 6, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1104, 'Stark tower', 124, NULL, 0, 3, 5, 1, util.VN_CURDATE(), NULL, NULL, NULL, NULL),
|
||||
(10, 1, 1, 5, 1, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1102, 'Ingram Street', 2, NULL, 0, 1, 5, 1, util.VN_CURDATE(), NULL, NULL, 'isTooLittle', NULL),
|
||||
(11, 1, 7, 1, 6, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1102, 'NY roofs', 122, NULL, 0, 3, 5, 1, util.VN_CURDATE(), NULL, NULL, 'hasTicketRequest', NULL),
|
||||
(12, 1, 8, 1, 1, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1103, 'Phone Box', 123, NULL, 0, 1, 5, 1, util.VN_CURDATE(), NULL, NULL, NULL, NULL),
|
||||
(13, 1, 7, 1, 6, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1103, 'Phone Box', 123, NULL, 0, 3, 5, 1, util.VN_CURDATE(), NULL, NULL, NULL, NULL),
|
||||
(14, 1, 2, 1, NULL, util.VN_CURDATE(), util.VN_CURDATE(), 1104, 'Malibu Point', 4, NULL, 0, 9, 5, 1, util.VN_CURDATE(), NULL, NULL, NULL, NULL),
|
||||
(15, 1, 7, 1, 6, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1105, 'An incredibly long alias for testing purposes', 125, NULL, 0, 3, 5, 1, util.VN_CURDATE(), NULL, NULL, 'isFreezed', NULL),
|
||||
(16, 1, 7, 1, 6, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1106, 'Many Places', 126, NULL, 0, 3, 5, 1, util.VN_CURDATE(), NULL, NULL, NULL, 388.7),
|
||||
(17, 1, 7, 2, 6, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1106, 'Many Places', 126, NULL, 0, 3, 5, 1, util.VN_CURDATE(), NULL, NULL, NULL, 388.7),
|
||||
(18, 1, 4, 4, 4, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1108, 'Cerebro', 128, NULL, 0, 12, 5, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL +12 HOUR), NULL, NULL, 'isFreezed', NULL),
|
||||
(19, 1, 5, 5, NULL, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1109, 'Somewhere in Thailand', 129, NULL, 1, NULL, 5, 1, util.VN_CURDATE(), NULL, NULL, 'isTaxDataChecked', NULL),
|
||||
(20, 1, 5, 5, 3, DATE_ADD(util.VN_CURDATE(), INTERVAL +1 MONTH), DATE_ADD(DATE_ADD(util.VN_CURDATE(),INTERVAL +1 MONTH), INTERVAL +1 DAY), 1109, 'Somewhere in Thailand', 129, NULL, 0, 13, 5, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL +1 MONTH), NULL, NULL, 'isTaxDataChecked', NULL),
|
||||
(21, NULL, 5, 5, 5, DATE_ADD(util.VN_CURDATE(), INTERVAL +1 MONTH), DATE_ADD(DATE_ADD(util.VN_CURDATE(),INTERVAL +1 MONTH), INTERVAL +1 DAY), 1109, 'Somewhere in Holland', 102, NULL, 0, 13, 5, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL +1 MONTH), NULL, NULL, 'isTaxDataChecked', NULL),
|
||||
(22, NULL, 5, 5, 5, DATE_ADD(util.VN_CURDATE(), INTERVAL +1 MONTH), DATE_ADD(DATE_ADD(util.VN_CURDATE(),INTERVAL +1 MONTH), INTERVAL +1 DAY), 1109, 'Somewhere in Japan', 103, NULL, 0, 13, 5, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL +1 MONTH), NULL, NULL, 'isTaxDataChecked', NULL),
|
||||
(23, NULL, 8, 1, 7, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1101, 'address 21', 121, NULL, 0, 5, 5, 1, util.VN_CURDATE(), NULL, NULL, 'hasTicketRequest, hasHighRisk', 901.4),
|
||||
(24 ,NULL, 8, 1, 7, util.VN_CURDATE(), util.VN_CURDATE(), 1101, 'Bruce Wayne', 1, NULL, 0, 5, 5, 1, util.VN_CURDATE(), NULL, NULL, 'hasHighRisk', 901.4),
|
||||
(25 ,NULL, 8, 1, NULL, util.VN_CURDATE(), util.VN_CURDATE(), 1101, 'Bruce Wayne', 1, NULL, 0, 1, 5, 1, util.VN_CURDATE(), NULL, NULL, 'hasHighRisk', 901.4),
|
||||
(26 ,NULL, 8, 1, NULL, util.VN_CURDATE(), util.VN_CURDATE(), 1101, 'An incredibly long alias for testing purposes', 1, NULL, 0, 1, 5, 1, util.VN_CURDATE(), NULL, NULL, 'hasHighRisk', 901.4),
|
||||
(27 ,NULL, 8, 1, NULL, util.VN_CURDATE(), util.VN_CURDATE(), 1101, 'Wolverine', 1, NULL, 0, 1, 5, 1, util.VN_CURDATE(), NULL, NULL, NULL, 901.4),
|
||||
(28, 1, 8, 1, 1, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1103, 'Phone Box', 123, NULL, 0, 1, 5, 1, util.VN_CURDATE(), NULL, NULL, NULL, NULL),
|
||||
(29, 1, 8, 1, 1, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1103, 'Phone Box', 123, NULL, 0, 1, 5, 1, util.VN_CURDATE(), NULL, NULL, NULL, NULL),
|
||||
(30, 1, 8, 1, 1, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1103, 'Phone Box', 123, NULL, 0, 1, 5, 1, util.VN_CURDATE(), NULL, NULL, NULL, NULL),
|
||||
(31, 1, 8, 1, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), DATE_ADD(util.VN_CURDATE(), INTERVAL + 2 DAY), 1103, 'Phone Box', 123, NULL, 0, 1, 5, 1, util.VN_CURDATE(), NULL, NULL, NULL, NULL),
|
||||
(32, 1, 8, 1, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), DATE_ADD(util.VN_CURDATE(), INTERVAL + 2 DAY), 1103, 'Phone Box', 123, NULL, 0, 1, 5, 1, util.VN_CURDATE(), NULL, NULL, NULL, NULL),
|
||||
(33, 1, 7, 1, 6, util.VN_CURDATE(), DATE_ADD(util.VN_CURDATE(), INTERVAL + 1 DAY), 1102, 'NY roofs', 122, NULL, 0, 3, 5, 1, util.VN_CURDATE(), NULL, NULL, NULL, NULL),
|
||||
(34, 1, 1, 1, 3, util.VN_CURDATE(), util.VN_CURDATE(), 1103, 'BEJAR', 123, NULL, 0, 1, 16, 0, util.VN_CURDATE(), NULL, NULL, NULL, NULL),
|
||||
(35, 1, 1, 1, 3, util.VN_CURDATE(), util.VN_CURDATE(), 1102, 'Somewhere in Philippines', 123, NULL, 0, 1, 16, 0, util.VN_CURDATE(), NULL, NULL, NULL, NULL),
|
||||
(36, 1, 1, 1, 3, util.VN_CURDATE(), util.VN_CURDATE(), 1102, 'Ant-Man Adventure', 123, NULL, 0, 1, 16, 0, util.VN_CURDATE(), NULL, NULL, NULL, NULL),
|
||||
(37, 1, 1, 1, 3, util.VN_CURDATE(), util.VN_CURDATE(), 1110, 'Deadpool swords', 123, NULL, 0, 1, 16, 0, util.VN_CURDATE(), NULL, NULL, NULL, NULL);
|
||||
|
||||
INSERT INTO `vn`.`ticketObservation`(`id`, `ticketFk`, `observationTypeFk`, `description`)
|
||||
VALUES
|
||||
|
@ -1059,50 +1059,50 @@ INSERT INTO `vn`.`ticketPackaging`(`id`, `ticketFk`, `packagingFk`, `quantity`,
|
|||
(2, 2, 2, 1, util.VN_CURDATE(), NULL),
|
||||
(3, 3, 2, 4, util.VN_CURDATE(), NULL);
|
||||
|
||||
INSERT INTO `vn`.`sale`(`id`, `itemFk`, `ticketFk`, `concept`, `quantity`, `price`, `discount`, `reserved`, `isPicked`, `created`)
|
||||
INSERT INTO `vn`.`sale`(`id`, `itemFk`, `ticketFk`, `concept`, `quantity`, `price`, `discount`, `reserved`, `isPicked`, `created`, `problem`)
|
||||
VALUES
|
||||
(1, 1, 1, 'Ranged weapon longbow 200cm', 5, 100.39, 0, 0, 0, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH)),
|
||||
(2, 2, 1, 'Melee weapon combat fist 15cm', 10, 7.07, 0, 0, 0, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH)),
|
||||
(3, 1, 1, 'Ranged weapon longbow 200cm', 2, 100.39, 0, 0, 0, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH)),
|
||||
(4, 4, 1, 'Melee weapon heavy shield 100cm', 20, 1.69, 0, 0, 0, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH)),
|
||||
(5, 1, 2, 'Ranged weapon longbow 200cm', 1, 110.33, 0, 0, 0, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH)),
|
||||
(6, 1, 3, 'Ranged weapon longbow 200cm', 1, 110.33, 0, 0, 0, DATE_ADD(util.VN_CURDATE(), INTERVAL -2 MONTH)),
|
||||
(7, 2, 11, 'Melee weapon combat fist 15cm', 15, 7.74, 0, 0, 0, util.VN_CURDATE()),
|
||||
(8, 4, 11, 'Melee weapon heavy shield 100cm', 10, 1.79, 0, 0, 0, util.VN_CURDATE()),
|
||||
(9, 1, 16, 'Ranged weapon longbow 200cm', 1, 103.49, 0, 0, 0, util.VN_CURDATE()),
|
||||
(10, 2, 16, 'Melee weapon combat fist 15cm', 10, 7.09, 0, 0, 0, util.VN_CURDATE()),
|
||||
(11, 1, 16, 'Ranged weapon longbow 200cm', 1, 103.49, 0, 0, 0, util.VN_CURDATE()),
|
||||
(12, 4, 16, 'Melee weapon heavy shield 100cm', 20, 1.71, 0, 0, 0, util.VN_CURDATE()),
|
||||
(13, 2, 8, 'Melee weapon combat fist 15cm', 10, 7.08, 0, 0, 0, util.VN_CURDATE()),
|
||||
(14, 1, 8, 'Ranged weapon longbow 200cm', 2, 103.49, 0, 0, 0, util.VN_CURDATE()),
|
||||
(15, 1, 19, 'Ranged weapon longbow 200cm', 1, 103.49, 0, 0, 0, util.VN_CURDATE()),
|
||||
(16, 2, 20, 'Melee weapon combat fist 15cm', 20, 7.07, 0, 0, 0, util.VN_CURDATE()),
|
||||
(17, 2, 22, 'Melee weapon combat fist 15cm', 30, 7.07, 0, 0, 0, DATE_ADD(util.VN_CURDATE(), INTERVAL +1 MONTH)),
|
||||
(18, 4, 22, 'Melee weapon heavy shield 100cm', 20, 1.69, 0, 0, 0, DATE_ADD(util.VN_CURDATE(), INTERVAL +1 MONTH)),
|
||||
(19, 1, 4, 'Ranged weapon longbow 200cm', 1, 8.07, 0, 0, 0, DATE_ADD(util.VN_CURDATE(), INTERVAL -3 MONTH)),
|
||||
(20, 1, 5, 'Ranged weapon longbow 200cm', 1, 8.07, 0, 0, 0, DATE_ADD(util.VN_CURDATE(), INTERVAL -4 MONTH)),
|
||||
(21, 1, 6, 'Ranged weapon longbow 200cm', 1, 8.07, 0, 0, 0, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH)),
|
||||
(22, 1, 7, 'Ranged weapon longbow 200cm', 1, 8.07, 0, 0, 0, util.VN_CURDATE()),
|
||||
(23, 1, 9, 'Ranged weapon longbow 200cm', 1, 8.07, 0, 0, 0, util.VN_CURDATE()),
|
||||
(24, 1, 10, 'Ranged weapon longbow 200cm', 1, 8.07, 0, 0, 0, util.VN_CURDATE()),
|
||||
(25, 4, 12, 'Melee weapon heavy shield 100cm', 20, 1.72, 0, 0, 0, util.VN_CURDATE()),
|
||||
(26, 4, 13, 'Melee weapon heavy shield 100cm', 20, 1.72, 0, 0, 0, util.VN_CURDATE()),
|
||||
(27, 4, 14, 'Melee weapon heavy shield 100cm', 20, 1.72, 0, 0, 0, util.VN_CURDATE()),
|
||||
(28, 4, 15, 'Melee weapon heavy shield 100cm', 20, 1.72, 0, 0, 0, util.VN_CURDATE()),
|
||||
(29, 4, 17, 'Melee weapon heavy shield 100cm', 20, 1.72, 0, 0, 0, util.VN_CURDATE()),
|
||||
(30, 4, 18, 'Melee weapon heavy shield 100cm', 20, 1.72, 0, 0, 0, util.VN_CURDATE()),
|
||||
(31, 2, 23, 'Melee weapon combat fist 15cm', -5, 7.08, 0, 0, 0, util.VN_CURDATE()),
|
||||
(32, 1, 24, 'Ranged weapon longbow 200cm', -1, 8.07, 0, 0, 0, util.VN_CURDATE()),
|
||||
(33, 5, 14, 'Ranged weapon pistol 9mm', 50, 1.79, 0, 0, 0, util.VN_CURDATE()),
|
||||
(34, 4, 28, 'Melee weapon heavy shield 100cm', 20, 1.72, 0, 0, 0, util.VN_CURDATE()),
|
||||
(35, 4, 29, 'Melee weapon heavy shield 100cm', 20, 1.72, 0, 0, 0, util.VN_CURDATE()),
|
||||
(37, 4, 31, 'Melee weapon heavy shield 100cm', 20, 1.72, 0, 0, 0, util.VN_CURDATE()),
|
||||
(36, 4, 30, 'Melee weapon heavy shield 100cm', 20, 1.72, 0, 0, 0, util.VN_CURDATE()),
|
||||
(38, 2, 32, 'Melee weapon combat fist 15cm', 30, 7.07, 0, 0, 0, DATE_ADD(util.VN_CURDATE(), INTERVAL +1 MONTH)),
|
||||
(39, 1, 32, 'Ranged weapon longbow 200cm', 2, 103.49, 0, 0, 0, util.VN_CURDATE()),
|
||||
(40, 2, 34, 'Melee weapon combat fist 15cm', 10.00, 3.91, 0, 0, 0, util.VN_CURDATE()),
|
||||
(41, 2, 35, 'Melee weapon combat fist 15cm', 8.00, 3.01, 0, 0, 0, util.VN_CURDATE()),
|
||||
(42, 2, 36, 'Melee weapon combat fist 15cm', 6.00, 2.50, 0, 0, 0, util.VN_CURDATE());
|
||||
(1, 1, 1, 'Ranged weapon longbow 200cm', 5, 100.39, 0, 0, 0, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 'hasComponentLack'),
|
||||
(2, 2, 1, 'Melee weapon combat fist 15cm', 10, 7.07, 0, 0, 0, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 'hasComponentLack'),
|
||||
(3, 1, 1, 'Ranged weapon longbow 200cm', 2, 100.39, 0, 0, 0, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 'hasComponentLack'),
|
||||
(4, 4, 1, 'Melee weapon heavy shield 100cm', 20, 1.69, 0, 0, 0, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 'hasComponentLack'),
|
||||
(5, 1, 2, 'Ranged weapon longbow 200cm', 1, 110.33, 0, 0, 0, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 'hasComponentLack'),
|
||||
(6, 1, 3, 'Ranged weapon longbow 200cm', 1, 110.33, 0, 0, 0, DATE_ADD(util.VN_CURDATE(), INTERVAL -2 MONTH), 'hasComponentLack'),
|
||||
(7, 2, 11, 'Melee weapon combat fist 15cm', 15, 7.74, 0, 0, 0, util.VN_CURDATE(), NULL),
|
||||
(8, 4, 11, 'Melee weapon heavy shield 100cm', 10, 1.79, 0, 0, 0, util.VN_CURDATE(), NULL),
|
||||
(9, 1, 16, 'Ranged weapon longbow 200cm', 1, 103.49, 0, 0, 0, util.VN_CURDATE(), NULL),
|
||||
(10, 2, 16, 'Melee weapon combat fist 15cm', 10, 7.09, 0, 0, 0, util.VN_CURDATE(), NULL),
|
||||
(11, 1, 16, 'Ranged weapon longbow 200cm', 1, 103.49, 0, 0, 0, util.VN_CURDATE(), NULL),
|
||||
(12, 4, 16, 'Melee weapon heavy shield 100cm', 20, 1.71, 0, 0, 0, util.VN_CURDATE(), NULL),
|
||||
(13, 2, 8, 'Melee weapon combat fist 15cm', 10, 7.08, 0, 0, 0, util.VN_CURDATE(), NULL),
|
||||
(14, 1, 8, 'Ranged weapon longbow 200cm', 2, 103.49, 0, 0, 0, util.VN_CURDATE(), NULL),
|
||||
(15, 1, 19, 'Ranged weapon longbow 200cm', 1, 103.49, 0, 0, 0, util.VN_CURDATE(), NULL),
|
||||
(16, 2, 20, 'Melee weapon combat fist 15cm', 20, 7.07, 0, 0, 0, util.VN_CURDATE(), 'hasComponentLack'),
|
||||
(17, 2, 22, 'Melee weapon combat fist 15cm', 30, 7.07, 0, 0, 0, DATE_ADD(util.VN_CURDATE(), INTERVAL +1 MONTH), 'hasComponentLack'),
|
||||
(18, 4, 22, 'Melee weapon heavy shield 100cm', 20, 1.69, 0, 0, 0, DATE_ADD(util.VN_CURDATE(), INTERVAL +1 MONTH), 'hasComponentLack'),
|
||||
(19, 1, 4, 'Ranged weapon longbow 200cm', 1, 8.07, 0, 0, 0, DATE_ADD(util.VN_CURDATE(), INTERVAL -3 MONTH), 'hasComponentLack'),
|
||||
(20, 1, 5, 'Ranged weapon longbow 200cm', 1, 8.07, 0, 0, 0, DATE_ADD(util.VN_CURDATE(), INTERVAL -4 MONTH), 'hasComponentLack'),
|
||||
(21, 1, 6, 'Ranged weapon longbow 200cm', 1, 8.07, 0, 0, 0, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 'hasComponentLack'),
|
||||
(22, 1, 7, 'Ranged weapon longbow 200cm', 1, 8.07, 0, 0, 0, util.VN_CURDATE(), 'hasComponentLack'),
|
||||
(23, 1, 9, 'Ranged weapon longbow 200cm', 1, 8.07, 0, 0, 0, util.VN_CURDATE(), 'hasComponentLack'),
|
||||
(24, 1, 10, 'Ranged weapon longbow 200cm', 1, 8.07, 0, 0, 0, util.VN_CURDATE(), 'hasComponentLack'),
|
||||
(25, 4, 12, 'Melee weapon heavy shield 100cm', 20, 1.72, 0, 0, 0, util.VN_CURDATE(), 'hasComponentLack'),
|
||||
(26, 4, 13, 'Melee weapon heavy shield 100cm', 20, 1.72, 0, 0, 0, util.VN_CURDATE(), 'hasComponentLack'),
|
||||
(27, 4, 14, 'Melee weapon heavy shield 100cm', 20, 1.72, 0, 0, 0, util.VN_CURDATE(), 'hasComponentLack'),
|
||||
(28, 4, 15, 'Melee weapon heavy shield 100cm', 20, 1.72, 0, 0, 0, util.VN_CURDATE(), 'hasComponentLack'),
|
||||
(29, 4, 17, 'Melee weapon heavy shield 100cm', 20, 1.72, 0, 0, 0, util.VN_CURDATE(), 'hasComponentLack'),
|
||||
(30, 4, 18, 'Melee weapon heavy shield 100cm', 20, 1.72, 0, 0, 0, util.VN_CURDATE(), 'hasComponentLack'),
|
||||
(31, 2, 23, 'Melee weapon combat fist 15cm', -5, 7.08, 0, 0, 0, util.VN_CURDATE(), NULL),
|
||||
(32, 1, 24, 'Ranged weapon longbow 200cm', -1, 8.07, 0, 0, 0, util.VN_CURDATE(), NULL),
|
||||
(33, 5, 14, 'Ranged weapon pistol 9mm', 50, 1.79, 0, 0, 0, util.VN_CURDATE(), NULL),
|
||||
(34, 4, 28, 'Melee weapon heavy shield 100cm', 20, 1.72, 0, 0, 0, util.VN_CURDATE(), 'hasComponentLack'),
|
||||
(35, 4, 29, 'Melee weapon heavy shield 100cm', 20, 1.72, 0, 0, 0, util.VN_CURDATE(), 'hasComponentLack'),
|
||||
(37, 4, 31, 'Melee weapon heavy shield 100cm', 20, 1.72, 0, 0, 0, util.VN_CURDATE(), NULL),
|
||||
(36, 4, 30, 'Melee weapon heavy shield 100cm', 20, 1.72, 0, 0, 0, util.VN_CURDATE(), 'hasComponentLack'),
|
||||
(38, 2, 32, 'Melee weapon combat fist 15cm', 30, 7.07, 0, 0, 0, DATE_ADD(util.VN_CURDATE(), INTERVAL +1 MONTH), 'hasComponentLack'),
|
||||
(39, 1, 32, 'Ranged weapon longbow 200cm', 2, 103.49, 0, 0, 0, util.VN_CURDATE(), 'hasComponentLack'),
|
||||
(40, 2, 34, 'Melee weapon combat fist 15cm', 10.00, 3.91, 0, 0, 0, util.VN_CURDATE(), 'hasComponentLack'),
|
||||
(41, 2, 35, 'Melee weapon combat fist 15cm', 8.00, 3.01, 0, 0, 0, util.VN_CURDATE(), 'hasComponentLack'),
|
||||
(42, 2, 36, 'Melee weapon combat fist 15cm', 6.00, 2.50, 0, 0, 0, util.VN_CURDATE(), 'hasComponentLack');
|
||||
|
||||
INSERT INTO `vn`.`saleComponent`(`saleFk`, `componentFk`, `value`)
|
||||
VALUES
|
||||
|
@ -3945,11 +3945,15 @@ VALUES
|
|||
(35, 'ES12346B12345679', 3, 241);
|
||||
|
||||
INSERT INTO vn.accountDetailType
|
||||
(id, description)
|
||||
(id, description, code)
|
||||
VALUES
|
||||
(1, 'IBAN'),
|
||||
(2, 'SWIFT'),
|
||||
(3, 'Referencia Remesas'),
|
||||
(4, 'Referencia Transferencias'),
|
||||
(5, 'Referencia Nominas'),
|
||||
(6, 'ABA');
|
||||
(1, 'IBAN', 'iban'),
|
||||
(2, 'SWIFT', 'swift'),
|
||||
(3, 'Referencia Remesas', 'remRef'),
|
||||
(4, 'Referencia Transferencias', 'trnRef'),
|
||||
(5, 'Referencia Nominas', 'payRef'),
|
||||
(6, 'ABA', 'aba');
|
||||
|
||||
INSERT INTO vn.ormConfig SET
|
||||
id = 1,
|
||||
selectLimit = 1000;
|
|
@ -1,13 +1,9 @@
|
|||
DELIMITER $$
|
||||
CREATE OR REPLACE DEFINER=`root`@`localhost` EVENT `srt`.`moving_clean`
|
||||
ON SCHEDULE EVERY 5 MINUTE
|
||||
ON SCHEDULE EVERY 15 MINUTE
|
||||
STARTS '2022-01-21 00:00:00.000'
|
||||
ON COMPLETION PRESERVE
|
||||
ENABLE
|
||||
COMMENT 'Llama a srt.moving_clean para que elimine y notifique de registr'
|
||||
DO BEGIN
|
||||
|
||||
CALL srt.moving_clean();
|
||||
|
||||
END$$
|
||||
DO CALL srt.moving_clean()$$
|
||||
DELIMITER ;
|
||||
|
|
|
@ -3,61 +3,69 @@ CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `srt`.`moving_clean`()
|
|||
BEGIN
|
||||
/**
|
||||
* Elimina movimientos por inactividad
|
||||
*
|
||||
*/
|
||||
DECLARE vExpeditionFk INT;
|
||||
DECLARE vBufferToFk INT;
|
||||
DECLARE vBufferFromFk INT;
|
||||
DECLARE done BOOL DEFAULT FALSE;
|
||||
|
||||
DECLARE cur CURSOR FOR
|
||||
SELECT m.expeditionFk, m.bufferToFk, m.bufferFromFk
|
||||
FROM srt.moving m
|
||||
JOIN srt.config c
|
||||
JOIN (SELECT bufferFk, SUM(isActive) hasBox
|
||||
FROM srt.photocell
|
||||
GROUP BY bufferFk) sub ON sub.bufferFk = m.bufferFromFk
|
||||
WHERE m.created < TIMESTAMPADD(MINUTE, - c.movingMaxLife , util.VN_NOW())
|
||||
DECLARE vStateOutFk INT
|
||||
DEFAULT (SELECT id FROM expeditionState WHERE `description` = 'OUT');
|
||||
DECLARE vDone BOOL;
|
||||
DECLARE vSorter CURSOR FOR
|
||||
SELECT m.expeditionFk, m.bufferFromFk
|
||||
FROM moving m
|
||||
JOIN (
|
||||
SELECT bufferFk, SUM(isActive) hasBox
|
||||
FROM photocell
|
||||
GROUP BY bufferFk
|
||||
) sub ON sub.bufferFk = m.bufferFromFk
|
||||
WHERE m.created < (util.VN_NOW() - INTERVAL (SELECT movingMaxLife FROM config) MINUTE)
|
||||
AND NOT sub.hasBox;
|
||||
|
||||
DECLARE CONTINUE HANDLER FOR NOT FOUND SET done = 1;
|
||||
DECLARE CONTINUE HANDLER FOR NOT FOUND SET vDone = TRUE;
|
||||
|
||||
OPEN cur;
|
||||
DECLARE EXIT HANDLER FOR SQLEXCEPTION
|
||||
BEGIN
|
||||
ROLLBACK;
|
||||
RESIGNAL;
|
||||
END;
|
||||
|
||||
bucle: LOOP
|
||||
OPEN vSorter;
|
||||
l: LOOP
|
||||
SET vDone = FALSE;
|
||||
FETCH vSorter INTO vExpeditionFk, vBufferFromFk;
|
||||
|
||||
FETCH cur INTO vExpeditionFk, vBufferToFk, vBufferFromFk;
|
||||
|
||||
IF done THEN
|
||||
LEAVE bucle;
|
||||
IF vDone THEN
|
||||
LEAVE l;
|
||||
END IF;
|
||||
|
||||
DELETE FROM srt.moving
|
||||
START TRANSACTION;
|
||||
|
||||
SELECT id
|
||||
FROM moving
|
||||
WHERE expeditionFk = vExpeditionFk
|
||||
FOR UPDATE;
|
||||
|
||||
DELETE FROM moving
|
||||
WHERE expeditionFk = vExpeditionFk;
|
||||
|
||||
UPDATE srt.expedition e
|
||||
JOIN srt.expeditionState es ON es.description = 'OUT'
|
||||
SET
|
||||
bufferFk = NULL,
|
||||
SELECT id
|
||||
FROM expedition
|
||||
WHERE id = vExpeditionFk
|
||||
OR (bufferFk = vBufferFromFk AND `position` > 0)
|
||||
FOR UPDATE;
|
||||
|
||||
UPDATE expedition
|
||||
SET bufferFk = NULL,
|
||||
`position` = NULL,
|
||||
stateFk = es.id
|
||||
WHERE e.id = vExpeditionFk;
|
||||
stateFk = vStateOutFk
|
||||
WHERE id = vExpeditionFk;
|
||||
|
||||
UPDATE srt.expedition e
|
||||
SET e.`position` = e.`position` - 1
|
||||
WHERE e.bufferFk = vBufferFromFk
|
||||
AND e.`position` > 0;
|
||||
|
||||
CALL vn.mail_insert(
|
||||
'pako@verdnatura.es, carles@verdnatura.es',
|
||||
NULL,
|
||||
CONCAT('Moving_clean. Expedition: ', vExpeditionFk, ' estaba parada'),
|
||||
CONCAT('Expedition: ', vExpeditionFk,' vBufferToFk: ', vBufferToFk)
|
||||
);
|
||||
|
||||
END LOOP bucle;
|
||||
|
||||
CLOSE cur;
|
||||
UPDATE expedition
|
||||
SET `position` = `position` - 1
|
||||
WHERE bufferFk = vBufferFromFk
|
||||
AND `position` > 0;
|
||||
|
||||
COMMIT;
|
||||
END LOOP l;
|
||||
CLOSE vSorter;
|
||||
END$$
|
||||
DELIMITER ;
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
DELIMITER $$
|
||||
CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `srt`.`buffer_afterDelete`
|
||||
AFTER DELETE ON `buffer`
|
||||
FOR EACH ROW
|
||||
BEGIN
|
||||
INSERT INTO buffer
|
||||
SET `action` = 'delete',
|
||||
`changedModel` = 'Buffer',
|
||||
`changedModelId` = OLD.id,
|
||||
`userFk` = account.myUser_getId();
|
||||
END$$
|
||||
DELIMITER ;
|
|
@ -0,0 +1,8 @@
|
|||
DELIMITER $$
|
||||
CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `srt`.`buffer_beforeInsert`
|
||||
BEFORE INSERT ON `buffer`
|
||||
FOR EACH ROW
|
||||
BEGIN
|
||||
SET NEW.editorFk = account.myUser_getId();
|
||||
END$$
|
||||
DELIMITER ;
|
|
@ -0,0 +1,8 @@
|
|||
DELIMITER $$
|
||||
CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `srt`.`buffer_beforeUpdate`
|
||||
BEFORE UPDATE ON `buffer`
|
||||
FOR EACH ROW
|
||||
BEGIN
|
||||
SET NEW.editorFk = account.myUser_getId();
|
||||
END$$
|
||||
DELIMITER ;
|
|
@ -0,0 +1,12 @@
|
|||
DELIMITER $$
|
||||
CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `srt`.`config_afterDelete`
|
||||
AFTER DELETE ON `config`
|
||||
FOR EACH ROW
|
||||
BEGIN
|
||||
INSERT INTO config
|
||||
SET `action` = 'delete',
|
||||
`changedModel` = 'Config',
|
||||
`changedModelId` = OLD.id,
|
||||
`userFk` = account.myUser_getId();
|
||||
END$$
|
||||
DELIMITER ;
|
|
@ -0,0 +1,8 @@
|
|||
DELIMITER $$
|
||||
CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `srt`.`config_beforeInsert`
|
||||
BEFORE INSERT ON `config`
|
||||
FOR EACH ROW
|
||||
BEGIN
|
||||
SET NEW.editorFk = account.myUser_getId();
|
||||
END$$
|
||||
DELIMITER ;
|
|
@ -0,0 +1,8 @@
|
|||
DELIMITER $$
|
||||
CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `srt`.`config_beforeUpdate`
|
||||
BEFORE UPDATE ON `config`
|
||||
FOR EACH ROW
|
||||
BEGIN
|
||||
SET NEW.editorFk = account.myUser_getId();
|
||||
END$$
|
||||
DELIMITER ;
|
|
@ -1,26 +1,43 @@
|
|||
DELIMITER $$
|
||||
CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`invoiceSerial`(vClientFk INT, vCompanyFk INT, vType CHAR(1))
|
||||
RETURNS char(1) CHARSET utf8mb3 COLLATE utf8mb3_general_ci
|
||||
CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`invoiceSerial`(
|
||||
vClientFk INT,
|
||||
vCompanyFk INT,
|
||||
vType CHAR(15)
|
||||
)
|
||||
RETURNS char(2) CHARSET utf8mb3 COLLATE utf8mb3_general_ci
|
||||
DETERMINISTIC
|
||||
BEGIN
|
||||
/**
|
||||
* Obtiene la serie de de una factura
|
||||
* dependiendo del area del cliente.
|
||||
*
|
||||
* @param vClientFk Id del cliente
|
||||
* @param vCompanyFk Id de la empresa
|
||||
* @param vType Tipo de factura ["R", "M", "G"]
|
||||
* @return Serie de la factura
|
||||
*/
|
||||
DECLARE vTaxArea VARCHAR(25);
|
||||
DECLARE vSerie CHAR(1);
|
||||
/**
|
||||
* Obtiene la serie de una factura
|
||||
* dependiendo del area del cliente.
|
||||
*
|
||||
* @param vClientFk Id del cliente
|
||||
* @param vCompanyFk Id de la empresa
|
||||
* @param vType Tipo de factura (vn.invoiceOutSerial.type[ENUM])
|
||||
* @return vSerie de la factura
|
||||
*/
|
||||
DECLARE vTaxArea VARCHAR(25) COLLATE utf8mb3_general_ci;
|
||||
DECLARE vTransactionCode INT(2);
|
||||
DECLARE vSerie CHAR(2);
|
||||
|
||||
IF (SELECT hasInvoiceSimplified FROM client WHERE id = vClientFk) THEN
|
||||
RETURN 'S';
|
||||
END IF;
|
||||
|
||||
SELECT clientTaxArea(vClientFk, vCompanyFk) INTO vTaxArea;
|
||||
SELECT invoiceSerialArea(vType,vTaxArea) INTO vSerie;
|
||||
SELECT addressTaxArea(defaultAddressFk, vCompanyFk) INTO vTaxArea
|
||||
FROM client
|
||||
WHERE id = vClientFk;
|
||||
|
||||
SELECT CodigoTransaccion INTO vTransactionCode
|
||||
FROM taxArea
|
||||
WHERE code = vTaxArea;
|
||||
|
||||
SELECT ios.code INTO vSerie
|
||||
FROM invoiceOutSerial ios
|
||||
JOIN taxArea ta ON ta.code = ios.taxAreaFk
|
||||
WHERE ios.`type` = vType
|
||||
AND ta.CodigoTransaccion = vTransactionCode;
|
||||
|
||||
RETURN vSerie;
|
||||
END$$
|
||||
DELIMITER ;
|
||||
|
|
|
@ -1,34 +0,0 @@
|
|||
DELIMITER $$
|
||||
CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`invoiceSerialArea`(vType CHAR(1), vTaxArea VARCHAR(25))
|
||||
RETURNS char(1) CHARSET utf8mb3 COLLATE utf8mb3_unicode_ci
|
||||
DETERMINISTIC
|
||||
BEGIN
|
||||
DECLARE vSerie CHAR(1);
|
||||
|
||||
IF vType = 'R' THEN
|
||||
SELECT
|
||||
CASE vTaxArea
|
||||
WHEN 'CEE' THEN 'H'
|
||||
WHEN 'WORLD' THEN 'E'
|
||||
ELSE 'T'
|
||||
END INTO vSerie;
|
||||
-- Factura multiple
|
||||
ELSEIF vType = 'M' THEN
|
||||
SELECT
|
||||
CASE vTaxArea
|
||||
WHEN 'CEE' THEN 'H'
|
||||
WHEN 'WORLD' THEN 'E'
|
||||
ELSE 'M'
|
||||
END INTO vSerie;
|
||||
-- Factura global
|
||||
ELSEIF vType = 'G' THEN
|
||||
SELECT
|
||||
CASE vTaxArea
|
||||
WHEN 'CEE' THEN 'V'
|
||||
WHEN 'WORLD' THEN 'X'
|
||||
ELSE 'A'
|
||||
END INTO vSerie;
|
||||
END IF;
|
||||
RETURN vSerie;
|
||||
END$$
|
||||
DELIMITER ;
|
|
@ -2,25 +2,33 @@ DELIMITER $$
|
|||
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`buy_recalcPrices`()
|
||||
BEGIN
|
||||
/**
|
||||
* Recalcula los precios para las compras insertadas en tmp.buyRecalc
|
||||
* Recalcula los precios para las compras insertadas en tmp.buyRecalc.
|
||||
*
|
||||
* @param tmp.buyRecalc (id)
|
||||
*/
|
||||
DECLARE vLanded DATE;
|
||||
DECLARE vWarehouseFk INT;
|
||||
DECLARE vHasNotPrice BOOL;
|
||||
DECLARE vBuyingValue DECIMAL(10,4);
|
||||
DECLARE vPackagingFk VARCHAR(10);
|
||||
DECLARE vIsWarehouseFloramondo BOOL;
|
||||
|
||||
SELECT t.landed, t.warehouseInFk, (w.`name` = 'Floramondo')
|
||||
INTO vLanded, vWarehouseFk, vIsWarehouseFloramondo
|
||||
DECLARE vDone BOOL;
|
||||
DECLARE vTravels CURSOR FOR
|
||||
SELECT t.landed, t.warehouseInFk, (w.code = 'flm')
|
||||
FROM tmp.buyRecalc br
|
||||
JOIN buy b ON b.id = br.id
|
||||
JOIN entry e ON e.id = b.entryFk
|
||||
JOIN travel t ON t.id = e.travelFk
|
||||
JOIN warehouse w ON w.id = t.warehouseInFk
|
||||
LIMIT 1;
|
||||
GROUP BY t.landed, t.warehouseInFk;
|
||||
|
||||
DECLARE CONTINUE HANDLER FOR NOT FOUND SET vDone = TRUE;
|
||||
|
||||
OPEN vTravels;
|
||||
l: LOOP
|
||||
SET vDone = FALSE;
|
||||
FETCH vTravels INTO vLanded, vWarehouseFk, vIsWarehouseFloramondo;
|
||||
|
||||
IF vDone THEN
|
||||
LEAVE l;
|
||||
END IF;
|
||||
|
||||
CALL rate_getPrices(vLanded, vWarehouseFk);
|
||||
|
||||
|
@ -40,13 +48,12 @@ BEGIN
|
|||
b.packageValue = @EF:= IF(vIsWarehouseFloramondo, 0, IFNULL(ROUND(IF(p.isPackageReturnable, p.returnCost / b.packing , p.`value` / b.packing), 3),0)),
|
||||
b.price3 = @t3:= IF(r.rate3 = 0, b.buyingValue,ROUND((b.buyingValue + @CF + @EF + @PF) / ((100 - r.rate3 - it.promo ) /100) ,2)), -- He añadido que el coste sea igual a tarifa3 si t3 = 0
|
||||
b.price2 = @t2:= round(@t3 * (1 + ((r.rate2 - r.rate3)/100)),2),
|
||||
b.price2 = @t2:= IF(@t2 <= @t3,@t3 , @t2);
|
||||
|
||||
SELECT (b.buyingValue = b.price2), b.buyingValue, b.packagingFk
|
||||
INTO vHasNotPrice, vBuyingValue, vPackagingFk
|
||||
FROM vn.buy b
|
||||
WHERE b.id = @buyId AND b.buyingValue <> 0.01;
|
||||
b.price2 = @t2:= IF(@t2 <= @t3,@t3 , @t2)
|
||||
WHERE tr.landed = vLanded
|
||||
AND tr.warehouseInFk = vWarehouseFk;
|
||||
|
||||
DROP TEMPORARY TABLE tmp.rate;
|
||||
END LOOP;
|
||||
CLOSE vTravels;
|
||||
END$$
|
||||
DELIMITER ;
|
||||
|
|
|
@ -9,10 +9,11 @@ BEGIN
|
|||
DECLARE vWarehouseFk INT;
|
||||
DECLARE vWagons INT;
|
||||
DECLARE vTrainFk INT;
|
||||
DECLARE vLinesLimit INT DEFAULT NULL;
|
||||
DECLARE vLinesLimit INT;
|
||||
DECLARE vTicketLines INT;
|
||||
DECLARE vVolumeLimit DECIMAL DEFAULT NULL;
|
||||
DECLARE vVolumeLimit DECIMAL;
|
||||
DECLARE vTicketVolume DECIMAL;
|
||||
DECLARE vSizeLimit INT;
|
||||
DECLARE vMaxTickets INT;
|
||||
DECLARE vStateFk VARCHAR(45);
|
||||
DECLARE vFirstTicketFk INT;
|
||||
|
@ -77,6 +78,7 @@ BEGIN
|
|||
o.trainFk,
|
||||
o.linesLimit,
|
||||
o.volumeLimit,
|
||||
o.sizeLimit,
|
||||
pc.collection_new_lockname
|
||||
INTO vMaxTickets,
|
||||
vHasUniqueCollectionTime,
|
||||
|
@ -88,6 +90,7 @@ BEGIN
|
|||
vTrainFk,
|
||||
vLinesLimit,
|
||||
vVolumeLimit,
|
||||
vSizeLimit,
|
||||
vLockName
|
||||
FROM productionConfig pc
|
||||
JOIN worker w ON w.id = vUserFk
|
||||
|
@ -172,6 +175,14 @@ BEGIN
|
|||
JOIN state s ON s.id = pb.state
|
||||
JOIN agencyMode am ON am.id = pb.agencyModeFk
|
||||
JOIN agency a ON a.id = am.agencyFk
|
||||
LEFT JOIN (
|
||||
SELECT pb.ticketFk, MAX(i.`size`) maxSize
|
||||
FROM tmp.productionBuffer pb
|
||||
JOIN ticket t ON t.id = pb.ticketfk
|
||||
JOIN sale s ON s.ticketFk = t.id
|
||||
JOIN item i ON i.id = s.itemFk
|
||||
GROUP BY pb.ticketFk
|
||||
) sub ON sub.ticketFk = pb.ticketFk
|
||||
JOIN productionConfig pc
|
||||
WHERE pb.shipped <> util.VN_CURDATE()
|
||||
OR (pb.ubicacion IS NULL AND a.isOwn)
|
||||
|
@ -183,8 +194,9 @@ BEGIN
|
|||
OR (NOT pb.V AND vItemPackingTypeFk = 'V')
|
||||
OR (pc.isPreviousPreparationRequired AND pb.previousWithoutParking)
|
||||
OR LENGTH(pb.problem) > 0
|
||||
OR (pb.lines >= vLinesLimit AND vLinesLimit IS NOT NULL)
|
||||
OR (pb.m3 >= vVolumeLimit AND vVolumeLimit IS NOT NULL);
|
||||
OR pb.lines > vLinesLimit
|
||||
OR pb.m3 > vVolumeLimit
|
||||
OR sub.maxSize > vSizeLimit;
|
||||
END IF;
|
||||
|
||||
-- Es importante que el primer ticket se coja en todos los casos
|
||||
|
|
|
@ -97,7 +97,7 @@ BEGIN
|
|||
AND (vCorrectingSerial = vSerial OR NOT hasAnyNegativeBase())
|
||||
THEN
|
||||
|
||||
-- el trigger añade el siguiente Id_Factura correspondiente a la vSerial
|
||||
-- el trigger añade el siguiente ref correspondiente a la vSerial
|
||||
INSERT INTO invoiceOut(
|
||||
ref,
|
||||
serial,
|
||||
|
|
|
@ -5,20 +5,18 @@ CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`itemShelving_transf
|
|||
)
|
||||
BEGIN
|
||||
/**
|
||||
* Transfiere producto de una ubicación a otra, fusionando si coincide el
|
||||
* packing y la fecha.
|
||||
* Transfiere producto de una ubicación a otra
|
||||
* fusionando si coincide el packing y la fecha.
|
||||
*
|
||||
* @param vItemShelvingFk Identificador de itemShelving
|
||||
* @param vShelvingFk Identificador de shelving
|
||||
*/
|
||||
DECLARE vNewItemShelvingFk INT DEFAULT 0;
|
||||
DECLARE vNewItemShelvingFk INT;
|
||||
|
||||
SELECT MAX(ish.id)
|
||||
INTO vNewItemShelvingFk
|
||||
SELECT MAX(ish.id) INTO vNewItemShelvingFk
|
||||
FROM itemShelving ish
|
||||
JOIN (
|
||||
SELECT
|
||||
itemFk,
|
||||
SELECT itemFk,
|
||||
packing,
|
||||
created,
|
||||
buyFk
|
||||
|
@ -26,7 +24,7 @@ BEGIN
|
|||
WHERE id = vItemShelvingFk
|
||||
) ish2 ON ish2.itemFk = ish.itemFk
|
||||
AND ish2.packing = ish.packing
|
||||
AND date(ish2.created) = date(ish.created)
|
||||
AND DATE(ish2.created) = DATE(ish.created)
|
||||
AND ish2.buyFk = ish.buyFk
|
||||
WHERE ish.shelvingFk = vShelvingFk COLLATE utf8_unicode_ci;
|
||||
|
||||
|
@ -39,10 +37,16 @@ BEGIN
|
|||
DELETE FROM itemShelving
|
||||
WHERE id = vItemShelvingFk;
|
||||
ELSE
|
||||
IF (SELECT EXISTS(SELECT id FROM shelving
|
||||
WHERE code = vShelvingFk COLLATE utf8_unicode_ci)) THEN
|
||||
|
||||
UPDATE itemShelving
|
||||
SET shelvingFk = vShelvingFk
|
||||
WHERE id = vItemShelvingFk;
|
||||
ELSE
|
||||
CALL util.throw('The shelving not exists');
|
||||
END IF;
|
||||
SELECT true;
|
||||
END IF;
|
||||
SELECT TRUE;
|
||||
END$$
|
||||
DELIMITER ;
|
|
@ -15,11 +15,6 @@ proc: BEGIN
|
|||
DECLARE vEndingDate DATETIME;
|
||||
DECLARE vIsTodayRelative BOOLEAN;
|
||||
|
||||
DECLARE EXIT HANDLER FOR SQLEXCEPTION
|
||||
BEGIN
|
||||
RESIGNAL;
|
||||
END;
|
||||
|
||||
SELECT util.dayEnd(util.VN_CURDATE()) + INTERVAL LEAST(vScopeDays, maxProductionScopeDays) DAY
|
||||
INTO vEndingDate
|
||||
FROM productionConfig;
|
||||
|
@ -273,7 +268,6 @@ proc: BEGIN
|
|||
DROP TEMPORARY TABLE
|
||||
tmp.productionTicket,
|
||||
tmp.ticket,
|
||||
tmp.risk,
|
||||
tmp.ticket_problems,
|
||||
tmp.ticketWithPrevia,
|
||||
tItemShelvingStock,
|
||||
|
|
|
@ -1,11 +1,13 @@
|
|||
DELIMITER $$
|
||||
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`sale_getProblems`(IN vIsTodayRelative tinyint(1))
|
||||
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`sale_getProblems`(
|
||||
vIsTodayRelative tinyint(1)
|
||||
)
|
||||
BEGIN
|
||||
/**
|
||||
* Calcula los problemas de cada venta para un conjunto de tickets.
|
||||
*
|
||||
* @param vIsTodayRelative Indica si se calcula el disponible como si todo saliera hoy
|
||||
* @table tmp.sale_getProblems(ticketFk, clientFk, warehouseFk, shipped) Identificadores de los tickets a calcular
|
||||
* @table tmp.sale_getProblems(ticketFk, clientFk, warehouseFk, shipped) Tickets a calcular
|
||||
* @return tmp.sale_problems
|
||||
*/
|
||||
DECLARE vWarehouseFk INT;
|
||||
|
@ -13,28 +15,20 @@ BEGIN
|
|||
DECLARE vAvailableCache INT;
|
||||
DECLARE vVisibleCache INT;
|
||||
DECLARE vDone BOOL;
|
||||
DECLARE vRequiredComponent INT;
|
||||
|
||||
DECLARE vCursor CURSOR FOR
|
||||
SELECT DISTINCT tt.warehouseFk, IF(vIsTodayRelative, util.VN_CURDATE(), DATE(tt.shipped))
|
||||
FROM tmp.sale_getProblems tt
|
||||
WHERE DATE(tt.shipped) BETWEEN util.VN_CURDATE()
|
||||
AND util.VN_CURDATE() + INTERVAL IF(vIsTodayRelative, 9.9, 1.9) DAY;
|
||||
SELECT DISTINCT warehouseFk, IF(vIsTodayRelative, util.VN_CURDATE(), DATE(shipped))
|
||||
FROM tmp.sale_getProblems
|
||||
WHERE shipped BETWEEN util.VN_CURDATE()
|
||||
AND util.dayEnd(util.VN_CURDATE() + INTERVAL IF(vIsTodayRelative, 9.9, 1.9) DAY);
|
||||
|
||||
DECLARE CONTINUE HANDLER FOR NOT FOUND SET vDone = TRUE;
|
||||
|
||||
DELETE tt.*
|
||||
FROM tmp.sale_getProblems tt
|
||||
JOIN ticketObservation tto ON tto.ticketFk = tt.ticketFk
|
||||
JOIN observationType ot ON ot.id = tto.observationTypeFk
|
||||
WHERE ot.code = 'administrative'
|
||||
AND tto.description = 'Miriam';
|
||||
|
||||
CREATE OR REPLACE TEMPORARY TABLE tmp.sale_problems (
|
||||
ticketFk INT(11),
|
||||
saleFk INT(11),
|
||||
isFreezed INTEGER(1) DEFAULT 0,
|
||||
risk DECIMAL(10,1) DEFAULT 0,
|
||||
hasRisk TINYINT(1) DEFAULT 0,
|
||||
hasHighRisk TINYINT(1) DEFAULT 0,
|
||||
hasTicketRequest INTEGER(1) DEFAULT 0,
|
||||
itemShortage VARCHAR(255),
|
||||
|
@ -48,105 +42,48 @@ BEGIN
|
|||
PRIMARY KEY (ticketFk, saleFk)
|
||||
) ENGINE = MEMORY;
|
||||
|
||||
CREATE OR REPLACE TEMPORARY TABLE tmp.ticket_list
|
||||
(PRIMARY KEY (ticketFk))
|
||||
ENGINE = MEMORY
|
||||
SELECT ticketFk, clientFk
|
||||
FROM tmp.sale_getProblems;
|
||||
|
||||
SELECT COUNT(*) INTO vRequiredComponent
|
||||
FROM component
|
||||
WHERE isRequired;
|
||||
|
||||
-- Too Little
|
||||
INSERT INTO tmp.sale_problems(ticketFk, isTooLittle)
|
||||
SELECT tp.ticketFk, TRUE
|
||||
FROM tmp.sale_getProblems tp
|
||||
JOIN ticket t ON t.id = tp.ticketFk
|
||||
JOIN (
|
||||
SELECT t.addressFk,
|
||||
SUM(ROUND(`ic`.`cm3delivery` * `s`.`quantity` / 1000, 0)) litros,
|
||||
t.totalWithoutVat
|
||||
FROM tmp.ticket_list tl
|
||||
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
|
||||
INSERT INTO tmp.sale_problems(ticketFk,
|
||||
saleFk,
|
||||
isFreezed,
|
||||
risk,
|
||||
hasRisk,
|
||||
hasHighRisk,
|
||||
hasTicketRequest,
|
||||
isTaxDataChecked,
|
||||
hasComponentLack,
|
||||
hasRounding,
|
||||
isTooLittle)
|
||||
SELECT sgp.ticketFk,
|
||||
s.id,
|
||||
IF(FIND_IN_SET('isFreezed', t.problem), TRUE, FALSE) isFreezed,
|
||||
t.risk,
|
||||
IF(FIND_IN_SET('hasRisk', t.problem), TRUE, FALSE) hasRisk,
|
||||
IF(FIND_IN_SET('hasHighRisk', t.problem), TRUE, FALSE) hasHighRisk,
|
||||
IF(FIND_IN_SET('hasTicketRequest', t.problem), TRUE, FALSE) hasTicketRequest,
|
||||
IF(FIND_IN_SET('isTaxDataChecked', t.problem), FALSE, TRUE) isTaxDataChecked,
|
||||
IF(FIND_IN_SET('hasComponentLack', s.problem), TRUE, FALSE) hasComponentLack,
|
||||
IF(FIND_IN_SET('hasRounding', s.problem),
|
||||
LEFT(GROUP_CONCAT('RE: ', i.id, ' ', IFNULL(i.longName,'') SEPARATOR ', '), 250),
|
||||
NULL
|
||||
) hasRounding,
|
||||
IF(FIND_IN_SET('isTooLittle', t.problem)
|
||||
AND util.VN_NOW() < (util.VN_CURDATE() + INTERVAL HOUR(zc.`hour`) HOUR) + INTERVAL MINUTE(zc.`hour`) MINUTE,
|
||||
TRUE, FALSE) isTooLittle
|
||||
FROM tmp.sale_getProblems sgp
|
||||
JOIN ticket t ON t.id = sgp.ticketFk
|
||||
LEFT JOIN sale s ON s.ticketFk = t.id
|
||||
LEFT JOIN item i ON i.id = s.itemFk
|
||||
LEFT JOIN zoneClosure zc ON zc.zoneFk = t.zoneFk
|
||||
AND zc.dated = util.VN_CURDATE()
|
||||
JOIN agencyMode am ON am.id = t.agencyModeFk
|
||||
JOIN deliveryMethod dm ON dm.id = am.deliveryMethodFk
|
||||
WHERE util.VN_NOW() < (util.VN_CURDATE() + INTERVAL HOUR(zc.`hour`) HOUR) + INTERVAL MINUTE(zc.`hour`) MINUTE
|
||||
AND dm.code IN ('AGENCY','DELIVERY','PICKUP')
|
||||
AND t.shipped BETWEEN util.VN_CURDATE() AND util.midnight()
|
||||
GROUP BY t.addressFk
|
||||
) sub ON sub.addressFk = t.addressFk
|
||||
JOIN volumeConfig vc
|
||||
WHERE sub.litros < vc.minTicketVolume
|
||||
AND sub.totalWithoutVat < vc.minTicketValue;
|
||||
WHERE s.problem <> '' OR t.problem <> '' OR t.risk
|
||||
GROUP BY t.id, s.id;
|
||||
|
||||
-- VIP
|
||||
INSERT INTO tmp.sale_problems(ticketFk, isVip)
|
||||
SELECT DISTINCT tl.ticketFk, TRUE
|
||||
FROM tmp.ticket_list tl
|
||||
JOIN client c ON c.id = tl.clientFk
|
||||
SELECT sgp.ticketFk, TRUE
|
||||
FROM tmp.sale_getProblems sgp
|
||||
JOIN client c ON c.id = sgp.clientFk
|
||||
WHERE c.businessTypeFk = 'VIP'
|
||||
ON DUPLICATE KEY UPDATE isVip = TRUE;
|
||||
|
||||
-- Faltan componentes
|
||||
INSERT INTO tmp.sale_problems(ticketFk, hasComponentLack, saleFk)
|
||||
SELECT t.id, COUNT(c.id) < vRequiredComponent hasComponentLack, s.id
|
||||
FROM tmp.ticket_list tl
|
||||
JOIN ticket t ON t.id = tl.ticketFk
|
||||
JOIN sale s ON s.ticketFk = t.id
|
||||
JOIN agencyMode am ON am.id = t.agencyModeFk
|
||||
JOIN deliveryMethod dm ON dm.id = am.deliveryMethodFk
|
||||
LEFT JOIN saleComponent sc ON sc.saleFk = s.id
|
||||
LEFT JOIN component c ON c.id = sc.componentFk
|
||||
AND c.isRequired
|
||||
WHERE dm.code IN ('AGENCY','DELIVERY','PICKUP')
|
||||
AND s.quantity > 0
|
||||
GROUP BY s.id
|
||||
HAVING hasComponentLack;
|
||||
|
||||
-- Cliente congelado
|
||||
INSERT INTO tmp.sale_problems(ticketFk, isFreezed)
|
||||
SELECT DISTINCT tl.ticketFk, TRUE
|
||||
FROM tmp.ticket_list tl
|
||||
JOIN client c ON c.id = tl.clientFk
|
||||
WHERE c.isFreezed
|
||||
ON DUPLICATE KEY UPDATE isFreezed = c.isFreezed;
|
||||
|
||||
-- Credit exceeded
|
||||
CREATE OR REPLACE TEMPORARY TABLE tmp.clientGetDebt
|
||||
(PRIMARY KEY (clientFk))
|
||||
ENGINE = MEMORY
|
||||
SELECT DISTINCT clientFk
|
||||
FROM tmp.ticket_list;
|
||||
|
||||
CALL client_getDebt(util.VN_CURDATE());
|
||||
|
||||
INSERT INTO tmp.sale_problems(ticketFk, risk, hasHighRisk)
|
||||
SELECT DISTINCT tl.ticketFk, r.risk, ((r.risk - cc.riskTolerance) > c.credit + 10)
|
||||
FROM tmp.ticket_list tl
|
||||
JOIN ticket t ON t.id = tl.ticketFk
|
||||
JOIN agencyMode a ON t.agencyModeFk = a.id
|
||||
JOIN tmp.risk r ON r.clientFk = t.clientFk
|
||||
JOIN client c ON c.id = t.clientFk
|
||||
JOIN clientConfig cc
|
||||
WHERE r.risk > c.credit + 10
|
||||
AND NOT a.isRiskFree
|
||||
ON DUPLICATE KEY UPDATE
|
||||
risk = r.risk, hasHighRisk = ((r.risk - cc.riskTolerance) > c.credit + 10);
|
||||
|
||||
-- Antiguo COD 100, son peticiones de compra sin terminar
|
||||
INSERT INTO tmp.sale_problems(ticketFk, hasTicketRequest)
|
||||
SELECT DISTINCT tl.ticketFk, TRUE
|
||||
FROM tmp.ticket_list tl
|
||||
JOIN ticketRequest tr ON tr.ticketFk = tl.ticketFk
|
||||
WHERE tr.isOK IS NULL
|
||||
ON DUPLICATE KEY UPDATE hasTicketRequest = TRUE;
|
||||
ON DUPLICATE KEY UPDATE isVIP = TRUE;
|
||||
|
||||
CREATE OR REPLACE TEMPORARY TABLE tItemShelvingStock_byWarehouse
|
||||
(INDEX (itemFk, warehouseFk))
|
||||
|
@ -158,10 +95,9 @@ BEGIN
|
|||
JOIN shelving sh ON sh.code = ish.shelvingFk
|
||||
JOIN parking p ON p.id = sh.parkingFk
|
||||
JOIN sector s ON s.id = p.sectorFk
|
||||
GROUP BY ish.itemFk,
|
||||
s.warehouseFk;
|
||||
GROUP BY ish.itemFk, s.warehouseFk;
|
||||
|
||||
-- Disponible, Faltas, Inventario y Retrasos
|
||||
-- Disponible, faltas, inventario y retrasos
|
||||
OPEN vCursor;
|
||||
l: LOOP
|
||||
SET vDone = FALSE;
|
||||
|
@ -180,14 +116,14 @@ BEGIN
|
|||
INSERT INTO tmp.sale_problems(ticketFk, itemShortage, saleFk)
|
||||
SELECT ticketFk, problem, saleFk
|
||||
FROM (
|
||||
SELECT tl.ticketFk,
|
||||
LEFT(CONCAT('F: ',GROUP_CONCAT(i.id, ' ', i.longName, ' ')),250) problem,
|
||||
s.id AS saleFk
|
||||
FROM tmp.ticket_list tl
|
||||
JOIN ticket t ON t.id = tl.ticketFk
|
||||
SELECT sgp.ticketFk,
|
||||
LEFT(CONCAT('F: ', GROUP_CONCAT(i.id, ' ', i.longName, ' ')), 250) problem,
|
||||
s.id saleFk
|
||||
FROM tmp.sale_getProblems sgp
|
||||
JOIN ticket t ON t.id = sgp.ticketFk
|
||||
JOIN sale s ON s.ticketFk = t.id
|
||||
JOIN item i ON i.id = s.itemFk
|
||||
JOIN itemType it on it.id = i.typeFk
|
||||
JOIN itemType it ON it.id = i.typeFk
|
||||
JOIN itemCategory ic ON ic.id = it.categoryFk
|
||||
LEFT JOIN cache.visible v ON v.item_id = i.id
|
||||
AND v.calc_id = vVisibleCache
|
||||
|
@ -195,8 +131,8 @@ BEGIN
|
|||
AND av.calc_id = vAvailableCache
|
||||
LEFT JOIN tItemShelvingStock_byWarehouse issw ON issw.itemFk = i.id
|
||||
AND issw.warehouseFk = t.warehouseFk
|
||||
WHERE IFNULL(v.visible,0) < s.quantity
|
||||
AND IFNULL(av.available ,0) < s.quantity
|
||||
WHERE IFNULL(v.visible, 0) < s.quantity
|
||||
AND IFNULL(av.available, 0) < s.quantity
|
||||
AND IFNULL(issw.visible, 0) < s.quantity
|
||||
AND NOT s.isPicked
|
||||
AND NOT s.reserved
|
||||
|
@ -205,27 +141,27 @@ BEGIN
|
|||
AND NOT i.generic
|
||||
AND util.VN_CURDATE() = vDate
|
||||
AND t.warehouseFk = vWarehouseFk
|
||||
GROUP BY tl.ticketFk) sub
|
||||
GROUP BY sgp.ticketFk) sub
|
||||
ON DUPLICATE KEY UPDATE itemShortage = sub.problem, saleFk = sub.saleFk;
|
||||
|
||||
-- Inventario: Visible suficiente, pero ubicado menor a la cantidad vendida
|
||||
INSERT INTO tmp.sale_problems(ticketFk, itemLost, saleFk)
|
||||
SELECT ticketFk, problem, saleFk
|
||||
FROM (
|
||||
SELECT tl.ticketFk,
|
||||
SELECT sgp.ticketFk,
|
||||
LEFT(GROUP_CONCAT('I: ', i.id, ' ', i.longName, ' '), 250) problem,
|
||||
s.id saleFk
|
||||
FROM tmp.ticket_list tl
|
||||
JOIN ticket t ON t.id = tl.ticketFk
|
||||
FROM tmp.sale_getProblems sgp
|
||||
JOIN ticket t ON t.id = sgp.ticketFk
|
||||
JOIN sale s ON s.ticketFk = t.id
|
||||
JOIN item i ON i.id = s.itemFk
|
||||
JOIN itemType it on it.id = i.typeFk
|
||||
JOIN itemType it ON it.id = i.typeFk
|
||||
JOIN itemCategory ic ON ic.id = it.categoryFk
|
||||
LEFT JOIN cache.visible v ON v.item_id = s.itemFk
|
||||
AND v.calc_id = vVisibleCache
|
||||
LEFT JOIN tItemShelvingStock_byWarehouse issw ON issw.itemFk = i.id
|
||||
AND issw.warehouseFk = t.warehouseFk
|
||||
WHERE IFNULL(v.visible,0) >= s.quantity
|
||||
WHERE IFNULL(v.visible, 0) >= s.quantity
|
||||
AND IFNULL(issw.visible, 0) < s.quantity
|
||||
AND s.quantity > 0
|
||||
AND NOT s.isPicked
|
||||
|
@ -235,22 +171,22 @@ BEGIN
|
|||
AND NOT i.generic
|
||||
AND util.VN_CURDATE() = vDate
|
||||
AND t.warehouseFk = vWarehouseFk
|
||||
GROUP BY tl.ticketFk
|
||||
GROUP BY sgp.ticketFk
|
||||
) sub
|
||||
ON DUPLICATE KEY UPDATE itemDelay = sub.problem, saleFk = sub.saleFk;
|
||||
ON DUPLICATE KEY UPDATE itemLost = sub.problem, saleFk = sub.saleFk;
|
||||
|
||||
-- Retraso: Disponible suficiente, pero no visible ni ubicado
|
||||
INSERT INTO tmp.sale_problems(ticketFk, itemDelay, saleFk)
|
||||
SELECT ticketFk, problem, saleFk
|
||||
FROM (
|
||||
SELECT tl.ticketFk,
|
||||
SELECT sgp.ticketFk,
|
||||
LEFT(GROUP_CONCAT('R: ', i.id, ' ', i.longName, ' '), 250) problem,
|
||||
s.id saleFk
|
||||
FROM tmp.ticket_list tl
|
||||
JOIN ticket t ON t.id = tl.ticketFk
|
||||
FROM tmp.sale_getProblems sgp
|
||||
JOIN ticket t ON t.id = sgp.ticketFk
|
||||
JOIN sale s ON s.ticketFk = t.id
|
||||
JOIN item i ON i.id = s.itemFk
|
||||
JOIN itemType it on it.id = i.typeFk
|
||||
JOIN itemType it ON it.id = i.typeFk
|
||||
JOIN itemCategory ic ON ic.id = it.categoryFk
|
||||
LEFT JOIN cache.visible v ON v.item_id = s.itemFk
|
||||
AND v.calc_id = vVisibleCache
|
||||
|
@ -269,42 +205,27 @@ BEGIN
|
|||
AND NOT i.generic
|
||||
AND util.VN_CURDATE() = vDate
|
||||
AND t.warehouseFk = vWarehouseFk
|
||||
GROUP BY tl.ticketFk
|
||||
GROUP BY sgp.ticketFk
|
||||
) sub
|
||||
ON DUPLICATE KEY UPDATE itemDelay = sub.problem, saleFk = sub.saleFk;
|
||||
|
||||
-- Redondeo: Cantidad pedida incorrecta en al grouping de la última compra
|
||||
CALL buy_getUltimate(NULL, vWarehouseFk, vDate);
|
||||
INSERT INTO tmp.sale_problems(ticketFk, hasRounding, saleFk)
|
||||
SELECT ticketFk, problem ,saleFk
|
||||
FROM (
|
||||
SELECT tl.ticketFk,
|
||||
s.id saleFk,
|
||||
LEFT(GROUP_CONCAT('RE: ',i.id, ' ', IFNULL(i.longName,'') SEPARATOR ', '), 250) problem
|
||||
FROM tmp.ticket_list tl
|
||||
JOIN ticket t ON t.id = tl.ticketFk
|
||||
AND t.warehouseFk = vWarehouseFk
|
||||
JOIN sale s ON s.ticketFk = tl.ticketFk
|
||||
JOIN item i ON i.id = s.itemFk
|
||||
JOIN tmp.buyUltimate bu ON bu.itemFk = s.itemFk
|
||||
JOIN buy b ON b.id = bu.buyFk
|
||||
WHERE MOD(s.quantity, b.`grouping`)
|
||||
GROUP BY tl.ticketFk
|
||||
)sub
|
||||
ON DUPLICATE KEY UPDATE hasRounding = sub.problem, saleFk = sub.saleFk;
|
||||
END LOOP;
|
||||
CLOSE vCursor;
|
||||
|
||||
INSERT INTO tmp.sale_problems(ticketFk, isTaxDataChecked)
|
||||
SELECT DISTINCT tl.ticketFk, FALSE
|
||||
FROM tmp.ticket_list tl
|
||||
JOIN client c ON c.id = tl.clientFk
|
||||
WHERE NOT c.isTaxDataChecked
|
||||
ON DUPLICATE KEY UPDATE isTaxDataChecked = FALSE;
|
||||
INSERT INTO tmp.sale_problems(ticketFk, hasRounding, saleFk)
|
||||
SELECT ticketFk, problem, saleFk
|
||||
FROM (
|
||||
SELECT sgp.ticketFk,
|
||||
s.id saleFk,
|
||||
LEFT(GROUP_CONCAT('RE: ', i.id, ' ', IFNULL(i.longName,'') SEPARATOR ', '), 250) problem
|
||||
FROM tmp.sale_getProblems sgp
|
||||
JOIN ticket t ON t.id = sgp.ticketFk
|
||||
JOIN sale s ON s.ticketFk = sgp.ticketFk
|
||||
JOIN item i ON i.id = s.itemFk
|
||||
WHERE FIND_IN_SET('hasRounding', s.problem)
|
||||
GROUP BY sgp.ticketFk
|
||||
) sub
|
||||
ON DUPLICATE KEY UPDATE hasRounding = sub.problem, saleFk = sub.saleFk;
|
||||
|
||||
DROP TEMPORARY TABLE
|
||||
tmp.clientGetDebt,
|
||||
tmp.ticket_list,
|
||||
tItemShelvingStock_byWarehouse;
|
||||
DROP TEMPORARY TABLE tItemShelvingStock_byWarehouse;
|
||||
END$$
|
||||
DELIMITER ;
|
||||
|
|
|
@ -7,8 +7,7 @@ BEGIN
|
|||
*
|
||||
* @return Problems result
|
||||
*/
|
||||
DROP TEMPORARY TABLE IF EXISTS tmp.sale_getProblems;
|
||||
CREATE TEMPORARY TABLE tmp.sale_getProblems
|
||||
CREATE OR REPLACE TEMPORARY TABLE tmp.sale_getProblems
|
||||
(INDEX (ticketFk))
|
||||
ENGINE = MEMORY
|
||||
SELECT t.id ticketFk, t.clientFk, t.warehouseFk, t.shipped
|
||||
|
|
|
@ -0,0 +1,75 @@
|
|||
DELIMITER $$
|
||||
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`sale_setProblemRoundingByBuy`(
|
||||
vBuyFk INT
|
||||
)
|
||||
BEGIN
|
||||
/**
|
||||
* Update rounding problem for all sales related to a buy.
|
||||
*
|
||||
* @param vBuyFk Buy id
|
||||
*/
|
||||
DECLARE vItemFk INT;
|
||||
DECLARE vWarehouseFk INT;
|
||||
DECLARE vMaxDated DATE;
|
||||
DECLARE vMinDated DATE;
|
||||
DECLARE vLanding DATE;
|
||||
DECLARE vLastBuy INT;
|
||||
DECLARE vCurrentBuy INT;
|
||||
DECLARE vGrouping INT;
|
||||
|
||||
SELECT b.itemFk, t.warehouseInFk
|
||||
INTO vItemFk, vWarehouseFk
|
||||
FROM buy b
|
||||
JOIN entry e ON e.id = b.entryFk
|
||||
JOIN travel t ON t.id = e.travelFk
|
||||
WHERE b.id = vBuyFk;
|
||||
|
||||
IF vItemFk AND vWarehouseFk THEN
|
||||
SELECT DATE(MAX(t.shipped)) + INTERVAL 1 DAY, DATE(MIN(t.shipped))
|
||||
INTO vMaxDated, vMinDated
|
||||
FROM sale s
|
||||
JOIN ticket t ON t.id = s.ticketFk
|
||||
WHERE t.shipped >= util.VN_CURDATE()
|
||||
AND s.itemFk = vItemFk
|
||||
AND s.quantity > 0;
|
||||
|
||||
CALL buy_getUltimate(vItemFk, vWarehouseFk, vMinDated);
|
||||
|
||||
SELECT bu.buyFk, b.grouping INTO vLastBuy, vGrouping
|
||||
FROM tmp.buyUltimate bu
|
||||
JOIN buy b ON b.id = bu.buyFk;
|
||||
|
||||
DROP TEMPORARY TABLE tmp.buyUltimate;
|
||||
|
||||
SET vLanding = vMaxDated;
|
||||
|
||||
WHILE vCurrentBuy <> vLastBuy OR vLanding > vMinDated DO
|
||||
SET vMaxDated = vLanding - INTERVAL 1 DAY;
|
||||
|
||||
CALL buy_getUltimate(vItemFk, vWarehouseFk, vMaxDated);
|
||||
|
||||
SELECT buyFk, landing
|
||||
INTO vCurrentBuy, vLanding
|
||||
FROM tmp.buyUltimate;
|
||||
|
||||
DROP TEMPORARY TABLE tmp.buyUltimate;
|
||||
END WHILE;
|
||||
|
||||
CREATE OR REPLACE TEMPORARY TABLE tmp.sale
|
||||
(INDEX(saleFk, isProblemCalcNeeded))
|
||||
ENGINE = MEMORY
|
||||
SELECT s.id saleFk,
|
||||
MOD(s.quantity, vGrouping) hasProblem,
|
||||
ticket_isProblemCalcNeeded(t.id) isProblemCalcNeeded
|
||||
FROM sale s
|
||||
JOIN ticket t ON t.id = s.ticketFk
|
||||
WHERE s.itemFk = vItemFk
|
||||
AND s.quantity > 0
|
||||
AND t.shipped BETWEEN vMinDated AND util.dayEnd(vMaxDated);
|
||||
|
||||
CALL sale_setProblem('hasRounding');
|
||||
|
||||
DROP TEMPORARY TABLE tmp.sale;
|
||||
END IF;
|
||||
END$$
|
||||
DELIMITER ;
|
|
@ -17,6 +17,7 @@ BEGIN
|
|||
DECLARE vHasDailyInvoice BOOL;
|
||||
DECLARE vWithPackage BOOL;
|
||||
DECLARE vHasToInvoice BOOL;
|
||||
DECLARE vSerial VARCHAR(2);
|
||||
|
||||
DECLARE cur CURSOR FOR
|
||||
SELECT ticketFk FROM tmp.ticket_close;
|
||||
|
@ -83,14 +84,17 @@ BEGIN
|
|||
GROUP BY e.freightItemFk);
|
||||
|
||||
IF(vHasDailyInvoice) AND vHasToInvoice THEN
|
||||
SELECT invoiceSerial(vClientFk, vCompanyFk, 'quick') INTO vSerial;
|
||||
IF NOT vSerial THEN
|
||||
CALL util.throw('Cannot booking without a serial');
|
||||
END IF;
|
||||
|
||||
-- Facturacion rapida
|
||||
CALL ticket_setState(vCurTicketFk, 'DELIVERED');
|
||||
-- Facturar si está contabilizado
|
||||
|
||||
IF vIsTaxDataChecked THEN
|
||||
CALL invoiceOut_newFromClient(
|
||||
vClientFk,
|
||||
(SELECT invoiceSerial(vClientFk, vCompanyFk, 'M')),
|
||||
vSerial,
|
||||
vShipped,
|
||||
vCompanyFk,
|
||||
NULL,
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
DELIMITER $$
|
||||
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ticket_getProblems`(IN vIsTodayRelative tinyint(1))
|
||||
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ticket_getProblems`(
|
||||
vIsTodayRelative tinyint(1)
|
||||
)
|
||||
BEGIN
|
||||
/**
|
||||
* Calcula los problemas para un conjunto de tickets.
|
||||
|
@ -16,6 +18,7 @@ BEGIN
|
|||
SELECT ticketFk,
|
||||
MAX(isFreezed) isFreezed,
|
||||
MAX(risk) risk,
|
||||
MAX(hasRisk) hasRisk,
|
||||
MAX(hasHighRisk) hasHighRisk,
|
||||
MAX(hasTicketRequest) hasTicketRequest,
|
||||
MAX(itemShortage) itemShortage,
|
||||
|
@ -30,19 +33,19 @@ BEGIN
|
|||
FROM tmp.sale_problems
|
||||
GROUP BY ticketFk;
|
||||
|
||||
UPDATE tmp.ticket_problems tp
|
||||
SET tp.totalProblems = (
|
||||
(tp.isFreezed) +
|
||||
IF(tp.risk,TRUE, FALSE) +
|
||||
(tp.hasTicketRequest) +
|
||||
(tp.isTaxDataChecked = 0) +
|
||||
(tp.hasComponentLack) +
|
||||
(tp.itemDelay) +
|
||||
(tp.isTooLittle) +
|
||||
(tp.itemLost) +
|
||||
(tp.hasRounding) +
|
||||
(tp.itemShortage) +
|
||||
(tp.isVip)
|
||||
UPDATE tmp.ticket_problems
|
||||
SET totalProblems = (
|
||||
(isFreezed) +
|
||||
(hasRisk) +
|
||||
(hasTicketRequest) +
|
||||
(!isTaxDataChecked) +
|
||||
(hasComponentLack) +
|
||||
(itemDelay IS NOT NULL) +
|
||||
(isTooLittle) +
|
||||
(itemLost IS NOT NULL) +
|
||||
(hasRounding IS NOT NULL) +
|
||||
(itemShortage IS NOT NULL) +
|
||||
(isVip)
|
||||
);
|
||||
|
||||
DROP TEMPORARY TABLE tmp.sale_problems;
|
||||
|
|
|
@ -14,16 +14,28 @@ BEGIN
|
|||
DECLARE vTicketFk INT;
|
||||
|
||||
DECLARE cTickets CURSOR FOR
|
||||
SELECT id FROM ticket
|
||||
WHERE refFk IS NULL
|
||||
AND ((vScope = 'client' AND clientFk = vId)
|
||||
OR (vScope = 'address' AND addressFk = vId));
|
||||
SELECT DISTINCT t.id
|
||||
FROM ticket t
|
||||
LEFT JOIN tItems ti ON ti.id = t.id
|
||||
WHERE t.refFk IS NULL
|
||||
AND ((vScope = 'client' AND t.clientFk = vId)
|
||||
OR (vScope = 'address' AND t.addressFk = vId)
|
||||
OR (vScope = 'item' AND ti.id)
|
||||
);
|
||||
|
||||
DECLARE CONTINUE HANDLER FOR NOT FOUND
|
||||
SET vDone = TRUE;
|
||||
DECLARE CONTINUE HANDLER FOR NOT FOUND SET vDone = TRUE;
|
||||
|
||||
CREATE OR REPLACE TEMPORARY TABLE tItems
|
||||
(PRIMARY KEY (id))
|
||||
ENGINE = MEMORY
|
||||
SELECT DISTINCT t.id
|
||||
FROM ticket t
|
||||
JOIN sale s ON s.ticketFk = t.id
|
||||
JOIN itemTaxCountry itc ON itc.itemFk = s.itemFk
|
||||
WHERE t.refFk IS NULL
|
||||
AND (vScope = 'item' AND itc.itemFk = vId);
|
||||
|
||||
OPEN cTickets;
|
||||
|
||||
myLoop: LOOP
|
||||
SET vDone = FALSE;
|
||||
FETCH cTickets INTO vTicketFk;
|
||||
|
@ -34,7 +46,8 @@ BEGIN
|
|||
|
||||
CALL ticket_recalc(vTicketFk, NULL);
|
||||
END LOOP;
|
||||
|
||||
CLOSE cTickets;
|
||||
|
||||
DROP TEMPORARY TABLE tItems;
|
||||
END$$
|
||||
DELIMITER ;
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
DELIMITER $$
|
||||
CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`host_beforeInsert`
|
||||
BEFORE INSERT ON `host`
|
||||
FOR EACH ROW
|
||||
BEGIN
|
||||
SET NEW.editorFk = account.myUser_getId();
|
||||
END$$
|
||||
DELIMITER ;
|
|
@ -4,5 +4,6 @@ CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`host_beforeUpdate`
|
|||
FOR EACH ROW
|
||||
BEGIN
|
||||
SET new.updated = util.VN_NOW();
|
||||
SET NEW.editorFk = account.myUser_getId();
|
||||
END$$
|
||||
DELIMITER ;
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
DELIMITER $$
|
||||
CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`roadmap_beforeInsert`
|
||||
BEFORE INSERT ON `roadmap`
|
||||
FOR EACH ROW
|
||||
BEGIN
|
||||
IF NEW.driver1Fk IS NOT NULL THEN
|
||||
SET NEW.driverName = (SELECT firstName FROM worker WHERE id = NEW.driver1Fk);
|
||||
ELSE
|
||||
SET NEW.driverName = NULL;
|
||||
END IF;
|
||||
END$$
|
||||
DELIMITER ;
|
|
@ -0,0 +1,12 @@
|
|||
DELIMITER $$
|
||||
CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`roadmap_beforeUpdate`
|
||||
BEFORE UPDATE ON `roadmap`
|
||||
FOR EACH ROW
|
||||
BEGIN
|
||||
IF NEW.driver1Fk IS NOT NULL THEN
|
||||
SET NEW.driverName = (SELECT firstName FROM worker WHERE id = NEW.driver1Fk);
|
||||
ELSE
|
||||
SET NEW.driverName = NULL;
|
||||
END IF;
|
||||
END$$
|
||||
DELIMITER ;
|
|
@ -2,5 +2,5 @@ CREATE OR REPLACE DEFINER=`root`@`localhost`
|
|||
SQL SECURITY DEFINER
|
||||
VIEW `vn2008`.`mandato_tipo`
|
||||
AS SELECT `m`.`id` AS `idmandato_tipo`,
|
||||
`m`.`name` AS `Nombre`
|
||||
`m`.`code` AS `Nombre`
|
||||
FROM `vn`.`mandateType` `m`
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
ALTER TABLE srt.moving DROP INDEX moving_fk1_idx;
|
|
@ -0,0 +1,4 @@
|
|||
ALTER TABLE vn.invoiceOutSerial
|
||||
MODIFY COLUMN `type` enum('global','quick','multiple') CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL NULL;
|
||||
|
||||
CREATE UNIQUE INDEX invoiceOutSerial_taxAreaFk_IDX USING BTREE ON vn.invoiceOutSerial (taxAreaFk,`type`);
|
|
@ -0,0 +1,3 @@
|
|||
UPDATE vn.invoiceOutSerial
|
||||
SET `type`='multiple'
|
||||
WHERE `description` LIKE '%Múltiple%';
|
|
@ -0,0 +1,3 @@
|
|||
ALTER TABLE vn.operator
|
||||
ADD COLUMN sizeLimit int(10) unsigned DEFAULT 90 NULL COMMENT 'Límite de altura en una colección para la asignación de pedidos' AFTER volumeLimit,
|
||||
MODIFY COLUMN linesLimit int(10) unsigned DEFAULT 20 NULL COMMENT 'Límite de lineas en una colección para la asignación de pedidos';
|
|
@ -0,0 +1 @@
|
|||
ALTER TABLE vn.ticket DROP FOREIGN KEY ticket_FK;
|
|
@ -0,0 +1 @@
|
|||
ALTER TABLE vn.invoiceOut DROP KEY Id_Factura;
|
|
@ -0,0 +1 @@
|
|||
ALTER TABLE vn.invoiceOut MODIFY COLUMN id int(10) unsigned NOT NULL;
|
|
@ -0,0 +1 @@
|
|||
ALTER TABLE vn.invoiceCorrection DROP FOREIGN KEY corrected_fk;
|
|
@ -0,0 +1 @@
|
|||
ALTER TABLE vn.invoiceCorrection DROP FOREIGN KEY correcting_fk;
|
|
@ -0,0 +1 @@
|
|||
ALTER TABLE vn.invoiceOutExpense DROP FOREIGN KEY invoiceOutExpence_FK_1;
|
|
@ -0,0 +1 @@
|
|||
ALTER TABLE vn.invoiceOutTax DROP FOREIGN KEY invoiceOutFk;
|
|
@ -0,0 +1 @@
|
|||
ALTER TABLE vn.invoiceOut DROP PRIMARY KEY;
|
|
@ -0,0 +1 @@
|
|||
ALTER TABLE vn.invoiceOut ADD CONSTRAINT invoiceOut_pk PRIMARY KEY (id);
|
|
@ -0,0 +1 @@
|
|||
ALTER TABLE vn.invoiceOut ADD CONSTRAINT invoiceOut_unique UNIQUE KEY (`ref`);
|
|
@ -0,0 +1,5 @@
|
|||
UPDATE vn.invoiceOut
|
||||
SET id = (SELECT MAX(id) + 1 FROM vn.invoiceOut)
|
||||
WHERE id = 0;
|
||||
|
||||
ALTER TABLE vn.invoiceOut MODIFY COLUMN id int(10) unsigned auto_increment NOT NULL;
|
|
@ -0,0 +1,2 @@
|
|||
ALTER TABLE vn.ticket ADD CONSTRAINT ticket_invoiceOut_FK
|
||||
FOREIGN KEY (refFk) REFERENCES vn.invoiceOut(`ref`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
|
@ -0,0 +1,2 @@
|
|||
ALTER TABLE vn.invoiceCorrection ADD CONSTRAINT invoiceCorrection_invoiceOut_FK
|
||||
FOREIGN KEY (correctingFk) REFERENCES vn.invoiceOut(id) ON DELETE CASCADE ON UPDATE CASCADE;
|
|
@ -0,0 +1,2 @@
|
|||
ALTER TABLE vn.invoiceCorrection ADD CONSTRAINT invoiceCorrection_invoiceOut_FK_1
|
||||
FOREIGN KEY (correctedFk) REFERENCES vn.invoiceOut(id) ON DELETE CASCADE ON UPDATE CASCADE;
|
|
@ -0,0 +1,2 @@
|
|||
ALTER TABLE vn.invoiceOutExpense ADD CONSTRAINT invoiceOutExpense_invoiceOut_FK
|
||||
FOREIGN KEY (invoiceOutFk) REFERENCES vn.invoiceOut(id) ON DELETE CASCADE ON UPDATE CASCADE;
|
|
@ -0,0 +1,2 @@
|
|||
ALTER TABLE vn.invoiceOutTax ADD CONSTRAINT invoiceOutTax_invoiceOut_FK
|
||||
FOREIGN KEY (invoiceOutFk) REFERENCES vn.invoiceOut(id) ON DELETE CASCADE ON UPDATE CASCADE;
|
|
@ -0,0 +1,8 @@
|
|||
USE vn;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS ormConfig (
|
||||
id int(5) NOT NULL AUTO_INCREMENT primary key,
|
||||
selectLimit int(5) NOT NULL
|
||||
);
|
||||
|
||||
INSERT IGNORE INTO ormConfig SET selectLimit = 1000;
|
|
@ -0,0 +1 @@
|
|||
DROP TABLE bi.Greuges_comercial_detail;
|
|
@ -0,0 +1 @@
|
|||
ALTER TABLE vn.host ADD editorFk int(10) unsigned DEFAULT NULL NULL;
|
|
@ -0,0 +1,3 @@
|
|||
ALTER TABLE vn.item
|
||||
ADD CONSTRAINT item_itemPackingType_FK FOREIGN KEY (itemPackingTypeFk)
|
||||
REFERENCES vn.itemPackingType(code) ON DELETE RESTRICT ON UPDATE CASCADE;
|
|
@ -0,0 +1,9 @@
|
|||
ALTER TABLE hedera.tpvMerchantEnable
|
||||
DROP FOREIGN KEY tpvMerchantEnable_ibfk_1,
|
||||
DROP PRIMARY KEY,
|
||||
ADD CONSTRAINT tpvMerchantEnable_pk PRIMARY KEY (merchantFk),
|
||||
ADD CONSTRAINT tpvMerchantEnable_tpvMerchant_FK
|
||||
FOREIGN KEY (merchantFk)
|
||||
REFERENCES hedera.tpvMerchant(id)
|
||||
ON DELETE RESTRICT
|
||||
ON UPDATE CASCADE;
|
|
@ -0,0 +1,3 @@
|
|||
ALTER TABLE vn.mandateType
|
||||
CHANGE name code VARCHAR(45) NOT NULL,
|
||||
ADD UNIQUE (code);
|
|
@ -0,0 +1,3 @@
|
|||
ALTER TABLE vn.accountDetailType
|
||||
ADD COLUMN code VARCHAR(45),
|
||||
ADD UNIQUE (code);
|
|
@ -0,0 +1,9 @@
|
|||
UPDATE vn.accountDetailType
|
||||
SET code = CASE description
|
||||
WHEN 'IBAN' THEN 'iban'
|
||||
WHEN 'SWIFT' THEN 'swift'
|
||||
WHEN 'Referencia Remesas' THEN 'remRef'
|
||||
WHEN 'Referencia Transferencias' THEN 'trnRef'
|
||||
WHEN 'Referencia Nominas' THEN 'payRef'
|
||||
WHEN 'ABA' THEN 'aba'
|
||||
END;
|
|
@ -0,0 +1,3 @@
|
|||
ALTER TABLE hedera.tpvMerchantEnable
|
||||
MODIFY COLUMN companyFk int(10) unsigned NOT NULL,
|
||||
ADD CONSTRAINT tpvMerchantEnable_company_FK FOREIGN KEY (companyFk) REFERENCES vn.company(id) ON DELETE RESTRICT ON UPDATE CASCADE;
|
|
@ -0,0 +1,19 @@
|
|||
CREATE OR REPLACE TABLE `srt`.`bufferLog` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`originFk` int(11) DEFAULT NULL,
|
||||
`userFk` int(10) unsigned DEFAULT NULL,
|
||||
`action` set('insert','update','delete','select') NOT NULL,
|
||||
`creationDate` timestamp NULL DEFAULT current_timestamp(),
|
||||
`description` text CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL,
|
||||
`changedModel` enum('Buffer', 'Config') NOT NULL DEFAULT 'Buffer',
|
||||
`oldInstance` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`oldInstance`)),
|
||||
`newInstance` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`newInstance`)),
|
||||
`changedModelId` int(11) NOT NULL,
|
||||
`changedModelValue` varchar(45) DEFAULT NULL,
|
||||
`summaryId` varchar(30) DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `logBufferUserFk` (`userFk`),
|
||||
KEY `bufferLog_changedModel` (`changedModel`,`changedModelId`,`creationDate`),
|
||||
KEY `bufferLog_originFk` (`originFk`,`creationDate`),
|
||||
CONSTRAINT `bufferUserFk` FOREIGN KEY (`userFk`) REFERENCES `account`.`user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;
|
|
@ -0,0 +1 @@
|
|||
ALTER TABLE srt.buffer ADD editorFk int(10) unsigned DEFAULT NULL NULL;
|
|
@ -0,0 +1 @@
|
|||
ALTER TABLE srt.config ADD editorFk int(10) unsigned DEFAULT NULL NULL;
|
|
@ -0,0 +1,9 @@
|
|||
CREATE TABLE vn.quadMindsApiConfig (
|
||||
id int(10) unsigned NULL PRIMARY KEY,
|
||||
`url` varchar(255) DEFAULT NULL NULL,
|
||||
`key` varchar(255) DEFAULT NULL NULL,
|
||||
CONSTRAINT quadMindsConfig_check CHECK (id = 1)
|
||||
)
|
||||
ENGINE=InnoDB
|
||||
DEFAULT CHARSET=utf8mb3
|
||||
COLLATE=utf8mb3_unicode_ci;
|
|
@ -0,0 +1,6 @@
|
|||
ALTER TABLE vn.roadmap
|
||||
ADD COLUMN m3 INT UNSIGNED NULL,
|
||||
ADD COLUMN driver2Fk INT UNSIGNED NULL,
|
||||
ADD COLUMN driver1Fk INT UNSIGNED NULL,
|
||||
ADD CONSTRAINT roadmap_worker_FK FOREIGN KEY (driver1Fk) REFERENCES vn.worker(id) ON DELETE RESTRICT ON UPDATE CASCADE,
|
||||
ADD CONSTRAINT roadmap_worker_FK_2 FOREIGN KEY (driver2Fk) REFERENCES vn.worker(id) ON DELETE RESTRICT ON UPDATE CASCADE;
|
|
@ -0,0 +1,24 @@
|
|||
DELETE FROM `salix`.`ACL`
|
||||
WHERE `model` = 'Ticket'
|
||||
AND `property` = 'refund'
|
||||
AND `accessType` = 'WRITE'
|
||||
AND `permission` = 'ALLOW'
|
||||
AND `principalType` = 'ROLE'
|
||||
AND `principalId` = 'salesAssistant';
|
||||
|
||||
UPDATE `salix`.`ACL`
|
||||
SET `property` = 'cloneAll'
|
||||
WHERE `model` = 'Ticket'
|
||||
AND `property` = 'refund'
|
||||
AND `accessType` = 'WRITE'
|
||||
AND `permission` = 'ALLOW'
|
||||
AND `principalType` = 'ROLE'
|
||||
AND `principalId` IN ('invoicing', 'claimManager', 'logistic');
|
||||
|
||||
DELETE FROM `salix`.`ACL`
|
||||
WHERE `model` = 'Ticket'
|
||||
AND `property` = 'clone'
|
||||
AND `accessType` = 'WRITE'
|
||||
AND `permission` = 'ALLOW'
|
||||
AND `principalType` = 'ROLE'
|
||||
AND `principalId` = 'administrative';
|
|
@ -0,0 +1,5 @@
|
|||
ALTER TABLE vn.ormConfig
|
||||
MODIFY COLUMN id INT NOT NULL,
|
||||
DROP PRIMARY KEY,
|
||||
ADD CONSTRAINT ormConfig_check CHECK (id = 1),
|
||||
ADD PRIMARY KEY (id);
|
|
@ -0,0 +1,2 @@
|
|||
-- Place your SQL code here
|
||||
ALTER TABLE dipole.expedition_PrintOut MODIFY COLUMN isPrinted int(11) DEFAULT 0 NOT NULL COMMENT '0.- Not Printed ; 1.- Printed; 2.- Selected ; 3.- Error ; 4.- Waiting to be printed';
|
|
@ -0,0 +1,7 @@
|
|||
UPDATE vn.packaging SET id='25E' WHERE id='cactus200';
|
||||
UPDATE vn.packaging SET id='35E' WHERE id='kalan330';
|
||||
UPDATE vn.packaging SET id='45E' WHERE id='kalan400';
|
||||
UPDATE vn.packaging SET id='60E' WHERE id='kalan577';
|
||||
UPDATE vn.packaging SET id='60A' WHERE id='guzma650';
|
||||
UPDATE vn.packaging SET id='120A' WHERE id='guzma1200';
|
||||
UPDATE vn.packaging SET id='140A' WHERE id='guzma1400';
|
|
@ -0,0 +1,6 @@
|
|||
ALTER TABLE vn.operator
|
||||
MODIFY COLUMN sizeLimit int(10) unsigned DEFAULT NULL NULL COMMENT 'Límite de altura en una colección para la asignación de pedidos';
|
||||
|
||||
UPDATE vn.operator
|
||||
SET sizeLimit = 90
|
||||
WHERE itemPackingTypeFk = 'V';
|
|
@ -0,0 +1,129 @@
|
|||
|
||||
use vn;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `material` (
|
||||
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`name` varchar(50) DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `name_UNIQUE` (`name`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;
|
||||
|
||||
INSERT IGNORE INTO `material` (`name`) VALUES ('Abedul');
|
||||
INSERT IGNORE INTO `material` (`name`) VALUES ('Acacia');
|
||||
INSERT IGNORE INTO `material` (`name`) VALUES ('Acero');
|
||||
INSERT IGNORE INTO `material` (`name`) VALUES ('Acero Galvanizado');
|
||||
INSERT IGNORE INTO `material` (`name`) VALUES ('Acetato');
|
||||
INSERT IGNORE INTO `material` (`name`) VALUES ('Acrílico');
|
||||
INSERT IGNORE INTO `material` (`name`) VALUES ('Alambre');
|
||||
INSERT IGNORE INTO `material` (`name`) VALUES ('Algodón');
|
||||
INSERT IGNORE INTO `material` (`name`) VALUES ('Aluminio');
|
||||
INSERT IGNORE INTO `material` (`name`) VALUES ('Antracita');
|
||||
INSERT IGNORE INTO `material` (`name`) VALUES ('Arcilla');
|
||||
INSERT IGNORE INTO `material` (`name`) VALUES ('Bambú');
|
||||
INSERT IGNORE INTO `material` (`name`) VALUES ('Banano');
|
||||
INSERT IGNORE INTO `material` (`name`) VALUES ('Canneté');
|
||||
INSERT IGNORE INTO `material` (`name`) VALUES ('Cartón');
|
||||
INSERT IGNORE INTO `material` (`name`) VALUES ('Cartulina');
|
||||
INSERT IGNORE INTO `material` (`name`) VALUES ('Celofán');
|
||||
INSERT IGNORE INTO `material` (`name`) VALUES ('Cemento');
|
||||
INSERT IGNORE INTO `material` (`name`) VALUES ('Cera');
|
||||
INSERT IGNORE INTO `material` (`name`) VALUES ('Cerámica');
|
||||
INSERT IGNORE INTO `material` (`name`) VALUES ('Chapa');
|
||||
INSERT IGNORE INTO `material` (`name`) VALUES ('Chenilla');
|
||||
INSERT IGNORE INTO `material` (`name`) VALUES ('Cloruro de polivinilo');
|
||||
INSERT IGNORE INTO `material` (`name`) VALUES ('Cobre');
|
||||
INSERT IGNORE INTO `material` (`name`) VALUES ('Corcho');
|
||||
INSERT IGNORE INTO `material` (`name`) VALUES ('Cordel');
|
||||
INSERT IGNORE INTO `material` (`name`) VALUES ('Cotton');
|
||||
INSERT IGNORE INTO `material` (`name`) VALUES ('Cotton Chess');
|
||||
INSERT IGNORE INTO `material` (`name`) VALUES ('Cristal');
|
||||
INSERT IGNORE INTO `material` (`name`) VALUES ('Cubo Asa');
|
||||
INSERT IGNORE INTO `material` (`name`) VALUES ('Cuerda');
|
||||
INSERT IGNORE INTO `material` (`name`) VALUES ('Cuero');
|
||||
INSERT IGNORE INTO `material` (`name`) VALUES ('Doble Raso');
|
||||
INSERT IGNORE INTO `material` (`name`) VALUES ('Doble Velvet');
|
||||
INSERT IGNORE INTO `material` (`name`) VALUES ('Eco Glass');
|
||||
INSERT IGNORE INTO `material` (`name`) VALUES ('Encaje');
|
||||
INSERT IGNORE INTO `material` (`name`) VALUES ('Esparto');
|
||||
INSERT IGNORE INTO `material` (`name`) VALUES ('Espuma');
|
||||
INSERT IGNORE INTO `material` (`name`) VALUES ('Felpa');
|
||||
INSERT IGNORE INTO `material` (`name`) VALUES ('Fibra');
|
||||
INSERT IGNORE INTO `material` (`name`) VALUES ('Fibra de Coco');
|
||||
INSERT IGNORE INTO `material` (`name`) VALUES ('Fibra de Vidrio y Resina');
|
||||
INSERT IGNORE INTO `material` (`name`) VALUES ('Fieltro');
|
||||
INSERT IGNORE INTO `material` (`name`) VALUES ('Foam');
|
||||
INSERT IGNORE INTO `material` (`name`) VALUES ('Gamuza');
|
||||
INSERT IGNORE INTO `material` (`name`) VALUES ('Gasa');
|
||||
INSERT IGNORE INTO `material` (`name`) VALUES ('Glass');
|
||||
INSERT IGNORE INTO `material` (`name`) VALUES ('Goma');
|
||||
INSERT IGNORE INTO `material` (`name`) VALUES ('Grafito');
|
||||
INSERT IGNORE INTO `material` (`name`) VALUES ('Hierro');
|
||||
INSERT IGNORE INTO `material` (`name`) VALUES ('Hoja Carbono');
|
||||
INSERT IGNORE INTO `material` (`name`) VALUES ('Hoja de Mirto');
|
||||
INSERT IGNORE INTO `material` (`name`) VALUES ('Hormigón');
|
||||
INSERT IGNORE INTO `material` (`name`) VALUES ('Jute');
|
||||
INSERT IGNORE INTO `material` (`name`) VALUES ('Kraft');
|
||||
INSERT IGNORE INTO `material` (`name`) VALUES ('Lana');
|
||||
INSERT IGNORE INTO `material` (`name`) VALUES ('Látex');
|
||||
INSERT IGNORE INTO `material` (`name`) VALUES ('Latrix');
|
||||
INSERT IGNORE INTO `material` (`name`) VALUES ('Lienzo');
|
||||
INSERT IGNORE INTO `material` (`name`) VALUES ('Lino');
|
||||
INSERT IGNORE INTO `material` (`name`) VALUES ('Lurex');
|
||||
INSERT IGNORE INTO `material` (`name`) VALUES ('Madera');
|
||||
INSERT IGNORE INTO `material` (`name`) VALUES ('Metacrilato');
|
||||
INSERT IGNORE INTO `material` (`name`) VALUES ('Metal');
|
||||
INSERT IGNORE INTO `material` (`name`) VALUES ('Mimbre');
|
||||
INSERT IGNORE INTO `material` (`name`) VALUES ('Musgo');
|
||||
INSERT IGNORE INTO `material` (`name`) VALUES ('Nonwoven');
|
||||
INSERT IGNORE INTO `material` (`name`) VALUES ('Nylon');
|
||||
INSERT IGNORE INTO `material` (`name`) VALUES ('Organza');
|
||||
INSERT IGNORE INTO `material` (`name`) VALUES ('Paja');
|
||||
INSERT IGNORE INTO `material` (`name`) VALUES ('Pana');
|
||||
INSERT IGNORE INTO `material` (`name`) VALUES ('Papel');
|
||||
INSERT IGNORE INTO `material` (`name`) VALUES ('Paperweb');
|
||||
INSERT IGNORE INTO `material` (`name`) VALUES ('Paulownia');
|
||||
INSERT IGNORE INTO `material` (`name`) VALUES ('Peluche');
|
||||
INSERT IGNORE INTO `material` (`name`) VALUES ('Piedra');
|
||||
INSERT IGNORE INTO `material` (`name`) VALUES ('Pizarra');
|
||||
INSERT IGNORE INTO `material` (`name`) VALUES ('Plástico');
|
||||
INSERT IGNORE INTO `material` (`name`) VALUES ('Poliestireno');
|
||||
INSERT IGNORE INTO `material` (`name`) VALUES ('Polipropileno');
|
||||
INSERT IGNORE INTO `material` (`name`) VALUES ('Poliresina');
|
||||
INSERT IGNORE INTO `material` (`name`) VALUES ('Polyester');
|
||||
INSERT IGNORE INTO `material` (`name`) VALUES ('Porcelana');
|
||||
INSERT IGNORE INTO `material` (`name`) VALUES ('Puntilla');
|
||||
INSERT IGNORE INTO `material` (`name`) VALUES ('PVC');
|
||||
INSERT IGNORE INTO `material` (`name`) VALUES ('Rafia');
|
||||
INSERT IGNORE INTO `material` (`name`) VALUES ('Rama');
|
||||
INSERT IGNORE INTO `material` (`name`) VALUES ('Raso');
|
||||
INSERT IGNORE INTO `material` (`name`) VALUES ('Rattan');
|
||||
INSERT IGNORE INTO `material` (`name`) VALUES ('Rayon');
|
||||
INSERT IGNORE INTO `material` (`name`) VALUES ('Reciclable');
|
||||
INSERT IGNORE INTO `material` (`name`) VALUES ('Red');
|
||||
INSERT IGNORE INTO `material` (`name`) VALUES ('Resina');
|
||||
INSERT IGNORE INTO `material` (`name`) VALUES ('Roca');
|
||||
INSERT IGNORE INTO `material` (`name`) VALUES ('Rope');
|
||||
INSERT IGNORE INTO `material` (`name`) VALUES ('Saco');
|
||||
INSERT IGNORE INTO `material` (`name`) VALUES ('Salim');
|
||||
INSERT IGNORE INTO `material` (`name`) VALUES ('Seagrass');
|
||||
INSERT IGNORE INTO `material` (`name`) VALUES ('Silicona');
|
||||
INSERT IGNORE INTO `material` (`name`) VALUES ('Sisal');
|
||||
INSERT IGNORE INTO `material` (`name`) VALUES ('Tejido');
|
||||
INSERT IGNORE INTO `material` (`name`) VALUES ('Tela');
|
||||
INSERT IGNORE INTO `material` (`name`) VALUES ('Terciopelo');
|
||||
INSERT IGNORE INTO `material` (`name`) VALUES ('Terracota');
|
||||
INSERT IGNORE INTO `material` (`name`) VALUES ('Textil');
|
||||
INSERT IGNORE INTO `material` (`name`) VALUES ('Titanio');
|
||||
INSERT IGNORE INTO `material` (`name`) VALUES ('Tul');
|
||||
INSERT IGNORE INTO `material` (`name`) VALUES ('Velvet');
|
||||
INSERT IGNORE INTO `material` (`name`) VALUES ('Vidrio');
|
||||
INSERT IGNORE INTO `material` (`name`) VALUES ('Yute');
|
||||
INSERT IGNORE INTO `material` (`name`) VALUES ('Zinc');
|
||||
INSERT IGNORE INTO `material` (`name`) VALUES ('Base de goma');
|
||||
INSERT IGNORE INTO `material` (`name`) VALUES ('Base de madera');
|
||||
INSERT IGNORE INTO `material` (`name`) VALUES ('Plumas');
|
||||
INSERT IGNORE INTO `material` (`name`) VALUES ('Protección Uva');
|
||||
INSERT IGNORE INTO `material` (`name`) VALUES ('Purpurina');
|
||||
|
||||
UPDATE vn.tag SET isFree=0,sourceTable='material' WHERE name= 'Material';
|
||||
UPDATE vn.tag SET isFree=0,sourceTable='material' WHERE name='Material secundario';
|
|
@ -1,164 +0,0 @@
|
|||
import selectors from '../../helpers/selectors.js';
|
||||
import getBrowser from '../../helpers/puppeteer';
|
||||
|
||||
describe('Account create and basic data path', () => {
|
||||
let browser;
|
||||
let page;
|
||||
|
||||
beforeAll(async() => {
|
||||
browser = await getBrowser();
|
||||
page = browser.page;
|
||||
await page.loginAndModule('itManagement', 'account');
|
||||
});
|
||||
|
||||
afterAll(async() => {
|
||||
await browser.close();
|
||||
});
|
||||
|
||||
it('should open the new account form by clicking the add button', async() => {
|
||||
await page.waitToClick(selectors.accountIndex.addAccount);
|
||||
await page.waitForState('account.create');
|
||||
});
|
||||
|
||||
it('should fill the form and then save it by clicking the create button', async() => {
|
||||
await page.write(selectors.accountIndex.newName, 'remy');
|
||||
await page.write(selectors.accountIndex.newNickname, 'Gambit');
|
||||
await page.write(selectors.accountIndex.newEmail, 'RemyEtienneLeBeau@verdnatura.es');
|
||||
await page.autocompleteSearch(selectors.accountIndex.newRole, 'Trainee');
|
||||
await page.write(selectors.accountIndex.newPassword, 'cestlavie');
|
||||
await page.waitToClick(selectors.accountIndex.createAccountButton);
|
||||
const message = await page.waitForSnackbar();
|
||||
|
||||
expect(message.text).toContain('Data saved!');
|
||||
});
|
||||
|
||||
it('should redirect the user to the created account basic data section', async() => {
|
||||
await page.waitForState('account.card.basicData');
|
||||
});
|
||||
|
||||
it('should check the name is as expected', async() => {
|
||||
const result = await page.waitToGetProperty(selectors.accountBasicData.name, 'value');
|
||||
|
||||
expect(result).toEqual('remy');
|
||||
});
|
||||
|
||||
it('should check the nickname is as expected', async() => {
|
||||
const result = await page.waitToGetProperty(selectors.accountBasicData.nickname, 'value');
|
||||
|
||||
expect(result).toEqual('Gambit');
|
||||
});
|
||||
|
||||
it('should check the email is as expected', async() => {
|
||||
const result = await page.waitToGetProperty(selectors.accountBasicData.email, 'value');
|
||||
|
||||
expect(result).toEqual('RemyEtienneLeBeau@verdnatura.es');
|
||||
});
|
||||
|
||||
it('should navigate to the roles section to check the roles are correct', async() => {
|
||||
await page.accessToSection('account.card.roles');
|
||||
const rolesCount = await page.countElement(selectors.accountRoles.anyResult);
|
||||
|
||||
expect(rolesCount).toEqual(3);
|
||||
});
|
||||
|
||||
describe('Descriptor option', () => {
|
||||
describe('activate account', () => {
|
||||
it(`should check the active account icon isn't present in the descriptor`, async() => {
|
||||
await page.waitForNumberOfElements(selectors.accountDescriptor.activeAccountIcon, 0);
|
||||
});
|
||||
|
||||
it('should activate the account using the descriptor menu', async() => {
|
||||
await page.waitToClick(selectors.accountDescriptor.menuButton);
|
||||
await page.waitToClick(selectors.accountDescriptor.activateAccount);
|
||||
await page.waitToClick(selectors.accountDescriptor.acceptButton);
|
||||
const message = await page.waitForSnackbar();
|
||||
|
||||
expect(message.text).toContain('Account enabled!');
|
||||
});
|
||||
|
||||
it('should check the active account icon is now present in the descriptor', async() => {
|
||||
await page.waitForSelector(selectors.accountDescriptor.activeAccountIcon, {visible: false});
|
||||
});
|
||||
});
|
||||
|
||||
describe('deactivate user', () => {
|
||||
it(`should check the inactive user icon isn't present in the descriptor just yet`, async() => {
|
||||
await page.waitForNumberOfElements(selectors.accountDescriptor.activeUserIcon, 0);
|
||||
});
|
||||
|
||||
it('should deactivate the user using the descriptor menu', async() => {
|
||||
await page.waitToClick(selectors.accountDescriptor.menuButton);
|
||||
await page.waitToClick(selectors.accountDescriptor.deactivateUser);
|
||||
await page.waitToClick(selectors.accountDescriptor.acceptButton);
|
||||
const message = await page.waitForSnackbar();
|
||||
|
||||
expect(message.text).toContain('User deactivated!');
|
||||
});
|
||||
|
||||
it('should check the inactive user icon is now present', async() => {
|
||||
await page.waitForNumberOfElements(selectors.accountDescriptor.activeUserIcon, 1);
|
||||
});
|
||||
});
|
||||
|
||||
describe('activate user', () => {
|
||||
it('should activate the user using the descriptor menu', async() => {
|
||||
await page.waitToClick(selectors.accountDescriptor.menuButton);
|
||||
await page.waitToClick(selectors.accountDescriptor.activateUser);
|
||||
await page.waitToClick(selectors.accountDescriptor.acceptButton);
|
||||
const message = await page.waitForSnackbar();
|
||||
|
||||
expect(message.text).toContain('User activated!');
|
||||
});
|
||||
|
||||
it('should check the inactive user icon is not present anymore', async() => {
|
||||
await page.waitForNumberOfElements(selectors.accountDescriptor.activeUserIcon, 0);
|
||||
});
|
||||
});
|
||||
|
||||
describe('mail forwarding', () => {
|
||||
it('should activate the mail forwarding and set the recipent email', async() => {
|
||||
await page.accessToSection('account.card.mailForwarding');
|
||||
await page.waitToClick(selectors.accountMailForwarding.mailForwardingCheckbox);
|
||||
await page.write(selectors.accountMailForwarding.email, 'someEmail@someDomain.es');
|
||||
await page.waitToClick(selectors.accountMailForwarding.save);
|
||||
const message = await page.waitForSnackbar();
|
||||
|
||||
expect(message.text).toContain('Data saved!');
|
||||
});
|
||||
});
|
||||
|
||||
describe('Set password', () => {
|
||||
it('should set the password using the descriptor menu', async() => {
|
||||
const newPassword = 'quantum.12345';
|
||||
|
||||
await page.waitToClick(selectors.accountDescriptor.menuButton);
|
||||
await page.waitToClick(selectors.accountDescriptor.setPassword);
|
||||
await page.write(selectors.accountDescriptor.newPassword, newPassword);
|
||||
await page.write(selectors.accountDescriptor.repeatPassword, newPassword);
|
||||
await page.waitToClick(selectors.accountDescriptor.acceptButton);
|
||||
const message = await page.waitForSnackbar();
|
||||
|
||||
expect(message.text).toContain('Password changed succesfully!');
|
||||
});
|
||||
|
||||
// cant log into created account for unknown reasons
|
||||
// it('should login into the created account with the new password', async() => {
|
||||
// await page.loginAndModule('Remy', 'quantum.crypt0graphy');
|
||||
// });
|
||||
});
|
||||
|
||||
describe('delete account', () => {
|
||||
// it('should navigate to the account basic data section', async() => {
|
||||
// });
|
||||
|
||||
it('should delete the account using the descriptor menu', async() => {
|
||||
await page.waitToClick(selectors.accountDescriptor.menuButton);
|
||||
await page.waitToClick(selectors.accountDescriptor.deleteAccount);
|
||||
await page.waitToClick(selectors.accountDescriptor.acceptButton);
|
||||
const message = await page.waitForSnackbar();
|
||||
|
||||
expect(message.text).toContain('User removed');
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
|
@ -1,66 +0,0 @@
|
|||
import selectors from '../../helpers/selectors.js';
|
||||
import getBrowser from '../../helpers/puppeteer';
|
||||
|
||||
describe('Account Alias create and basic data path', () => {
|
||||
let browser;
|
||||
let page;
|
||||
|
||||
beforeAll(async() => {
|
||||
browser = await getBrowser();
|
||||
page = browser.page;
|
||||
await page.loginAndModule('itManagement', 'account');
|
||||
await page.accessToSection('account.alias');
|
||||
});
|
||||
|
||||
afterAll(async() => {
|
||||
await browser.close();
|
||||
});
|
||||
|
||||
it('should open the new account alias form by clicking the add button', async() => {
|
||||
await page.waitToClick(selectors.accountAliasIndex.addAlias);
|
||||
await page.waitForState('account.alias.create');
|
||||
});
|
||||
|
||||
it('should fill the form and then save it by clicking the create alias button', async() => {
|
||||
await page.write(selectors.accountAliasIndex.newName, 'Boring alias');
|
||||
await page.write(selectors.accountAliasIndex.newDescription, 'Boring description');
|
||||
await page.waitToClick(selectors.accountAliasIndex.createAliasButton);
|
||||
const message = await page.waitForSnackbar();
|
||||
|
||||
expect(message.text).toContain('Data saved!');
|
||||
});
|
||||
|
||||
it('should redirect the user to the created account alias basic data section', async() => {
|
||||
await page.waitForState('account.alias.card.basicData');
|
||||
});
|
||||
|
||||
it('should edit the alias basic data', async() => {
|
||||
await page.overwrite(selectors.accountAliasBasicData.name, 'Psykers');
|
||||
await page.overwrite(selectors.accountAliasBasicData.description, 'Email group for psykers');
|
||||
await page.waitToClick(selectors.accountAliasBasicData.save);
|
||||
const message = await page.waitForSnackbar();
|
||||
|
||||
expect(message.text).toContain('Data saved!');
|
||||
});
|
||||
|
||||
it('should reload the basicData section and check the name was edited successfully', async() => {
|
||||
await page.reloadSection('account.alias.card.basicData');
|
||||
const result = await page.waitToGetProperty(selectors.accountAliasBasicData.name, 'value');
|
||||
|
||||
expect(result).toEqual('Psykers');
|
||||
});
|
||||
|
||||
it('should check the alias description was edited successfully', async() => {
|
||||
const result = await page.waitToGetProperty(selectors.accountAliasBasicData.description, 'value');
|
||||
|
||||
expect(result).toContain('psykers');
|
||||
});
|
||||
|
||||
it('should search IT alias then access the user section to check the role listed is the expected one', async() => {
|
||||
await page.accessToSearchResult('IT');
|
||||
await page.accessToSection('account.alias.card.users');
|
||||
const rolesCount = await page.countElement(selectors.accountAliasUsers.anyResult);
|
||||
|
||||
expect(rolesCount).toEqual(1);
|
||||
});
|
||||
});
|
|
@ -1,86 +0,0 @@
|
|||
import selectors from '../../helpers/selectors.js';
|
||||
import getBrowser from '../../helpers/puppeteer';
|
||||
|
||||
describe('Account Role create and basic data path', () => {
|
||||
let browser;
|
||||
let page;
|
||||
|
||||
beforeAll(async() => {
|
||||
browser = await getBrowser();
|
||||
page = browser.page;
|
||||
await page.loginAndModule('it', 'account');
|
||||
await page.accessToSection('account.role');
|
||||
});
|
||||
|
||||
afterAll(async() => {
|
||||
await browser.close();
|
||||
});
|
||||
|
||||
it('should open the new account role form by clicking the add button', async() => {
|
||||
await page.waitToClick(selectors.accountRoleIndex.addRole);
|
||||
await page.waitForState('account.role.create');
|
||||
});
|
||||
|
||||
it('should fill the form and then save it by clicking the create role button', async() => {
|
||||
await page.write(selectors.accountRoleIndex.newName, 'boringRole');
|
||||
await page.write(selectors.accountRoleIndex.newDescription, 'Boring description');
|
||||
await page.waitToClick(selectors.accountRoleIndex.createRoleButton);
|
||||
const message = await page.waitForSnackbar();
|
||||
|
||||
expect(message.text).toContain('Data saved!');
|
||||
});
|
||||
|
||||
it('should redirect the user to the created role basic data section', async() => {
|
||||
await page.waitForState('account.role.card.basicData');
|
||||
});
|
||||
|
||||
it('should edit the role basic data', async() => {
|
||||
await page.overwrite(selectors.accountRoleBasicData.name, 'psyker');
|
||||
await page.overwrite(selectors.accountRoleBasicData.description, 'A role just for psykers');
|
||||
await page.waitToClick(selectors.accountRoleBasicData.save);
|
||||
const message = await page.waitForSnackbar();
|
||||
|
||||
expect(message.text).toContain('Data saved!');
|
||||
});
|
||||
|
||||
it('should reload the role basicData section and check the name was edited successfully', async() => {
|
||||
await page.reloadSection('account.role.card.basicData');
|
||||
const result = await page.waitToGetProperty(selectors.accountRoleBasicData.name, 'value');
|
||||
|
||||
expect(result).toEqual('psyker');
|
||||
});
|
||||
|
||||
it('should check the role description was edited successfully', async() => {
|
||||
const result = await page.waitToGetProperty(selectors.accountRoleBasicData.description, 'value');
|
||||
|
||||
expect(result).toContain('psykers');
|
||||
});
|
||||
|
||||
it('should navigate to the subroles section', async() => {
|
||||
await page.accessToSection('account.role.card.subroles');
|
||||
});
|
||||
|
||||
it('should asign a subrole', async() => {
|
||||
await page.waitToClick(selectors.accountSubroles.addSubrole);
|
||||
await page.autocompleteSearch(selectors.accountSubroles.role, 'teamManager');
|
||||
await page.waitToClick(selectors.accountSubroles.save);
|
||||
const message = await page.waitForSnackbar();
|
||||
|
||||
expect(message.text).toContain('Role added!');
|
||||
});
|
||||
|
||||
it('should reload the subroles section and check a role was added', async() => {
|
||||
await page.reloadSection('account.role.card.subroles');
|
||||
const subrolesCount = await page.countElement(selectors.accountSubroles.anyResult);
|
||||
|
||||
expect(subrolesCount).toEqual(1);
|
||||
});
|
||||
|
||||
it('should access the employee roles inheritance then check the roles listed are the expected ones', async() => {
|
||||
await page.accessToSearchResult('employee');
|
||||
await page.accessToSection('account.role.card.inherited');
|
||||
const rolesCount = await page.countElement(selectors.accountRoleInheritance.anyResult);
|
||||
|
||||
expect(rolesCount).toEqual(7);
|
||||
});
|
||||
});
|
|
@ -1,60 +0,0 @@
|
|||
import selectors from '../../helpers/selectors.js';
|
||||
import getBrowser from '../../helpers/puppeteer';
|
||||
|
||||
describe('Account ACL path', () => {
|
||||
let browser;
|
||||
let page;
|
||||
|
||||
beforeAll(async() => {
|
||||
browser = await getBrowser();
|
||||
page = browser.page;
|
||||
await page.loginAndModule('developer', 'account');
|
||||
await page.accessToSection('account.acl');
|
||||
});
|
||||
|
||||
afterAll(async() => {
|
||||
await browser.close();
|
||||
});
|
||||
|
||||
it('should go to create new acl', async() => {
|
||||
await page.waitToClick(selectors.accountAcl.addAcl);
|
||||
await page.waitForState('account.acl.create');
|
||||
});
|
||||
|
||||
it('should create new acl', async() => {
|
||||
await page.autocompleteSearch(selectors.accountAcl.role, 'sysadmin');
|
||||
await page.autocompleteSearch(selectors.accountAcl.model, 'Account');
|
||||
await page.autocompleteSearch(selectors.accountAcl.accessType, '*');
|
||||
await page.autocompleteSearch(selectors.accountAcl.permission, 'ALLOW');
|
||||
await page.waitToClick(selectors.accountAcl.save);
|
||||
const message = await page.waitForSnackbar();
|
||||
|
||||
expect(message.text).toContain('Data saved!');
|
||||
});
|
||||
|
||||
it('should navigate to edit', async() => {
|
||||
await page.doSearch();
|
||||
await page.waitToClick(selectors.accountAcl.thirdAcl);
|
||||
await page.waitForState('account.acl.edit');
|
||||
});
|
||||
|
||||
it('should edit the third acl', async() => {
|
||||
await page.autocompleteSearch(selectors.accountAcl.model, 'Supplier');
|
||||
await page.autocompleteSearch(selectors.accountAcl.accessType, 'READ');
|
||||
await page.waitToClick(selectors.accountAcl.save);
|
||||
const message = await page.waitForSnackbar();
|
||||
|
||||
expect(message.text).toContain('Data saved!');
|
||||
});
|
||||
|
||||
it('should delete the third result', async() => {
|
||||
const result = await page.waitToGetProperty(selectors.accountAcl.thirdAcl, 'innerText');
|
||||
await page.waitToClick(selectors.accountAcl.deleteThirdAcl);
|
||||
await page.waitToClick(selectors.globalItems.acceptButton);
|
||||
const message = await page.waitForSnackbar();
|
||||
const newResult = await page.waitToGetProperty(selectors.accountAcl.thirdAcl, 'innerText');
|
||||
|
||||
expect(message.text).toContain('ACL removed');
|
||||
expect(result).not.toEqual(newResult);
|
||||
});
|
||||
});
|
|
@ -1,25 +0,0 @@
|
|||
import selectors from '../../helpers/selectors.js';
|
||||
import getBrowser from '../../helpers/puppeteer';
|
||||
|
||||
describe('Account Connections path', () => {
|
||||
let browser;
|
||||
let page;
|
||||
const account = 'sysadmin';
|
||||
|
||||
beforeAll(async() => {
|
||||
browser = await getBrowser();
|
||||
page = browser.page;
|
||||
await page.loginAndModule(account, 'account');
|
||||
await page.accessToSection('account.connections');
|
||||
});
|
||||
|
||||
afterAll(async() => {
|
||||
await browser.close();
|
||||
});
|
||||
|
||||
it('should check this is the last connection', async() => {
|
||||
const firstResult = await page.waitToGetProperty(selectors.accountConnections.firstConnection, 'innerText');
|
||||
|
||||
expect(firstResult).toContain(account);
|
||||
});
|
||||
});
|
|
@ -1,37 +0,0 @@
|
|||
import selectors from '../../helpers/selectors.js';
|
||||
import getBrowser from '../../helpers/puppeteer';
|
||||
|
||||
describe('Account Accounts path', () => {
|
||||
let browser;
|
||||
let page;
|
||||
|
||||
beforeAll(async() => {
|
||||
browser = await getBrowser();
|
||||
page = browser.page;
|
||||
await page.loginAndModule('sysadmin', 'account');
|
||||
await page.accessToSection('account.accounts');
|
||||
});
|
||||
|
||||
afterAll(async() => {
|
||||
await browser.close();
|
||||
});
|
||||
|
||||
it('should sync roles', async() => {
|
||||
await page.waitToClick(selectors.accountAccounts.syncRoles);
|
||||
const message = await page.waitForSnackbar();
|
||||
|
||||
expect(message.text).toContain('Roles synchronized!');
|
||||
});
|
||||
|
||||
it('should relogin', async() => {
|
||||
await page.loginAndModule('sysadmin', 'account');
|
||||
await page.accessToSection('account.accounts');
|
||||
});
|
||||
|
||||
it('should sync all', async() => {
|
||||
await page.waitToClick(selectors.accountAccounts.syncAll);
|
||||
const message = await page.waitForSnackbar();
|
||||
|
||||
expect(message.text).toContain('Synchronizing in the background');
|
||||
});
|
||||
});
|
|
@ -1,41 +0,0 @@
|
|||
import selectors from '../../helpers/selectors.js';
|
||||
import getBrowser from '../../helpers/puppeteer';
|
||||
|
||||
describe('Account LDAP path', () => {
|
||||
let browser;
|
||||
let page;
|
||||
|
||||
beforeAll(async() => {
|
||||
browser = await getBrowser();
|
||||
page = browser.page;
|
||||
await page.loginAndModule('sysadmin', 'account');
|
||||
await page.accessToSection('account.ldap');
|
||||
});
|
||||
|
||||
afterAll(async() => {
|
||||
await browser.close();
|
||||
});
|
||||
|
||||
it('should set data and save', async() => {
|
||||
await page.waitToClick(selectors.accountLdap.checkEnable);
|
||||
await page.write(selectors.accountLdap.server, '1234');
|
||||
await page.write(selectors.accountLdap.rdn, '1234');
|
||||
await page.write(selectors.accountLdap.password, 'nightmare');
|
||||
await page.write(selectors.accountLdap.userDn, 'sysadmin');
|
||||
await page.write(selectors.accountLdap.groupDn, '1234');
|
||||
await page.waitToClick(selectors.accountLdap.save);
|
||||
|
||||
const message = await page.waitForSnackbar();
|
||||
|
||||
expect(message.text).toContain('Data saved!');
|
||||
});
|
||||
|
||||
it('should reset data', async() => {
|
||||
await page.waitToClick(selectors.accountLdap.checkEnable);
|
||||
await page.waitToClick(selectors.accountLdap.save);
|
||||
|
||||
const message = await page.waitForSnackbar();
|
||||
|
||||
expect(message.text).toContain('Data saved!');
|
||||
});
|
||||
});
|
|
@ -1,42 +0,0 @@
|
|||
import selectors from '../../helpers/selectors.js';
|
||||
import getBrowser from '../../helpers/puppeteer';
|
||||
|
||||
describe('Account Samba path', () => {
|
||||
let browser;
|
||||
let page;
|
||||
|
||||
beforeAll(async() => {
|
||||
browser = await getBrowser();
|
||||
page = browser.page;
|
||||
await page.loginAndModule('sysadmin', 'account');
|
||||
await page.accessToSection('account.samba');
|
||||
});
|
||||
|
||||
afterAll(async() => {
|
||||
await browser.close();
|
||||
});
|
||||
|
||||
it('should set data and save', async() => {
|
||||
await page.waitToClick(selectors.accountSamba.checkEnable);
|
||||
await page.write(selectors.accountSamba.adDomain, '1234');
|
||||
await page.write(selectors.accountSamba.adController, '1234');
|
||||
await page.write(selectors.accountSamba.adUser, 'sysadmin');
|
||||
await page.write(selectors.accountSamba.adPassword, 'nightmare');
|
||||
await page.write(selectors.accountSamba.userDn, 'testDn');
|
||||
await page.waitToClick(selectors.accountSamba.verifyCert);
|
||||
await page.waitToClick(selectors.accountSamba.save);
|
||||
|
||||
const message = await page.waitForSnackbar();
|
||||
|
||||
expect(message.text).toContain('Data saved!');
|
||||
});
|
||||
|
||||
it('should reset data', async() => {
|
||||
await page.waitToClick(selectors.accountSamba.checkEnable);
|
||||
await page.waitToClick(selectors.accountSamba.save);
|
||||
|
||||
const message = await page.waitForSnackbar();
|
||||
|
||||
expect(message.text).toContain('Data saved!');
|
||||
});
|
||||
});
|
|
@ -1,112 +0,0 @@
|
|||
import selectors from '../../helpers/selectors.js';
|
||||
import getBrowser from '../../helpers/puppeteer';
|
||||
|
||||
describe('Account privileges path', () => {
|
||||
let browser;
|
||||
let page;
|
||||
|
||||
beforeAll(async() => {
|
||||
browser = await getBrowser();
|
||||
page = browser.page;
|
||||
await page.loginAndModule('developer', 'account');
|
||||
await page.accessToSearchResult('1101');
|
||||
await page.accessToSection('account.card.privileges');
|
||||
});
|
||||
|
||||
afterAll(async() => {
|
||||
await browser.close();
|
||||
});
|
||||
|
||||
describe('as developer', () => {
|
||||
it('should throw error when give privileges', async() => {
|
||||
await page.waitToClick(selectors.accountPrivileges.checkHasGrant);
|
||||
await page.waitToClick(selectors.accountPrivileges.save);
|
||||
|
||||
const message = await page.waitForSnackbar();
|
||||
|
||||
expect(message.text).toContain(`You don't have grant privilege`);
|
||||
});
|
||||
|
||||
it('should throw error when change role', async() => {
|
||||
await page.autocompleteSearch(selectors.accountPrivileges.role, 'employee');
|
||||
await page.waitToClick(selectors.accountPrivileges.save);
|
||||
|
||||
const message = await page.waitForSnackbar();
|
||||
|
||||
expect(message.text).toContain(`You don't have grant privilege`);
|
||||
});
|
||||
});
|
||||
|
||||
describe('as sysadmin', () => {
|
||||
beforeAll(async() => {
|
||||
await page.loginAndModule('sysadmin', 'account');
|
||||
await page.accessToSearchResult('9');
|
||||
await page.accessToSection('account.card.privileges');
|
||||
});
|
||||
|
||||
it('should give privileges', async() => {
|
||||
await page.waitToClick(selectors.accountPrivileges.checkHasGrant);
|
||||
await page.waitToClick(selectors.accountPrivileges.save);
|
||||
const message = await page.waitForSnackbar();
|
||||
|
||||
await page.reloadSection('account.card.privileges');
|
||||
const result = await page.checkboxState(selectors.accountPrivileges.checkHasGrant);
|
||||
|
||||
expect(message.text).toContain(`Data saved!`);
|
||||
expect(result).toBe('checked');
|
||||
});
|
||||
|
||||
it('should throw error when change role and not own role', async() => {
|
||||
await page.autocompleteSearch(selectors.accountPrivileges.role, 'itBoss');
|
||||
await page.waitToClick(selectors.accountPrivileges.save);
|
||||
|
||||
const message = await page.waitForSnackbar();
|
||||
|
||||
expect(message.text).toContain(`You don't own the role and you can't assign it to another user`);
|
||||
});
|
||||
|
||||
it('should change role to employee', async() => {
|
||||
await page.autocompleteSearch(selectors.accountPrivileges.role, 'employee');
|
||||
await page.waitToClick(selectors.accountPrivileges.save);
|
||||
const message = await page.waitForSnackbar();
|
||||
|
||||
await page.reloadSection('account.card.privileges');
|
||||
const result = await page.waitToGetProperty(selectors.accountPrivileges.role, 'value');
|
||||
|
||||
expect(message.text).toContain(`Data saved!`);
|
||||
expect(result).toContain('employee');
|
||||
});
|
||||
|
||||
it('should return role to developer', async() => {
|
||||
await page.autocompleteSearch(selectors.accountPrivileges.role, 'developer');
|
||||
await page.waitToClick(selectors.accountPrivileges.save);
|
||||
const message = await page.waitForSnackbar();
|
||||
|
||||
await page.reloadSection('account.card.privileges');
|
||||
const result = await page.waitToGetProperty(selectors.accountPrivileges.role, 'value');
|
||||
|
||||
expect(message.text).toContain(`Data saved!`);
|
||||
expect(result).toContain('developer');
|
||||
});
|
||||
});
|
||||
|
||||
describe('as developer again', () => {
|
||||
it('should remove privileges', async() => {
|
||||
await page.accessToSearchResult('9');
|
||||
await page.accessToSection('account.card.privileges');
|
||||
|
||||
await page.waitToClick(selectors.accountPrivileges.checkHasGrant);
|
||||
await page.waitToClick(selectors.accountPrivileges.save);
|
||||
const message = await page.waitForSnackbar();
|
||||
|
||||
expect(message.text).toContain(`Data saved!`);
|
||||
});
|
||||
|
||||
it('should logIn in developer', async() => {
|
||||
await page.reloadSection('account.card.privileges');
|
||||
const result = await page.checkboxState(selectors.accountPrivileges.checkHasGrant);
|
||||
|
||||
expect(result).toBe('unchecked');
|
||||
});
|
||||
});
|
||||
});
|
|
@ -13,7 +13,6 @@ module.exports = function(Self) {
|
|||
Object.assign(Self, {
|
||||
setup() {
|
||||
Self.super_.setup.call(this);
|
||||
|
||||
/**
|
||||
* Setting a global transaction timeout to find out if the service
|
||||
* is blocked because the connection pool is empty.
|
||||
|
@ -28,6 +27,26 @@ module.exports = function(Self) {
|
|||
};
|
||||
});
|
||||
|
||||
this.beforeRemote('**', async ctx => {
|
||||
if (!this.hasFilter(ctx)) return;
|
||||
|
||||
const defaultLimit = this.app.orm.selectLimit;
|
||||
const filter = ctx.args.filter || {limit: defaultLimit};
|
||||
|
||||
if (filter.limit > defaultLimit) {
|
||||
filter.limit = defaultLimit;
|
||||
ctx.args.filter = filter;
|
||||
}
|
||||
});
|
||||
|
||||
this.afterRemote('**', async ctx => {
|
||||
if (!this.hasFilter(ctx)) return;
|
||||
|
||||
const {result} = ctx;
|
||||
const length = Array.isArray(result) ? result.length : result ? 1 : 0;
|
||||
if (length >= this.app.orm.selectLimit) throw new UserError('Too many records');
|
||||
});
|
||||
|
||||
// Register field ACL validation
|
||||
/*
|
||||
this.beforeRemote('prototype.patchAttributes', ctx => this.checkUpdateAcls(ctx));
|
||||
|
@ -327,6 +346,12 @@ module.exports = function(Self) {
|
|||
|
||||
checkInsertAcls(ctx) {
|
||||
return this.checkAcls(ctx, 'insert');
|
||||
},
|
||||
|
||||
hasFilter(ctx) {
|
||||
return ctx.req.method.toUpperCase() === 'GET' &&
|
||||
ctx.method.accepts.some(x => x.arg === 'filter' && x.type.toLowerCase() === 'object');
|
||||
}
|
||||
|
||||
});
|
||||
};
|
||||
|
|
|
@ -369,5 +369,6 @@
|
|||
"Cannot send mail": "Não é possível enviar o email",
|
||||
"CONSTRAINT `supplierAccountTooShort` failed for `vn`.`supplier`": "La cuenta debe tener exactamente 10 dígitos",
|
||||
"The sale not exists in the item shelving": "La venta no existe en la estantería del artículo",
|
||||
"The entry not have stickers": "La entrada no tiene etiquetas"
|
||||
"The entry not have stickers": "La entrada no tiene etiquetas",
|
||||
"Too many records": "Demasiados registros"
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
module.exports = async function(app) {
|
||||
if (!app.orm) {
|
||||
const ormConfig = await app.models.OrmConfig.findOne();
|
||||
app.orm = ormConfig;
|
||||
}
|
||||
};
|
|
@ -0,0 +1,42 @@
|
|||
/**
|
||||
* Flattens an array of objects by converting each object into a flat structure.
|
||||
*
|
||||
* @param {Array} dataArray Array of objects to be flattened
|
||||
* @return {Array} Array of flattened objects
|
||||
*/
|
||||
function flatten(dataArray) {
|
||||
return dataArray.map(item => flattenObj(item.__data));
|
||||
}
|
||||
|
||||
/**
|
||||
* Recursively flattens an object, converting nested properties into a single level object
|
||||
* with keys representing the original nested structure.
|
||||
*
|
||||
* @param {Object} data The object to be flattened
|
||||
* @param {String} [prefix=''] Optional prefix for nested keys
|
||||
* @return {Object} Flattened object
|
||||
*/
|
||||
function flattenObj(data, prefix = '') {
|
||||
let result = {};
|
||||
try {
|
||||
for (let key in data) {
|
||||
if (!data[key]) continue;
|
||||
|
||||
const newKey = prefix ? `${prefix}_${key}` : key;
|
||||
const value = data[key];
|
||||
|
||||
if (typeof value === 'object' && value !== null && !Array.isArray(value))
|
||||
Object.assign(result, flattenObj(value.__data, newKey));
|
||||
else
|
||||
result[newKey] = value;
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
module.exports = {
|
||||
flatten,
|
||||
flattenObj,
|
||||
};
|
|
@ -1,75 +0,0 @@
|
|||
<vn-watcher
|
||||
vn-id="watcher"
|
||||
url="AccountConfigs"
|
||||
data="$ctrl.config"
|
||||
id-value="1"
|
||||
form="form">
|
||||
</vn-watcher>
|
||||
<form
|
||||
name="form"
|
||||
ng-submit="watcher.submit()"
|
||||
class="vn-w-md">
|
||||
<vn-card class="vn-pa-lg" vn-focus>
|
||||
<vn-vertical>
|
||||
<vn-textfield
|
||||
label="Homedir base"
|
||||
ng-model="$ctrl.config.homedir"
|
||||
rule="AccountConfig">
|
||||
</vn-textfield>
|
||||
<vn-textfield
|
||||
label="Shell"
|
||||
ng-model="$ctrl.config.shell"
|
||||
rule="AccountConfig">
|
||||
</vn-textfield>
|
||||
<vn-input-number
|
||||
label="User and role base id"
|
||||
ng-model="$ctrl.config.idBase"
|
||||
rule="AccountConfig">
|
||||
</vn-input-number>
|
||||
<vn-horizontal>
|
||||
<vn-input-number
|
||||
label="Min"
|
||||
ng-model="$ctrl.config.min"
|
||||
rule="AccountConfig">
|
||||
</vn-input-number>
|
||||
<vn-input-number
|
||||
label="Max"
|
||||
ng-model="$ctrl.config.max"
|
||||
rule="AccountConfig">
|
||||
</vn-input-number>
|
||||
</vn-horizontal>
|
||||
<vn-horizontal>
|
||||
<vn-input-number
|
||||
label="Warn"
|
||||
ng-model="$ctrl.config.warn"
|
||||
rule="AccountConfig">
|
||||
</vn-input-number>
|
||||
<vn-input-number
|
||||
label="Inact"
|
||||
ng-model="$ctrl.config.inact"
|
||||
rule="AccountConfig">
|
||||
</vn-input-number>
|
||||
</vn-horizontal>
|
||||
</vn-vertical>
|
||||
</vn-card>
|
||||
<vn-button-bar>
|
||||
<vn-submit
|
||||
disabled="!watcher.dataChanged()"
|
||||
label="Save">
|
||||
</vn-submit>
|
||||
<vn-button
|
||||
label="Synchronize all"
|
||||
ng-click="$ctrl.onSynchronizeAll()">
|
||||
</vn-button>
|
||||
<vn-button
|
||||
label="Synchronize roles"
|
||||
ng-click="$ctrl.onSynchronizeRoles()">
|
||||
</vn-button>
|
||||
<vn-button
|
||||
disabled="!watcher.dataChanged()"
|
||||
class="cancel"
|
||||
label="Undo changes"
|
||||
ng-click="watcher.loadOriginalData()">
|
||||
</vn-button>
|
||||
</vn-button-bar>
|
||||
</form>
|
|
@ -1,19 +0,0 @@
|
|||
import ngModule from '../module';
|
||||
import Section from 'salix/components/section';
|
||||
|
||||
export default class Controller extends Section {
|
||||
onSynchronizeAll() {
|
||||
this.vnApp.showSuccess(this.$t('Synchronizing in the background'));
|
||||
this.$http.patch(`Accounts/syncAll`);
|
||||
}
|
||||
|
||||
onSynchronizeRoles() {
|
||||
this.$http.patch(`RoleInherits/sync`)
|
||||
.then(() => this.vnApp.showSuccess(this.$t('Roles synchronized!')));
|
||||
}
|
||||
}
|
||||
|
||||
ngModule.component('vnAccountAccounts', {
|
||||
template: require('./index.html'),
|
||||
controller: Controller
|
||||
});
|
|
@ -1,14 +0,0 @@
|
|||
Accounts: Cuentas
|
||||
Homedir base: Directorio base para carpetas de usuario
|
||||
Shell: Intérprete de línea de comandos
|
||||
User and role base id: Id base usuarios y roles
|
||||
Synchronize all: Sincronizar todo
|
||||
Synchronize roles: Sincronizar roles
|
||||
If password is not specified, just user attributes are synchronized: >-
|
||||
Si la contraseña no se especifica solo se sincronizarán lo atributos del usuario
|
||||
Synchronizing in the background: Sincronizando en segundo plano
|
||||
Users synchronized!: ¡Usuarios sincronizados!
|
||||
Username: Nombre de usuario
|
||||
Synchronize: Sincronizar
|
||||
Please enter the username: Por favor introduce el nombre de usuario
|
||||
Roles synchronized!: ¡Roles sincronizados!
|
|
@ -1,70 +0,0 @@
|
|||
<vn-watcher
|
||||
vn-id="watcher"
|
||||
url="ACLs"
|
||||
data="$ctrl.acl"
|
||||
id-value="$ctrl.$params.id"
|
||||
insert-mode="!$ctrl.$params.id"
|
||||
form="form">
|
||||
</vn-watcher>
|
||||
<form
|
||||
name="form"
|
||||
vn-http-submit="watcher.submitGo('account.acl')"
|
||||
class="vn-w-md">
|
||||
<vn-card class="vn-pa-lg">
|
||||
<vn-horizontal>
|
||||
<vn-autocomplete
|
||||
label="Role"
|
||||
ng-model="$ctrl.acl.principalId"
|
||||
url="VnRoles"
|
||||
id-field="name"
|
||||
value-field="name"
|
||||
vn-focus>
|
||||
</vn-autocomplete>
|
||||
</vn-horizontal>
|
||||
<vn-horizontal>
|
||||
<vn-autocomplete
|
||||
label="Model"
|
||||
ng-model="$ctrl.acl.model"
|
||||
data="$ctrl.models"
|
||||
id-field="name"
|
||||
value-field="name">
|
||||
</vn-autocomplete>
|
||||
</vn-horizontal>
|
||||
<vn-horizontal>
|
||||
<vn-textfield
|
||||
label="Property"
|
||||
ng-model="$ctrl.acl.property"
|
||||
info="Use * to match all properties">
|
||||
</vn-textfield>
|
||||
</vn-horizontal>
|
||||
<vn-horizontal>
|
||||
<vn-autocomplete
|
||||
label="Access type"
|
||||
ng-model="$ctrl.acl.accessType"
|
||||
data="$ctrl.accessTypes"
|
||||
id-field="name"
|
||||
value-field="name">
|
||||
</vn-autocomplete>
|
||||
</vn-horizontal>
|
||||
<vn-horizontal>
|
||||
<vn-autocomplete
|
||||
label="Permission"
|
||||
ng-model="$ctrl.acl.permission"
|
||||
data="$ctrl.permissions"
|
||||
id-field="name"
|
||||
value-field="name">
|
||||
</vn-autocomplete>
|
||||
</vn-horizontal>
|
||||
</vn-card>
|
||||
<vn-button-bar>
|
||||
<vn-submit
|
||||
disabled="!watcher.dataChanged()"
|
||||
label="Save">
|
||||
</vn-submit>
|
||||
<vn-button
|
||||
class="cancel"
|
||||
label="Cancel"
|
||||
ui-sref="account.acl">
|
||||
</vn-button>
|
||||
</vn-button-bar>
|
||||
</form>
|
|
@ -1,33 +0,0 @@
|
|||
import ngModule from '../../module';
|
||||
import Section from 'salix/components/section';
|
||||
|
||||
export default class Controller extends Section {
|
||||
constructor(...args) {
|
||||
super(...args);
|
||||
this.accessTypes = [
|
||||
{name: '*'},
|
||||
{name: 'READ'},
|
||||
{name: 'WRITE'}
|
||||
];
|
||||
this.permissions = [
|
||||
{name: 'ALLOW'},
|
||||
{name: 'DENY'}
|
||||
];
|
||||
|
||||
this.models = [];
|
||||
for (let model in window.validations)
|
||||
this.models.push({name: model});
|
||||
|
||||
this.acl = {
|
||||
property: '*',
|
||||
principalType: 'ROLE',
|
||||
accessType: 'READ',
|
||||
permission: 'ALLOW'
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
ngModule.component('vnAclCreate', {
|
||||
template: require('./index.html'),
|
||||
controller: Controller
|
||||
});
|
|
@ -1,4 +0,0 @@
|
|||
import './main';
|
||||
import './index/';
|
||||
import './create';
|
||||
import './search-panel';
|
|
@ -1,51 +0,0 @@
|
|||
<vn-auto-search
|
||||
model="model">
|
||||
</vn-auto-search>
|
||||
<vn-data-viewer
|
||||
model="model"
|
||||
class="vn-w-sm">
|
||||
<vn-card>
|
||||
<vn-list class="separated">
|
||||
<a
|
||||
ng-repeat="row in model.data track by row.id"
|
||||
ui-sref="account.acl.edit(::{id: row.id})"
|
||||
translate-attr="{title: 'Edit ACL'}"
|
||||
class="vn-item search-result">
|
||||
<vn-item-section>
|
||||
<h6>{{::row.model}}.{{::row.property}}</h6>
|
||||
<vn-label-value
|
||||
label="Role"
|
||||
value="{{::row.principalId}}">
|
||||
</vn-label-value>
|
||||
<vn-label-value
|
||||
label="Access type"
|
||||
value="{{::row.accessType}}">
|
||||
</vn-label-value>
|
||||
<vn-label-value
|
||||
label="Permission"
|
||||
value="{{::row.permission}}">
|
||||
</vn-label-value>
|
||||
</vn-item-section>
|
||||
<vn-item-section side>
|
||||
<vn-icon-button
|
||||
vn-click-stop="deleteAcl.show(row)"
|
||||
vn-tooltip="Delete"
|
||||
icon="delete">
|
||||
</vn-icon-button>
|
||||
</vn-item-section>
|
||||
</a>
|
||||
</vn-list>
|
||||
</vn-card>
|
||||
</vn-data-viewer>
|
||||
<a ui-sref="account.acl.create"
|
||||
vn-tooltip="New ACL"
|
||||
vn-bind="+"
|
||||
fixed-bottom-right>
|
||||
<vn-float-button icon="add"></vn-float-button>
|
||||
</a>
|
||||
<vn-confirm
|
||||
vn-id="deleteAcl"
|
||||
on-accept="$ctrl.onDelete($data)"
|
||||
question="Are you sure you want to continue?"
|
||||
message="ACL will be removed">
|
||||
</vn-confirm>
|
|
@ -1,15 +0,0 @@
|
|||
import ngModule from '../../module';
|
||||
import Section from 'salix/components/section';
|
||||
|
||||
export default class Controller extends Section {
|
||||
onDelete(row) {
|
||||
return this.$http.delete(`ACLs/${row.id}`)
|
||||
.then(() => this.$.model.refresh())
|
||||
.then(() => this.vnApp.showSuccess(this.$t('ACL removed')));
|
||||
}
|
||||
}
|
||||
|
||||
ngModule.component('vnAclIndex', {
|
||||
template: require('./index.html'),
|
||||
controller: Controller
|
||||
});
|
|
@ -1,4 +0,0 @@
|
|||
New ACL: Nuevo ACL
|
||||
Edit ACL: Editar ACL
|
||||
ACL will be removed: El ACL será eliminado
|
||||
ACL removed: ACL eliminado
|
|
@ -1,4 +0,0 @@
|
|||
Model: Modelo
|
||||
Property: Propiedad
|
||||
Access type: Tipo de acceso
|
||||
Permission: Permiso
|
|
@ -1,20 +0,0 @@
|
|||
<vn-crud-model
|
||||
vn-id="model"
|
||||
url="ACLs"
|
||||
limit="20"
|
||||
expr-builder="$ctrl.exprBuilder(param, value)"
|
||||
auto-save="true">
|
||||
</vn-crud-model>
|
||||
<vn-portal slot="topbar">
|
||||
<vn-searchbar
|
||||
info="Search ACL by model name"
|
||||
panel="vn-acl-search-panel"
|
||||
model="model"
|
||||
expr-builder="$ctrl.exprBuilder(param, value)"
|
||||
base-state="account.acl"
|
||||
entity-state="edit">
|
||||
</vn-searchbar>
|
||||
</vn-portal>
|
||||
<ui-view>
|
||||
<vn-acl-index></vn-acl-index>
|
||||
</ui-view>
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue