From c5f1b05671c6fefaa22df376af105589dd60b402 Mon Sep 17 00:00:00 2001 From: robert Date: Fri, 15 Nov 2024 11:32:20 +0100 Subject: [PATCH] feat: refs #8127 quitar esquemas --- db/routines/vn/functions/entry_getCommission.sql | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/db/routines/vn/functions/entry_getCommission.sql b/db/routines/vn/functions/entry_getCommission.sql index 898ac8521..a4afdabd4 100644 --- a/db/routines/vn/functions/entry_getCommission.sql +++ b/db/routines/vn/functions/entry_getCommission.sql @@ -25,18 +25,17 @@ BEGIN LIMIT 1; RETURN IFNULL(vCommission, 0); - ELSE SELECT e.id INTO vLastEntryFk - FROM vn.entry e - JOIN vn.travel tr ON tr.id = e.travelFk + FROM `entry` e + JOIN travel tr ON tr.id = e.travelFk WHERE e.supplierFk = vSupplierFk ORDER BY tr.landed DESC LIMIT 1; IF vLastEntryFk THEN SELECT commission INTO vCurrentCommission - FROM vn.entry + FROM `entry` WHERE id = vLastEntryFk; ELSE @@ -47,8 +46,6 @@ BEGIN END IF; RETURN vCurrentCommission; - END IF; - END$$ DELIMITER ;