13: DECLARE
14: l_temp date;
15: l_max_period date;
16: BEGIN 17: if ssp_ssp_pkg.ssp_is_installed then 18: l_temp := sysdate;
19: if (nvl(:new.stated_return_date,l_temp) <> nvl(:old.stated_return_date,l_temp)) then
20: l_max_period := ssp_smp_pkg.get_max_SMP_date(:old.maternity_id,:new.due_date,:new.mpp_start_date);
21: if (:old.stated_return_date is null and :new.stated_return_date is not null) OR