7430_devToTest #2490
|
@ -21,9 +21,6 @@ BEGIN
|
||||||
|
|
||||||
CALL cache.available_refresh(vCalcFk, FALSE, vWarehouseFk, vDated);
|
CALL cache.available_refresh(vCalcFk, FALSE, vWarehouseFk, vDated);
|
||||||
|
|
||||||
-- Añadido temporalmente para ver si ya no sucede el cuelgue de db
|
|
||||||
SET vShowType = TRUE;
|
|
||||||
|
|
||||||
WITH itemTags AS (
|
WITH itemTags AS (
|
||||||
SELECT i.id,
|
SELECT i.id,
|
||||||
typeFk,
|
typeFk,
|
||||||
|
@ -82,7 +79,7 @@ BEGIN
|
||||||
AND iss.warehouseFk = vWarehouseFk
|
AND iss.warehouseFk = vWarehouseFk
|
||||||
JOIN itemTags its
|
JOIN itemTags its
|
||||||
WHERE a.available > 0
|
WHERE a.available > 0
|
||||||
AND IF(vShowType, i.typeFk = its.typeFk, TRUE)
|
AND (i.typeFk = its.typeFk OR NOT vShowType)
|
||||||
AND i.id <> vSelf
|
AND i.id <> vSelf
|
||||||
ORDER BY `counter` DESC,
|
ORDER BY `counter` DESC,
|
||||||
(t.name = its.name) DESC,
|
(t.name = its.name) DESC,
|
||||||
|
|
Loading…
Reference in New Issue