From 82f8e84288b3a30370c5551c8ce4f7d887d79c12 Mon Sep 17 00:00:00 2001 From: sergiodt Date: Thu, 3 Oct 2024 11:42:21 +0200 Subject: [PATCH 1/2] fix: refs #6861 collectionGetTickets --- db/routines/vn/procedures/collection_getTickets.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/routines/vn/procedures/collection_getTickets.sql b/db/routines/vn/procedures/collection_getTickets.sql index 4566792fa..0f675041a 100644 --- a/db/routines/vn/procedures/collection_getTickets.sql +++ b/db/routines/vn/procedures/collection_getTickets.sql @@ -23,7 +23,7 @@ BEGIN 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 OR tc.ticketFk = vParamFk + AND tc.collectionFk = vParamFk ) SELECT t.id ticketFk, IF(!(vItemPackingTypeFk <=> 'V'), cc.code, CONCAT(SUBSTRING('ABCDEFGH', tc.wagon, 1), '-', tc.`level`)) `level`, -- 2.40.1 From 32415d36169b9fc3487fa921c0de5d06bfee9653 Mon Sep 17 00:00:00 2001 From: sergiodt Date: Thu, 3 Oct 2024 11:56:36 +0200 Subject: [PATCH 2/2] fix: refs #6861 collectionGetTickets --- db/routines/vn/procedures/collection_getTickets.sql | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/db/routines/vn/procedures/collection_getTickets.sql b/db/routines/vn/procedures/collection_getTickets.sql index 0f675041a..6b7a794a9 100644 --- a/db/routines/vn/procedures/collection_getTickets.sql +++ b/db/routines/vn/procedures/collection_getTickets.sql @@ -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`, -- 2.40.1