Merge branch 'test' into 8058-test-ticketsUrgentes
gitea/salix/pipeline/pr-test This commit looks good
Details
gitea/salix/pipeline/pr-test This commit looks good
Details
This commit is contained in:
commit
98bc78fd42
|
@ -4,7 +4,7 @@ USE `util`;
|
|||
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
|
||||
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
|
||||
|
||||
INSERT INTO `version` VALUES ('vn-database','11196','91ee956fbd1557848e4ab522bc5d39b2ec10e9b2','2024-09-18 07:28:14','11245');
|
||||
INSERT INTO `version` VALUES ('vn-database','11278','fe10f03459a153fc213bf64e352804c043f94590','2024-10-03 07:47:47','11281');
|
||||
|
||||
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);
|
||||
|
@ -862,6 +862,7 @@ INSERT INTO `versionLog` VALUES ('vn-database','11083','00-firstScript.sql','jen
|
|||
INSERT INTO `versionLog` VALUES ('vn-database','11084','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-06-25 08:38:13',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11086','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-06-27 10:02:02',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11087','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-06-25 08:38:13',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11088','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:44:48',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11089','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-06-25 08:39:16',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11090','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-06-11 08:32:35',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11092','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-06-07 08:21:23',NULL,NULL);
|
||||
|
@ -875,12 +876,37 @@ INSERT INTO `versionLog` VALUES ('vn-database','11103','00-firstScript.sql','jen
|
|||
INSERT INTO `versionLog` VALUES ('vn-database','11104','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-07-09 07:39:38',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11105','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-06-20 15:36:07',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11106','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-06-25 08:39:49',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11107','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:44:48',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11107','01-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:44:48',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11107','02-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:44:48',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11107','03-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:44:48',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11107','04-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:44:49',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11107','05-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:44:49',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11107','06-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:45:04',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11107','07-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:45:41',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11107','08-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:45:41',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11107','09-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:45:47',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11107','10-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:45:48',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11107','11-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:45:59',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11107','12-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:46:00',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11107','14-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:46:00',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11107','15-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:46:06',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11107','17-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:46:06',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11107','18-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:46:06',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11107','19-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:46:19',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11107','20-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:46:19',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11107','21-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:47:34',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11107','22-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:47:34',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11107','23-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:47:35',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11107','24-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:47:35',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11108','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-09-17 07:38:39',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11109','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-06-18 19:09:56',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11110','00-clientUnpaid.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-07-09 07:39:38',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11111','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-07-09 07:39:38',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11112','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-09-17 07:38:40',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11113','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:47:35',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11114','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-06-25 08:39:49',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11115','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:47:35',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11116','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-07-09 07:39:38',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11117','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-07-09 07:39:38',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11118','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-07-19 12:28:49',NULL,NULL);
|
||||
|
@ -942,6 +968,7 @@ INSERT INTO `versionLog` VALUES ('vn-database','11172','14-firstScript.sql','jen
|
|||
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','11178','00-aclSetWeight.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:47:35',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);
|
||||
|
@ -967,12 +994,45 @@ INSERT INTO `versionLog` VALUES ('vn-database','11205','00-firstScript.sql','jen
|
|||
INSERT INTO `versionLog` VALUES ('vn-database','11206','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-09-17 07:38:42',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11207','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-09-17 07:38:42',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);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11210','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:47:35',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11210','01-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:47:35',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11210','02-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:47:40',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11210','03-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:47:41',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11211','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-09-17 07:38:42',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11213','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-09-06 06:31:13',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11215','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-09-17 07:38:42',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11216','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:47:41',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11217','00-hederaMessages.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-09-09 12:21:45',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11219','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:47:41',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11221','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:47:41',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11222','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:47:41',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11223','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:47:41',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11224','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:47:41',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11225','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:47:41',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11225','01-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:47:41',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11225','02-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:47:41',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11227','00-addWorkerTimeControlMailAcl.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:47:41',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11229','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-09-16 08:24:17',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11234','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:47:42',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11235','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:47:43',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11236','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:47:43',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11236','01-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:47:43',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11237','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:47:43',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11239','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-09-17 12:57:06',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11240','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:47:43',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11241','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-09-20 09:08:25',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11246','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-09-18 12:39:53',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11247','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-09-19 12:10:08',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11248','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-09-23 11:12:17',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11249','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:47:43',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11253','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-09-20 14:41:27',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11255','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:47:43',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11256','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-09-23 12:18:24',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11262','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:47:43',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11263','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-09-27 12:05:32',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11278','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-03 07:47:43',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11279','00-firstScript.sql','jenkins@db-proxy2.servers.dc.verdnatura.es','2024-10-02 08:05:24',NULL,NULL);
|
||||
INSERT INTO `versionLog` VALUES ('vn-database','11280','00-firstScript.sql','jenkins@db-proxy1.servers.dc.verdnatura.es','2024-10-02 08:46:50',NULL,NULL);
|
||||
|
||||
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
|
||||
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
|
||||
|
@ -1345,6 +1405,8 @@ INSERT INTO `roleInherit` VALUES (373,131,2,19295);
|
|||
INSERT INTO `roleInherit` VALUES (375,120,131,1437);
|
||||
INSERT INTO `roleInherit` VALUES (376,124,21,19336);
|
||||
INSERT INTO `roleInherit` VALUES (377,47,49,19295);
|
||||
INSERT INTO `roleInherit` VALUES (378,101,15,19294);
|
||||
INSERT INTO `roleInherit` VALUES (379,103,121,19294);
|
||||
|
||||
INSERT INTO `userPassword` VALUES (1,7,1,0,2,1);
|
||||
|
||||
|
@ -1445,7 +1507,7 @@ INSERT INTO `ACL` VALUES (112,'Defaulter','*','READ','ALLOW','ROLE','employee',N
|
|||
INSERT INTO `ACL` VALUES (113,'ClientRisk','*','READ','ALLOW','ROLE','trainee',NULL);
|
||||
INSERT INTO `ACL` VALUES (114,'Receipt','*','READ','ALLOW','ROLE','trainee',NULL);
|
||||
INSERT INTO `ACL` VALUES (115,'Receipt','*','WRITE','ALLOW','ROLE','administrative',NULL);
|
||||
INSERT INTO `ACL` VALUES (116,'BankEntity','*','*','ALLOW','ROLE','employee',NULL);
|
||||
INSERT INTO `ACL` VALUES (116,'BankEntity','*','READ','ALLOW','ROLE','employee',10578);
|
||||
INSERT INTO `ACL` VALUES (117,'ClientSample','*','*','ALLOW','ROLE','employee',NULL);
|
||||
INSERT INTO `ACL` VALUES (118,'WorkerTeam','*','*','ALLOW','ROLE','salesPerson',NULL);
|
||||
INSERT INTO `ACL` VALUES (119,'Travel','*','READ','ALLOW','ROLE','employee',NULL);
|
||||
|
@ -1541,8 +1603,6 @@ INSERT INTO `ACL` VALUES (234,'WorkerLog','find','READ','ALLOW','ROLE','hr',NULL
|
|||
INSERT INTO `ACL` VALUES (235,'CustomsAgent','*','*','ALLOW','ROLE','employee',NULL);
|
||||
INSERT INTO `ACL` VALUES (236,'Buy','*','*','ALLOW','ROLE','buyer',NULL);
|
||||
INSERT INTO `ACL` VALUES (237,'WorkerDms','filter','*','ALLOW','ROLE','employee',NULL);
|
||||
INSERT INTO `ACL` VALUES (238,'Town','*','WRITE','ALLOW','ROLE','deliveryAssistant',NULL);
|
||||
INSERT INTO `ACL` VALUES (239,'Province','*','WRITE','ALLOW','ROLE','deliveryAssistant',NULL);
|
||||
INSERT INTO `ACL` VALUES (241,'SupplierContact','*','WRITE','ALLOW','ROLE','administrative',NULL);
|
||||
INSERT INTO `ACL` VALUES (248,'RoleMapping','*','READ','ALLOW','ROLE','account',NULL);
|
||||
INSERT INTO `ACL` VALUES (249,'UserPassword','*','READ','ALLOW','ROLE','account',NULL);
|
||||
|
@ -1556,7 +1616,7 @@ INSERT INTO `ACL` VALUES (257,'FixedPrice','*','*','ALLOW','ROLE','buyer',NULL);
|
|||
INSERT INTO `ACL` VALUES (258,'PayDem','*','READ','ALLOW','ROLE','employee',NULL);
|
||||
INSERT INTO `ACL` VALUES (259,'Client','createReceipt','*','ALLOW','ROLE','salesAssistant',NULL);
|
||||
INSERT INTO `ACL` VALUES (260,'PrintServerQueue','*','WRITE','ALLOW','ROLE','employee',NULL);
|
||||
INSERT INTO `ACL` VALUES (261,'SupplierAccount','*','*','ALLOW','ROLE','administrative',NULL);
|
||||
INSERT INTO `ACL` VALUES (261,'SupplierAccount','*','WRITE','ALLOW','ROLE','administrative',783);
|
||||
INSERT INTO `ACL` VALUES (262,'Entry','*','*','ALLOW','ROLE','administrative',NULL);
|
||||
INSERT INTO `ACL` VALUES (263,'InvoiceIn','*','READ','ALLOW','ROLE','administrative',NULL);
|
||||
INSERT INTO `ACL` VALUES (264,'StarredModule','*','*','ALLOW','ROLE','$authenticated',NULL);
|
||||
|
@ -1931,7 +1991,7 @@ INSERT INTO `ACL` VALUES (699,'TicketSms','find','READ','ALLOW','ROLE','salesPer
|
|||
INSERT INTO `ACL` VALUES (701,'Docuware','upload','WRITE','ALLOW','ROLE','deliveryAssistant',NULL);
|
||||
INSERT INTO `ACL` VALUES (702,'Ticket','docuwareDownload','READ','ALLOW','ROLE','salesPerson',NULL);
|
||||
INSERT INTO `ACL` VALUES (703,'Worker','search','READ','ALLOW','ROLE','employee',NULL);
|
||||
INSERT INTO `ACL` VALUES (704,'ExpeditionState','addExpeditionState','WRITE','ALLOW','ROLE','delivery',NULL);
|
||||
INSERT INTO `ACL` VALUES (704,'ExpeditionState','addExpeditionState','WRITE','ALLOW','ROLE','production',19294);
|
||||
INSERT INTO `ACL` VALUES (705,'SaleGroupDetail','deleteById','WRITE','ALLOW','ROLE','employee',NULL);
|
||||
INSERT INTO `ACL` VALUES (706,'Ticket','setDeleted','WRITE','ALLOW','ROLE','buyer',NULL);
|
||||
INSERT INTO `ACL` VALUES (707,'DeviceLog','create','WRITE','ALLOW','ROLE','employee',NULL);
|
||||
|
@ -2134,9 +2194,25 @@ INSERT INTO `ACL` VALUES (915,'ACL','*','WRITE','ALLOW','ROLE','developerBoss',1
|
|||
INSERT INTO `ACL` VALUES (916,'Entry','getBuysCsv','READ','ALLOW','ROLE','supplier',10578);
|
||||
INSERT INTO `ACL` VALUES (917,'InvoiceOut','refundAndInvoice','WRITE','ALLOW','ROLE','administrative',10578);
|
||||
INSERT INTO `ACL` VALUES (918,'Worker','__get__descriptor','READ','ALLOW','ROLE','employee',10578);
|
||||
INSERT INTO `ACL` VALUES (919,'Worker','findById','READ','ALLOW','ROLE','$subordinate',10578);
|
||||
INSERT INTO `ACL` VALUES (919,'Worker','findById','READ','ALLOW','ROLE','employee',10578);
|
||||
INSERT INTO `ACL` VALUES (920,'QuadmindsApiConfig','*','*','ALLOW','ROLE','delivery',19295);
|
||||
INSERT INTO `ACL` VALUES (921,'Worker','findById','READ','ALLOW','ROLE','employee',NULL);
|
||||
INSERT INTO `ACL` VALUES (922,'SaleGroup','*','WRITE','ALLOW','ROLE','production',19294);
|
||||
INSERT INTO `ACL` VALUES (923,'Worker','__get__advancedSummary','READ','ALLOW','ROLE','hr',10578);
|
||||
INSERT INTO `ACL` VALUES (924,'Worker','__get__summary','READ','ALLOW','ROLE','employee',10578);
|
||||
INSERT INTO `ACL` VALUES (925,'Postcode','*','WRITE','ALLOW','ROLE','administrative',10578);
|
||||
INSERT INTO `ACL` VALUES (926,'Province','*','WRITE','ALLOW','ROLE','administrative',10578);
|
||||
INSERT INTO `ACL` VALUES (927,'Town','*','WRITE','ALLOW','ROLE','administrative',10578);
|
||||
INSERT INTO `ACL` VALUES (928,'ExpeditionStateType','*','READ','ALLOW','ROLE','employee',19294);
|
||||
INSERT INTO `ACL` VALUES (929,'ExpeditionState','addExpeditionState','WRITE','ALLOW','ROLE','delivery',19294);
|
||||
INSERT INTO `ACL` VALUES (930,'SupplierAccount','*','READ','ALLOW','ROLE','buyer',783);
|
||||
INSERT INTO `ACL` VALUES (931,'StockBought','*','READ','ALLOW','ROLE','buyer',10578);
|
||||
INSERT INTO `ACL` VALUES (932,'StockBought','*','WRITE','ALLOW','ROLE','buyer',10578);
|
||||
INSERT INTO `ACL` VALUES (933,'Buyer','*','READ','ALLOW','ROLE','buyer',10578);
|
||||
INSERT INTO `ACL` VALUES (934,'Ticket','setWeight','WRITE','ALLOW','ROLE','salesPerson',10578);
|
||||
INSERT INTO `ACL` VALUES (935,'BankEntity','*','WRITE','ALLOW','ROLE','financial',10578);
|
||||
INSERT INTO `ACL` VALUES (936,'Device','handleUser','*','ALLOW','ROLE','employee',10578);
|
||||
INSERT INTO `ACL` VALUES (937,'WorkerTimeControlMail','count','READ','ALLOW','ROLE','employee',10578);
|
||||
INSERT INTO `ACL` VALUES (938,'Worker','__get__mail','READ','ALLOW','ROLE','hr',10578);
|
||||
|
||||
INSERT INTO `fieldAcl` VALUES (1,'Client','name','update','employee');
|
||||
INSERT INTO `fieldAcl` VALUES (2,'Client','contact','update','employee');
|
||||
|
@ -2437,6 +2513,7 @@ 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 (48,'fusión de lineas',4,NULL,NULL,1,'lineFusion',0);
|
||||
INSERT INTO `component` VALUES (49,'sustitución',4,NULL,NULL,1,'substitution',0);
|
||||
INSERT INTO `component` VALUES (50,'bonus',4,NULL,NULL,1,'bonus',0);
|
||||
|
||||
INSERT INTO `componentType` VALUES (1,'cost','coste',1,0);
|
||||
INSERT INTO `componentType` VALUES (2,NULL,'com ventas',1,1);
|
||||
|
@ -2511,7 +2588,7 @@ INSERT INTO `department` VALUES (136,'heavyVehicles','VEHICULOS PESADOS',110,111
|
|||
INSERT INTO `department` VALUES (137,'sorter','SORTER',112,113,NULL,0,0,0,1,0,1,'/1/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||
INSERT INTO `department` VALUES (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 (141,NULL,'PREVIA',35,36,NULL,0,1,0,2,0,37,'/1/37/',NULL,0,NULL,0,0,0,1,NULL,NULL,NULL,'PREVIOUS');
|
||||
INSERT INTO `department` VALUES (146,NULL,'VERDNACOLOMBIA',3,4,NULL,72,0,0,2,0,22,'/1/22/',NULL,0,NULL,0,0,0,0,NULL,NULL,NULL,NULL);
|
||||
INSERT INTO `department` VALUES (147,'spainTeamAsia','EQUIPO ESPAÑA ASIA',71,72,40214,0,0,0,2,0,43,'/1/43/','esA_equipo',0,'esA@verdnatura.es',0,0,0,0,NULL,NULL,'5500',NULL);
|
||||
|
||||
|
@ -2568,7 +2645,7 @@ INSERT INTO `sample` VALUES (16,'letter-debtor-nd','Aviso reiterado por saldo de
|
|||
INSERT INTO `sample` VALUES (17,'client-lcr','Email de solicitud de datos bancarios LCR',0,1,1,0,NULL);
|
||||
INSERT INTO `sample` VALUES (18,'client-debt-statement','Extracto del cliente',1,0,1,1,'Clients');
|
||||
INSERT INTO `sample` VALUES (19,'credit-request','Solicitud de crédito',1,1,1,0,'Clients');
|
||||
INSERT INTO `sample` VALUES (20,'incoterms-authorization','Autorización de incoterms',1,1,1,0,'Clients');
|
||||
INSERT INTO `sample` VALUES (20,'incoterms-authorization','Entregas intracomunitarias recogidas por el cliente',1,1,1,0,'Clients');
|
||||
|
||||
INSERT INTO `siiTrascendencyInvoiceIn` VALUES (1,'Operación de régimen general');
|
||||
INSERT INTO `siiTrascendencyInvoiceIn` VALUES (2,'Operaciones por las que los empresarios satisfacen compensaciones REAGYP');
|
||||
|
@ -2605,48 +2682,50 @@ INSERT INTO `siiTypeInvoiceOut` VALUES (7,'R3','Factura rectificativa (Art. 80.4
|
|||
INSERT INTO `siiTypeInvoiceOut` VALUES (8,'R4','Factura rectificativa (Resto)');
|
||||
INSERT INTO `siiTypeInvoiceOut` VALUES (9,'R5','Factura rectificativa en facturas simplificadas');
|
||||
|
||||
INSERT INTO `state` VALUES (1,'Arreglar',2,0,'FIXING',NULL,1,0,0,0,0,0,0,4,1,'alert');
|
||||
INSERT INTO `state` VALUES (2,'Libre',2,0,'FREE',NULL,2,0,0,0,0,0,0,4,1,'notice');
|
||||
INSERT INTO `state` VALUES (3,'OK',3,0,'OK',3,28,1,0,1,0,1,1,3,0,'success');
|
||||
INSERT INTO `state` VALUES (4,'Impreso',4,0,'PRINTED',2,29,1,0,1,0,0,1,2,0,'success');
|
||||
INSERT INTO `state` VALUES (5,'Preparación',6,2,'ON_PREPARATION',7,14,0,0,0,2,0,0,2,0,'warning');
|
||||
INSERT INTO `state` VALUES (6,'En Revisión',7,2,'ON_CHECKING',NULL,6,0,1,0,3,0,0,1,0,'warning');
|
||||
INSERT INTO `state` VALUES (7,'Sin Acabar',1,0,'NOT_READY',NULL,7,0,0,0,0,0,0,4,1,'alert');
|
||||
INSERT INTO `state` VALUES (8,'Revisado',8,2,'CHECKED',NULL,8,0,1,0,3,0,0,1,0,'warning');
|
||||
INSERT INTO `state` VALUES (9,'Encajando',9,3,'PACKING',NULL,9,0,1,0,0,0,0,1,0,NULL);
|
||||
INSERT INTO `state` VALUES (10,'Encajado',10,3,'PACKED',NULL,10,0,1,0,0,0,0,0,0,NULL);
|
||||
INSERT INTO `state` VALUES (11,'Facturado',0,4,'INVOICED',NULL,11,0,1,0,0,0,0,0,0,NULL);
|
||||
INSERT INTO `state` VALUES (12,'Bloqueado',0,0,'BLOCKED',NULL,12,0,0,0,0,0,0,4,1,'alert');
|
||||
INSERT INTO `state` VALUES (13,'En Reparto',11,4,'ON_DELIVERY',NULL,13,0,1,0,0,0,0,0,0,NULL);
|
||||
INSERT INTO `state` VALUES (14,'Preparado',6,2,'PREPARED',NULL,14,0,1,0,2,0,0,1,0,'warning');
|
||||
INSERT INTO `state` VALUES (15,'Pte Recogida',12,4,'WAITING_FOR_PICKUP',NULL,15,0,1,0,0,0,0,0,0,NULL);
|
||||
INSERT INTO `state` VALUES (16,'Entregado',13,4,'DELIVERED',NULL,16,0,1,0,0,0,0,0,0,NULL);
|
||||
INSERT INTO `state` VALUES (20,'Asignado',4,0,'PICKER_DESIGNED',NULL,20,1,0,0,0,0,0,2,0,'success');
|
||||
INSERT INTO `state` VALUES (21,'Retornado',4,2,'PRINTED_BACK',6,21,0,0,0,0,0,0,2,0,'success');
|
||||
INSERT INTO `state` VALUES (22,'Pte. Ampliar',2,0,'EXPANDABLE',NULL,22,0,0,0,0,0,0,4,1,'alert');
|
||||
INSERT INTO `state` VALUES (23,'URGENTE',5,2,'LAST_CALL',NULL,23,1,0,1,0,0,0,4,1,'success');
|
||||
INSERT INTO `state` VALUES (24,'Encadenado',4,0,'CHAINED',4,24,0,0,0,0,0,0,3,1,'success');
|
||||
INSERT INTO `state` VALUES (25,'Embarcando',3,0,'BOARDING',5,25,1,0,0,0,0,0,3,0,'alert');
|
||||
INSERT INTO `state` VALUES (26,'Prep Previa',5,0,'PREVIOUS_PREPARATION',1,28,1,0,0,1,0,0,2,0,'warning');
|
||||
INSERT INTO `state` VALUES (27,'Prep Asistida',5,2,'ASSISTED_PREPARATION',7,27,0,0,0,0,0,0,2,0,'success');
|
||||
INSERT INTO `state` VALUES (28,'Previa OK',3,0,'OK PREVIOUS',3,28,1,0,1,1,1,1,3,0,'warning');
|
||||
INSERT INTO `state` VALUES (29,'Previa Impreso',4,0,'PRINTED PREVIOUS',2,29,1,0,1,0,0,1,2,0,'success');
|
||||
INSERT INTO `state` VALUES (30,'Embarcado',4,2,'BOARD',5,30,0,0,0,2,0,0,3,0,'success');
|
||||
INSERT INTO `state` VALUES (31,'Polizon Impreso',4,2,'PRINTED STOWAWAY',2,29,1,0,1,0,0,1,2,0,'success');
|
||||
INSERT INTO `state` VALUES (32,'Polizon OK',3,2,'OK STOWAWAY',3,31,1,0,0,1,1,1,3,0,'warning');
|
||||
INSERT INTO `state` VALUES (33,'Auto_Impreso',4,0,'PRINTED_AUTO',2,29,1,0,1,0,0,1,2,0,'success');
|
||||
INSERT INTO `state` VALUES (34,'Pte Pago',3,0,'WAITING_FOR_PAYMENT',NULL,34,0,0,0,0,0,0,4,1,'alert');
|
||||
INSERT INTO `state` VALUES (35,'Semi-Encajado',9,3,'HALF_PACKED',NULL,10,0,1,0,0,0,0,1,0,NULL);
|
||||
INSERT INTO `state` VALUES (36,'Previa Revisando',3,0,'PREVIOUS_CONTROL',2,37,1,0,0,4,0,1,2,0,'warning');
|
||||
INSERT INTO `state` VALUES (37,'Previa Revisado',3,0,'PREVIOUS_CONTROLLED',2,29,1,0,1,0,0,1,2,0,'warning');
|
||||
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 `state` VALUES (1,'Arreglar',2,0,'FIXING',1,0,0,0,0,0,0,4,1,'alert');
|
||||
INSERT INTO `state` VALUES (2,'Libre',2,0,'FREE',2,0,0,0,0,0,0,4,1,'notice');
|
||||
INSERT INTO `state` VALUES (3,'OK',3,0,'OK',28,1,0,1,0,1,1,3,0,'success');
|
||||
INSERT INTO `state` VALUES (4,'Impreso',4,0,'PRINTED',29,1,0,1,0,0,1,2,0,'success');
|
||||
INSERT INTO `state` VALUES (5,'Preparación',6,2,'ON_PREPARATION',14,0,0,0,2,0,0,2,0,'warning');
|
||||
INSERT INTO `state` VALUES (6,'En Revisión',7,2,'ON_CHECKING',6,0,1,0,3,0,0,1,0,'warning');
|
||||
INSERT INTO `state` VALUES (7,'Sin Acabar',1,0,'NOT_READY',7,0,0,0,0,0,0,4,1,'alert');
|
||||
INSERT INTO `state` VALUES (8,'Revisado',8,2,'CHECKED',8,0,1,0,3,0,0,1,0,'warning');
|
||||
INSERT INTO `state` VALUES (9,'Encajando',9,3,'PACKING',9,0,1,0,0,0,0,1,0,NULL);
|
||||
INSERT INTO `state` VALUES (10,'Encajado',10,3,'PACKED',10,0,1,0,0,0,0,0,0,NULL);
|
||||
INSERT INTO `state` VALUES (11,'Facturado',0,4,'INVOICED',11,0,1,0,0,0,0,0,0,NULL);
|
||||
INSERT INTO `state` VALUES (12,'Bloqueado',0,0,'BLOCKED',12,0,0,0,0,0,0,4,1,'alert');
|
||||
INSERT INTO `state` VALUES (13,'En Reparto',11,4,'ON_DELIVERY',13,0,1,0,0,0,0,0,0,NULL);
|
||||
INSERT INTO `state` VALUES (14,'Preparado',6,2,'PREPARED',14,0,1,0,2,0,0,1,0,'warning');
|
||||
INSERT INTO `state` VALUES (15,'Pte Recogida',12,4,'WAITING_FOR_PICKUP',15,0,1,0,0,0,0,0,0,NULL);
|
||||
INSERT INTO `state` VALUES (16,'Entregado',13,4,'DELIVERED',16,0,1,0,0,0,0,0,0,NULL);
|
||||
INSERT INTO `state` VALUES (20,'Asignado',4,0,'PICKER_DESIGNED',20,1,0,0,0,0,0,2,0,'success');
|
||||
INSERT INTO `state` VALUES (21,'Retornado',4,2,'PRINTED_BACK',21,0,0,0,0,0,0,2,0,'success');
|
||||
INSERT INTO `state` VALUES (22,'Pte. Ampliar',2,0,'EXPANDABLE',22,0,0,0,0,0,0,4,1,'alert');
|
||||
INSERT INTO `state` VALUES (23,'URGENTE',5,2,'LAST_CALL',23,1,0,1,0,0,0,4,1,'success');
|
||||
INSERT INTO `state` VALUES (24,'Encadenado',4,0,'CHAINED',24,0,0,0,0,0,0,3,1,'success');
|
||||
INSERT INTO `state` VALUES (25,'Embarcando',3,0,'BOARDING',25,1,0,0,0,0,0,3,0,'alert');
|
||||
INSERT INTO `state` VALUES (26,'Prep Previa',5,0,'PREVIOUS_PREPARATION',28,1,0,0,1,0,0,2,0,'warning');
|
||||
INSERT INTO `state` VALUES (27,'Prep Asistida',5,2,'ASSISTED_PREPARATION',27,0,0,0,0,0,0,2,0,'success');
|
||||
INSERT INTO `state` VALUES (28,'Previa OK',3,0,'OK PREVIOUS',28,1,0,1,1,1,1,3,0,'warning');
|
||||
INSERT INTO `state` VALUES (29,'Previa Impreso',4,0,'PRINTED PREVIOUS',29,1,0,1,0,0,1,2,0,'success');
|
||||
INSERT INTO `state` VALUES (30,'Embarcado',4,2,'BOARD',30,0,0,0,2,0,0,3,0,'success');
|
||||
INSERT INTO `state` VALUES (31,'Polizon Impreso',4,2,'PRINTED STOWAWAY',29,1,0,1,0,0,1,2,0,'success');
|
||||
INSERT INTO `state` VALUES (32,'Polizon OK',3,2,'OK STOWAWAY',31,1,0,0,1,1,1,3,0,'warning');
|
||||
INSERT INTO `state` VALUES (33,'Auto_Impreso',4,0,'PRINTED_AUTO',29,1,0,1,0,0,1,2,0,'success');
|
||||
INSERT INTO `state` VALUES (34,'Pte Pago',3,0,'WAITING_FOR_PAYMENT',34,0,0,0,0,0,0,4,1,'alert');
|
||||
INSERT INTO `state` VALUES (35,'Semi-Encajado',9,3,'HALF_PACKED',10,0,1,0,0,0,0,1,0,NULL);
|
||||
INSERT INTO `state` VALUES (36,'Previa Revisando',3,0,'PREVIOUS_CONTROL',37,1,0,0,4,0,1,2,0,'warning');
|
||||
INSERT INTO `state` VALUES (37,'Previa Revisado',3,0,'PREVIOUS_CONTROLLED',29,1,0,1,0,0,1,2,0,'warning');
|
||||
INSERT INTO `state` VALUES (38,'Prep Cámara',6,2,'COOLER_PREPARATION',14,0,0,0,2,0,0,2,0,'warning');
|
||||
INSERT INTO `state` VALUES (41,'Prep Parcial',6,2,'PARTIAL_PREPARATION',14,0,0,0,2,0,0,2,0,'warning');
|
||||
INSERT INTO `state` VALUES (42,'Entregado en parte',13,3,'PARTIAL_DELIVERED',16,0,1,0,0,0,0,0,0,NULL);
|
||||
INSERT INTO `state` VALUES (43,'Preparación por caja',6,2,'BOX_PICKING',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');
|
||||
|
||||
INSERT INTO `ticketCanAdvanceConfig` VALUES (1,5);
|
||||
|
||||
INSERT INTO `volumeConfig` VALUES (2.67,1.60,0.8,150,0.30,120,57,2.0,50,200,10,167.0);
|
||||
|
||||
INSERT INTO `workCenter` VALUES (1,'Silla',20,859,1,'Av espioca 100',552703,NULL);
|
||||
|
@ -2659,6 +2738,7 @@ INSERT INTO `workCenter` VALUES (7,'Tenerife',NULL,NULL,NULL,NULL,NULL,NULL);
|
|||
INSERT INTO `workCenter` VALUES (8,'Silla-Agrario',26,NULL,NULL,NULL,NULL,NULL);
|
||||
INSERT INTO `workCenter` VALUES (9,'Algemesi',20,1354,60,'Fenollars, 2',523549,NULL);
|
||||
INSERT INTO `workCenter` VALUES (10,'Rubi',88,NULL,84,'Av. de la Llana, 131',549722,NULL);
|
||||
INSERT INTO `workCenter` VALUES (11,'Colombia',NULL,NULL,NULL,NULL,NULL,NULL);
|
||||
|
||||
INSERT INTO `workerTimeControlError` VALUES (1,'IS_NOT_ALLOWED_FUTURE','No se permite fichar a futuro');
|
||||
INSERT INTO `workerTimeControlError` VALUES (2,'INACTIVE_BUSINESS','No hay un contrato en vigor');
|
||||
|
|
|
@ -1471,6 +1471,9 @@ INSERT IGNORE INTO `tables_priv` VALUES ('','vn','productionAssi','tillSerial','
|
|||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','stockBuyed','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','employee','alertLevel','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','workerActivityType','guillermo@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','buyer','priceDelta','jenkins@db-proxy1.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select,Insert,Update,Delete','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','parkingLog','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||
INSERT IGNORE INTO `tables_priv` VALUES ('','vn','grafana','travelLog','guillermo@db-proxy2.servers.dc.verdnatura.es','0000-00-00 00:00:00','Select','');
|
||||
/*!40000 ALTER TABLE `tables_priv` ENABLE KEYS */;
|
||||
|
||||
/*!40000 ALTER TABLE `columns_priv` DISABLE KEYS */;
|
||||
|
@ -2072,7 +2075,7 @@ INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','itemshelving_addby
|
|||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','itemShelvingSale_addByCollection','PROCEDURE','carlosap@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','itemshelving_addlist','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','itemshelving_selfconsumption','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','cooler','item_getSimilar','PROCEDURE','guillermo@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','cooler','item_getSimilar','PROCEDURE','guillermo@db-proxy2.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','itemshelvingsale_add','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','collection_printsticker','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','deviceproductionuser_getworker','PROCEDURE','alexm@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||
|
@ -2123,7 +2126,7 @@ INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','itemshelving_filterb
|
|||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','itemshelving_addbyclaim','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','itemshelving_addlist','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','itemshelving_selfconsumption','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','reviewer','item_getSimilar','PROCEDURE','guillermo@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','reviewer','item_getSimilar','PROCEDURE','guillermo@10.5.1.6','Execute','0000-00-00 00:00:00');
|
||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','itemshelvingsale_add','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','collection_printsticker','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','delivery','deviceproductionuser_getworker','PROCEDURE','guillermo@db-proxy1.static.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||
|
@ -2191,6 +2194,7 @@ INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','buy_recalcPricesByEn
|
|||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','entryEditor','buy_recalcPricesByBuy','PROCEDURE','jenkins@db-proxy2.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','claimManager','buy_recalcPricesByBuy','PROCEDURE','jenkins@db-proxy2.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','employee','buy_recalcPricesByBuy','PROCEDURE','jenkins@db-proxy2.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','itemShelvingSale_addBySaleGroup','PROCEDURE','alexm@db-proxy2.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','hr','ledger_nextTx','PROCEDURE','guillermo@db-proxy2.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','hr','ledger_docompensation','PROCEDURE','guillermo@db-proxy2.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','production','itemShelvingSale_setQuantity','PROCEDURE','carlosap@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||
|
@ -2206,6 +2210,8 @@ INSERT IGNORE INTO `procs_priv` VALUES ('','vn','grafana-write','item_ValuateInv
|
|||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','guest','ticketCalculatePurge','PROCEDURE','jenkins@db-proxy2.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','buyer','buy_getUltimate','PROCEDURE','guillermo@db-proxy2.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||
INSERT IGNORE INTO `procs_priv` VALUES ('','vn','cooler','buy_getUltimate','PROCEDURE','guillermo@db-proxy2.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||
INSERT IGNORE INTO `procs_priv` VALUES ('','bs','buyerBoss','waste_addSales','PROCEDURE','jenkins@db-proxy1.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||
INSERT IGNORE INTO `procs_priv` VALUES ('','bs','grafana','waste_addSales','PROCEDURE','guillermo@db-proxy2.servers.dc.verdnatura.es','Execute','0000-00-00 00:00:00');
|
||||
/*!40000 ALTER TABLE `procs_priv` ENABLE KEYS */;
|
||||
|
||||
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -4306,35 +4306,13 @@ DELIMITER ;
|
|||
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
|
||||
/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
|
||||
DELIMITER ;;
|
||||
/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`creditInsurance_beforeInsert`
|
||||
BEFORE INSERT ON `creditInsurance`
|
||||
FOR EACH ROW
|
||||
BEGIN
|
||||
IF NEW.creditClassificationFk THEN
|
||||
SET NEW.creditClassification = NEW.creditClassificationFk;
|
||||
END IF;
|
||||
END */;;
|
||||
DELIMITER ;
|
||||
/*!50003 SET sql_mode = @saved_sql_mode */ ;
|
||||
/*!50003 SET character_set_client = @saved_cs_client */ ;
|
||||
/*!50003 SET character_set_results = @saved_cs_results */ ;
|
||||
/*!50003 SET collation_connection = @saved_col_connection */ ;
|
||||
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
||||
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
||||
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
|
||||
/*!50003 SET character_set_client = utf8mb4 */ ;
|
||||
/*!50003 SET character_set_results = utf8mb4 */ ;
|
||||
/*!50003 SET collation_connection = utf8mb4_unicode_ci */ ;
|
||||
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
|
||||
/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
|
||||
DELIMITER ;;
|
||||
/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`creditInsurance_afterInsert`
|
||||
AFTER INSERT ON `creditInsurance`
|
||||
FOR EACH ROW
|
||||
BEGIN
|
||||
UPDATE `client` c
|
||||
JOIN vn.creditClassification cc ON cc.client = c.id
|
||||
SET creditInsurance = NEW.credit WHERE cc.id = NEW.creditClassification;
|
||||
SET creditInsurance = NEW.credit WHERE cc.id = NEW.creditClassificationFk;
|
||||
|
||||
END */;;
|
||||
DELIMITER ;
|
||||
|
@ -5018,7 +4996,10 @@ BEGIN
|
|||
SET NEW.currencyFk = entry_getCurrency(NEW.currencyFk, NEW.supplierFk);
|
||||
END IF;
|
||||
|
||||
IF NOT (NEW.travelFk <=> OLD.travelFk) OR NOT (NEW.currencyFk <=> OLD.currencyFk) THEN
|
||||
IF NOT (NEW.travelFk <=> OLD.travelFk)
|
||||
OR NOT (NEW.currencyFk <=> OLD.currencyFk)
|
||||
OR NOT (NEW.supplierFk <=> OLD.supplierFk) THEN
|
||||
|
||||
SET NEW.commission = entry_getCommission(NEW.travelFk, NEW.currencyFk, NEW.supplierFk);
|
||||
END IF;
|
||||
END */;;
|
||||
|
@ -5552,7 +5533,7 @@ 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`
|
||||
/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`host_beforeInsert`
|
||||
BEFORE INSERT ON `host`
|
||||
FOR EACH ROW
|
||||
BEGIN
|
||||
|
@ -6518,6 +6499,36 @@ BEGIN
|
|||
SET NEW.userFk = account.myUser_getId();
|
||||
SET NEW.available = NEW.visible;
|
||||
|
||||
END */;;
|
||||
DELIMITER ;
|
||||
/*!50003 SET sql_mode = @saved_sql_mode */ ;
|
||||
/*!50003 SET character_set_client = @saved_cs_client */ ;
|
||||
/*!50003 SET character_set_results = @saved_cs_results */ ;
|
||||
/*!50003 SET collation_connection = @saved_col_connection */ ;
|
||||
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
||||
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
||||
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
|
||||
/*!50003 SET character_set_client = utf8mb4 */ ;
|
||||
/*!50003 SET character_set_results = utf8mb4 */ ;
|
||||
/*!50003 SET collation_connection = utf8mb4_unicode_ci */ ;
|
||||
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
|
||||
/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
|
||||
DELIMITER ;;
|
||||
/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`itemShelving_afterInsert`
|
||||
AFTER INSERT ON `itemShelving`
|
||||
FOR EACH ROW
|
||||
BEGIN
|
||||
INSERT INTO itemShelvingLog
|
||||
SET itemShelvingFk = NEW.id,
|
||||
workerFk = account.myUser_getId(),
|
||||
accion = 'CREA REGISTRO',
|
||||
itemFk = NEW.itemFk,
|
||||
shelvingFk = NEW.shelvingFk,
|
||||
visible = NEW.visible,
|
||||
`grouping` = NEW.`grouping`,
|
||||
packing = NEW.packing,
|
||||
available = NEW.available;
|
||||
|
||||
END */;;
|
||||
DELIMITER ;
|
||||
/*!50003 SET sql_mode = @saved_sql_mode */ ;
|
||||
|
@ -7925,7 +7936,7 @@ 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`
|
||||
/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`roadmap_beforeInsert`
|
||||
BEFORE INSERT ON `roadmap`
|
||||
FOR EACH ROW
|
||||
BEGIN
|
||||
|
@ -7949,7 +7960,7 @@ 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_beforeUpdate`
|
||||
/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`roadmap_beforeUpdate`
|
||||
BEFORE UPDATE ON `roadmap`
|
||||
FOR EACH ROW
|
||||
BEGIN
|
||||
|
@ -8604,7 +8615,7 @@ 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`.`saleGroupDetail_beforeInsert`
|
||||
/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`saleGroupDetail_beforeInsert`
|
||||
BEFORE INSERT ON `saleGroupDetail`
|
||||
FOR EACH ROW
|
||||
BEGIN
|
||||
|
@ -8624,7 +8635,7 @@ 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`.`saleGroupDetail_beforeUpdate`
|
||||
/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`saleGroupDetail_beforeUpdate`
|
||||
BEFORE UPDATE ON `saleGroupDetail`
|
||||
FOR EACH ROW
|
||||
BEGIN
|
||||
|
@ -8644,7 +8655,7 @@ 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`.`saleGroupDetail_afterDelete`
|
||||
/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`saleGroupDetail_afterDelete`
|
||||
AFTER DELETE ON `saleGroupDetail`
|
||||
FOR EACH ROW
|
||||
BEGIN
|
||||
|
@ -8925,7 +8936,7 @@ DELIMITER ;;
|
|||
BEGIN
|
||||
UPDATE client c
|
||||
JOIN creditClassification cc ON cc.client = c.id
|
||||
JOIN creditInsurance ci ON ci.creditClassification = cc.id
|
||||
JOIN creditInsurance ci ON ci.creditClassificationFk = cc.id
|
||||
SET creditInsurance = ci.credit * 2 WHERE ci.id = NEW.creditInsurance;
|
||||
END */;;
|
||||
DELIMITER ;
|
||||
|
@ -8949,12 +8960,12 @@ BEGIN
|
|||
IF NEW.dateLeaving IS NOT NULL THEN
|
||||
UPDATE client c
|
||||
JOIN creditClassification cc ON cc.client = c.id
|
||||
JOIN creditInsurance ci ON ci.creditClassification = cc.id
|
||||
JOIN creditInsurance ci ON ci.creditClassificationFk = cc.id
|
||||
SET creditInsurance = ci.credit WHERE ci.id = OLD.creditInsurance;
|
||||
ELSE
|
||||
UPDATE client c
|
||||
JOIN creditClassification cc ON cc.client = c.id
|
||||
JOIN creditInsurance ci ON ci.creditClassification = cc.id
|
||||
JOIN creditInsurance ci ON ci.creditClassificationFk = cc.id
|
||||
SET creditInsurance = ci.credit * 2 WHERE ci.id = OLD.creditInsurance;
|
||||
END IF;
|
||||
END */;;
|
||||
|
@ -8978,7 +8989,7 @@ DELIMITER ;;
|
|||
BEGIN
|
||||
UPDATE client c
|
||||
JOIN creditClassification cc ON cc.client = c.id
|
||||
JOIN creditInsurance ci ON ci.creditClassification = cc.id
|
||||
JOIN creditInsurance ci ON ci.creditClassificationFk = cc.id
|
||||
SET creditInsurance = ci.credit WHERE ci.id = OLD.creditInsurance;
|
||||
END */;;
|
||||
DELIMITER ;
|
||||
|
@ -10852,8 +10863,8 @@ DELIMITER ;
|
|||
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
|
||||
/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
|
||||
DELIMITER ;;
|
||||
/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`workerDocument_beforeInsert`
|
||||
BEFORE INSERT ON `workerDocument`
|
||||
/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`workerDms_beforeInsert`
|
||||
BEFORE INSERT ON `workerDms`
|
||||
FOR EACH ROW
|
||||
BEGIN
|
||||
SET NEW.editorFk = account.myUser_getId();
|
||||
|
@ -10872,8 +10883,8 @@ DELIMITER ;
|
|||
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
|
||||
/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
|
||||
DELIMITER ;;
|
||||
/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`workerDocument_beforeUpdate`
|
||||
BEFORE UPDATE ON `workerDocument`
|
||||
/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`workerDms_beforeUpdate`
|
||||
BEFORE UPDATE ON `workerDms`
|
||||
FOR EACH ROW
|
||||
BEGIN
|
||||
SET NEW.editorFk = account.myUser_getId();
|
||||
|
@ -10892,13 +10903,13 @@ DELIMITER ;
|
|||
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
|
||||
/*!50003 SET sql_mode = 'IGNORE_SPACE,NO_ENGINE_SUBSTITUTION' */ ;
|
||||
DELIMITER ;;
|
||||
/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`workerDocument_afterDelete`
|
||||
AFTER DELETE ON `workerDocument`
|
||||
/*!50003 CREATE*/ /*!50017 DEFINER=`vn`@`localhost`*/ /*!50003 TRIGGER `vn`.`workerDms_afterDelete`
|
||||
AFTER DELETE ON `workerDms`
|
||||
FOR EACH ROW
|
||||
BEGIN
|
||||
INSERT INTO workerLog
|
||||
SET `action` = 'delete',
|
||||
`changedModel` = 'WorkerDocument',
|
||||
`changedModel` = 'WorkerDms',
|
||||
`changedModelId` = OLD.id,
|
||||
`userFk` = account.myUser_getId();
|
||||
END */;;
|
||||
|
@ -11458,4 +11469,4 @@ USE `vn2008`;
|
|||
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
|
||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||
|
||||
-- Dump completed on 2024-09-18 9:32:59
|
||||
-- Dump completed on 2024-10-03 7:43:14
|
||||
|
|
|
@ -3184,7 +3184,7 @@ UPDATE vn.department
|
|||
SET workerFk = null;
|
||||
|
||||
INSERT INTO vn.packaging
|
||||
VALUES('--', 2745600.00, 100.00, 120.00, 220.00, 0.00, 1, '2001-01-01 00:00:00.000', NULL, NULL, NULL, 0.00, 16, 0.00, 0, NULL, 0.00, NULL, NULL, 0, NULL, 0, 0,0);
|
||||
VALUES('--', 2745600.00, 100.00, 120.00, 220.00, 0.00, 1, '2001-01-01 00:00:00.000', NULL, NULL, NULL, 0.00, 16, 0.00, 0, NULL, 0.00, NULL, NULL, 0, NULL, 0, 0,0,1);
|
||||
|
||||
|
||||
INSERT IGNORE INTO vn.intrastat
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
DELIMITER $$
|
||||
CREATE OR REPLACE DEFINER=`root`@`localhost` EVENT `vn`.`travel_setDelivered`
|
||||
CREATE OR REPLACE DEFINER=`vn`@`localhost` EVENT `vn`.`travel_setDelivered`
|
||||
ON SCHEDULE EVERY 1 DAY
|
||||
STARTS '2024-07-12 00:10:00.000'
|
||||
ON COMPLETION PRESERVE
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
DELIMITER $$
|
||||
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`buy_getUltimate`(
|
||||
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`buy_getUltimate`(
|
||||
vItemFk INT,
|
||||
vWarehouseFk SMALLINT,
|
||||
vDated DATE
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
DELIMITER $$
|
||||
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`buy_getUltimateFromInterval`(
|
||||
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`buy_getUltimateFromInterval`(
|
||||
vItemFk INT,
|
||||
vWarehouseFk SMALLINT,
|
||||
vStarted DATE,
|
||||
|
|
|
@ -29,21 +29,24 @@ BEGIN
|
|||
(INDEX (itemFk))
|
||||
ENGINE = MEMORY
|
||||
SELECT i.id itemFk,
|
||||
SUM(IFNULL(pd.absIncreasing,0)) absIncreasing,
|
||||
SUM(IFNULL(pd.ratIncreasing,0)) ratIncreasing,
|
||||
pd.warehouseFk
|
||||
FROM item i
|
||||
JOIN priceDelta pd
|
||||
ON pd.itemTypeFk = i.typeFk
|
||||
AND (pd.minSize IS NULL OR pd.minSize <= i.`size`)
|
||||
AND (pd.maxSize IS NULL OR pd.maxSize >= i.`size`)
|
||||
AND (pd.inkFk IS NULL OR pd.inkFk = i.inkFk)
|
||||
AND (pd.originFk IS NULL OR pd.originFk = i.originFk)
|
||||
AND (pd.producerFk IS NULL OR pd.producerFk = i.producerFk)
|
||||
AND (pd.warehouseFk IS NULL OR pd.warehouseFk = vWarehouseFk)
|
||||
WHERE (pd.fromDated IS NULL OR pd.fromDated <= vShipped)
|
||||
AND (pd.toDated IS NULL OR pd.toDated >= vShipped)
|
||||
GROUP BY i.id;
|
||||
SUM(IFNULL(pd.absIncreasing,0)) absIncreasing,
|
||||
SUM(IFNULL(pd.ratIncreasing,0)) ratIncreasing,
|
||||
pd.warehouseFk
|
||||
FROM item i
|
||||
JOIN priceDelta pd
|
||||
ON pd.itemTypeFk = i.typeFk
|
||||
AND (pd.minSize IS NULL OR pd.minSize <= i.`size`)
|
||||
AND (pd.maxSize IS NULL OR pd.maxSize >= i.`size`)
|
||||
AND (pd.inkFk IS NULL OR pd.inkFk = i.inkFk)
|
||||
AND (pd.originFk IS NULL OR pd.originFk = i.originFk)
|
||||
AND (pd.producerFk IS NULL OR pd.producerFk = i.producerFk)
|
||||
AND (pd.warehouseFk IS NULL OR pd.warehouseFk = vWarehouseFk)
|
||||
LEFT JOIN zoneGeo zg ON zg.id = pd.zoneGeoFk
|
||||
LEFT JOIN zoneGeo zg2 ON zg2.id = address_getGeo(vAddressFk)
|
||||
WHERE (pd.fromDated IS NULL OR pd.fromDated <= vShipped)
|
||||
AND (pd.toDated IS NULL OR pd.toDated >= vShipped)
|
||||
AND (pd.zoneGeoFk IS NULL OR zg2.lft BETWEEN zg.lft AND zg.rgt)
|
||||
GROUP BY itemFk;
|
||||
|
||||
CREATE OR REPLACE TEMPORARY TABLE tSpecialPrice
|
||||
(INDEX (itemFk))
|
||||
|
@ -130,15 +133,15 @@ BEGIN
|
|||
|
||||
-- Bonus del comprador a un rango de productos
|
||||
INSERT INTO tmp.ticketComponent(warehouseFk, itemFk, componentFk, cost)
|
||||
SELECT
|
||||
SELECT
|
||||
tcb.warehouseFk,
|
||||
tcb.itemFk,
|
||||
c.id,
|
||||
IFNULL(tcb.base * tpd.ratIncreasing / 100,0) + IFNULL(tpd.absIncreasing,0)
|
||||
FROM tmp.ticketComponentBase tcb
|
||||
JOIN component c ON c.code = 'bonus'
|
||||
JOIN tPriceDelta tpd
|
||||
ON tpd.itemFk = tcb.itemFk
|
||||
JOIN tPriceDelta tpd
|
||||
ON tpd.itemFk = tcb.itemFk
|
||||
AND tpd.warehouseFk = tcb.warehouseFk;
|
||||
|
||||
-- RECOBRO
|
||||
|
|
|
@ -55,24 +55,20 @@ BEGIN
|
|||
SELECT ts.saleFk,
|
||||
ts.itemFk,
|
||||
CAST(0 AS DECIMAL(10,0)) saleOrder,
|
||||
IF(ish.visible > 0 OR iss.id, 1, 100000) *
|
||||
IFNULL(p2.pickingOrder, p.pickingOrder) `order`,
|
||||
TO_SECONDS(IF(iss.id,
|
||||
iss.created - INTERVAL vCurrentYear YEAR,
|
||||
ish.created - INTERVAL YEAR(ish.created) YEAR)) priority,
|
||||
(IF(ish.visible > 0 OR iss.id, 1, 100000) *
|
||||
COALESCE(p2.pickingOrder, p.pickingOrder)) `order`,
|
||||
TO_SECONDS(COALESCE(iss.created, ish.created)) - TO_SECONDS(MAKEDATE(IFNULL(YEAR(iss.created), YEAR(ish.created)), 1)) priority,
|
||||
CONCAT(
|
||||
IF(iss.id,
|
||||
CONCAT('< ', IFNULL(wk.`code`, '---'),' > '),
|
||||
''),
|
||||
p.`code`) COLLATE utf8_general_ci placement,
|
||||
IF(iss.id, CONCAT('< ', COALESCE(wk.`code`, '---'),' > '), ''),
|
||||
p.`code`
|
||||
) COLLATE utf8_general_ci placement,
|
||||
sh.priority shelvingPriority,
|
||||
sh.code COLLATE utf8_general_ci shelving,
|
||||
ish.created,
|
||||
ish.visible,
|
||||
IFNULL(
|
||||
IF(st.code = 'previousByPacking', ish.packing, g.`grouping`),
|
||||
1) `grouping`,
|
||||
st.code = 'previousPrepared' isPreviousPrepared,
|
||||
COALESCE(
|
||||
IF(st.code = 'previousByPacking', ish.packing, g.`grouping`),1) `grouping`,
|
||||
(st.code = 'previousPrepared') isPreviousPrepared,
|
||||
iss.id itemShelvingSaleFk,
|
||||
ts.ticketFk,
|
||||
iss.id,
|
||||
|
@ -80,11 +76,12 @@ BEGIN
|
|||
iss.userFk,
|
||||
ts.quantity
|
||||
FROM tSale ts
|
||||
LEFT JOIN (SELECT DISTINCT saleFk
|
||||
FROM saleTracking st
|
||||
JOIN state s ON s.id = st.stateFk
|
||||
WHERE st.isChecked
|
||||
AND s.semaphore = 1) st ON st.saleFk = ts.saleFk
|
||||
LEFT JOIN (SELECT st.saleFk
|
||||
FROM saleTracking st
|
||||
JOIN state s ON s.id = st.stateFk
|
||||
WHERE st.isChecked
|
||||
AND s.semaphore = 1
|
||||
GROUP BY st.saleFk) st ON st.saleFk = ts.saleFk
|
||||
JOIN itemShelving ish ON ish.itemFk = ts.itemFk
|
||||
JOIN shelving sh ON sh.code = ish.shelvingFk
|
||||
JOIN parking p ON p.id = sh.parkingFk
|
||||
|
@ -93,14 +90,14 @@ BEGIN
|
|||
JOIN warehouse w ON w.id = sc.warehouseFk
|
||||
LEFT JOIN tGrouping g ON g.itemFk = ts.itemFk
|
||||
LEFT JOIN itemShelvingSale iss ON iss.saleFk = ts.saleFk
|
||||
AND iss.itemShelvingFk = ish.id
|
||||
AND iss.itemShelvingFk = ish.id
|
||||
LEFT JOIN worker wk ON wk.id = iss.userFk
|
||||
LEFT JOIN saleGroupDetail sgd ON sgd.saleFk = ts.saleFk
|
||||
LEFT JOIN saleGroup sg ON sg.id = sgd.saleGroupFk
|
||||
LEFT JOIN parking p2 ON p2.id = sg.parkingFk
|
||||
WHERE w.id = vWarehouseFk
|
||||
AND NOT sc.isHideForPickers
|
||||
HAVING (iss.id AND st.saleFk) OR salePreviousPrepared IS NULL;
|
||||
AND NOT sc.isHideForPickers
|
||||
AND ((iss.id AND st.saleFk) OR st.saleFk IS NULL);
|
||||
|
||||
CREATE OR REPLACE TEMPORARY TABLE tSalePlacementList2
|
||||
(INDEX(saleFk), INDEX(olderPriority))
|
||||
|
|
|
@ -3,7 +3,7 @@ CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`collection_assign`(
|
|||
vUserFk INT,
|
||||
OUT vCollectionFk INT
|
||||
)
|
||||
BEGIN
|
||||
BEGIN
|
||||
/**
|
||||
* Comprueba si existen colecciones libres que se ajustan
|
||||
* al perfil del usuario y le asigna la más antigua.
|
||||
|
@ -45,6 +45,12 @@ BEGIN
|
|||
DECLARE CONTINUE HANDLER FOR NOT FOUND SET vDone = TRUE;
|
||||
-- Si hay colecciones sin terminar, sale del proceso
|
||||
|
||||
DECLARE EXIT HANDLER FOR SQLEXCEPTION
|
||||
BEGIN
|
||||
ROLLBACK;
|
||||
RESIGNAL;
|
||||
END;
|
||||
|
||||
CALL collection_get(vUserFk);
|
||||
|
||||
SELECT (pc.maxNotReadyCollections - COUNT(*)) <= 0, pc.maxNotAssignedCollectionLifeTime
|
||||
|
@ -118,9 +124,19 @@ BEGIN
|
|||
IF vCollectionFk IS NULL THEN
|
||||
CALL collection_new(vUserFk, vCollectionFk);
|
||||
|
||||
UPDATE `collection`
|
||||
SET workerFk = vUserFk
|
||||
WHERE id = vCollectionFk;
|
||||
START TRANSACTION;
|
||||
|
||||
SELECT workerFk INTO vCollectionWorker
|
||||
FROM `collection`
|
||||
WHERE id = vCollectionFk FOR UPDATE;
|
||||
|
||||
IF vCollectionWorker IS NULL THEN
|
||||
UPDATE `collection`
|
||||
SET workerFk = vUserFk
|
||||
WHERE id = vCollectionFk;
|
||||
END IF;
|
||||
|
||||
COMMIT;
|
||||
END IF;
|
||||
END$$
|
||||
DELIMITER ;
|
|
@ -21,9 +21,8 @@ BEGIN
|
|||
SELECT tob.ticketFk, tob.description
|
||||
FROM vn.ticketObservation tob
|
||||
JOIN vn.ticketCollection tc ON tc.ticketFk = tob.ticketFk
|
||||
LEFT JOIN vn.observationType ot ON ot.id = tob.observationTypeFk
|
||||
WHERE ot.`code` = 'itemPicker'
|
||||
AND tc.collectionFk = vParamFk
|
||||
JOIN vn.observationType ot ON ot.id = tob.observationTypeFk AND ot.`code` = 'itemPicker'
|
||||
WHERE tc.collectionFk = vParamFk OR tc.ticketFk = vParamFk
|
||||
)
|
||||
SELECT t.id ticketFk,
|
||||
IF(!(vItemPackingTypeFk <=> 'V'), cc.code, CONCAT(SUBSTRING('ABCDEFGH', tc.wagon, 1), '-', tc.`level`)) `level`,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
DELIMITER $$
|
||||
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`collection_mergeSales`(vCollectionFk INT)
|
||||
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`collection_mergeSales`(vCollectionFk INT)
|
||||
BEGIN
|
||||
DECLARE vDone BOOL;
|
||||
DECLARE vTicketFk INT;
|
||||
|
|
|
@ -5,22 +5,26 @@ CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`expeditionPallet_buil
|
|||
vWorkerFk INT,
|
||||
OUT vPalletFk INT
|
||||
)
|
||||
BEGIN
|
||||
/** Construye un pallet de expediciones.
|
||||
proc: BEGIN
|
||||
/**
|
||||
* Builds an expedition pallet.
|
||||
*
|
||||
* Primero comprueba si esas expediciones ya pertenecen a otro pallet,
|
||||
* en cuyo caso actualiza ese pallet.
|
||||
* First, it checks if these expeditions already belong to another pallet,
|
||||
* in which case it returns an error.
|
||||
*
|
||||
* @param vExpeditions JSON_ARRAY con esta estructura [exp1, exp2, exp3, ...]
|
||||
* @param vArcId INT Identificador de arcRead
|
||||
* @param vWorkerFk INT Identificador de worker
|
||||
* @param out vPalletFk Identificador de expeditionPallet
|
||||
* @param vExpeditions JSON_ARRAY with this structure [exp1, exp2, exp3, ...]
|
||||
* @param vArcId INT Identifier of arcRead
|
||||
* @param vWorkerFk INT Identifier of worker
|
||||
* @param out vPalletFk Identifier of expeditionPallet
|
||||
*/
|
||||
|
||||
DECLARE vCounter INT;
|
||||
DECLARE vExpeditionFk INT;
|
||||
DECLARE vTruckFk INT;
|
||||
DECLARE vPrinterFk INT;
|
||||
DECLARE vExpeditionStateTypeFk INT;
|
||||
DECLARE vFreeExpeditionCount INT;
|
||||
DECLARE vExpeditionWithPallet INT;
|
||||
|
||||
CREATE OR REPLACE TEMPORARY TABLE tExpedition (
|
||||
expeditionFk INT,
|
||||
|
@ -44,48 +48,63 @@ BEGIN
|
|||
WHERE e.id = vExpeditionFk;
|
||||
END WHILE;
|
||||
|
||||
SELECT palletFk INTO vPalletFk
|
||||
FROM (
|
||||
SELECT palletFk, count(*) n
|
||||
FROM tExpedition
|
||||
WHERE palletFk > 0
|
||||
GROUP BY palletFk
|
||||
ORDER BY n DESC
|
||||
LIMIT 100
|
||||
) sub
|
||||
LIMIT 1;
|
||||
SELECT COUNT(expeditionFk) INTO vFreeExpeditionCount
|
||||
FROM tExpedition
|
||||
WHERE palletFk IS NULL;
|
||||
|
||||
IF vPalletFk IS NULL THEN
|
||||
SELECT roadmapStopFk INTO vTruckFk
|
||||
FROM (
|
||||
SELECT rm.roadmapStopFk, count(*) n
|
||||
FROM routesMonitor rm
|
||||
JOIN tExpedition e ON e.routeFk = rm.routeFk
|
||||
GROUP BY roadmapStopFk
|
||||
ORDER BY n DESC
|
||||
LIMIT 1
|
||||
) sub;
|
||||
SELECT COUNT(expeditionFk) INTO vExpeditionWithPallet
|
||||
FROM tExpedition
|
||||
WHERE palletFk;
|
||||
|
||||
IF vTruckFk IS NULL THEN
|
||||
CALL util.throw ('TRUCK_NOT_AVAILABLE');
|
||||
END IF;
|
||||
|
||||
INSERT INTO expeditionPallet SET truckFk = vTruckFk;
|
||||
|
||||
SET vPalletFk = LAST_INSERT_ID();
|
||||
IF vExpeditionWithPallet THEN
|
||||
UPDATE arcRead
|
||||
SET error = (
|
||||
SELECT GROUP_CONCAT(expeditionFk SEPARATOR ', ')
|
||||
FROM tExpedition
|
||||
WHERE palletFk
|
||||
)
|
||||
WHERE id = vArcId;
|
||||
LEAVE proc;
|
||||
END IF;
|
||||
|
||||
IF NOT vFreeExpeditionCount THEN
|
||||
CALL util.throw ('NO_FREE_EXPEDITIONS');
|
||||
END IF;
|
||||
|
||||
SELECT roadmapStopFk INTO vTruckFk
|
||||
FROM (
|
||||
SELECT rm.roadmapStopFk, count(*) n
|
||||
FROM routesMonitor rm
|
||||
JOIN tExpedition e ON e.routeFk = rm.routeFk
|
||||
WHERE e.palletFk IS NULL
|
||||
GROUP BY roadmapStopFk
|
||||
ORDER BY n DESC
|
||||
LIMIT 1
|
||||
) sub;
|
||||
|
||||
IF vTruckFk IS NULL THEN
|
||||
CALL util.throw ('TRUCK_NOT_AVAILABLE');
|
||||
END IF;
|
||||
|
||||
INSERT INTO expeditionPallet SET truckFk = vTruckFk;
|
||||
|
||||
SET vPalletFk = LAST_INSERT_ID();
|
||||
|
||||
INSERT INTO expeditionScan(expeditionFk, palletFk, workerFk)
|
||||
SELECT expeditionFk, vPalletFk, vWorkerFk
|
||||
FROM tExpedition
|
||||
ON DUPLICATE KEY UPDATE palletFk = vPalletFk, workerFk = vWorkerFk;
|
||||
WHERE palletFk IS NULL;
|
||||
|
||||
SELECT id INTO vExpeditionStateTypeFk
|
||||
FROM expeditionStateType
|
||||
WHERE code = 'PALLETIZED';
|
||||
|
||||
|
||||
INSERT INTO expeditionState(expeditionFk, typeFk)
|
||||
SELECT expeditionFk, vExpeditionStateTypeFk FROM tExpedition;
|
||||
SELECT expeditionFk, vExpeditionStateTypeFk
|
||||
FROM tExpedition
|
||||
WHERE palletFk IS NULL;
|
||||
|
||||
UPDATE arcRead SET error = NULL WHERE id = vArcId;
|
||||
|
||||
SELECT printerFk INTO vPrinterFk FROM arcRead WHERE id = vArcId;
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
DELIMITER $$
|
||||
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`itemMinimumQuantity_check`(
|
||||
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`itemMinimumQuantity_check`(
|
||||
vSelf INT,
|
||||
vItemFk INT,
|
||||
vStarted DATE,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
DELIMITER $$
|
||||
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`itemShelvingSale_addBySaleGroup`(
|
||||
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`itemShelvingSale_addBySaleGroup`(
|
||||
vSaleGroupFk INT(11)
|
||||
)
|
||||
BEGIN
|
||||
|
|
|
@ -1,64 +1,51 @@
|
|||
DELIMITER $$
|
||||
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`item_getSimilar`(
|
||||
vSelf INT,
|
||||
vWarehouseFk INT,
|
||||
vDated DATE,
|
||||
vShowType BOOL,
|
||||
vDaysInForward INT
|
||||
vSelf INT,
|
||||
vWarehouseFk INT,
|
||||
vDated DATE,
|
||||
vShowType BOOL,
|
||||
vDaysInForward INT
|
||||
)
|
||||
BEGIN
|
||||
/**
|
||||
* Propone articulos ordenados, con la cantidad
|
||||
* de veces usado y segun sus caracteristicas.
|
||||
*
|
||||
* @param vSelf Id de artículo
|
||||
* @param vWarehouseFk Id de almacen
|
||||
* @param vDated Fecha
|
||||
* @param vShowType Mostrar tipos
|
||||
* @param vDaysInForward Días de alcance para las ventas
|
||||
*/
|
||||
DECLARE vAvailableCalcFk INT;
|
||||
DECLARE vPriority INT DEFAULT 1;
|
||||
* Propone articulos ordenados, con la cantidad
|
||||
* de veces usado y segun sus caracteristicas.
|
||||
*
|
||||
* @param vSelf Id de artículo
|
||||
* @param vWarehouseFk Id de almacen
|
||||
* @param vDated Fecha
|
||||
* @param vShowType Mostrar tipos
|
||||
* @param vDaysInForward Días de alcance para las ventas (https://redmine.verdnatura.es/issues/7956#note-4)
|
||||
*/
|
||||
DECLARE vAvailableCalcFk INT;
|
||||
DECLARE vVisibleCalcFk INT;
|
||||
DECLARE vTypeFk INT;
|
||||
DECLARE vPriority INT DEFAULT 1;
|
||||
|
||||
CALL cache.available_refresh(vAvailableCalcFk, FALSE, vWarehouseFk, vDated);
|
||||
CALL cache.available_refresh(vAvailableCalcFk, FALSE, vWarehouseFk, vDated);
|
||||
CALL cache.visible_refresh(vVisibleCalcFk, FALSE, vWarehouseFk);
|
||||
|
||||
WITH itemTags AS (
|
||||
SELECT i.id,
|
||||
typeFk,
|
||||
tag5,
|
||||
value5,
|
||||
tag6,
|
||||
value6,
|
||||
tag7,
|
||||
value7,
|
||||
tag8,
|
||||
value8,
|
||||
t.name,
|
||||
it.value
|
||||
WITH itemTags AS (
|
||||
SELECT i.id,
|
||||
typeFk,
|
||||
tag5,
|
||||
value5,
|
||||
tag6,
|
||||
value6,
|
||||
tag7,
|
||||
value7,
|
||||
tag8,
|
||||
value8,
|
||||
t.name,
|
||||
it.value
|
||||
FROM vn.item i
|
||||
LEFT JOIN vn.itemTag it ON it.itemFk = i.id
|
||||
AND it.priority = vPriority
|
||||
LEFT JOIN vn.tag t ON t.id = it.tagFk
|
||||
WHERE i.id = vSelf
|
||||
),
|
||||
stock AS (
|
||||
SELECT itemFk, SUM(visible) stock
|
||||
FROM vn.itemShelvingStock
|
||||
WHERE warehouseFk = vWarehouseFk
|
||||
GROUP BY itemFk
|
||||
),
|
||||
sold AS (
|
||||
SELECT SUM(s.quantity) quantity, s.itemFk
|
||||
FROM vn.sale s
|
||||
JOIN vn.ticket t ON t.id = s.ticketFk
|
||||
LEFT JOIN vn.itemShelvingSale iss ON iss.saleFk = s.id
|
||||
WHERE t.shipped BETWEEN CURDATE() AND CURDATE() + INTERVAL vDaysInForward DAY
|
||||
AND iss.saleFk IS NULL
|
||||
AND t.warehouseFk = vWarehouseFk
|
||||
GROUP BY s.itemFk
|
||||
)
|
||||
SELECT i.id itemFk,
|
||||
CAST(sd.quantity AS INT) advanceable,
|
||||
)
|
||||
SELECT i.id itemFk,
|
||||
NULL advanceable, -- https://redmine.verdnatura.es/issues/7956#note-4
|
||||
i.longName,
|
||||
i.subName,
|
||||
i.tag5,
|
||||
|
@ -80,13 +67,13 @@ BEGIN
|
|||
WHEN b.groupingMode = 'packing' THEN b.packing
|
||||
ELSE 1
|
||||
END minQuantity,
|
||||
sk.stock located,
|
||||
v.visible located,
|
||||
b.price2
|
||||
FROM vn.item i
|
||||
LEFT JOIN sold sd ON sd.itemFk = i.id
|
||||
JOIN cache.available a ON a.item_id = i.id
|
||||
AND a.calc_id = vAvailableCalcFk
|
||||
LEFT JOIN stock sk ON sk.itemFk = i.id
|
||||
LEFT JOIN cache.visible v ON v.item_id = i.id
|
||||
AND v.calc_id = vVisibleCalcFk
|
||||
LEFT JOIN cache.last_buy lb ON lb.item_id = i.id
|
||||
AND lb.warehouse_id = vWarehouseFk
|
||||
LEFT JOIN vn.itemProposal ip ON ip.mateFk = i.id
|
||||
|
@ -96,21 +83,20 @@ BEGIN
|
|||
LEFT JOIN vn.tag t ON t.id = it.tagFk
|
||||
LEFT JOIN vn.buy b ON b.id = lb.buy_id
|
||||
JOIN itemTags its
|
||||
WHERE (a.available > 0 OR sd.quantity < sk.stock)
|
||||
WHERE a.available > 0
|
||||
AND (i.typeFk = its.typeFk OR NOT vShowType)
|
||||
AND i.id <> vSelf
|
||||
ORDER BY (a.available > 0) DESC,
|
||||
`counter` DESC,
|
||||
(t.name = its.name) DESC,
|
||||
(it.value = its.value) DESC,
|
||||
(i.tag5 = its.tag5) DESC,
|
||||
match5 DESC,
|
||||
(i.tag6 = its.tag6) DESC,
|
||||
match6 DESC,
|
||||
(i.tag7 = its.tag7) DESC,
|
||||
match7 DESC,
|
||||
(i.tag8 = its.tag8) DESC,
|
||||
match8 DESC
|
||||
ORDER BY `counter` DESC,
|
||||
(t.name = its.name) DESC,
|
||||
(it.value = its.value) DESC,
|
||||
(i.tag5 = its.tag5) DESC,
|
||||
match5 DESC,
|
||||
(i.tag6 = its.tag6) DESC,
|
||||
match6 DESC,
|
||||
(i.tag7 = its.tag7) DESC,
|
||||
match7 DESC,
|
||||
(i.tag8 = its.tag8) DESC,
|
||||
match8 DESC
|
||||
LIMIT 100;
|
||||
END$$
|
||||
DELIMITER ;
|
||||
|
|
|
@ -40,7 +40,7 @@ BEGIN
|
|||
isTooLittle BOOL DEFAULT FALSE,
|
||||
isVip BOOL DEFAULT FALSE,
|
||||
PRIMARY KEY (ticketFk, saleFk)
|
||||
) ENGINE = MEMORY;
|
||||
); -- No memory
|
||||
|
||||
INSERT INTO tmp.sale_problems(ticketFk,
|
||||
saleFk,
|
||||
|
|
|
@ -0,0 +1,62 @@
|
|||
DELIMITER $$
|
||||
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`stockBought_calculate`(
|
||||
vDated DATE
|
||||
)
|
||||
proc: BEGIN
|
||||
/**
|
||||
* Calculate the stock of the auction warehouse from the inventory date to vDated
|
||||
* without taking into account the outputs of the same day vDated
|
||||
*
|
||||
* @param vDated Date to calculate the stock.
|
||||
*/
|
||||
IF vDated < util.VN_CURDATE() THEN
|
||||
LEAVE proc;
|
||||
END IF;
|
||||
|
||||
CREATE OR REPLACE TEMPORARY TABLE tStockBought
|
||||
SELECT workerFk, reserve
|
||||
FROM stockBought
|
||||
WHERE dated = vDated
|
||||
AND reserve;
|
||||
|
||||
DELETE FROM stockBought WHERE dated = vDated;
|
||||
|
||||
CALL item_calculateStock(vDated);
|
||||
|
||||
INSERT INTO stockBought(workerFk, bought, dated)
|
||||
SELECT it.workerFk,
|
||||
ROUND(SUM(
|
||||
(ti.quantity / b.packing) *
|
||||
buy_getVolume(b.id)
|
||||
) / vc.palletM3 / 1000000, 1) bought,
|
||||
vDated
|
||||
FROM itemType it
|
||||
JOIN item i ON i.typeFk = it.id
|
||||
LEFT JOIN tmp.item ti ON ti.itemFk = i.id
|
||||
JOIN itemCategory ic ON ic.id = it.categoryFk
|
||||
JOIN warehouse wh ON wh.code = 'VNH'
|
||||
JOIN tmp.buyUltimate bu ON bu.itemFk = i.id
|
||||
AND bu.warehouseFk = wh.id
|
||||
JOIN buy b ON b.id = bu.buyFk
|
||||
JOIN volumeConfig vc
|
||||
WHERE ic.display
|
||||
GROUP BY it.workerFk
|
||||
HAVING bought;
|
||||
|
||||
UPDATE stockBought s
|
||||
JOIN tStockBought ts ON ts.workerFk = s.workerFk
|
||||
SET s.reserve = ts.reserve
|
||||
WHERE s.dated = vDated;
|
||||
|
||||
INSERT INTO stockBought (workerFk, reserve, dated)
|
||||
SELECT ts.workerFk, ts.reserve, vDated
|
||||
FROM tStockBought ts
|
||||
WHERE ts.workerFk NOT IN (
|
||||
SELECT workerFk
|
||||
FROM stockBought
|
||||
WHERE dated = vDated
|
||||
);
|
||||
|
||||
DROP TEMPORARY TABLE tStockBought, tmp.item, tmp.buyUltimate;
|
||||
END$$
|
||||
DELIMITER ;
|
|
@ -1,5 +1,5 @@
|
|||
DELIMITER $$
|
||||
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE vn.supplier_statementWithEntries(
|
||||
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE vn.supplier_statementWithEntries(
|
||||
vSupplierFk INT,
|
||||
vCurrencyFk INT,
|
||||
vCompanyFk INT,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
DELIMITER $$
|
||||
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ticket_mergeSales`(
|
||||
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`ticket_mergeSales`(
|
||||
vSelf INT
|
||||
)
|
||||
BEGIN
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
DELIMITER $$
|
||||
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ticket_setProblemRiskByClient`(
|
||||
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`ticket_setProblemRiskByClient`(
|
||||
vClientFk INT
|
||||
)
|
||||
BEGIN
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
DELIMITER $$
|
||||
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ticket_setVolume`(
|
||||
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`ticket_setVolume`(
|
||||
vSelf INT
|
||||
)
|
||||
BEGIN
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
DELIMITER $$
|
||||
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`ticket_setVolumeItemCost`(
|
||||
CREATE OR REPLACE DEFINER=`vn`@`localhost` PROCEDURE `vn`.`ticket_setVolumeItemCost`(
|
||||
vItemFk INT
|
||||
)
|
||||
BEGIN
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
DELIMITER $$
|
||||
CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`host_beforeInsert`
|
||||
CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`host_beforeInsert`
|
||||
BEFORE INSERT ON `host`
|
||||
FOR EACH ROW
|
||||
BEGIN
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
DELIMITER $$
|
||||
CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`itemShelving_afterInsert`
|
||||
AFTER INSERT ON `itemShelving`
|
||||
FOR EACH ROW
|
||||
BEGIN
|
||||
INSERT INTO itemShelvingLog
|
||||
SET itemShelvingFk = NEW.id,
|
||||
workerFk = account.myUser_getId(),
|
||||
accion = 'CREA REGISTRO',
|
||||
itemFk = NEW.itemFk,
|
||||
shelvingFk = NEW.shelvingFk,
|
||||
visible = NEW.visible,
|
||||
`grouping` = NEW.`grouping`,
|
||||
packing = NEW.packing,
|
||||
available = NEW.available;
|
||||
|
||||
END$$
|
||||
DELIMITER ;
|
|
@ -1,5 +1,5 @@
|
|||
DELIMITER $$
|
||||
CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`roadmap_beforeInsert`
|
||||
CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`roadmap_beforeInsert`
|
||||
BEFORE INSERT ON `roadmap`
|
||||
FOR EACH ROW
|
||||
BEGIN
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
DELIMITER $$
|
||||
CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`roadmap_beforeUpdate`
|
||||
CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`roadmap_beforeUpdate`
|
||||
BEFORE UPDATE ON `roadmap`
|
||||
FOR EACH ROW
|
||||
BEGIN
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
DELIMITER $$
|
||||
CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`saleGroupDetail_beforeInsert`
|
||||
CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`saleGroupDetail_beforeInsert`
|
||||
BEFORE INSERT ON `saleGroupDetail`
|
||||
FOR EACH ROW
|
||||
BEGIN
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
DELIMITER $$
|
||||
CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`saleGroupDetail_afterDelete`
|
||||
CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`saleGroupDetail_afterDelete`
|
||||
AFTER DELETE ON `saleGroupDetail`
|
||||
FOR EACH ROW
|
||||
BEGIN
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
DELIMITER $$
|
||||
CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`saleGroupDetail_beforeUpdate`
|
||||
CREATE OR REPLACE DEFINER=`vn`@`localhost` TRIGGER `vn`.`saleGroupDetail_beforeUpdate`
|
||||
BEFORE UPDATE ON `saleGroupDetail`
|
||||
FOR EACH ROW
|
||||
BEGIN
|
||||
|
|
|
@ -17,5 +17,6 @@ AS SELECT `p`.`id` AS `Id_Cubo`,
|
|||
`p`.`upload` AS `Suben`,
|
||||
`p`.`base` AS `Base`,
|
||||
`p`.`isBox` AS `box`,
|
||||
`p`.`returnCost` AS `costeRetorno`
|
||||
`p`.`returnCost` AS `costeRetorno`,
|
||||
`p`.`isActive` AS `isActive`
|
||||
FROM `vn`.`packaging` `p`
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
-- Place your SQL code here
|
||||
-- vn.stockBought definition
|
||||
|
||||
CREATE TABLE IF NOT EXISTS vn.stockBought (
|
||||
id INT UNSIGNED auto_increment NOT NULL,
|
||||
workerFk int(10) unsigned NOT NULL,
|
||||
bought decimal(10,2) NOT NULL COMMENT 'purchase volume in m3 for the day',
|
||||
reserve decimal(10,2) NULL COMMENT 'reserved volume in m3 for the day',
|
||||
dated DATE NOT NULL DEFAULT current_timestamp(),
|
||||
CONSTRAINT stockBought_pk PRIMARY KEY (id),
|
||||
CONSTRAINT stockBought_unique UNIQUE KEY (workerFk,dated),
|
||||
CONSTRAINT stockBought_worker_FK FOREIGN KEY (workerFk) REFERENCES vn.worker(id)
|
||||
)
|
||||
ENGINE=InnoDB
|
||||
DEFAULT CHARSET=utf8mb3
|
||||
COLLATE=utf8mb3_unicode_ci;
|
||||
|
||||
|
||||
INSERT IGNORE vn.stockBought (workerFk, bought, reserve, dated)
|
||||
SELECT userFk, SUM(buyed), SUM(IFNULL(reserved,0)), dated
|
||||
FROM vn.stockBuyed
|
||||
WHERE userFk IS NOT NULL
|
||||
AND buyed IS NOT NULL
|
||||
GROUP BY userFk, dated;
|
||||
|
||||
INSERT INTO salix.ACL (model,property,accessType,permission,principalType,principalId)
|
||||
VALUES ('StockBought','*','READ','ALLOW','ROLE','buyer'),
|
||||
('StockBought','*','WRITE','ALLOW','ROLE','buyer'),
|
||||
('Buyer','*','READ','ALLOW','ROLE','buyer');
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
-- Place your SQL code here
|
||||
-- vn.priceDelta definition
|
||||
|
||||
CREATE OR REPLACE TABLE vn.priceDelta (
|
||||
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`itemTypeFk` smallint(5) unsigned NOT NULL,
|
||||
`minSize` int(10) unsigned DEFAULT NULL COMMENT 'Minimum item.size',
|
||||
`maxSize` int(10) unsigned DEFAULT NULL COMMENT 'Maximum item.size',
|
||||
`inkFk` varchar(3) DEFAULT NULL,
|
||||
`originFk` tinyint(2) unsigned DEFAULT NULL,
|
||||
`producerFk` mediumint(3) unsigned DEFAULT NULL,
|
||||
`fromDated` date DEFAULT NULL,
|
||||
`toDated` date DEFAULT NULL,
|
||||
`absIncreasing` decimal(10,3) DEFAULT NULL COMMENT 'Absolute increasing of final price',
|
||||
`ratIncreasing` int(11) DEFAULT NULL COMMENT 'Increasing ratio for the cost price',
|
||||
`warehouseFk` smallint(6) unsigned NOT NULL,
|
||||
`created` timestamp NOT NULL DEFAULT current_timestamp(),
|
||||
`editorFk` int(10) unsigned DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `priceDelta_itemType_FK` (`itemTypeFk`),
|
||||
KEY `priceDelta_ink_FK` (`inkFk`),
|
||||
KEY `priceDelta_producer_FK` (`producerFk`),
|
||||
KEY `priceDelta_warehouse_FK` (`warehouseFk`),
|
||||
KEY `priceDelta_worker_FK` (`editorFk`),
|
||||
CONSTRAINT `priceDelta_ink_FK` FOREIGN KEY (`inkFk`) REFERENCES `ink` (`id`) ON UPDATE CASCADE,
|
||||
CONSTRAINT `priceDelta_itemType_FK` FOREIGN KEY (`itemTypeFk`) REFERENCES `itemType` (`id`) ON UPDATE CASCADE,
|
||||
CONSTRAINT `priceDelta_producer_FK` FOREIGN KEY (`producerFk`) REFERENCES `producer` (`id`) ON UPDATE CASCADE,
|
||||
CONSTRAINT `priceDelta_warehouse_FK` FOREIGN KEY (`warehouseFk`) REFERENCES `warehouse` (`id`) ON UPDATE CASCADE,
|
||||
CONSTRAINT `priceDelta_worker_FK` FOREIGN KEY (`editorFk`) REFERENCES `worker` (`id`) ON DELETE SET NULL ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci COMMENT='Defines the increasing o decreasing for ranges of items';
|
||||
|
||||
GRANT INSERT, SELECT, UPDATE, DELETE ON TABLE vn.priceDelta TO buyer;
|
|
@ -0,0 +1,22 @@
|
|||
CREATE TABLE IF NOT EXISTS `vn`.`itemStateTag` (
|
||||
`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 `vn`.`itemStateTag` (`name`) VALUES ('Artificial');
|
||||
INSERT IGNORE INTO `vn`.`itemStateTag` (`name`) VALUES ('Inactivo');
|
||||
INSERT IGNORE INTO `vn`.`itemStateTag` (`name`) VALUES ('Preservado');
|
||||
INSERT IGNORE INTO `vn`.`itemStateTag` (`name`) VALUES ('Seco');
|
||||
INSERT IGNORE INTO `vn`.`itemStateTag` (`name`) VALUES ('Seco y preservado');
|
||||
INSERT IGNORE INTO `vn`.`itemStateTag` (`name`) VALUES ('Estabilizada');
|
||||
INSERT IGNORE INTO `vn`.`itemStateTag` (`name`) VALUES ('Natural y seco');
|
||||
INSERT IGNORE INTO `vn`.`itemStateTag` (`name`) VALUES ('Preservado y artificial');
|
||||
INSERT IGNORE INTO `vn`.`itemStateTag` (`name`) VALUES ('Usado');
|
||||
|
||||
UPDATE vn.tag
|
||||
SET isFree=0,
|
||||
sourceTable='itemStateTag'
|
||||
WHERE name= 'Estado';
|
|
@ -0,0 +1,6 @@
|
|||
-- Place your SQL code here
|
||||
|
||||
ALTER TABLE vn.priceDelta ADD IF NOT EXISTS zoneGeoFk int(11) NULL;
|
||||
|
||||
ALTER TABLE vn.priceDelta ADD CONSTRAINT priceDelta_zoneGeo_FK FOREIGN KEY IF NOT EXISTS (zoneGeoFk)
|
||||
REFERENCES vn.zoneGeo (`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
|
@ -0,0 +1,6 @@
|
|||
-- Place your SQL code here
|
||||
|
||||
ALTER TABLE vn.priceDelta ADD IF NOT EXISTS zoneGeoFk int(11) NULL;
|
||||
|
||||
ALTER TABLE vn.priceDelta ADD CONSTRAINT priceDelta_zoneGeo_FK FOREIGN KEY IF NOT EXISTS (zoneGeoFk)
|
||||
REFERENCES vn.zoneGeo (`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
|
@ -0,0 +1,24 @@
|
|||
ALTER TABLE `vn`.`packaging`
|
||||
ADD COLUMN IF NOT EXISTS `isActive` TINYINT(1) DEFAULT 1;
|
||||
|
||||
UPDATE vn.packaging
|
||||
SET isActive = FALSE
|
||||
WHERE id IN('06x04x06','07x04x03','1000','100SM','1031','104','105','1060','10x04x06','10x04x07','1100','118','119','1200','129','1300',
|
||||
'134','146','147','148','158','159','17x01x02','17X01X03','17x01x04','17x01x05','18X01X04','198','199',
|
||||
'20P','20x01x03','246','273','278','279','280','290','359','37247','382','40P','453','463','464','465','466',
|
||||
'467','469','471','473','494','508','509','511','512','514','515','516','518','519-50B','575','598-3x6','604','605','606',
|
||||
'607','609','647','67515','676','680','682','685','687','688','691','692','693','694','695','730','751','7808','790','7910',
|
||||
'7920','79450','7950','7952','7960','7976','7982','7986','7988',
|
||||
'7993','8000','8046','8049','8053','8057','8058','8065','8076','8085','8086','8088',
|
||||
'8091','8095','8096','8097','8101','8106','8108','8110','8112','8124','8134','8140','8141','8143','8145','8149','8150',
|
||||
'8170','8174','8192','8200','8210','8249','8270','8275','8288','8300','8350','8375','8399','8400','8420','845','847','8480','8500',
|
||||
'855','858','8600','862','869','871','872','8720','878','879','880','8800','882','885','910','911','912','914','916','917','918','919',
|
||||
'920','921','922','923','924','925','926','927','930','9300','932','934','935','936','938','942','948','9600','980','984','9920',
|
||||
'B20x16','B43x13','Bande Rota','bb3','Bcesta','BcestaOVAL','BcestaRED','Bcirios','BciriosG','BjarronBLN','BjarronNGR',
|
||||
'Btazon','Bvelas','cactus200','Caja040','CajaTGLF','CC Alza Pl','CC_falso',
|
||||
'EB-RSMINA','EMB 1_4','EMB 2_5','espuma','FB-BENCH','granel','Grenex','guzma1200','guzma1400','guzma330','guzma400','guzma650','guzma900','HB-ALEX',
|
||||
'HB-APOSENT','HB-MAGIC','HB-NATUF','HB-RSMINA','HB-TES-RSR','HB068','HB117','HB2-CIRCA','JB-AROMA','jumboX3','kalan330','kalan400',
|
||||
'kalan577','kalan900','L12','L120','L14','L2-120','L200','L3-120','L4-120','L44','L6','L6-180','L8','L8-200','MB-BENCH','MBOLA','mc_11',
|
||||
'mc_13','Msp','NO VALIDO','NO-002','PANIC','PBLG','PISOCC/3','PISOCC/4','PISOCC/5','PISOCC/6',
|
||||
'procona','QB-CARDENA','QB-PANDERO','QB-TES-RSR','QB7-TOSCA','QB9-TOSCA','RB-BENCH','SemiEuroPa','spolette','t_flori11','T26x23',
|
||||
'T26x25','T27x24','T27x30','T28x26','T30x24','T33x30','THA50','ti_13','Tumbado','UB-BENCH')
|
|
@ -57,7 +57,7 @@ export default class App {
|
|||
|
||||
getUrl(route, appName = 'lilium') {
|
||||
const index = window.location.hash.indexOf(route.toLowerCase());
|
||||
const newRoute = index < 0 ? route : window.location.hash.substring(index);
|
||||
let newRoute = index < 0 ? route : window.location.hash.substring(index);
|
||||
const env = process.env.NODE_ENV;
|
||||
const filter = {
|
||||
where: {and: [
|
||||
|
@ -66,6 +66,17 @@ export default class App {
|
|||
]}
|
||||
};
|
||||
|
||||
const hasId = !isNaN(parseInt(route.split('/')[1]));
|
||||
|
||||
if (this.logger.$params.q) {
|
||||
let tableValue = this.logger.$params.q;
|
||||
const q = JSON.parse(tableValue);
|
||||
if (typeof q === 'number')
|
||||
tableValue = JSON.stringify({id: tableValue});
|
||||
newRoute = newRoute.concat(`?table=${tableValue}`);
|
||||
} else if (!hasId && this.logger.$params.id && newRoute.indexOf(this.logger.$params.id) < 0)
|
||||
newRoute = newRoute.concat(`${this.logger.$params.id}`);
|
||||
|
||||
return this.logger.$http.get('Urls/findOne', {filter})
|
||||
.then(res => {
|
||||
if (res && res.data)
|
||||
|
|
|
@ -239,5 +239,6 @@
|
|||
"Original invoice not found": "Original invoice not found",
|
||||
"There is already a tray with the same height": "There is already a tray with the same height",
|
||||
"The height must be greater than 50cm": "The height must be greater than 50cm",
|
||||
"The maximum height of the wagon is 200cm": "The maximum height of the wagon is 200cm"
|
||||
"The maximum height of the wagon is 200cm": "The maximum height of the wagon is 200cm",
|
||||
"The quantity claimed cannot be greater than the quantity of the line": "The quantity claimed cannot be greater than the quantity of the line"
|
||||
}
|
||||
|
|
|
@ -377,5 +377,6 @@
|
|||
"This ticket is not allocated to your department": "Este ticket no está asignado a tu departamento",
|
||||
"There is already a tray with the same height": "Ya existe una bandeja con la misma altura",
|
||||
"The height must be greater than 50cm": "La altura debe ser superior a 50cm",
|
||||
"The maximum height of the wagon is 200cm": "La altura máxima es 200cm"
|
||||
"The maximum height of the wagon is 200cm": "La altura máxima es 200cm",
|
||||
"The quantity claimed cannot be greater than the quantity of the line": "La cantidad reclamada no puede ser mayor que la cantidad de la línea"
|
||||
}
|
||||
|
|
|
@ -361,6 +361,6 @@
|
|||
"The invoices have been created but the PDFs could not be generated": "La facture a été émise mais le PDF n'a pas pu être généré",
|
||||
"It has been invoiced but the PDF of refund not be generated": "Il a été facturé mais le PDF de remboursement n'a pas été généré",
|
||||
"Cannot send mail": "Impossible d'envoyer le mail",
|
||||
"Original invoice not found": "Facture originale introuvable"
|
||||
|
||||
"Original invoice not found": "Facture originale introuvable",
|
||||
"The quantity claimed cannot be greater than the quantity of the line": "Le montant réclamé ne peut pas être supérieur au montant de la ligne"
|
||||
}
|
||||
|
|
|
@ -361,5 +361,6 @@
|
|||
"The invoices have been created but the PDFs could not be generated": "Foi faturado, mas o PDF não pôde ser gerado",
|
||||
"It has been invoiced but the PDF of refund not be generated": "Foi faturado mas não foi gerado o PDF do reembolso",
|
||||
"Original invoice not found": "Fatura original não encontrada",
|
||||
"Cannot send mail": "Não é possível enviar o email"
|
||||
"Cannot send mail": "Não é possível enviar o email",
|
||||
"The quantity claimed cannot be greater than the quantity of the line": "O valor reclamado não pode ser superior ao valor da linha"
|
||||
}
|
||||
|
|
|
@ -0,0 +1,55 @@
|
|||
const models = require('vn-loopback/server/server').models;
|
||||
const LoopBackContext = require('loopback-context');
|
||||
|
||||
describe('ClaimBeginning model()', () => {
|
||||
const claimFk = 1;
|
||||
const activeCtx = {
|
||||
accessToken: {userId: 18},
|
||||
headers: {origin: 'localhost:5000'},
|
||||
__: () => {}
|
||||
};
|
||||
|
||||
beforeEach(() => {
|
||||
spyOn(LoopBackContext, 'getCurrentContext').and.returnValue({
|
||||
active: activeCtx
|
||||
});
|
||||
});
|
||||
|
||||
it('should change quantity claimed', async() => {
|
||||
const tx = await models.ClaimBeginning.beginTransaction({});
|
||||
|
||||
let error;
|
||||
try {
|
||||
const options = {transaction: tx};
|
||||
const claim = await models.ClaimBeginning.findOne({where: {claimFk}}, options);
|
||||
const sale = await models.Sale.findById(claim.saleFk, {}, options);
|
||||
await claim.updateAttribute('quantity', sale.quantity - 1, options);
|
||||
|
||||
await tx.rollback();
|
||||
} catch (e) {
|
||||
error = e;
|
||||
await tx.rollback();
|
||||
}
|
||||
|
||||
expect(error).toBeUndefined();
|
||||
});
|
||||
|
||||
it('should throw error when quantity claimed is greater than quantity of the sale', async() => {
|
||||
const tx = await models.ClaimBeginning.beginTransaction({});
|
||||
|
||||
let error;
|
||||
try {
|
||||
const options = {transaction: tx};
|
||||
const claim = await models.ClaimBeginning.findOne({where: {claimFk}}, options);
|
||||
const sale = await models.Sale.findById(claim.saleFk, {}, options);
|
||||
await claim.updateAttribute('quantity', sale.quantity + 1, options);
|
||||
|
||||
await tx.rollback();
|
||||
} catch (e) {
|
||||
error = e;
|
||||
await tx.rollback();
|
||||
}
|
||||
|
||||
expect(error.toString()).toContain('The quantity claimed cannot be greater than the quantity of the line');
|
||||
});
|
||||
});
|
|
@ -10,16 +10,21 @@ module.exports = Self => {
|
|||
});
|
||||
|
||||
Self.observe('before save', async ctx => {
|
||||
const options = ctx.options;
|
||||
const models = Self.app.models;
|
||||
const saleFk = ctx?.currentInstance?.saleFk || ctx?.instance?.saleFk;
|
||||
const sale = await models.Sale.findById(saleFk, {fields: ['ticketFk', 'quantity']}, options);
|
||||
|
||||
if (ctx.isNewInstance) {
|
||||
const models = Self.app.models;
|
||||
const options = ctx.options;
|
||||
const instance = ctx.instance;
|
||||
const ticket = await models.Sale.findById(instance.saleFk, {fields: ['ticketFk']}, options);
|
||||
const claim = await models.Claim.findById(instance.claimFk, {fields: ['ticketFk']}, options);
|
||||
if (ticket.ticketFk != claim.ticketFk)
|
||||
const claim = await models.Claim.findById(ctx.instance.claimFk, {fields: ['ticketFk']}, options);
|
||||
if (sale.ticketFk != claim.ticketFk)
|
||||
throw new UserError(`Cannot create a new claimBeginning from a different ticket`);
|
||||
}
|
||||
|
||||
await claimIsEditable(ctx);
|
||||
|
||||
if (sale?.quantity && ctx.data?.quantity && ctx.data.quantity > sale?.quantity)
|
||||
throw new UserError('The quantity claimed cannot be greater than the quantity of the line');
|
||||
});
|
||||
|
||||
Self.observe('before delete', async ctx => {
|
||||
|
|
|
@ -54,7 +54,7 @@
|
|||
<th field="clientFk">
|
||||
<span translate>Client</span>
|
||||
</th>
|
||||
<th>
|
||||
<th field="isWorker">
|
||||
<span translate>Es trabajador</span>
|
||||
</th>
|
||||
<th field="salesPersonFk">
|
||||
|
|
|
@ -57,6 +57,11 @@ export default class Controller extends Section {
|
|||
field: 'observation',
|
||||
searchable: false
|
||||
},
|
||||
{
|
||||
field: 'isWorker',
|
||||
checkbox: true,
|
||||
|
||||
},
|
||||
{
|
||||
field: 'created',
|
||||
datepicker: true
|
||||
|
@ -73,9 +78,6 @@ export default class Controller extends Section {
|
|||
|
||||
set defaulters(value) {
|
||||
if (!value || !value.length) return;
|
||||
for (let defaulter of value)
|
||||
defaulter.isWorker = defaulter.businessTypeFk === 'worker';
|
||||
|
||||
this._defaulters = value;
|
||||
}
|
||||
|
||||
|
@ -164,6 +166,8 @@ export default class Controller extends Section {
|
|||
|
||||
exprBuilder(param, value) {
|
||||
switch (param) {
|
||||
case 'isWorker':
|
||||
return {isWorker: value};
|
||||
case 'creditInsurance':
|
||||
case 'amount':
|
||||
case 'clientFk':
|
||||
|
|
|
@ -0,0 +1,58 @@
|
|||
module.exports = Self => {
|
||||
Self.remoteMethod('getStockBought', {
|
||||
description: 'Returns the stock bought for a given date',
|
||||
accessType: 'READ',
|
||||
accepts: [{
|
||||
arg: 'workerFk',
|
||||
type: 'number',
|
||||
description: 'The id for a buyer',
|
||||
},
|
||||
{
|
||||
arg: 'dated',
|
||||
type: 'date',
|
||||
description: 'The date to filter',
|
||||
}
|
||||
],
|
||||
returns: {
|
||||
type: ['object'],
|
||||
root: true
|
||||
},
|
||||
http: {
|
||||
path: `/getStockBought`,
|
||||
verb: 'GET'
|
||||
}
|
||||
});
|
||||
|
||||
Self.getStockBought = async(workerFk, dated = Date.vnNew()) => {
|
||||
const models = Self.app.models;
|
||||
const today = Date.vnNew();
|
||||
dated.setHours(0, 0, 0, 0);
|
||||
today.setHours(0, 0, 0, 0);
|
||||
|
||||
await models.StockBought.rawSql(`CALL vn.stockBought_calculate(?)`, [dated]);
|
||||
|
||||
const filter = {
|
||||
where: {dated},
|
||||
include: [
|
||||
{
|
||||
fields: ['workerFk', 'reserve', 'bought'],
|
||||
relation: 'worker',
|
||||
scope: {
|
||||
include: [
|
||||
{
|
||||
relation: 'user',
|
||||
scope: {
|
||||
fields: ['id', 'name']
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
if (workerFk) filter.where.workerFk = workerFk;
|
||||
|
||||
return models.StockBought.find(filter);
|
||||
};
|
||||
};
|
|
@ -0,0 +1,74 @@
|
|||
module.exports = Self => {
|
||||
Self.remoteMethod('getStockBoughtDetail', {
|
||||
description: 'Returns the detail of stock bought for a given date and a worker',
|
||||
accessType: 'READ',
|
||||
accepts: [{
|
||||
arg: 'workerFk',
|
||||
type: 'number',
|
||||
description: 'The worker to filter',
|
||||
required: true,
|
||||
}, {
|
||||
arg: 'dated',
|
||||
type: 'string',
|
||||
description: 'The date to filter',
|
||||
required: true,
|
||||
}
|
||||
],
|
||||
returns: {
|
||||
type: ['object'],
|
||||
root: true
|
||||
},
|
||||
http: {
|
||||
path: `/getStockBoughtDetail`,
|
||||
verb: 'GET'
|
||||
}
|
||||
});
|
||||
|
||||
Self.getStockBoughtDetail = async(workerFk, dated) => {
|
||||
const models = Self.app.models;
|
||||
const myOptions = {};
|
||||
let tx;
|
||||
let result;
|
||||
|
||||
if (typeof options == 'object')
|
||||
Object.assign(myOptions, options);
|
||||
|
||||
if (!myOptions.transaction) {
|
||||
tx = await Self.beginTransaction({});
|
||||
myOptions.transaction = tx;
|
||||
}
|
||||
|
||||
try {
|
||||
await models.StockBought.rawSql(`CALL vn.item_calculateStock(?)`, [dated], myOptions);
|
||||
result = await Self.rawSql(
|
||||
`SELECT b.entryFk entryFk,
|
||||
i.id itemFk,
|
||||
i.name itemName,
|
||||
ti.quantity,
|
||||
(ac.conversionCoefficient * (ti.quantity / b.packing) * buy_getVolume(b.id))
|
||||
/ (vc.trolleyM3 * 1000000) volume,
|
||||
b.packagingFk packagingFk,
|
||||
b.packing
|
||||
FROM tmp.item ti
|
||||
JOIN item i ON i.id = ti.itemFk
|
||||
JOIN itemType it ON i.typeFk = it.id
|
||||
JOIN itemCategory ic ON ic.id = it.categoryFk
|
||||
JOIN worker w ON w.id = it.workerFk
|
||||
JOIN auctionConfig ac
|
||||
JOIN tmp.buyUltimate bu ON bu.itemFk = i.id
|
||||
AND bu.warehouseFk = ac.warehouseFk
|
||||
JOIN buy b ON b.id = bu.buyFk
|
||||
JOIN volumeConfig vc
|
||||
WHERE ic.display
|
||||
AND w.id = ?`,
|
||||
[workerFk], myOptions
|
||||
);
|
||||
await Self.rawSql(`DROP TEMPORARY TABLE tmp.item, tmp.buyUltimate;`, [], myOptions);
|
||||
if (tx) await tx.commit();
|
||||
return result;
|
||||
} catch (e) {
|
||||
await tx.rollback();
|
||||
throw e;
|
||||
}
|
||||
};
|
||||
};
|
|
@ -25,5 +25,8 @@
|
|||
},
|
||||
"EntryType": {
|
||||
"dataSource": "vn"
|
||||
},
|
||||
"StockBought": {
|
||||
"dataSource": "vn"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
const UserError = require('vn-loopback/util/user-error');
|
||||
module.exports = Self => {
|
||||
require('../methods/stock-bought/getStockBought')(Self);
|
||||
require('../methods/stock-bought/getStockBoughtDetail')(Self);
|
||||
Self.rewriteDbError(function(err) {
|
||||
if (err.code === 'ER_DUP_ENTRY')
|
||||
return new UserError(`This buyer has already made a reservation for this date`);
|
||||
return err;
|
||||
});
|
||||
};
|
|
@ -0,0 +1,34 @@
|
|||
{
|
||||
"name": "StockBought",
|
||||
"base": "VnModel",
|
||||
"options": {
|
||||
"mysql": {
|
||||
"table": "stockBought"
|
||||
}
|
||||
},
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "number",
|
||||
"id": true
|
||||
},
|
||||
"workerFk": {
|
||||
"type": "number"
|
||||
},
|
||||
"bought": {
|
||||
"type": "number"
|
||||
},
|
||||
"reserve": {
|
||||
"type": "number"
|
||||
},
|
||||
"dated": {
|
||||
"type": "date"
|
||||
}
|
||||
},
|
||||
"relations": {
|
||||
"worker": {
|
||||
"type": "belongsTo",
|
||||
"model": "Worker",
|
||||
"foreignKey": "workerFk"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
<slot-descriptor>
|
||||
<vn-entry-descriptor></vn-entry-descriptor>
|
||||
</slot-descriptor>
|
|
@ -0,0 +1,9 @@
|
|||
import ngModule from '../module';
|
||||
import DescriptorPopover from 'salix/components/descriptor-popover';
|
||||
|
||||
class Controller extends DescriptorPopover {}
|
||||
|
||||
ngModule.vnComponent('vnEntryDescriptorPopover', {
|
||||
slotTemplate: require('./index.html'),
|
||||
controller: Controller
|
||||
});
|
|
@ -0,0 +1,65 @@
|
|||
<vn-descriptor-content
|
||||
module="entry"
|
||||
description="$ctrl.entry.supplier.nickname"
|
||||
summary="$ctrl.$.summary">
|
||||
<slot-menu>
|
||||
<vn-item
|
||||
ng-click="$ctrl.showEntryReport()"
|
||||
translate>
|
||||
Show entry report
|
||||
</vn-item>
|
||||
</slot-menu>
|
||||
<slot-body>
|
||||
<div class="attributes">
|
||||
<vn-label-value label="Agency "
|
||||
value="{{$ctrl.entry.travel.agency.name}}">
|
||||
</vn-label-value>
|
||||
<vn-label-value label="Landed"
|
||||
value="{{$ctrl.entry.travel.landed | date: 'dd/MM/yyyy'}}">
|
||||
</vn-label-value>
|
||||
<vn-label-value label="Warehouse Out"
|
||||
value="{{$ctrl.entry.travel.warehouseOut.name}}">
|
||||
</vn-label-value>
|
||||
</div>
|
||||
<div class="icons">
|
||||
<vn-icon
|
||||
vn-tooltip="Is inventory entry"
|
||||
icon="icon-inventory"
|
||||
ng-if="$ctrl.entry.isExcludedFromAvailable">
|
||||
</vn-icon>
|
||||
<vn-icon
|
||||
vn-tooltip="Is virtual entry"
|
||||
icon="icon-net"
|
||||
ng-if="$ctrl.entry.isRaid">
|
||||
</vn-icon>
|
||||
</div>
|
||||
<div class="quicklinks">
|
||||
<div ng-transclude="btnOne">
|
||||
<vn-quick-link
|
||||
tooltip="Supplier card"
|
||||
state="['supplier.index', {q: $ctrl.entry.supplier.id }]"
|
||||
icon="icon-supplier">
|
||||
</vn-quick-link>
|
||||
</div>
|
||||
<div ng-transclude="btnTwo">
|
||||
<vn-quick-link
|
||||
tooltip="All travels with current agency"
|
||||
state="['travel.index', {q: $ctrl.travelFilter}]"
|
||||
icon="local_airport">
|
||||
</vn-quick-link>
|
||||
</div>
|
||||
<div ng-transclude="btnThree">
|
||||
<vn-quick-link
|
||||
tooltip="All entries with current supplier"
|
||||
state="['entry.index', {q: $ctrl.entryFilter}]"
|
||||
icon="icon-entry">
|
||||
</vn-quick-link>
|
||||
</div>
|
||||
<div ng-transclude="btnThree">
|
||||
</div>
|
||||
</div>
|
||||
</slot-body>
|
||||
</vn-descriptor-content>
|
||||
<vn-popup vn-id="summary">
|
||||
<vn-entry-summary entry="$ctrl.entry"></vn-entry-summary>
|
||||
</vn-popup>
|
|
@ -0,0 +1,99 @@
|
|||
import ngModule from '../module';
|
||||
import Descriptor from 'salix/components/descriptor';
|
||||
|
||||
class Controller extends Descriptor {
|
||||
get entry() {
|
||||
return this.entity;
|
||||
}
|
||||
|
||||
set entry(value) {
|
||||
this.entity = value;
|
||||
}
|
||||
|
||||
get travelFilter() {
|
||||
let travelFilter;
|
||||
const entryTravel = this.entry && this.entry.travel;
|
||||
|
||||
if (entryTravel && entryTravel.agencyModeFk) {
|
||||
travelFilter = this.entry && JSON.stringify({
|
||||
agencyModeFk: entryTravel.agencyModeFk
|
||||
});
|
||||
}
|
||||
return travelFilter;
|
||||
}
|
||||
|
||||
get entryFilter() {
|
||||
let entryTravel = this.entry && this.entry.travel;
|
||||
|
||||
if (!entryTravel || !entryTravel.landed) return null;
|
||||
|
||||
const date = new Date(entryTravel.landed);
|
||||
date.setHours(0, 0, 0, 0);
|
||||
|
||||
const from = new Date(date.getTime());
|
||||
from.setDate(from.getDate() - 10);
|
||||
|
||||
const to = new Date(date.getTime());
|
||||
to.setDate(to.getDate() + 10);
|
||||
|
||||
return JSON.stringify({
|
||||
supplierFk: this.entry.supplierFk,
|
||||
from,
|
||||
to
|
||||
});
|
||||
}
|
||||
|
||||
loadData() {
|
||||
const filter = {
|
||||
include: [
|
||||
{
|
||||
relation: 'travel',
|
||||
scope: {
|
||||
fields: ['id', 'landed', 'agencyModeFk', 'warehouseOutFk'],
|
||||
include: [
|
||||
{
|
||||
relation: 'agency',
|
||||
scope: {
|
||||
fields: ['name']
|
||||
}
|
||||
},
|
||||
{
|
||||
relation: 'warehouseOut',
|
||||
scope: {
|
||||
fields: ['name']
|
||||
}
|
||||
},
|
||||
{
|
||||
relation: 'warehouseIn',
|
||||
scope: {
|
||||
fields: ['name']
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
relation: 'supplier',
|
||||
scope: {
|
||||
fields: ['id', 'nickname']
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
return this.getData(`Entries/${this.id}`, {filter})
|
||||
.then(res => this.entity = res.data);
|
||||
}
|
||||
|
||||
showEntryReport() {
|
||||
this.vnReport.show(`Entries/${this.id}/entry-order-pdf`);
|
||||
}
|
||||
}
|
||||
|
||||
ngModule.vnComponent('vnEntryDescriptor', {
|
||||
template: require('./index.html'),
|
||||
controller: Controller,
|
||||
bindings: {
|
||||
entry: '<'
|
||||
}
|
||||
});
|
|
@ -1,3 +1,6 @@
|
|||
export * from './module';
|
||||
|
||||
import './main';
|
||||
import './descriptor';
|
||||
import './descriptor-popover';
|
||||
import './summary';
|
||||
|
|
|
@ -8,6 +8,12 @@
|
|||
"main": [
|
||||
{"state": "entry.index", "icon": "icon-entry"},
|
||||
{"state": "entry.latestBuys", "icon": "contact_support"}
|
||||
],
|
||||
"card": [
|
||||
{"state": "entry.card.basicData", "icon": "settings"},
|
||||
{"state": "entry.card.buy.index", "icon": "icon-lines"},
|
||||
{"state": "entry.card.observation", "icon": "insert_drive_file"},
|
||||
{"state": "entry.card.log", "icon": "history"}
|
||||
]
|
||||
},
|
||||
"keybindings": [
|
||||
|
@ -27,6 +33,90 @@
|
|||
"component": "vn-entry-index",
|
||||
"description": "Entries",
|
||||
"acl": ["buyer", "administrative"]
|
||||
},
|
||||
{
|
||||
"url": "/latest-buys?q",
|
||||
"state": "entry.latestBuys",
|
||||
"component": "vn-entry-latest-buys",
|
||||
"description": "Latest buys",
|
||||
"acl": ["buyer", "administrative"]
|
||||
},
|
||||
{
|
||||
"url": "/create?supplierFk&travelFk&companyFk",
|
||||
"state": "entry.create",
|
||||
"component": "vn-entry-create",
|
||||
"description": "New entry",
|
||||
"acl": ["buyer", "administrative"]
|
||||
},
|
||||
{
|
||||
"url": "/:id",
|
||||
"state": "entry.card",
|
||||
"abstract": true,
|
||||
"component": "vn-entry-card"
|
||||
},
|
||||
{
|
||||
"url": "/summary",
|
||||
"state": "entry.card.summary",
|
||||
"component": "vn-entry-summary",
|
||||
"description": "Summary",
|
||||
"params": {
|
||||
"entry": "$ctrl.entry"
|
||||
},
|
||||
"acl": ["buyer", "administrative"]
|
||||
},
|
||||
{
|
||||
"url": "/basic-data",
|
||||
"state": "entry.card.basicData",
|
||||
"component": "vn-entry-basic-data",
|
||||
"description": "Basic data",
|
||||
"params": {
|
||||
"entry": "$ctrl.entry"
|
||||
},
|
||||
"acl": ["buyer", "administrative"]
|
||||
},
|
||||
{
|
||||
"url": "/observation",
|
||||
"state": "entry.card.observation",
|
||||
"component": "vn-entry-observation",
|
||||
"description": "Notes",
|
||||
"params": {
|
||||
"entry": "$ctrl.entry"
|
||||
},
|
||||
"acl": ["buyer", "administrative"]
|
||||
},
|
||||
{
|
||||
"url" : "/log",
|
||||
"state": "entry.card.log",
|
||||
"component": "vn-entry-log",
|
||||
"description": "Log",
|
||||
"acl": ["buyer", "administrative"]
|
||||
},
|
||||
{
|
||||
"url": "/buy",
|
||||
"state": "entry.card.buy",
|
||||
"abstract": true,
|
||||
"component": "ui-view",
|
||||
"acl": ["buyer"]
|
||||
},
|
||||
{
|
||||
"url" : "/index",
|
||||
"state": "entry.card.buy.index",
|
||||
"component": "vn-entry-buy-index",
|
||||
"description": "Buys",
|
||||
"params": {
|
||||
"entry": "$ctrl.entry"
|
||||
},
|
||||
"acl": ["buyer", "administrative"]
|
||||
},
|
||||
{
|
||||
"url" : "/import",
|
||||
"state": "entry.card.buy.import",
|
||||
"component": "vn-entry-buy-import",
|
||||
"description": "Import buys",
|
||||
"params": {
|
||||
"entry": "$ctrl.entry"
|
||||
},
|
||||
"acl": ["buyer"]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -0,0 +1,195 @@
|
|||
<vn-crud-model
|
||||
vn-id="buysModel"
|
||||
url="Entries/{{$ctrl.entry.id}}/getBuys"
|
||||
limit="5"
|
||||
data="buys"
|
||||
auto-load="true">
|
||||
</vn-crud-model>
|
||||
<vn-card class="summary">
|
||||
<h5>
|
||||
<a ng-if="::$ctrl.entryData.id"
|
||||
vn-tooltip="Go to the entry"
|
||||
ui-sref="entry.card.summary({id: {{::$ctrl.entryData.id}}})"
|
||||
name="goToSummary">
|
||||
<vn-icon-button icon="launch"></vn-icon-button>
|
||||
</a>
|
||||
<span> #{{$ctrl.entryData.id}} - {{$ctrl.entryData.supplier.nickname}}</span>
|
||||
</h5>
|
||||
<vn-horizontal>
|
||||
<vn-one>
|
||||
<vn-label-value label="Commission"
|
||||
value="{{$ctrl.entryData.commission}}">
|
||||
</vn-label-value>
|
||||
<vn-label-value label="Currency"
|
||||
value="{{$ctrl.entryData.currency.name}}">
|
||||
</vn-label-value>
|
||||
<vn-label-value label="Company"
|
||||
value="{{$ctrl.entryData.company.code}}">
|
||||
</vn-label-value>
|
||||
<vn-label-value label="Reference"
|
||||
value="{{$ctrl.entryData.reference}}">
|
||||
</vn-label-value>
|
||||
<vn-label-value label="Invoice number"
|
||||
value="{{$ctrl.entryData.invoiceNumber}}">
|
||||
</vn-label-value>
|
||||
</vn-one>
|
||||
<vn-one>
|
||||
<vn-label-value label="Reference">
|
||||
<span
|
||||
ng-click="travelDescriptor.show($event, $ctrl.entryData.travel.id)"
|
||||
class="link">
|
||||
{{$ctrl.entryData.travel.ref}}
|
||||
</span>
|
||||
</vn-label-value>
|
||||
<vn-label-value label="Agency"
|
||||
value="{{$ctrl.entryData.travel.agency.name}}">
|
||||
</vn-label-value>
|
||||
<vn-label-value label="Shipped"
|
||||
value="{{$ctrl.entryData.travel.shipped | date: 'dd/MM/yyyy'}}">
|
||||
</vn-label-value>
|
||||
<vn-label-value label="Warehouse Out"
|
||||
value="{{$ctrl.entryData.travel.warehouseOut.name}}">
|
||||
</vn-label-value>
|
||||
<vn-check
|
||||
label="Delivered"
|
||||
ng-model="$ctrl.entryData.travel.isDelivered"
|
||||
disabled="true">
|
||||
</vn-check>
|
||||
<vn-label-value label="Landed"
|
||||
value="{{$ctrl.entryData.travel.landed | date: 'dd/MM/yyyy'}}">
|
||||
</vn-label-value>
|
||||
<vn-label-value label="Warehouse In"
|
||||
value="{{$ctrl.entryData.travel.warehouseIn.name}}">
|
||||
</vn-label-value>
|
||||
<vn-check
|
||||
label="Received"
|
||||
ng-model="$ctrl.entryData.travel.isReceived"
|
||||
disabled="true">
|
||||
</vn-check>
|
||||
</vn-one>
|
||||
<vn-one>
|
||||
<vn-vertical>
|
||||
<vn-check
|
||||
label="Ordered"
|
||||
ng-model="$ctrl.entryData.isOrdered"
|
||||
disabled="true">
|
||||
</vn-check>
|
||||
<vn-check
|
||||
label="Confirmed"
|
||||
ng-model="$ctrl.entryData.isConfirmed"
|
||||
disabled="true">
|
||||
</vn-check>
|
||||
<vn-check
|
||||
label="Booked"
|
||||
ng-model="$ctrl.entryData.isBooked"
|
||||
disabled="true">
|
||||
</vn-check>
|
||||
<vn-check
|
||||
label="Raid"
|
||||
ng-model="$ctrl.entryData.isRaid"
|
||||
disabled="true">
|
||||
</vn-check>
|
||||
<vn-check
|
||||
label="Inventory"
|
||||
ng-model="$ctrl.entryData.isExcludedFromAvailable"
|
||||
disabled="true">
|
||||
</vn-check>
|
||||
</vn-vertical>
|
||||
</vn-one>
|
||||
</vn-horizontal>
|
||||
<vn-horizontal>
|
||||
<vn-auto name="buys">
|
||||
<h4 translate>Buys</h4>
|
||||
<table class="vn-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th translate center field="quantity">Quantity</th>
|
||||
<th translate center field="sticker">Stickers</th>
|
||||
<th translate center field="packagingFk">Package</th>
|
||||
<th translate center field="weight">Weight</th>
|
||||
<th translate center field="packing">Packing</th>
|
||||
<th translate center field="grouping">Grouping</th>
|
||||
<th translate center field="buyingValue">Buying value</th>
|
||||
<th translate center field="price3">Import</th>
|
||||
<th translate center expand field="price">PVP</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody ng-repeat="line in buys">
|
||||
<tr>
|
||||
<td center title="{{::line.quantity}}">{{::line.quantity}}</td>
|
||||
<td center title="{{::line.stickers | dashIfEmpty}}">{{::line.stickers | dashIfEmpty}}</td>
|
||||
<td center title="{{::line.packagingFk | dashIfEmpty}}">{{::line.packagingFk | dashIfEmpty}}</td>
|
||||
<td center title="{{::line.weight}}">{{::line.weight}}</td>
|
||||
<td center>
|
||||
<vn-chip class="transparent" translate-attr="line.groupingMode == 'packing' ? {title: 'Minimun amount'} : {title: 'Packing'}" ng-class="{'message': line.groupingMode == 'packing'}">
|
||||
<span>{{::line.packing | dashIfEmpty}}</span>
|
||||
</vn-chip>
|
||||
</td>
|
||||
<td center>
|
||||
<vn-chip class="transparent" translate-attr="line.groupingMode == 'grouping' ? {title: 'Minimun amount'} : {title: 'Grouping'}" ng-class="{'message': line.groupingMode == 'grouping'}">
|
||||
<span>{{::line.grouping | dashIfEmpty}}</span>
|
||||
</vn-chip>
|
||||
</vn-td>
|
||||
<td center title="{{::line.buyingValue | currency: 'EUR':2}}">{{::line.buyingValue | currency: 'EUR':2}}</td>
|
||||
<td center title="{{::line.quantity * line.buyingValue | currency: 'EUR':2}}">{{::line.quantity * line.buyingValue | currency: 'EUR':2}}</td>
|
||||
<td center title="Grouping / Packing">{{::line.price2 | currency: 'EUR':2 | dashIfEmpty}} / {{::line.price3 | currency: 'EUR':2 | dashIfEmpty}}</td>
|
||||
</tr>
|
||||
<tr class="dark-row">
|
||||
<td shrink>
|
||||
<span
|
||||
translate-attr="{title: 'Item type'}">
|
||||
{{::line.item.itemType.code}}
|
||||
</span>
|
||||
</td>
|
||||
<td shrink>
|
||||
<span
|
||||
ng-click="itemDescriptor.show($event, line.item.id)"
|
||||
class="link">
|
||||
{{::line.item.id}}
|
||||
</span>
|
||||
</td>
|
||||
<td number shrink>
|
||||
<span
|
||||
translate-attr="{title: 'Item size'}">
|
||||
{{::line.item.size}}
|
||||
</span>
|
||||
</td>
|
||||
<td center>
|
||||
<span
|
||||
translate-attr="{title: 'Minimum price'}">
|
||||
{{::line.item.minPrice | currency: 'EUR':2}}
|
||||
</span>
|
||||
</td>
|
||||
<td vn-fetched-tags colspan="6">
|
||||
<div>
|
||||
<vn-one title="{{::line.item.concept}}">{{::line.item.name}}</vn-one>
|
||||
<vn-one ng-if="::line.item.subName">
|
||||
<h3 title="{{::line.item.subName}}">{{::line.item.subName}}</h3>
|
||||
</vn-one>
|
||||
</div>
|
||||
<vn-fetched-tags
|
||||
max-length="6"
|
||||
item="::line.item"
|
||||
tabindex="-1">
|
||||
</vn-fetched-tags>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="empty-row">
|
||||
<td colspan="10"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<vn-pagination
|
||||
model="buysModel"
|
||||
class="vn-pt-xs">
|
||||
</vn-pagination>
|
||||
</vn-auto>
|
||||
</vn-horizontal>
|
||||
</vn-card>
|
||||
<vn-item-descriptor-popover
|
||||
vn-id="item-descriptor"
|
||||
warehouse-fk="$ctrl.vnConfig.warehouseFk">
|
||||
</vn-item-descriptor-popover>
|
||||
<vn-travel-descriptor-popover
|
||||
vn-id="travelDescriptor">
|
||||
</vn-travel-descriptor-popover>
|
|
@ -0,0 +1,33 @@
|
|||
import ngModule from '../module';
|
||||
import './style.scss';
|
||||
import Summary from 'salix/components/summary';
|
||||
|
||||
class Controller extends Summary {
|
||||
get entry() {
|
||||
if (!this._entry)
|
||||
return this.$params;
|
||||
|
||||
return this._entry;
|
||||
}
|
||||
|
||||
set entry(value) {
|
||||
this._entry = value;
|
||||
|
||||
if (value && value.id)
|
||||
this.getEntryData();
|
||||
}
|
||||
|
||||
getEntryData() {
|
||||
return this.$http.get(`Entries/${this.entry.id}/getEntry`).then(response => {
|
||||
this.entryData = response.data;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
ngModule.vnComponent('vnEntrySummary', {
|
||||
template: require('./index.html'),
|
||||
controller: Controller,
|
||||
bindings: {
|
||||
entry: '<'
|
||||
}
|
||||
});
|
|
@ -0,0 +1,30 @@
|
|||
@import "variables";
|
||||
|
||||
|
||||
vn-entry-summary .summary {
|
||||
max-width: $width-lg;
|
||||
|
||||
.dark-row {
|
||||
background-color: lighten($color-marginal, 10%);
|
||||
}
|
||||
|
||||
tbody tr:nth-child(1) {
|
||||
border-top: $border-thin;
|
||||
}
|
||||
|
||||
tbody tr:nth-child(1),
|
||||
tbody tr:nth-child(2) {
|
||||
border-left: $border-thin;
|
||||
border-right: $border-thin
|
||||
}
|
||||
|
||||
tbody tr:nth-child(3) {
|
||||
height: inherit
|
||||
}
|
||||
|
||||
tr {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
$color-font-link-medium: lighten($color-font-link, 20%)
|
|
@ -64,7 +64,7 @@ module.exports = Self => {
|
|||
try {
|
||||
const client = await models.Client.findById(args.clientId, {
|
||||
fields: ['id', 'hasToInvoiceByAddress']
|
||||
}, options);
|
||||
}, myOptions);
|
||||
|
||||
if (client.hasToInvoiceByAddress) {
|
||||
await Self.rawSql('CALL ticketToInvoiceByAddress(?, ?, ?, ?)', [
|
||||
|
@ -72,13 +72,13 @@ module.exports = Self => {
|
|||
args.maxShipped,
|
||||
args.addressId,
|
||||
args.companyFk
|
||||
], options);
|
||||
], myOptions);
|
||||
} else {
|
||||
await Self.rawSql('CALL invoiceFromClient(?, ?, ?)', [
|
||||
args.maxShipped,
|
||||
client.id,
|
||||
args.companyFk
|
||||
], options);
|
||||
], myOptions);
|
||||
}
|
||||
|
||||
const invoiceId = await models.Ticket.makeInvoice(
|
||||
|
@ -87,7 +87,7 @@ module.exports = Self => {
|
|||
args.companyFk,
|
||||
args.invoiceDate,
|
||||
null,
|
||||
options
|
||||
myOptions
|
||||
);
|
||||
|
||||
if (tx) await tx.commit();
|
||||
|
|
|
@ -38,9 +38,13 @@ module.exports = Self => {
|
|||
|
||||
const itemShelving = itemShelvingSale.itemShelving();
|
||||
const quantity = itemShelving.visible + itemShelvingSale.quantity;
|
||||
const available = itemShelving.available + itemShelvingSale.quantity;
|
||||
|
||||
await itemShelving.updateAttributes(
|
||||
{visible: quantity},
|
||||
{
|
||||
visible: quantity,
|
||||
available: available
|
||||
},
|
||||
myOptions
|
||||
);
|
||||
if (tx) await tx.commit();
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
"name": "Items",
|
||||
"icon": "icon-item",
|
||||
"validations" : true,
|
||||
"dependencies": ["worker", "client", "ticket"],
|
||||
"dependencies": ["worker", "client", "ticket", "entry"],
|
||||
"menus": {
|
||||
"main": [
|
||||
{"state": "item.index", "icon": "icon-item"},
|
||||
|
|
|
@ -39,8 +39,6 @@ module.exports = Self => {
|
|||
const {reportMail} = agencyMode();
|
||||
let user;
|
||||
let account;
|
||||
let userEmail;
|
||||
ctx.args.recipients = reportMail ? reportMail.split(',').map(email => email.trim()) : [];
|
||||
|
||||
if (workerFk) {
|
||||
user = await models.VnUser.findById(workerFk, {
|
||||
|
@ -50,17 +48,10 @@ module.exports = Self => {
|
|||
account = await models.Account.findById(workerFk);
|
||||
}
|
||||
|
||||
if (user?.active && account)
|
||||
userEmail = user.emailUser().email;
|
||||
|
||||
if (userEmail)
|
||||
ctx.args.recipients.push(userEmail);
|
||||
|
||||
ctx.args.recipients = [...new Set(ctx.args.recipients)];
|
||||
|
||||
if (!ctx.args.recipients.length)
|
||||
throw new UserError('An email is necessary');
|
||||
if (user?.active && account) ctx.args.recipient = user.emailUser().email;
|
||||
else ctx.args.recipient = reportMail;
|
||||
|
||||
if (!ctx.args.recipient) throw new UserError('An email is necessary');
|
||||
return Self.sendTemplate(ctx, 'driver-route');
|
||||
};
|
||||
};
|
||||
|
|
|
@ -75,7 +75,11 @@ module.exports = Self => {
|
|||
|
||||
const itemShelving = await models.ItemShelving.findById(itemShelvingFk, null, myOptions);
|
||||
|
||||
await itemShelving.updateAttributes({visible: itemShelving.visible - quantity}, myOptions);
|
||||
await itemShelving.updateAttributes(
|
||||
{
|
||||
visible: itemShelving.visible - quantity,
|
||||
available: itemShelving.available - quantity
|
||||
}, myOptions);
|
||||
|
||||
await Self.updateAll(
|
||||
{saleFk},
|
||||
|
|
|
@ -142,12 +142,19 @@ module.exports = Self => {
|
|||
ctx.args.addressId = ticket.addressFk;
|
||||
|
||||
const newTicket = await models.Ticket.new(ctx, myOptions);
|
||||
|
||||
await models.TicketRefund.create({
|
||||
originalTicketFk: ticketId,
|
||||
refundTicketFk: newTicket.id
|
||||
}, myOptions);
|
||||
|
||||
const existingRefund = await models.TicketRefund.findOne({
|
||||
where: {
|
||||
originalTicketFk: ticketId,
|
||||
refundTicketFk: newTicket.id
|
||||
},
|
||||
myOptions
|
||||
});
|
||||
if (!existingRefund) {
|
||||
await models.TicketRefund.create({
|
||||
originalTicketFk: ticketId,
|
||||
refundTicketFk: newTicket.id
|
||||
}, myOptions);
|
||||
}
|
||||
return newTicket;
|
||||
}
|
||||
};
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
"name": "Travels",
|
||||
"icon": "local_airport",
|
||||
"validations": true,
|
||||
"dependencies": ["worker"],
|
||||
"dependencies": ["worker", "entry"],
|
||||
"menus": {
|
||||
"main": [
|
||||
{"state": "travel.index", "icon": "local_airport"},
|
||||
|
|
|
@ -82,7 +82,7 @@ module.exports = Self => {
|
|||
const getDataOperator = await models.Operator.findOne({
|
||||
where: {workerFk: user.id},
|
||||
fields: ['numberOfWagons', 'warehouseFk', 'itemPackingTypeFk', 'sectorFk', 'sector',
|
||||
'trainFk', 'train', 'labelerFk', 'printer'],
|
||||
'trainFk', 'train', 'labelerFk', 'printer', 'isOnReservationMode'],
|
||||
include: [
|
||||
{
|
||||
relation: 'sector',
|
||||
|
|
|
@ -69,6 +69,7 @@ fixtures:
|
|||
- siiTypeInvoiceOut
|
||||
- state
|
||||
- ticketUpdateAction
|
||||
- ticketCanAdvanceConfig
|
||||
- volumeConfig
|
||||
- workCenter
|
||||
- workerTimeControlError
|
||||
|
|
Loading…
Reference in New Issue