From 84e90bb91b8dbe2a6f2d384b8670239ef61da033 Mon Sep 17 00:00:00 2001 From: guillermo Date: Wed, 8 May 2024 12:43:46 +0200 Subject: [PATCH] hotfix: rollback tmp item_getSimilar --- db/routines/vn/procedures/item_getSimilar.sql | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/db/routines/vn/procedures/item_getSimilar.sql b/db/routines/vn/procedures/item_getSimilar.sql index 6f275de86..b0f3ca40e 100644 --- a/db/routines/vn/procedures/item_getSimilar.sql +++ b/db/routines/vn/procedures/item_getSimilar.sql @@ -21,9 +21,6 @@ BEGIN 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 ( SELECT i.id, typeFk, @@ -82,7 +79,7 @@ BEGIN AND iss.warehouseFk = vWarehouseFk JOIN itemTags its WHERE a.available > 0 - AND IF(vShowType, i.typeFk = its.typeFk, TRUE) + AND (i.typeFk = its.typeFk OR NOT vShowType) AND i.id <> vSelf ORDER BY `counter` DESC, (t.name = its.name) DESC,