1 PACKAGE BODY hr_de_extra_assignment_checks AS
2 /* $Header: pedeasgv.pkb 120.1.12010000.3 2009/03/18 11:11:42 parusia ship $ */
3 --
4 --
5 -- Service functions to return TRUE if the value passed has been changed.
6 --
7 FUNCTION val_changed(p_value IN NUMBER) RETURN BOOLEAN IS
8 BEGIN RETURN (NVL(p_value, 1) <> hr_api.g_number); END val_changed;
9 --
10 FUNCTION val_changed(p_value IN VARCHAR2) RETURN BOOLEAN IS
11 BEGIN RETURN (NVL(p_value, 'a') <> hr_api.g_varchar2); END val_changed;
12 --
13 FUNCTION val_changed(p_value IN DATE) RETURN BOOLEAN IS
14 BEGIN RETURN (NVL(p_value, sysdate) <> hr_api.g_date); END val_changed;
15 --
16 --
17 -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
18 -- Assignment checks.
19 --
20 -- 1. Union Membership cannot be recorded.
21 -- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
22 --
23 PROCEDURE assignment_checks
24 (p_labour_union_member_flag IN VARCHAR2) IS
25 BEGIN
26 --
27 --
28 -- Check if DE is installed
29 IF hr_utility.chk_product_install('Oracle Human Resources', 'DE') THEN
30
31 -- Check that the union member flag has not been set.
32 --
33 If val_changed(p_labour_union_member_flag) AND p_labour_union_member_flag IS NOT NULL THEN
34 hr_utility.set_message(800, 'HR_DE_INVALID_UNION_FLAG');
35 hr_utility.raise_error;
36 END IF;
37
38 END IF;
39 END assignment_checks;
40
41 PROCEDURE set_labour_union_flag
42 (p_labour_union_member_flag IN OUT NOCOPY VARCHAR2) IS
43 BEGIN
44 -- It is not required with a German commercial HR system to record an
45 -- individuals membership of a union. In Germany union membership and
46 -- any associated dues are dealt with outside of any HRMS system to
47 -- prevent companies from discriminating against employees who are union members
48 -- Hence returning null for Labour_union_member_flag for germany.
49
50 p_labour_union_member_flag := null ;
51
52 END set_labour_union_flag ;
53
54 END hr_de_extra_assignment_checks;