205: IF p_inserting OR
206: (p_updating AND
207: ((NVL(new_references.authorised_person_id, 0) <>
208: NVL(old_references.authorised_person_id, 0)) OR
209: (NVL(new_references.authorised_on,IGS_GE_DATE.IGSDATE('1900/01/01'))
210: <> NVL(old_references.authorised_on, IGS_GE_DATE.IGSDATE('1900/01/01'))))) THEN
211:
212: -- p_legacy value passed as 'N' as function is called in non-legacy mode
213: IF IGS_EN_VAL_SUSA.enrp_val_susa_auth(
206: (p_updating AND
207: ((NVL(new_references.authorised_person_id, 0) <>
208: NVL(old_references.authorised_person_id, 0)) OR
209: (NVL(new_references.authorised_on,IGS_GE_DATE.IGSDATE('1900/01/01'))
210: <> NVL(old_references.authorised_on, IGS_GE_DATE.IGSDATE('1900/01/01'))))) THEN
211:
212: -- p_legacy value passed as 'N' as function is called in non-legacy mode
213: IF IGS_EN_VAL_SUSA.enrp_val_susa_auth(
214: new_references.unit_set_cd,
227: (p_updating AND
228: ((NVL(new_references.authorised_person_id, 0) <>
229: NVL(old_references.authorised_person_id, 0)) OR
230: (new_references.student_confirmed_ind <> old_references.student_confirmed_ind) OR
231: (NVL(new_references.authorised_on,IGS_GE_DATE.IGSDATE('1900/01/01'))
232: <> NVL(old_references.authorised_on, IGS_GE_DATE.IGSDATE('1900/01/01'))))) THEN
233: -- Validate that the authorisation fields must be set when
234: -- the IGS_PS_UNIT set cd requires authorisation (IGS_EN_UNIT_SET.authorisation_ind = 'Y')
235: -- Check required only when the IGS_PS_UNIT set is confirmed.
228: ((NVL(new_references.authorised_person_id, 0) <>
229: NVL(old_references.authorised_person_id, 0)) OR
230: (new_references.student_confirmed_ind <> old_references.student_confirmed_ind) OR
231: (NVL(new_references.authorised_on,IGS_GE_DATE.IGSDATE('1900/01/01'))
232: <> NVL(old_references.authorised_on, IGS_GE_DATE.IGSDATE('1900/01/01'))))) THEN
233: -- Validate that the authorisation fields must be set when
234: -- the IGS_PS_UNIT set cd requires authorisation (IGS_EN_UNIT_SET.authorisation_ind = 'Y')
235: -- Check required only when the IGS_PS_UNIT set is confirmed.
236: IF (new_references.student_confirmed_ind = 'Y') THEN
251: IF p_inserting OR
252: (p_updating AND
253: ((NVL(new_references.rqrmnts_complete_ind, 'x')
254: <> NVL(old_references.rqrmnts_complete_ind, 'x')) OR
255: (NVL(new_references.rqrmnts_complete_dt,IGS_GE_DATE.IGSDATE('1900/01/01'))
256: <> NVL(old_references.rqrmnts_complete_dt,
257: IGS_GE_DATE.IGSDATE('1900/01/01')))))THEN
258:
259: -- p_legacy value passed as 'N' as function is called in non-legacy mode
253: ((NVL(new_references.rqrmnts_complete_ind, 'x')
254: <> NVL(old_references.rqrmnts_complete_ind, 'x')) OR
255: (NVL(new_references.rqrmnts_complete_dt,IGS_GE_DATE.IGSDATE('1900/01/01'))
256: <> NVL(old_references.rqrmnts_complete_dt,
257: IGS_GE_DATE.IGSDATE('1900/01/01')))))THEN
258:
259: -- p_legacy value passed as 'N' as function is called in non-legacy mode
260: IF IGS_EN_VAL_SUSA.enrp_val_susa_cmplt(
261: new_references.rqrmnts_complete_dt,
275: ((NVL(new_references.rqrmnts_complete_ind, 'x')
276: <> NVL(old_references.rqrmnts_complete_ind, 'x')) OR
277: (NVL(new_references.s_completed_source_type, 'x')
278: <> NVL(old_references.s_completed_source_type, 'x')) OR
279: (NVL(new_references.rqrmnts_complete_dt,IGS_GE_DATE.IGSDATE('1900/01/01'))
280: <> NVL(old_references.rqrmnts_complete_dt,
281: IGS_GE_DATE.IGSDATE('1900/01/01')))))THEN
282: IF IGS_EN_VAL_SUSA.enrp_val_susa_scst(
283: new_references.rqrmnts_complete_dt,
277: (NVL(new_references.s_completed_source_type, 'x')
278: <> NVL(old_references.s_completed_source_type, 'x')) OR
279: (NVL(new_references.rqrmnts_complete_dt,IGS_GE_DATE.IGSDATE('1900/01/01'))
280: <> NVL(old_references.rqrmnts_complete_dt,
281: IGS_GE_DATE.IGSDATE('1900/01/01')))))THEN
282: IF IGS_EN_VAL_SUSA.enrp_val_susa_scst(
283: new_references.rqrmnts_complete_dt,
284: new_references.rqrmnts_complete_ind,
285: new_references.s_completed_source_type,
296: -- confirmed/unconfirmed
297: IF p_inserting OR
298: (p_updating AND
299: ((new_references.student_confirmed_ind <> old_references.student_confirmed_ind) OR
300: (NVL(new_references.selection_dt,IGS_GE_DATE.IGSDATE('1900/01/01'))
301: <> NVL(old_references.selection_dt, IGS_GE_DATE.IGSDATE('1900/01/01'))))) THEN
302:
303: -- p_legacy value passed as 'N' as function is called in non-legacy mode
304: IF IGS_EN_VAL_SUSA.enrp_val_susa_sci_sd(
297: IF p_inserting OR
298: (p_updating AND
299: ((new_references.student_confirmed_ind <> old_references.student_confirmed_ind) OR
300: (NVL(new_references.selection_dt,IGS_GE_DATE.IGSDATE('1900/01/01'))
301: <> NVL(old_references.selection_dt, IGS_GE_DATE.IGSDATE('1900/01/01'))))) THEN
302:
303: -- p_legacy value passed as 'N' as function is called in non-legacy mode
304: IF IGS_EN_VAL_SUSA.enrp_val_susa_sci_sd(
305: new_references.student_confirmed_ind,
315: -- set.
316: IF p_inserting OR
317: (p_updating AND
318: ((new_references.voluntary_end_ind <> old_references.voluntary_end_ind) OR
319: (NVL(new_references.end_dt,IGS_GE_DATE.IGSDATE('1900/01/01'))
320: <> NVL(old_references.end_dt, IGS_GE_DATE.IGSDATE('1900/01/01'))))) THEN
321: IF IGS_EN_VAL_SUSA.enrp_val_susa_end_vi(
322: new_references.voluntary_end_ind,
323: new_references.end_dt,
316: IF p_inserting OR
317: (p_updating AND
318: ((new_references.voluntary_end_ind <> old_references.voluntary_end_ind) OR
319: (NVL(new_references.end_dt,IGS_GE_DATE.IGSDATE('1900/01/01'))
320: <> NVL(old_references.end_dt, IGS_GE_DATE.IGSDATE('1900/01/01'))))) THEN
321: IF IGS_EN_VAL_SUSA.enrp_val_susa_end_vi(
322: new_references.voluntary_end_ind,
323: new_references.end_dt,
324: v_message_name ) = FALSE THEN
630: -- of the IGS_PS_UNIT set exists. Also cannot be cleared if parent ended.
631: -- If part of the admissions offer, authorisation required to end
632: -- the IGS_PS_UNIT set.
633: IF p_inserting OR
634: (NVL(new_references.end_dt,IGS_GE_DATE.IGSDATE('1900/01/01'))
635: <> NVL(old_references.end_dt, IGS_GE_DATE.IGSDATE('1900/01/01'))) THEN
636: -- Store away the rowid as the validation will cause a mutating trigger.
637: -- Set the end date field to indicate validation required for end date.
638: -- If p_inserting, validation is still to occur. If end_is null then set it
631: -- If part of the admissions offer, authorisation required to end
632: -- the IGS_PS_UNIT set.
633: IF p_inserting OR
634: (NVL(new_references.end_dt,IGS_GE_DATE.IGSDATE('1900/01/01'))
635: <> NVL(old_references.end_dt, IGS_GE_DATE.IGSDATE('1900/01/01'))) THEN
636: -- Store away the rowid as the validation will cause a mutating trigger.
637: -- Set the end date field to indicate validation required for end date.
638: -- If p_inserting, validation is still to occur. If end_is null then set it
639: -- such that validation will happen in the after statement trigger.
637: -- Set the end date field to indicate validation required for end date.
638: -- If p_inserting, validation is still to occur. If end_is null then set it
639: -- such that validation will happen in the after statement trigger.
640: IF p_inserting AND
641: (NVL(new_references.end_dt, IGS_GE_DATE.IGSDATE('1900/01/01'))
642: = IGS_GE_DATE.IGSDATE('1900/01/01')) THEN
643: v_tmp_end_dt := IGS_GE_DATE.IGSDATE('1900/01/01');
644: ELSE
645: v_tmp_end_dt := new_references.end_dt;
638: -- If p_inserting, validation is still to occur. If end_is null then set it
639: -- such that validation will happen in the after statement trigger.
640: IF p_inserting AND
641: (NVL(new_references.end_dt, IGS_GE_DATE.IGSDATE('1900/01/01'))
642: = IGS_GE_DATE.IGSDATE('1900/01/01')) THEN
643: v_tmp_end_dt := IGS_GE_DATE.IGSDATE('1900/01/01');
644: ELSE
645: v_tmp_end_dt := new_references.end_dt;
646: END IF;
639: -- such that validation will happen in the after statement trigger.
640: IF p_inserting AND
641: (NVL(new_references.end_dt, IGS_GE_DATE.IGSDATE('1900/01/01'))
642: = IGS_GE_DATE.IGSDATE('1900/01/01')) THEN
643: v_tmp_end_dt := IGS_GE_DATE.IGSDATE('1900/01/01');
644: ELSE
645: v_tmp_end_dt := new_references.end_dt;
646: END IF;
647: RowValMutation(