feat: refs #8190 entry_getCommission
gitea/salix/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Robert Ferrús 2024-11-26 11:57:24 +01:00
parent 96902afc83
commit 5a92fe1691
1 changed files with 2 additions and 3 deletions

View File

@ -34,9 +34,8 @@ BEGIN
SELECT e.id INTO vLastEntryFk SELECT e.id INTO vLastEntryFk
FROM `entry` e FROM `entry` e
JOIN travel tr ON tr.id = e.travelFk JOIN travel tr ON tr.id = e.travelFk
WHERE tr.landed < vTravelFkLanded WHERE e.supplierFk = vSupplierFk
AND e.supplierFk = vSupplierFk ORDER BY (vTravelFkLanded <= tr.landed) ASC, tr.landed DESC
ORDER BY (vTravelFkLanded - tr.landed) ASC, tr.landed DESC
LIMIT 1; LIMIT 1;
IF vLastEntryFk THEN IF vLastEntryFk THEN