[Home] [Help]
PACKAGE BODY: APPS.PER_GB_P46EXPAT_INFO
Source
1 PACKAGE BODY PER_GB_P46EXPAT_INFO AS
2 /* $Header: pergbeit.pkb 120.1.12020000.4 2012/12/28 13:17:18 sampmand ship $ */
3
4 g_package varchar2(33) := ' PER_GB_P46EXPAT_INFO.';
5
6 PROCEDURE CREATE_GB_P46EXPAT_INFO(P_ASSIGNMENT_ID NUMBER
7 ,P_INFORMATION_TYPE VARCHAR2
8 ,P_AEI_ATTRIBUTE_CATEGORY VARCHAR2
9 ,P_AEI_INFORMATION_CATEGORY VARCHAR2
10 ,P_AEI_INFORMATION1 VARCHAR2
11 ,P_AEI_INFORMATION2 VARCHAR2
12 ,P_AEI_INFORMATION3 VARCHAR2
13 ,P_AEI_INFORMATION4 VARCHAR2
14 ,P_AEI_INFORMATION5 VARCHAR2
15 ,P_AEI_INFORMATION6 VARCHAR2
16 ,P_AEI_INFORMATION7 VARCHAR2
17 )
18 IS
19
20 -- Declare local variables
21 l_proc varchar2(72) := g_package||'CREATE_GB_P46EXPAT_INFO';
22 --
23
24 BEGIN
25
26 hr_utility.set_location('Entering:'|| l_proc, 10);
27
28 hr_utility.set_location(l_proc, 6);
29
30 if p_aei_information_category = 'GB_P46EXP' then
31 if (p_aei_information1 = 'Y') then --if send_edi is checked
32 if (p_aei_information2 <> 'A' and p_aei_information2 <> 'B' and p_aei_information2 <> 'C') then
33 hr_utility.set_message(801, 'PAY_GB_78146_INV_EXPAT_STMT');
34 hr_utility.set_message_token('TYPE','P46EXPAT');
35 hr_utility.raise_error;
36 end if;
37
38 if (p_aei_information4 is not null and p_aei_information4 <> 'D') then
39 hr_utility.set_message(801, 'PAY_GB_78147_INV_STU_LOAN');
40 hr_utility.set_message_token('TYPE','P46EXPAT');
41 hr_utility.raise_error;
42 end if;
43
44 if (p_aei_information5 is not null) then
45 hr_utility.set_message(801, 'PAY_GB_78143_WARN_EEA_CITIZEN');
46 hr_utility.set_message_token('TYPE','P46EXPAT');
47 end if;
48
49 if (p_aei_information7 is null) then
50 hr_utility.set_message(801, 'PAY_GB_78148_INV_UK_EMPL_DATE');
51 hr_utility.set_message_token('TYPE','P46EXPAT');
52 hr_utility.raise_error;
53 end if;
54
55 end if;
56 end if;
57
58 if (p_aei_information_category = 'GB_PAY_RTI') then
59
60 if (p_aei_information5 <> hr_api.g_varchar2 and p_aei_information5 <> 'Y' and p_aei_information5 <> 'N') then
61 hr_utility.set_message(800, 'HR_GB_78160_INV_EXPAT_IND');
62 hr_utility.set_message_token('TYPE','EAS13');
63 hr_utility.raise_error;
64 end if;
65
66 if (p_aei_information6 <> hr_api.g_varchar2 and p_aei_information6 <> 'Y' and p_aei_information6 <> 'N') then
67 hr_utility.set_message(800, 'HR_GB_78161_INV_OCC_PENSION');
68 hr_utility.set_message_token('TYPE','EAS13');
69 hr_utility.raise_error;
70 end if;
71
72 if (p_aei_information7 <> hr_api.g_varchar2 and p_aei_information7 <> 'Y' and p_aei_information7 <> 'N') then
73 hr_utility.set_message(800, 'HR_GB_78162_INV_NON_PAY_INDIV');
74 hr_utility.set_message_token('TYPE','EAS13');
75 hr_utility.raise_error;
76 end if;
77
78
79 end if;
80
81
82 hr_utility.set_location(' Leaving:'||l_proc, 40);
83
84 END CREATE_GB_P46EXPAT_INFO;
85
86 PROCEDURE UPDATE_GB_P46EXPAT_INFO(P_ASSIGNMENT_EXTRA_INFO_ID NUMBER
87 ,P_AEI_ATTRIBUTE_CATEGORY VARCHAR2
88 ,P_AEI_INFORMATION_CATEGORY VARCHAR2
89 ,P_AEI_INFORMATION1 VARCHAR2
90 ,P_AEI_INFORMATION2 VARCHAR2
91 ,P_AEI_INFORMATION3 VARCHAR2
92 ,P_AEI_INFORMATION4 VARCHAR2
93 ,P_AEI_INFORMATION5 VARCHAR2
94 ,P_AEI_INFORMATION6 VARCHAR2
95 ,P_AEI_INFORMATION7 VARCHAR2
96 )
97 IS
98
99 l_proc varchar2(72) := g_package||'UPDATE_GB_P46EXPAT_INFO';
100 BEGIN
101 hr_utility.set_location('Entering:'|| l_proc, 10);
102 --Commented out for time being in order to address rollback issue
103 /* if (p_aei_information1 = 'Y') then
104
105 if (p_aei_information2 <> 'A' and p_aei_information2 <> 'B' and p_aei_information2 <> 'C') then
106 hr_utility.set_message(801, 'PAY_GB_78146_INV_EXPAT_STMT');
107 hr_utility.set_message_token('TYPE','P46EXPAT');
108 hr_utility.raise_error;
109 end if;
110
111 if (p_aei_information4 is not null and p_aei_information4 <> 'D') then
112 hr_utility.set_message(801, 'PAY_GB_78147_INV_STU_LOAN');
113 hr_utility.set_message_token('TYPE','P46EXPAT');
114 hr_utility.raise_error;
115 end if;
116
117 if (p_aei_information5 is not null) then
118 hr_utility.set_message(801, 'PAY_GB_78143_WARN_EEA_CITIZEN');
119 hr_utility.set_message_token('TYPE','P46EXPAT');
120 hr_utility.raise_error;
121 end if;
122
123 if (p_aei_information7 is null) then
124 hr_utility.set_message(801, 'PAY_GB_78148_INV_UK_EMPL_DATE');
125 hr_utility.set_message_token('TYPE','P46EXPAT');
126 hr_utility.raise_error;
127 end if;
128
129 end if;
130 */
131
132 if (p_aei_information_category = 'GB_PAY_RTI') then
133
134 if (p_aei_information5 <> hr_api.g_varchar2 and p_aei_information5 <> 'Y' and p_aei_information5 <> 'N') then
135 hr_utility.set_message(800, 'HR_GB_78160_INV_EXPAT_IND');
136 hr_utility.set_message_token('TYPE','EAS13');
137 hr_utility.raise_error;
138 end if;
139
140 if (p_aei_information6 <> hr_api.g_varchar2 and p_aei_information6 <> 'Y' and p_aei_information6 <> 'N') then
141 hr_utility.set_message(800, 'HR_GB_78161_INV_OCC_PENSION');
142 hr_utility.set_message_token('TYPE','EAS13');
143 hr_utility.raise_error;
144 end if;
145
146 if (p_aei_information7 <> hr_api.g_varchar2 and p_aei_information7 <> 'Y' and p_aei_information7 <> 'N') then
147 hr_utility.set_message(800, 'HR_GB_78162_INV_NON_PAY_INDIV');
148 hr_utility.set_message_token('TYPE','EAS13');
149 hr_utility.raise_error;
150 end if;
151
152
153 end if;
154 hr_utility.set_location(' Leaving:'||l_proc, 40);
155
156 END UPDATE_GB_P46EXPAT_INFO;
157
158
159
160 END PER_GB_P46EXPAT_INFO;