feat: refs #8190 entry_getCommission change request
gitea/salix/pipeline/pr-dev There was a failure building this commit Details

This commit is contained in:
Robert Ferrús 2024-11-27 07:27:47 +01:00
parent 72b2bd688e
commit d9aa11b3e9
1 changed files with 3 additions and 3 deletions

View File

@ -11,7 +11,7 @@ BEGIN
DECLARE vCurrentCommission INT;
DECLARE vIsNotEUR INT;
DECLARE vLastEntryFk INT;
DECLARE vTravelFkLanded INT;
DECLARE vLanded INT;
SELECT count(*) INTO vIsNotEUR
FROM currency c
@ -27,7 +27,7 @@ BEGIN
RETURN IFNULL(vCommission, 0);
ELSE
SELECT landed INTO vTravelFkLanded
SELECT landed INTO vLanded
FROM travel
WHERE id = vTravelFk;
@ -35,7 +35,7 @@ BEGIN
FROM `entry` e
JOIN travel tr ON tr.id = e.travelFk
WHERE e.supplierFk = vSupplierFk
ORDER BY (vTravelFkLanded <= tr.landed) ASC, tr.landed DESC
ORDER BY (vLanded <= tr.landed), tr.landed DESC
LIMIT 1;
IF vLastEntryFk THEN