1 PACKAGE BODY hr_hk_people_leg_hook AS
2 /* $Header: hrhklhpp.pkb 120.0.12000000.2 2007/09/11 04:24:59 jalin ship $ */
3 --
4 g_package VARCHAR2(33) := 'hr_hk_people_leg_hook.';
5 --
6
7
8 PROCEDURE check_hkid_passport( p_person_type_id NUMBER
9 ,p_national_identifier VARCHAR2
10 ,p_per_information1 VARCHAR2
11 ,p_per_information2 VARCHAR2
12 ,p_per_information3 VARCHAR2
13 ,p_per_information4 VARCHAR2) IS
14
15 l_proc VARCHAR2(200) := g_package||'check_hkid_passport';
16 l_system_person_type per_person_types.system_person_type%type;
17
18 BEGIN
19 hr_utility.set_location('Entering:'|| l_proc, 10);
20
21 IF NOT hr_utility.chk_product_install('Oracle Human Resources', 'HK') THEN
22 hr_utility.trace ('HK Legislation not installed. Not performing the validations');
23 RETURN;
24 END IF;
25
26 OPEN csr_val_person_type(p_person_type_id);
27 FETCH csr_val_person_type INTO
28 l_system_person_type;
29 CLOSE csr_val_person_type;
30
31 -- Check if the Person is Employee - Bug No : 2817820. The cursor csr_val_person_type included to fetch the
32 -- person_type using person_type_id.
33
34 IF l_system_person_type like 'EMP%' THEN
35 IF p_national_identifier IS NULL THEN
36 IF ((p_per_information1 IS NULL)
37 OR (p_per_information2 IS NULL)
38 OR (p_per_information3 IS NULL)
39 OR (p_per_information4 IS NULL)) THEN
40 -- Error
41 hr_utility.set_message(800,'HR_HK_HKID_OR_PASSPORT_INFO');
42 hr_utility.raise_error;
43 END IF;
44 END IF;
45 END IF;
46 hr_utility.set_location(' Leaving:'||l_proc, 20);
47 END check_hkid_passport;
48
49
50
51 /* Bug No : 2737948 - Included a new procedure check_hongkong_name for Hong Kong Name validation */
52
53 PROCEDURE check_hongkong_name( p_person_type_id NUMBER
54 ,p_per_information6 VARCHAR2) IS
55
56 l_proc VARCHAR2(200) := g_package|| 'check_hongkong_name';
57 l_system_person_type per_person_types.system_person_type%type;
58
59 BEGIN
60 hr_utility.set_location('Entering:'|| l_proc, 10);
61
62 IF NOT hr_utility.chk_product_install('Oracle Human Resources', 'HK') THEN
63 hr_utility.trace ('HK Legislation not installed. Not performing the validations');
64 RETURN;
65 END IF;
66
67 OPEN csr_val_person_type(p_person_type_id);
68 FETCH csr_val_person_type INTO
69 l_system_person_type;
70 CLOSE csr_val_person_type;
71
72 IF l_system_person_type like 'EMP%' THEN
73 IF (p_per_information6 IS NULL) THEN
74 hr_utility.set_message('800', 'HR_HK_HONGKONG_NAME');
75 hr_utility.raise_error;
76 END IF;
77 END IF;
78
79 hr_utility.set_location(' Leaving:'||l_proc, 20);
80 EXCEPTION
81 WHEN OTHERS THEN
82 hr_utility.trace('Error in ' || l_proc );
83 raise;
84 END check_hongkong_name;
85
86
87 END hr_hk_people_leg_hook;