From b978833a64151646a1587138dfcf05f39656dd6b Mon Sep 17 00:00:00 2001 From: jgallego Date: Tue, 26 Mar 2024 09:46:53 +0100 Subject: [PATCH] fix: #6782 with con esquema --- db/routines/vn/procedures/productionError_add.sql | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/db/routines/vn/procedures/productionError_add.sql b/db/routines/vn/procedures/productionError_add.sql index a872ca511..dcbe379dc 100644 --- a/db/routines/vn/procedures/productionError_add.sql +++ b/db/routines/vn/procedures/productionError_add.sql @@ -38,11 +38,11 @@ BEGIN SELECT sm.id, st.workerFk, ROW_NUMBER() OVER(PARTITION BY sm.id ORDER BY s2.`order`) AS rnk - FROM saleMistake sm - JOIN saleTracking st ON sm.saleFk = st.saleFk - JOIN `state` s2 ON s2.id = st.stateFk - JOIN sale s ON s.id = sm.saleFk - JOIN ticket t ON t.id = s.ticketFk + FROM vn.saleMistake sm + JOIN vn.saleTracking st ON sm.saleFk = st.saleFk + JOIN vn.`state` s2 ON s2.id = st.stateFk + JOIN vn.sale s ON s.id = sm.saleFk + JOIN vn.ticket t ON t.id = s.ticketFk WHERE t.shipped BETWEEN vDatedFrom AND vDatedTo AND s2.code IN ('OK', 'PREVIOUS_PREPARATION', 'PREPARED', 'CHECKED') )