[Home] [Help]
16: p_message_name OUT NOCOPY VARCHAR2)
17: RETURN BOOLEAN AS
18: gv_other_detail VARCHAR2(255);
19: BEGIN -- finp_val_prsn_encmb
20: -- Validates that IGS_PE_PERSON does not currently have an active IGS_PE_PERS_ENCUMB
21: -- record matching that which will be applied if the IGS_PE_PND_FEE_ENCUM
22: -- is authorised
23: DECLARE
24: cst_academic CONSTANT VARCHAR2(8) := 'ACADEMIC';
23: DECLARE
24: cst_academic CONSTANT VARCHAR2(8) := 'ACADEMIC';
25: v_rec_found BOOLEAN DEFAULT FALSE;
26: v_s_encmb_cat IGS_FI_ENCMB_TYPE.s_encumbrance_cat%TYPE;
27: v_start_dt IGS_PE_PERS_ENCUMB.start_dt%TYPE;
28: CURSOR c_encmb_type (
29: cp_encumbrance_type IGS_FI_ENCMB_TYPE.encumbrance_type%TYPE) IS
30: SELECT et.s_encumbrance_cat
31: FROM IGS_FI_ENCMB_TYPE et
30: SELECT et.s_encumbrance_cat
31: FROM IGS_FI_ENCMB_TYPE et
32: WHERE et.encumbrance_type = cp_encumbrance_type;
33: CURSOR c_prsn_encmb (
34: cp_person_id IGS_PE_PERS_ENCUMB.person_id%TYPE,
35: cp_encumbrance_type IGS_PE_PERS_ENCUMB.encumbrance_type%TYPE,
36: cp_fee_encumbrance_dt IGS_PE_PERS_ENCUMB.start_dt%TYPE) IS
37: SELECT 'x'
38: FROM IGS_PE_PERS_ENCUMB pe
31: FROM IGS_FI_ENCMB_TYPE et
32: WHERE et.encumbrance_type = cp_encumbrance_type;
33: CURSOR c_prsn_encmb (
34: cp_person_id IGS_PE_PERS_ENCUMB.person_id%TYPE,
35: cp_encumbrance_type IGS_PE_PERS_ENCUMB.encumbrance_type%TYPE,
36: cp_fee_encumbrance_dt IGS_PE_PERS_ENCUMB.start_dt%TYPE) IS
37: SELECT 'x'
38: FROM IGS_PE_PERS_ENCUMB pe
39: WHERE pe.person_id = cp_person_id AND
32: WHERE et.encumbrance_type = cp_encumbrance_type;
33: CURSOR c_prsn_encmb (
34: cp_person_id IGS_PE_PERS_ENCUMB.person_id%TYPE,
35: cp_encumbrance_type IGS_PE_PERS_ENCUMB.encumbrance_type%TYPE,
36: cp_fee_encumbrance_dt IGS_PE_PERS_ENCUMB.start_dt%TYPE) IS
37: SELECT 'x'
38: FROM IGS_PE_PERS_ENCUMB pe
39: WHERE pe.person_id = cp_person_id AND
40: pe.encumbrance_type = cp_encumbrance_type AND
34: cp_person_id IGS_PE_PERS_ENCUMB.person_id%TYPE,
35: cp_encumbrance_type IGS_PE_PERS_ENCUMB.encumbrance_type%TYPE,
36: cp_fee_encumbrance_dt IGS_PE_PERS_ENCUMB.start_dt%TYPE) IS
37: SELECT 'x'
38: FROM IGS_PE_PERS_ENCUMB pe
39: WHERE pe.person_id = cp_person_id AND
40: pe.encumbrance_type = cp_encumbrance_type AND
41: trunc(pe.start_dt) <=
42: trunc(cp_fee_encumbrance_dt) AND
43: (pe.expiry_dt IS NULL OR
44: trunc(pe.expiry_dt) >
45: trunc(cp_fee_encumbrance_dt));
46: CURSOR c_prsn_encmb_1 (
47: cp_person_id IGS_PE_PERS_ENCUMB.person_id%TYPE,
48: cp_encumbrance_type IGS_PE_PERS_ENCUMB.encumbrance_type%TYPE,
49: cp_start_dt IGS_PE_PERS_ENCUMB.start_dt%TYPE) IS
50: SELECT 'x'
51: FROM IGS_PE_PERS_ENCUMB pe
44: trunc(pe.expiry_dt) >
45: trunc(cp_fee_encumbrance_dt));
46: CURSOR c_prsn_encmb_1 (
47: cp_person_id IGS_PE_PERS_ENCUMB.person_id%TYPE,
48: cp_encumbrance_type IGS_PE_PERS_ENCUMB.encumbrance_type%TYPE,
49: cp_start_dt IGS_PE_PERS_ENCUMB.start_dt%TYPE) IS
50: SELECT 'x'
51: FROM IGS_PE_PERS_ENCUMB pe
52: WHERE pe.person_id = cp_person_id AND
45: trunc(cp_fee_encumbrance_dt));
46: CURSOR c_prsn_encmb_1 (
47: cp_person_id IGS_PE_PERS_ENCUMB.person_id%TYPE,
48: cp_encumbrance_type IGS_PE_PERS_ENCUMB.encumbrance_type%TYPE,
49: cp_start_dt IGS_PE_PERS_ENCUMB.start_dt%TYPE) IS
50: SELECT 'x'
51: FROM IGS_PE_PERS_ENCUMB pe
52: WHERE pe.person_id = cp_person_id AND
53: pe.ENCUMBRANCE_TYPE = cp_encumbrance_type AND
47: cp_person_id IGS_PE_PERS_ENCUMB.person_id%TYPE,
48: cp_encumbrance_type IGS_PE_PERS_ENCUMB.encumbrance_type%TYPE,
49: cp_start_dt IGS_PE_PERS_ENCUMB.start_dt%TYPE) IS
50: SELECT 'x'
51: FROM IGS_PE_PERS_ENCUMB pe
52: WHERE pe.person_id = cp_person_id AND
53: pe.ENCUMBRANCE_TYPE = cp_encumbrance_type AND
54: trunc(pe.start_dt)= trunc(cp_start_dt);
55: BEGIN
62: END IF;
63: -- Evaluate the fee_encumbrance_dt.
64: -- If it is less then the current date, set it to the current date.
65: -- This is necessary as it is used as the start date value in the
66: -- IGS_PE_PERS_ENCUMB record and if less than the current date,
67: -- an error will result.
68: IF(p_fee_encumbrance_dt < sysdate) THEN
69: v_start_dt := SYSDATE;
70: ELSE