This commit is contained in:
parent
d1dfa126c0
commit
0473f1de82
|
@ -5,18 +5,21 @@ CREATE DEFINER=`root`@`%` FUNCTION `vn`.`clientGetMana`(vClient INT) RETURNS dec
|
|||
DETERMINISTIC
|
||||
BEGIN
|
||||
/**
|
||||
* Devuelve el maná del cliente.
|
||||
* Devuelve el mana del cliente.
|
||||
*
|
||||
* @param vClient Id del cliente
|
||||
* @return Maná del cliente
|
||||
* @return Mana del cliente
|
||||
*/
|
||||
DECLARE vMana DECIMAL(10,2);
|
||||
DECLARE vFromDated DATE;
|
||||
DECLARE vHasMana BOOLEAN;
|
||||
DECLARE vManaComponent INT;
|
||||
DECLARE vAutoManaComponent INT;
|
||||
DECLARE vManaBank INT DEFAULT 66;
|
||||
DECLARE vManaBank INT;
|
||||
DECLARE vManaGreugeType INT;
|
||||
|
||||
SELECT id INTO vManaGreugeType FROM greugeType WHERE code = 'mana';
|
||||
SELECT id INTO vManaBank FROM bank WHERE code = 'mana';
|
||||
SELECT id INTO vManaComponent FROM component WHERE code = 'mana';
|
||||
SELECT id INTO vAutoManaComponent FROM component WHERE code = 'autoMana';
|
||||
|
||||
|
@ -57,17 +60,15 @@ BEGIN
|
|||
AND r.payed <= CURDATE()
|
||||
AND c.id = vClient
|
||||
UNION ALL
|
||||
SELECT g.Importe
|
||||
FROM vn2008.Greuges g
|
||||
JOIN vn2008.Clientes c using(Id_Cliente)
|
||||
WHERE g.Greuges_type_id = 3 -- Maná
|
||||
AND g.Fecha > vFromDated
|
||||
AND g.Fecha <= CURDATE()
|
||||
AND c.Id_Cliente = vClient
|
||||
SELECT g.amount
|
||||
FROM greuge g
|
||||
JOIN client c ON c.id = g.clientFk
|
||||
WHERE g.greugeTypeFk = vManaGreugeType
|
||||
AND g.shipped > vFromDated
|
||||
AND g.shipped <= CURDATE()
|
||||
AND c.id = vClient
|
||||
) sub;
|
||||
|
||||
RETURN IFNULL(vMana,0);
|
||||
|
||||
END$$
|
||||
|
||||
DELIMITER ;
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
DROP procedure IF EXISTS `vn2008`.`notify_passport`;
|
||||
|
||||
DELIMITER $$
|
||||
CREATE DEFINER=`root`@`%` PROCEDURE `vn2008`.`notify_passport`(
|
||||
IN vItemFk INT,
|
||||
IN vStickers SMALLINT,
|
||||
IN vPacking SMALLINT,
|
||||
IN vBuyFk INT
|
||||
)
|
||||
BEGIN
|
||||
-- DPRECATED use vn.buy_notifyPassport
|
||||
CALL vn.buy_notifyPassport(vBuyFk, vItemFk, vStickers, vPacking);
|
||||
END$$
|
||||
|
||||
DELIMITER ;
|
||||
|
|
@ -8918,7 +8918,7 @@ CREATE TABLE `cache_calc` (
|
|||
KEY `cache_id` (`cache_id`),
|
||||
KEY `cacheName` (`cacheName`),
|
||||
KEY `expires` (`expires`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=437035 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=437042 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
@ -10033,7 +10033,7 @@ CREATE TABLE `deliveryInformation` (
|
|||
KEY `fgbSupplyResponse_idx2` (`FirstOrderDateTime`),
|
||||
KEY `fgbSupplyResponse_idx3` (`LatestOrderDateTime`),
|
||||
CONSTRAINT `fgbSupplyResponse` FOREIGN KEY (`supplyResponseID`) REFERENCES `supplyResponse` (`ID`) ON DELETE CASCADE ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=24393221 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=24393824 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
@ -10091,7 +10091,7 @@ CREATE TABLE `ekt` (
|
|||
KEY `barcode` (`barcode`),
|
||||
KEY `fec` (`fec`),
|
||||
KEY `putOrderFk` (`putOrderFk`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=1112531 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=1112639 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
@ -10112,7 +10112,7 @@ CREATE TABLE `exchange` (
|
|||
KEY `buy_edi_id` (`ektFk`),
|
||||
CONSTRAINT `exchange_ibfk_1` FOREIGN KEY (`mailFk`) REFERENCES `mail` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||
CONSTRAINT `exchange_ibfk_2` FOREIGN KEY (`ektFk`) REFERENCES `ekt` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=653193 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=653301 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
@ -10374,7 +10374,7 @@ CREATE TABLE `mail` (
|
|||
UNIQUE KEY `mail_id` (`messageId`),
|
||||
KEY `sender_id` (`senderFk`),
|
||||
CONSTRAINT `mail_ibfk_2` FOREIGN KEY (`senderFk`) REFERENCES `mailSender` (`id`) ON DELETE NO ACTION ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=683079 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=683172 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
@ -10630,7 +10630,7 @@ CREATE TABLE `supplyResponse` (
|
|||
PRIMARY KEY (`ID`),
|
||||
UNIQUE KEY `ID_UNIQUE` (`ID`),
|
||||
KEY `IX_TransNumber` (`TransactionNumber`) COMMENT 'Agregado por Ernesto 11.6.2019\nSe ejecutaba 1 consulta por segundo desde MAIL y consumia un 20% de CPU de todo el servidor !!!!!\nCPU usada es mas estable que Indice en SendererID, cpu vs espacio que ocupa?\n'
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=8947741 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=8947858 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
@ -11327,7 +11327,7 @@ CREATE TABLE `image` (
|
|||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `collection` (`collectionFk`,`name`),
|
||||
CONSTRAINT `image_ibfk_1` FOREIGN KEY (`collectionFk`) REFERENCES `imageCollection` (`name`) ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=171831 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=171862 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
@ -12008,7 +12008,7 @@ CREATE TABLE `order` (
|
|||
CONSTRAINT `order_ibfk_5` FOREIGN KEY (`address_id`) REFERENCES `vn`.`address` (`id`) ON UPDATE CASCADE,
|
||||
CONSTRAINT `order_ibfk_8` FOREIGN KEY (`delivery_method_id`) REFERENCES `vn`.`deliveryMethod` (`id`) ON UPDATE CASCADE,
|
||||
CONSTRAINT `order_ibfk_9` FOREIGN KEY (`agency_id`) REFERENCES `vn`.`agencyMode` (`id`) ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=2247959 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=2247972 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
||||
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
||||
|
@ -12127,7 +12127,7 @@ CREATE TABLE `orderRow` (
|
|||
KEY `warehouse_shipment` (`warehouseFk`,`shipment`),
|
||||
CONSTRAINT `orderRow_ibfk_2` FOREIGN KEY (`itemFk`) REFERENCES `vn`.`item` (`id`) ON UPDATE CASCADE,
|
||||
CONSTRAINT `orderRow_ibfk_3` FOREIGN KEY (`orderFk`) REFERENCES `order` (`id`) ON DELETE NO ACTION ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=13471735 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=13471768 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
||||
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
||||
|
@ -12551,7 +12551,7 @@ CREATE TABLE `tpvTransaction` (
|
|||
CONSTRAINT `receipt_id` FOREIGN KEY (`receiptFk`) REFERENCES `vn`.`receipt` (`Id`) ON DELETE SET NULL ON UPDATE CASCADE,
|
||||
CONSTRAINT `tpvTransaction_ibfk_1` FOREIGN KEY (`clientFk`) REFERENCES `vn`.`client` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||
CONSTRAINT `tpvTransaction_ibfk_2` FOREIGN KEY (`merchantFk`) REFERENCES `tpvMerchant` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=372874 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Transactions realized through the virtual TPV';
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=372875 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Transactions realized through the virtual TPV';
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
@ -12586,7 +12586,7 @@ CREATE TABLE `visit` (
|
|||
PRIMARY KEY (`id`),
|
||||
KEY `firstAgent` (`firstAgentFk`),
|
||||
CONSTRAINT `visit_ibfk_1` FOREIGN KEY (`firstAgentFk`) REFERENCES `visitAgent` (`id`) ON DELETE SET NULL ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=2008312 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=2008351 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
@ -12606,7 +12606,7 @@ CREATE TABLE `visitAccess` (
|
|||
KEY `visit_access_idx_agent` (`agentFk`),
|
||||
KEY `stamp` (`stamp`),
|
||||
CONSTRAINT `visitAccess_ibfk_1` FOREIGN KEY (`agentFk`) REFERENCES `visitAgent` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=4484736 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=4484795 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
@ -12631,7 +12631,7 @@ CREATE TABLE `visitAgent` (
|
|||
KEY `firstAccess` (`firstAccessFk`),
|
||||
CONSTRAINT `visitAgent_ibfk_1` FOREIGN KEY (`visitFk`) REFERENCES `visit` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||
CONSTRAINT `visitAgent_ibfk_2` FOREIGN KEY (`firstAccessFk`) REFERENCES `visitAccess` (`id`) ON DELETE SET NULL ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=2655432 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=2655475 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
@ -12651,7 +12651,7 @@ CREATE TABLE `visitUser` (
|
|||
KEY `date_time` (`stamp`),
|
||||
KEY `user_id` (`userFk`),
|
||||
CONSTRAINT `visitUser_ibfk_1` FOREIGN KEY (`accessFk`) REFERENCES `visitAccess` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=3927228 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=3927275 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
@ -20180,7 +20180,7 @@ CREATE TABLE `XDiario` (
|
|||
PRIMARY KEY (`id`),
|
||||
KEY `empresa_id` (`empresa_id`),
|
||||
CONSTRAINT `XDiario_ibfk_1` FOREIGN KEY (`empresa_id`) REFERENCES `company` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=4055070 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=4055076 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
||||
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
||||
|
@ -20933,6 +20933,7 @@ CREATE TABLE `bank` (
|
|||
`entityFk` int(10) unsigned NOT NULL,
|
||||
`isActive` tinyint(4) NOT NULL DEFAULT '1',
|
||||
`currencyFk` tinyint(3) unsigned DEFAULT '1',
|
||||
`code` varchar(45) COLLATE utf8_unicode_ci DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `BancosBanco` (`bank`),
|
||||
KEY `fk_Bancos_entity1_idx` (`entityFk`),
|
||||
|
@ -21119,7 +21120,7 @@ CREATE TABLE `buy` (
|
|||
CONSTRAINT `buy_ibfk_3` FOREIGN KEY (`containerFk`) REFERENCES `vn2008`.`container` (`container_id`) ON UPDATE CASCADE,
|
||||
CONSTRAINT `buy_id` FOREIGN KEY (`entryFk`) REFERENCES `entry` (`id`) ON DELETE NO ACTION ON UPDATE CASCADE,
|
||||
CONSTRAINT `buy_itemfk` FOREIGN KEY (`itemFk`) REFERENCES `item` (`id`) ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=352686632 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=352686690 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
||||
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
||||
|
@ -22113,7 +22114,7 @@ CREATE TABLE `clientCredit` (
|
|||
KEY `credit_ClienteFk` (`clientFk`),
|
||||
CONSTRAINT `credit_ClienteFk` FOREIGN KEY (`clientFk`) REFERENCES `client` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||
CONSTRAINT `workers_fk` FOREIGN KEY (`workerFk`) REFERENCES `worker` (`id`) ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=85166 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=85167 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
@ -22202,7 +22203,7 @@ CREATE TABLE `clientLog` (
|
|||
KEY `userFk` (`userFk`),
|
||||
CONSTRAINT `clientLog_ibfk_1` FOREIGN KEY (`originFk`) REFERENCES `client` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||
CONSTRAINT `clientLog_ibfk_2` FOREIGN KEY (`userFk`) REFERENCES `account`.`user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=240238 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=240239 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
@ -23411,7 +23412,7 @@ CREATE TABLE `dms` (
|
|||
UNIQUE KEY `emp_id` (`companyFk`,`hardCopyNumber`,`warehouseFk`),
|
||||
KEY `trabajador_id` (`workerFk`),
|
||||
KEY `warehouse_id` (`warehouseFk`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=1388177 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='document managment system';
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=1388197 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='document managment system';
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
||||
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
||||
|
@ -23820,7 +23821,7 @@ CREATE TABLE `entry` (
|
|||
CONSTRAINT `entry_ibfk_1` FOREIGN KEY (`supplierFk`) REFERENCES `supplier` (`id`) ON UPDATE CASCADE,
|
||||
CONSTRAINT `entry_ibfk_6` FOREIGN KEY (`travelFk`) REFERENCES `travel` (`id`) ON UPDATE CASCADE,
|
||||
CONSTRAINT `entry_ibfk_7` FOREIGN KEY (`companyFk`) REFERENCES `company` (`id`) ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=182103 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='InnoDB free: 88064 kB; (`Id_Proveedor`) REFER `vn2008/Provee';
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=182107 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='InnoDB free: 88064 kB; (`Id_Proveedor`) REFER `vn2008/Provee';
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
||||
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
||||
|
@ -24021,7 +24022,7 @@ CREATE TABLE `entryLog` (
|
|||
KEY `entryLog_ibfk_2` (`userFk`),
|
||||
CONSTRAINT `entryLog_ibfk_1` FOREIGN KEY (`originFk`) REFERENCES `entry` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||
CONSTRAINT `entryLog_ibfk_2` FOREIGN KEY (`userFk`) REFERENCES `account`.`user` (`id`) ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=177180 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=177189 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
@ -25430,7 +25431,7 @@ CREATE TABLE `itemBarcode` (
|
|||
UNIQUE KEY `Id_Article_2` (`itemFk`,`code`),
|
||||
KEY `Id_Article` (`itemFk`),
|
||||
CONSTRAINT `itemBarcode_ibfk_1` FOREIGN KEY (`itemFk`) REFERENCES `item` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=42923 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=42930 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
@ -25628,7 +25629,7 @@ CREATE TABLE `itemLog` (
|
|||
KEY `itemLogUserFk_idx` (`userFk`),
|
||||
CONSTRAINT `itemLogItemFk` FOREIGN KEY (`originFk`) REFERENCES `item` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||
CONSTRAINT `itemLogUserFk` FOREIGN KEY (`userFk`) REFERENCES `account`.`user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=99157 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=99171 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
@ -25655,7 +25656,7 @@ CREATE TABLE `itemPlacement` (
|
|||
CONSTRAINT `Articles_nicho_wh_fk` FOREIGN KEY (`warehouseFk`) REFERENCES `warehouse` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||
CONSTRAINT `Articles_nichos_fk` FOREIGN KEY (`itemFk`) REFERENCES `item` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||
CONSTRAINT `itemPlacement_fk3` FOREIGN KEY (`sectorFk`) REFERENCES `sector` (`id`) ON DELETE SET NULL ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=1160906 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=1160939 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
||||
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
||||
|
@ -25705,7 +25706,7 @@ CREATE TABLE `itemPlacementSupply` (
|
|||
CONSTRAINT `itemPlacementSupply_fk2` FOREIGN KEY (`userFk`) REFERENCES `account`.`user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||
CONSTRAINT `itemPlacementSupply_fk3` FOREIGN KEY (`repoUserFk`) REFERENCES `account`.`user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||
CONSTRAINT `itemPlacementSupply_fk4` FOREIGN KEY (`sectorFk`) REFERENCES `sector` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=80804 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Lista de nichos de picking que hay que reponer';
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=80805 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Lista de nichos de picking que hay que reponer';
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
@ -26013,7 +26014,7 @@ CREATE TABLE `itemShelvingSale` (
|
|||
CONSTRAINT `itemShelvingSale_fk1` FOREIGN KEY (`itemShelvingFk`) REFERENCES `itemShelving` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||
CONSTRAINT `itemShelvingSale_fk2` FOREIGN KEY (`saleFk`) REFERENCES `sale` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||
CONSTRAINT `itemShelvingSale_fk3` FOREIGN KEY (`userFk`) REFERENCES `account`.`user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=42087 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Detalle del producto que se retira de los carros, relacionando la linea de movimiento correspondiente';
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=42119 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Detalle del producto que se retira de los carros, relacionando la linea de movimiento correspondiente';
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
||||
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
||||
|
@ -26140,7 +26141,7 @@ CREATE TABLE `itemTag` (
|
|||
KEY `itemFk_2` (`itemFk`,`tagFk`,`intValue`),
|
||||
CONSTRAINT `itemTagItemFk` FOREIGN KEY (`itemFk`) REFERENCES `item` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||
CONSTRAINT `itemTagTagFk` FOREIGN KEY (`tagFk`) REFERENCES `tag` (`id`) ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=1400544 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=1400546 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
||||
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
||||
|
@ -26739,7 +26740,7 @@ CREATE TABLE `message` (
|
|||
KEY `sender` (`sender`),
|
||||
KEY `recipient` (`recipient`),
|
||||
KEY `uuid` (`uuid`(8))
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=2056489 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=2056575 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
@ -26761,7 +26762,7 @@ CREATE TABLE `messageInbox` (
|
|||
PRIMARY KEY (`id`),
|
||||
KEY `uuid` (`uuid`(8)),
|
||||
KEY `finalRecipient` (`finalRecipient`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=2232309 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=2232395 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
@ -26991,7 +26992,7 @@ CREATE TABLE `packageChecked` (
|
|||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `entryFk_UNIQUE` (`itemFk`),
|
||||
KEY `fkItem_idx` (`itemFk`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=3224 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=3231 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
@ -27697,7 +27698,7 @@ CREATE TABLE `producer` (
|
|||
`isVisible` tinyint(1) NOT NULL DEFAULT '1',
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `name_UNIQUE` (`name`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=14545 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=14549 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
@ -28030,7 +28031,7 @@ CREATE TABLE `receipt` (
|
|||
CONSTRAINT `receipt_ibfk_1` FOREIGN KEY (`companyFk`) REFERENCES `company` (`id`) ON UPDATE CASCADE,
|
||||
CONSTRAINT `receipt_ibfk_2` FOREIGN KEY (`bankFk`) REFERENCES `bank` (`id`) ON UPDATE CASCADE,
|
||||
CONSTRAINT `recibo_customer_id` FOREIGN KEY (`clientFk`) REFERENCES `client` (`id`) ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=609864 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=609865 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
||||
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
||||
|
@ -28216,7 +28217,7 @@ CREATE TABLE `route` (
|
|||
KEY `route_ibfk_2_idx` (`workerFk`),
|
||||
CONSTRAINT `route_ibfk_1` FOREIGN KEY (`gestdocFk`) REFERENCES `dms` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
|
||||
CONSTRAINT `route_ibfk_2` FOREIGN KEY (`workerFk`) REFERENCES `worker` (`id`) ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=60130 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=60147 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
||||
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
||||
|
@ -28410,7 +28411,7 @@ CREATE TABLE `routeLog` (
|
|||
KEY `userFk` (`userFk`),
|
||||
CONSTRAINT `routeLog_ibfk_1` FOREIGN KEY (`originFk`) REFERENCES `route` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||
CONSTRAINT `routeLog_ibfk_2` FOREIGN KEY (`userFk`) REFERENCES `account`.`user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=197166 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=197397 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
@ -28521,7 +28522,7 @@ CREATE TABLE `sale` (
|
|||
KEY `itemFk_ticketFk` (`itemFk`,`ticketFk`),
|
||||
CONSTRAINT `movement_ticket_id` FOREIGN KEY (`ticketFk`) REFERENCES `ticket` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||
CONSTRAINT `sale_ibfk_1` FOREIGN KEY (`itemFk`) REFERENCES `item` (`id`) ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=26414808 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=26414860 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
||||
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
||||
|
@ -28762,7 +28763,7 @@ CREATE TABLE `saleTracking` (
|
|||
KEY `fgnStateFk_idx` (`stateFk`),
|
||||
KEY `saleTracking_idx5` (`created`),
|
||||
CONSTRAINT `fgnStateFk` FOREIGN KEY (`stateFk`) REFERENCES `state` (`id`) ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=21026302 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=21026634 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
||||
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
||||
|
@ -29163,7 +29164,7 @@ CREATE TABLE `sms` (
|
|||
`status` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
|
||||
`created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=155196 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=155221 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
@ -29352,7 +29353,7 @@ CREATE TABLE `stockBuyed` (
|
|||
UNIQUE KEY `date_UNIQUE` (`date`,`user`),
|
||||
KEY `stockBuyed_user_idx` (`user`),
|
||||
CONSTRAINT `stockBuyedUserFk` FOREIGN KEY (`user`) REFERENCES `account`.`user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=847937 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=848177 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
@ -29797,7 +29798,7 @@ CREATE TABLE `ticket` (
|
|||
CONSTRAINT `ticket_ibfk_9` FOREIGN KEY (`routeFk`) REFERENCES `route` (`id`) ON UPDATE CASCADE,
|
||||
CONSTRAINT `tickets_fk10` FOREIGN KEY (`refFk`) REFERENCES `invoiceOut` (`ref`) ON UPDATE CASCADE,
|
||||
CONSTRAINT `tickets_zone_fk` FOREIGN KEY (`zoneFk`) REFERENCES `zone` (`id`) ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=2484593 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=2484620 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
||||
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
||||
|
@ -30072,7 +30073,7 @@ CREATE TABLE `ticketLog` (
|
|||
KEY `logTicketuserFk` (`userFk`),
|
||||
CONSTRAINT `ticketLog_ibfk_1` FOREIGN KEY (`originFk`) REFERENCES `ticket` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||
CONSTRAINT `ticketLog_user` FOREIGN KEY (`userFk`) REFERENCES `account`.`user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=8112788 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=8113130 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
@ -30109,7 +30110,7 @@ CREATE TABLE `ticketObservation` (
|
|||
KEY `observation_type_id` (`observationTypeFk`),
|
||||
CONSTRAINT `ticketObservation_ibfk_1` FOREIGN KEY (`ticketFk`) REFERENCES `ticket` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||
CONSTRAINT `ticketObservation_ibfk_2` FOREIGN KEY (`observationTypeFk`) REFERENCES `observationType` (`id`) ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=1509900 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Todas las observaciones referentes a un ticket';
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=1509914 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Todas las observaciones referentes a un ticket';
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
@ -30227,7 +30228,7 @@ CREATE TABLE `ticketParking` (
|
|||
KEY `ticketParking_fk1_idx` (`parkingFk`),
|
||||
CONSTRAINT `ticketParking_fk1` FOREIGN KEY (`ticketFk`) REFERENCES `ticket` (`id`) ON UPDATE CASCADE,
|
||||
CONSTRAINT `ticketParking_fk2` FOREIGN KEY (`parkingFk`) REFERENCES `parking` (`id`) ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=11492 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Almacena los distintos lugares donde puede estar aparcado cada uno de los prepedidos';
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=11497 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Almacena los distintos lugares donde puede estar aparcado cada uno de los prepedidos';
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
@ -30293,7 +30294,7 @@ CREATE TABLE `ticketRequest` (
|
|||
CONSTRAINT `fgnAtender` FOREIGN KEY (`atenderFk`) REFERENCES `worker` (`id`) ON UPDATE CASCADE,
|
||||
CONSTRAINT `fgnRequester` FOREIGN KEY (`requesterFk`) REFERENCES `worker` (`id`) ON UPDATE CASCADE,
|
||||
CONSTRAINT `fgnTicket` FOREIGN KEY (`ticketFk`) REFERENCES `ticket` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=52123 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=52125 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
||||
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
||||
|
@ -31687,7 +31688,7 @@ CREATE TABLE `workerTimeControl` (
|
|||
KEY `warehouseFkfk1_idx` (`warehouseFk`),
|
||||
CONSTRAINT `warehouseFk_1` FOREIGN KEY (`warehouseFk`) REFERENCES `warehouse` (`id`) ON UPDATE CASCADE,
|
||||
CONSTRAINT `workerTimeControl_fk1` FOREIGN KEY (`userFk`) REFERENCES `account`.`user` (`id`) ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=8297369 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Fichadas';
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=8297378 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Fichadas';
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
@ -56637,7 +56638,7 @@ CREATE TABLE `Cajas` (
|
|||
KEY `fk_Cajas_Proveedores_account1_idx` (`Proveedores_account_Id`),
|
||||
CONSTRAINT `Cajas_ibfk_2` FOREIGN KEY (`Id_Banco`) REFERENCES `vn`.`bank` (`id`) ON UPDATE CASCADE,
|
||||
CONSTRAINT `Cajas_ibfk_3` FOREIGN KEY (`Id_Trabajador`) REFERENCES `vn`.`worker` (`id`) ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=743475 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=743478 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
||||
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
||||
|
@ -56890,7 +56891,7 @@ CREATE TABLE `Colas` (
|
|||
KEY `Id_Trabajador` (`Id_Trabajador`),
|
||||
CONSTRAINT `Colas_ibfk_3` FOREIGN KEY (`Id_Prioridad`) REFERENCES `vn`.`queuePriority` (`id`) ON UPDATE CASCADE,
|
||||
CONSTRAINT `Colas_ibfk_4` FOREIGN KEY (`Id_Impresora`) REFERENCES `Impresoras` (`Id_Impresora`) ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=21582 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=21605 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
@ -57311,7 +57312,7 @@ CREATE TABLE `Entradas_dits` (
|
|||
CONSTRAINT `Entradas_dits_ibfk_1` FOREIGN KEY (`Id_Ticket`) REFERENCES `vn`.`entry` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||
CONSTRAINT `fgkey_entradas_1` FOREIGN KEY (`idaccion_dits`) REFERENCES `accion_dits` (`idaccion_dits`) ON DELETE NO ACTION ON UPDATE CASCADE,
|
||||
CONSTRAINT `fgkey_entradas_3` FOREIGN KEY (`Id_Trabajador`) REFERENCES `vn`.`worker` (`id`) ON DELETE NO ACTION ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=3986463 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=3986582 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
@ -58552,7 +58553,7 @@ CREATE TABLE `Tickets_dits` (
|
|||
CONSTRAINT `Tickets_dits_ibfk_1` FOREIGN KEY (`Id_Ticket`) REFERENCES `vn`.`ticket` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||
CONSTRAINT `fgkey1` FOREIGN KEY (`idaccion_dits`) REFERENCES `accion_dits` (`idaccion_dits`) ON DELETE NO ACTION ON UPDATE CASCADE,
|
||||
CONSTRAINT `fgkey3` FOREIGN KEY (`Id_Trabajador`) REFERENCES `vn`.`worker` (`id`) ON DELETE NO ACTION ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=65253509 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=65253575 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
||||
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
||||
|
@ -61646,7 +61647,7 @@ CREATE TABLE `mail` (
|
|||
PRIMARY KEY (`id`),
|
||||
KEY `sent_idx` (`sent`),
|
||||
KEY `creation_idx` (`DATE_ODBC`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=1938221 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=1938230 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
@ -62374,7 +62375,7 @@ CREATE TABLE `price_fixed` (
|
|||
KEY `date_end` (`date_end`),
|
||||
KEY `warehouse_id` (`warehouse_id`),
|
||||
CONSTRAINT `price_fixed_ibfk_1` FOREIGN KEY (`item_id`) REFERENCES `vn`.`item` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=64846 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=64851 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
||||
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
||||
|
@ -63643,7 +63644,7 @@ CREATE TABLE `travel_dits` (
|
|||
KEY `fgkey2_idx` (`Id_Ticket`),
|
||||
KEY `fgkey3_idx` (`Id_Trabajador`),
|
||||
CONSTRAINT `travel_dits_ibfk_1` FOREIGN KEY (`Id_Trabajador`) REFERENCES `vn`.`worker` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=246368 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=246370 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
@ -79693,7 +79694,7 @@ DELIMITER ;
|
|||
/*!50003 SET character_set_client = @saved_cs_client */ ;
|
||||
/*!50003 SET character_set_results = @saved_cs_results */ ;
|
||||
/*!50003 SET collation_connection = @saved_col_connection */ ;
|
||||
/*!50003 DROP PROCEDURE IF EXISTS `inventario_multiple_inventarios` */;
|
||||
/*!50003 DROP PROCEDURE IF EXISTS `inventario_multiple_inventariosKk` */;
|
||||
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
||||
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
||||
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
|
||||
|
@ -79703,7 +79704,7 @@ DELIMITER ;
|
|||
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
|
||||
/*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ;
|
||||
DELIMITER ;;
|
||||
CREATE DEFINER=`root`@`%` PROCEDURE `inventario_multiple_inventarios`(wh SMALLINT, date_ticket DATETIME)
|
||||
CREATE DEFINER=`root`@`%` PROCEDURE `inventario_multiple_inventariosKk`(wh SMALLINT, date_ticket DATETIME)
|
||||
BEGIN
|
||||
DECLARE date_order DATETIME;
|
||||
DECLARE date_end DATETIME DEFAULT CURDATE();
|
||||
|
@ -79714,8 +79715,16 @@ BEGIN
|
|||
ALTER TABLE article_inventory
|
||||
ADD visible FLOAT(7,2) NOT NULL;
|
||||
|
||||
SELECT FechaInventario, TIMESTAMP(TIMESTAMPADD(DAY, 15, date_ticket),'23:59:59')
|
||||
INTO date_start, date_end
|
||||
-- Campaña
|
||||
|
||||
SELECT
|
||||
IF(@camp := DATEDIFF(campaign, date_ticket) BETWEEN 0 AND campaign_life ,
|
||||
TIMESTAMPADD(DAY, -campaign_life, campaign) ,
|
||||
FechaInventario),
|
||||
IF(@camp BETWEEN 0 AND campaign_life,
|
||||
TIMESTAMP(campaign, '23:59:59'),
|
||||
TIMESTAMP(TIMESTAMPADD(DAY, 15, date_ticket),'23:59:59'))
|
||||
INTO date_start, date_end
|
||||
FROM tblContadores;
|
||||
|
||||
SET date_order = TIMESTAMP(DATE(date_ticket), '00:00:00');
|
||||
|
@ -79752,17 +79761,17 @@ DELIMITER ;
|
|||
/*!50003 SET character_set_client = @saved_cs_client */ ;
|
||||
/*!50003 SET character_set_results = @saved_cs_results */ ;
|
||||
/*!50003 SET collation_connection = @saved_col_connection */ ;
|
||||
/*!50003 DROP PROCEDURE IF EXISTS `inventario_multiple_inventariosKk` */;
|
||||
/*!50003 DROP PROCEDURE IF EXISTS `inventario_multiple_inventarios__` */;
|
||||
/*!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 = utf8 */ ;
|
||||
/*!50003 SET character_set_results = utf8 */ ;
|
||||
/*!50003 SET collation_connection = utf8_general_ci */ ;
|
||||
/*!50003 SET character_set_client = utf8mb4 */ ;
|
||||
/*!50003 SET character_set_results = utf8mb4 */ ;
|
||||
/*!50003 SET collation_connection = utf8mb4_general_ci */ ;
|
||||
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
|
||||
/*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ;
|
||||
DELIMITER ;;
|
||||
CREATE DEFINER=`root`@`%` PROCEDURE `inventario_multiple_inventariosKk`(wh SMALLINT, date_ticket DATETIME)
|
||||
CREATE DEFINER=`root`@`%` PROCEDURE `inventario_multiple_inventarios__`(wh SMALLINT, date_ticket DATETIME)
|
||||
BEGIN
|
||||
DECLARE date_order DATETIME;
|
||||
DECLARE date_end DATETIME DEFAULT CURDATE();
|
||||
|
@ -79773,16 +79782,8 @@ BEGIN
|
|||
ALTER TABLE article_inventory
|
||||
ADD visible FLOAT(7,2) NOT NULL;
|
||||
|
||||
-- Campaña
|
||||
|
||||
SELECT
|
||||
IF(@camp := DATEDIFF(campaign, date_ticket) BETWEEN 0 AND campaign_life ,
|
||||
TIMESTAMPADD(DAY, -campaign_life, campaign) ,
|
||||
FechaInventario),
|
||||
IF(@camp BETWEEN 0 AND campaign_life,
|
||||
TIMESTAMP(campaign, '23:59:59'),
|
||||
TIMESTAMP(TIMESTAMPADD(DAY, 15, date_ticket),'23:59:59'))
|
||||
INTO date_start, date_end
|
||||
SELECT FechaInventario, TIMESTAMP(TIMESTAMPADD(DAY, 15, date_ticket),'23:59:59')
|
||||
INTO date_start, date_end
|
||||
FROM tblContadores;
|
||||
|
||||
SET date_order = TIMESTAMP(DATE(date_ticket), '00:00:00');
|
||||
|
@ -92121,7 +92122,7 @@ CREATE TABLE `inter` (
|
|||
CONSTRAINT `inter_ibfk_1` FOREIGN KEY (`Id_Ticket`) REFERENCES `vn`.`ticket` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||
CONSTRAINT `inter_state` FOREIGN KEY (`state_id`) REFERENCES `vn`.`state` (`id`) ON UPDATE CASCADE,
|
||||
CONSTRAINT `responsable` FOREIGN KEY (`Id_Supervisor`) REFERENCES `vn`.`worker` (`id`) ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=21652202 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=21652681 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
||||
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
||||
|
@ -99975,4 +99976,4 @@ USE `vncontrol`;
|
|||
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||
|
||||
-- Dump completed on 2019-11-21 7:08:17
|
||||
-- Dump completed on 2019-11-21 7:34:03
|
||||
|
|
Loading…
Reference in New Issue