refactor: refs #6874 Changed params item_getSimilar #2132

Merged
guillermo merged 3 commits from 6874-item_getSimilar into dev 2024-03-06 10:05:08 +00:00
1 changed files with 5 additions and 10 deletions

View File

@ -1,7 +1,8 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`item_getSimilar`( CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`item_getSimilar`(
vSelf INT, vSelf INT,
vTicketFk INT, vWarehouseFk INT,
vDated DATE,
vShowType BOOL vShowType BOOL
) )
BEGIN BEGIN
@ -10,11 +11,10 @@ BEGIN
* de veces usado y segun sus caracteristicas. * de veces usado y segun sus caracteristicas.
* *
* @param vSelf Id de artículo * @param vSelf Id de artículo
* @param vTicketFk Id de ticket * @param vWarehouseFk Id de almacen
* @param vDated Fecha
* @param vShowType Mostrar tipos * @param vShowType Mostrar tipos
*/ */
DECLARE vWarehouseFk INT;
DECLARE vShipped DATE;
DECLARE vCalcFk INT; DECLARE vCalcFk INT;
DECLARE vTypeFk INT; DECLARE vTypeFk INT;
DECLARE vPriority INT DEFAULT 1; DECLARE vPriority INT DEFAULT 1;
@ -31,11 +31,6 @@ BEGIN
DECLARE vValue7 VARCHAR(50) CHARACTER SET 'utf8' COLLATE 'utf8_unicode_ci'; DECLARE vValue7 VARCHAR(50) CHARACTER SET 'utf8' COLLATE 'utf8_unicode_ci';
DECLARE vValue8 VARCHAR(50) CHARACTER SET 'utf8' COLLATE 'utf8_unicode_ci'; DECLARE vValue8 VARCHAR(50) CHARACTER SET 'utf8' COLLATE 'utf8_unicode_ci';
SELECT warehouseFk, shipped
INTO vWarehouseFk, vShipped
FROM ticket
WHERE id = vTicketFk;
SELECT typeFk, SELECT typeFk,
tag5, tag5,
value5, value5,
@ -64,7 +59,7 @@ BEGIN
LEFT JOIN tag t ON t.id = it.tagFk LEFT JOIN tag t ON t.id = it.tagFk
WHERE i.id = vSelf; WHERE i.id = vSelf;
CALL cache.available_refresh(vCalcFk, FALSE, vWarehouseFk, vShipped); CALL cache.available_refresh(vCalcFk, FALSE, vWarehouseFk, vDated);
SELECT i.id itemFk, SELECT i.id itemFk,
i.longName, i.longName,