DBA Data[Home] [Help]

PACKAGE BODY: APPS.HR_SG_PEOPLE_LEG_HOOK

Source


1 PACKAGE BODY hr_sg_people_leg_hook AS
2 /* $Header: hrsglhpp.pkb 120.0 2005/05/31 02:41:44 appldev noship $ */
3 --
4   g_package  VARCHAR2(33) := 'hr_sg_people_leg_hook.';
5 --
6   procedure check_sg_legal_name( p_person_type_id  NUMBER
7                                 ,p_per_information1 VARCHAR2) IS
8     l_proc         VARCHAR2(72) := g_package||'check_sg_legal_name';
9     l_person_type  VARCHAR2(150);
10 
11   begin
12     --
13     -- It will raise an error if the Legal Name has not been entered
14     -- when the person is EMPLOYEE
15     --
16     hr_utility.set_location('Entering:'|| l_proc, 10);
17 
18     if hr_multi_message.no_exclusive_error
19          (p_check_column1 => 'PER_ALL_PEOPLE_F.PER_INFORMATION1'
20          ) then
21       if p_per_information1 is NULL then
22         open  csr_val_person_type(p_person_type_id);
23         fetch csr_val_person_type into l_person_type;
24         close csr_val_person_type;
25         if l_person_type like 'EMP%' then
26           fnd_message.set_name('PAY', 'HR_SG_LEGAL_NAME_NULL');
27           hr_multi_message.add
28             (p_associated_column1 => 'PER_ALL_PEOPLE_F.PER_INFORMATION1'
29             );
30         end if;
31       end if;
32     end if;
33     hr_utility.set_location('Leaving:'|| l_proc, 20);
34   end check_sg_legal_name;
35 
36   procedure check_sg_income_tax( p_person_type_id      NUMBER
37                                 ,p_national_identifier VARCHAR2
38                                 ,p_per_information12   VARCHAR2) IS
39     l_proc               VARCHAR2(72) := g_package||'check_sg_income_tax';
40     l_system_person_type per_person_types.system_person_type%type;
41 
42   begin
43     --
44     -- It will raise an error if the income tax number has not been
45     -- entered when the NRIC number is blank
46     --
47     hr_utility.set_location('Entering:'|| l_proc,10);
48 
49     OPEN  csr_val_person_type(p_person_type_id);
50     FETCH csr_val_person_type INTO
51           l_system_person_type;
52     CLOSE csr_val_person_type;
53 
54     IF l_system_person_type like 'EMP%' THEN
55        if hr_multi_message.no_exclusive_error
56          (p_check_column1 => 'PER_ALL_PEOPLE_F.PER_INFORMATION12'
57           ) then
58           if p_national_identifier is NULL then
59              if p_per_information12 is NULL then
60                 fnd_message.set_name('PAY','HR_SG_INCOME_TAX_NUMBER_NULL');
61                 hr_multi_message.add
62                 (p_associated_column1 => 'PER_ALL_PEOPLE_F.PER_INFORMATION12');
63              end if;
64           end if;
65           hr_utility.set_location(' Leaving:'|| l_proc, 20);
66        end if;
67     END IF;
68   end check_sg_income_tax;
69 end hr_sg_people_leg_hook;