From 35f4f161ab6cd4ef8f6cc6b179bae88012d4220c Mon Sep 17 00:00:00 2001 From: Pako Date: Mon, 11 Nov 2024 09:02:04 +0100 Subject: [PATCH] fix(collection_new): remove agency condition for suitable tickets Refs: #0000 --- db/routines/vn/procedures/collection_new.sql | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/db/routines/vn/procedures/collection_new.sql b/db/routines/vn/procedures/collection_new.sql index f04d5241e..36e837869 100644 --- a/db/routines/vn/procedures/collection_new.sql +++ b/db/routines/vn/procedures/collection_new.sql @@ -173,8 +173,6 @@ BEGIN DELETE pb.* FROM tmp.productionBuffer pb JOIN state s ON s.id = pb.state - JOIN agencyMode am ON am.id = pb.agencyModeFk - JOIN agency a ON a.id = am.agencyFk LEFT JOIN ( SELECT pb.ticketFk, MAX(i.`size`) maxSize FROM tmp.productionBuffer pb @@ -185,7 +183,7 @@ BEGIN ) sub ON sub.ticketFk = pb.ticketFk JOIN productionConfig pc WHERE pb.shipped <> util.VN_CURDATE() - OR (pb.ubicacion IS NULL AND a.isOwn) + OR pb.ubicacion IS NULL OR (NOT s.isPreparable AND NOT s.isPrintable) OR pb.collectionH IS NOT NULL OR pb.collectionV IS NOT NULL