feat: add client id to getLastBookings

This commit is contained in:
Timo Ley 2023-06-03 08:28:43 +00:00
parent fe96863703
commit 5e608db644

View file

@ -30,9 +30,9 @@ BEGIN
return finalclerkid;
END;
CREATE OR REPLACE PROCEDURE getLastBookings(months IN NUMBER)
CREATE OR REPLACE PROCEDURE getLastBookings(months IN NUMBER, clientz in NUMBER)
IS
CURSOR bookingsCursor IS SELECT BOOKINGID FROM BOOKING WHERE ARRIVALDATE >= ADD_MONTHS(SYSDATE,-months);
CURSOR bookingsCursor IS SELECT BOOKINGID FROM BOOKING WHERE ARRIVALDATE >= ADD_MONTHS(SYSDATE,-months) AND clientId = clientz;
BEGIN
FOR booking IN bookingsCursor