This commit is contained in:
parent
96902afc83
commit
5a92fe1691
|
@ -34,9 +34,8 @@ BEGIN
|
|||
SELECT e.id INTO vLastEntryFk
|
||||
FROM `entry` e
|
||||
JOIN travel tr ON tr.id = e.travelFk
|
||||
WHERE tr.landed < vTravelFkLanded
|
||||
AND e.supplierFk = vSupplierFk
|
||||
ORDER BY (vTravelFkLanded - tr.landed) ASC, tr.landed DESC
|
||||
WHERE e.supplierFk = vSupplierFk
|
||||
ORDER BY (vTravelFkLanded <= tr.landed) ASC, tr.landed DESC
|
||||
LIMIT 1;
|
||||
|
||||
IF vLastEntryFk THEN
|
||||
|
|
Loading…
Reference in New Issue