10: SELECT pps.final_process_date fpd
11: FROM
12: per_periods_of_service pps
13: WHERE
14: pps.person_id = hr_pay_interface_pkg.g_ele_person_id;
15: --
16: l_event_id NUMBER;
17: l_business_group_id NUMBER;
18: l_legislation_code VARCHAR2(10);
25: -- If the business group id is null, the Before Row trigger didn't fire
26: -- which means that no rows have been deleted in the database.
27: -- Hence the trigger doesn't need to fire.
28: --
29: IF hr_pay_interface_pkg.g_element_entry_rec_var.business_group_id IS NULL
30: THEN
31: return;
32: END IF;
33: --
43: --process date of the employee (if terminated). If it is, then the
44: --element should be deleted, therefore the trigger shouldn't fire,
45: --and should exit at this point.
46: IF ((l_fpd IS NOT NULL) AND
47: (l_fpd < hr_pay_interface_pkg.g_ele_start_date)) OR
48: (hr_pay_interface_pkg.g_ele_start_date IS NULL) THEN
49: hr_pay_interface_pkg.g_ele_start_date := NULL;
50: hr_pay_interface_pkg.g_ele_person_id := NULL;
51: return;
44: --element should be deleted, therefore the trigger shouldn't fire,
45: --and should exit at this point.
46: IF ((l_fpd IS NOT NULL) AND
47: (l_fpd < hr_pay_interface_pkg.g_ele_start_date)) OR
48: (hr_pay_interface_pkg.g_ele_start_date IS NULL) THEN
49: hr_pay_interface_pkg.g_ele_start_date := NULL;
50: hr_pay_interface_pkg.g_ele_person_id := NULL;
51: return;
52: END IF;
45: --and should exit at this point.
46: IF ((l_fpd IS NOT NULL) AND
47: (l_fpd < hr_pay_interface_pkg.g_ele_start_date)) OR
48: (hr_pay_interface_pkg.g_ele_start_date IS NULL) THEN
49: hr_pay_interface_pkg.g_ele_start_date := NULL;
50: hr_pay_interface_pkg.g_ele_person_id := NULL;
51: return;
52: END IF;
53:
46: IF ((l_fpd IS NOT NULL) AND
47: (l_fpd < hr_pay_interface_pkg.g_ele_start_date)) OR
48: (hr_pay_interface_pkg.g_ele_start_date IS NULL) THEN
49: hr_pay_interface_pkg.g_ele_start_date := NULL;
50: hr_pay_interface_pkg.g_ele_person_id := NULL;
51: return;
52: END IF;
53:
54: /* Initialise the variables to ensure the triggers work */
53:
54: /* Initialise the variables to ensure the triggers work */
55: --
56: l_business_group_id :=
57: hr_pay_interface_pkg.g_element_entry_rec_var.business_group_id;
58: l_payroll_id := hr_pay_interface_pkg.g_element_entry_rec_var.payroll_id;
59: l_legislation_code := pay_core_utils.get_legislation_code(
60: p_bg_id => l_business_group_id);
61: --
54: /* Initialise the variables to ensure the triggers work */
55: --
56: l_business_group_id :=
57: hr_pay_interface_pkg.g_element_entry_rec_var.business_group_id;
58: l_payroll_id := hr_pay_interface_pkg.g_element_entry_rec_var.payroll_id;
59: l_legislation_code := pay_core_utils.get_legislation_code(
60: p_bg_id => l_business_group_id);
61: --
62: -- Check if the cursor is enabled
73: RETURN;
74: END IF;
75: /* If the procedure hasn't exited at this point, run the trigger code*/
76: --
77: hr_pay_interface_pkg.disable_ele_entry_delete;
78: --
79: END IF;
80: END hr_pay_if_ele_ent_asd;