[Home] [Help]
Skip to content
PACKAGE BODY: APPS.PAY_CN_ENTRY_VALUE_LEG_HOOK
Source
1 PACKAGE BODY pay_cn_entry_value_leg_hook AS
2 /* $Header: pycnlhee.pkb 120.0.12010000.2 2009/10/01 09:05:21 dduvvuri ship $ */
3 --
4 -- Globals
5 --
6 g_package CONSTANT VARCHAR2(100) := 'pay_cn_entry_value_leg_hook.' ;
7 g_debug BOOLEAN ;
8 g_message_name VARCHAR2(30);
9 g_token_name hr_cn_api.char_tab_type;
10 g_token_value hr_cn_api.char_tab_type;
11
12 --------------------------------------------------------------------------
13 -- --
14 -- Name : CHECK_EE_PHF_SI_SETUP --
15 -- Type : PROCEDURE --
16 -- Access : Private --
17 -- Description : Internal Procedure for CN localization --
18 -- Parameters : --
19 -- IN : p_entry_information2 IN VARCHAR2 --
20 -- p_entry_information3 IN VARCHAR2 --
21 -- p_entry_information4 IN VARCHAR2 --
22 -- p_entry_information5 IN VARCHAR2 --
23 -- p_entry_information6 IN VARCHAR2 --
24 -- p_entry_information7 IN VARCHAR2 --
25 -- p_entry_information8 IN VARCHAR2 --
26 -- p_entry_information9 IN VARCHAR2 --
27 -- p_calling_procedure IN VARCHAR2 --
28 -- OUT: --
29 -- p_message_name VARCHAR2 --
30 -- p_token_name PL/SQL table --
31 -- p_token_value PL/SQL table --
32 -- --
33 -- Change History : --
34 --------------------------------------------------------------------------
35 -- Rev# Date Userid Bug Description --
36 --------------------------------------------------------------------------
37 -- 1.0 07-Oct-06 abhjain 5563042 Created this procedure --
38 -- 1.1 01-oct-09 dduvvuri 8838185 Raised error messages for all the validations --
39 --------------------------------------------------------------------------
40 PROCEDURE check_ee_phf_si_setup(
41 p_entry_information2 IN VARCHAR2
42 ,p_entry_information3 IN VARCHAR2
43 ,p_entry_information4 IN VARCHAR2
44 ,p_entry_information5 IN VARCHAR2
45 ,p_entry_information6 IN VARCHAR2
46 ,p_entry_information7 IN VARCHAR2
47 ,p_entry_information8 IN VARCHAR2
48 ,p_entry_information9 IN VARCHAR2
49 ,p_calling_procedure IN VARCHAR2
50 ,p_message_name OUT NOCOPY VARCHAR2
51 ,p_token_name OUT NOCOPY hr_cn_api.char_tab_type
52 ,p_token_value OUT NOCOPY hr_cn_api.char_tab_type
53 )
54 IS
55 l_procedure VARCHAR2(100);
56 BEGIN
57
58 l_procedure := g_package||'check_ee_phf_si_setup';
59 g_debug := hr_utility.debug_enabled;
60 hr_cn_api.set_location(g_debug, 'Entering: ' || l_procedure, 10);
61
62 IF g_debug THEN
63 hr_utility.trace('====================================================================');
64 hr_utility.trace('p_message_name '||p_message_name);
65 hr_utility.trace('====================================================================');
66 END IF;
67
68 IF g_debug THEN
69 hr_utility.trace('====================================================================');
70 hr_utility.trace('p_entry_information2 '||p_entry_information2);
71 hr_utility.trace('p_entry_information3 '||p_entry_information3);
72 hr_utility.trace('p_entry_information4 '||p_entry_information4);
73 hr_utility.trace('p_entry_information5 '||p_entry_information5);
74 hr_utility.trace('p_entry_information6 '||p_entry_information6);
75 hr_utility.trace('p_entry_information7 '||p_entry_information7);
76 hr_utility.trace('p_entry_information8 '||p_entry_information8);
77 hr_utility.trace('p_entry_information9 '||p_entry_information9);
78 hr_utility.trace('p_calling_procedure '||p_calling_procedure );
79 hr_utility.trace('====================================================================');
80 END IF;
81
82 IF (p_entry_information2 IS NOT NULL AND p_entry_information3 IS NULL) THEN
83 hr_cn_api.set_location(g_debug,l_procedure,20);
84 p_message_name := 'HR_374622_DPND_FIELD_ABSENT';
85 p_token_name(1) := 'FIELD1';
86 p_token_value(1) := hr_cn_api.get_dff_tl_value('EE Rate or Fixed Amount', 'Element Entry Developer DF' , 'CN_PHF AND SI INFORMATION');
87 p_token_name(2) := 'FIELD2';
88 p_token_value(2) := hr_cn_api.get_dff_tl_value('EE Percent or Fixed', 'Element Entry Developer DF' , 'CN_PHF AND SI INFORMATION');
89
90 IF g_debug THEN
91 hr_utility.trace('====================================================================');
92 hr_utility.trace('p_message_name '||p_message_name);
93 hr_utility.trace('====================================================================');
94 END IF;
95 /* Raised error message for bug 8838185 */
96 hr_cn_api.raise_message(800
97 ,p_message_name
98 ,p_token_name
99 ,p_token_value);
100 END IF;
101
102 IF (p_entry_information3 IS NOT NULL AND p_entry_information2 IS NULL) THEN
103 hr_cn_api.set_location(g_debug,l_procedure,30);
104 p_message_name := 'HR_374622_DPND_FIELD_ABSENT';
105 p_token_name(1) := 'FIELD1';
106 p_token_value(1) := hr_cn_api.get_dff_tl_value('EE Percent or Fixed', 'Element Entry Developer DF' , 'CN_PHF AND SI INFORMATION');
107 p_token_name(2) := 'FIELD2';
108 p_token_value(2) := hr_cn_api.get_dff_tl_value('EE Rate or Fixed Amount', 'Element Entry Developer DF' , 'CN_PHF AND SI INFORMATION');
109
110 IF g_debug THEN
111 hr_utility.trace('====================================================================');
112 hr_utility.trace('p_message_name '||p_message_name);
113 hr_utility.trace('====================================================================');
114 END IF;
115 /* Raised error message for bug 8838185 */
116 hr_cn_api.raise_message(800
117 ,p_message_name
118 ,p_token_name
119 ,p_token_value);
120 END IF;
121
122 IF (p_entry_information4 IS NOT NULL AND p_entry_information5 IS NULL) THEN
123 hr_cn_api.set_location(g_debug,l_procedure,40);
124 p_message_name := 'HR_374622_DPND_FIELD_ABSENT';
125 p_token_name(1) := 'FIELD1';
126 p_token_value(1) := hr_cn_api.get_dff_tl_value('ER Rate or Fixed Amount', 'Element Entry Developer DF' , 'CN_PHF AND SI INFORMATION');
127 p_token_name(2) := 'FIELD2';
128 p_token_value(2) := hr_cn_api.get_dff_tl_value('ER Percent or Fixed', 'Element Entry Developer DF' , 'CN_PHF AND SI INFORMATION');
129
130 IF g_debug THEN
131 hr_utility.trace('====================================================================');
132 hr_utility.trace('p_message_name '||p_message_name);
133 hr_utility.trace('====================================================================');
134 END IF;
135 /* Raised error message for bug 8838185 */
136 hr_cn_api.raise_message(800
137 ,p_message_name
138 ,p_token_name
139 ,p_token_value);
140 END IF;
141
142 IF (p_entry_information5 IS NOT NULL AND p_entry_information4 IS NULL) THEN
143 hr_cn_api.set_location(g_debug,l_procedure,50);
144 p_message_name := 'HR_374622_DPND_FIELD_ABSENT';
145 p_token_name(1) := 'FIELD1';
146 p_token_value(1) := hr_cn_api.get_dff_tl_value('ER Percent or Fixed', 'Element Entry Developer DF' , 'CN_PHF AND SI INFORMATION');
147 p_token_name(2) := 'FIELD2';
148 p_token_value(2) := hr_cn_api.get_dff_tl_value('ER Rate or Fixed Amount', 'Element Entry Developer DF' , 'CN_PHF AND SI INFORMATION');
149
150 IF g_debug THEN
151 hr_utility.trace('====================================================================');
152 hr_utility.trace('p_message_name '||p_message_name);
153 hr_utility.trace('====================================================================');
154 END IF;
155 /* Raised error message for bug 8838185 */
156 hr_cn_api.raise_message(800
157 ,p_message_name
158 ,p_token_name
159 ,p_token_value);
160 END IF;
161
162 IF (p_entry_information6 = 'FIXED' AND p_entry_information7 IS NULL) THEN
163 hr_cn_api.set_location(g_debug,l_procedure,60);
164 p_message_name := 'HR_374622_DPND_FIELD_ABSENT';
165 p_token_name(1) := 'FIELD1';
166 p_token_value(1) := hr_cn_api.get_dff_tl_value('EE Fixed Amount', 'Element Entry Developer DF' , 'CN_PHF AND SI INFORMATION');
167 p_token_name(2) := 'FIELD2';
168 p_token_value(2) := hr_cn_api.get_dff_tl_value('EE Cont Base Method', 'Element Entry Developer DF' , 'CN_PHF AND SI INFORMATION');
169
170 IF g_debug THEN
171 hr_utility.trace('====================================================================');
172 hr_utility.trace('p_message_name '||p_message_name);
173 hr_utility.trace('====================================================================');
174 END IF;
175 /* Raised error message for bug 8838185 */
176 hr_cn_api.raise_message(800
177 ,p_message_name
178 ,p_token_name
179 ,p_token_value);
180 END IF;
181
182 IF (p_entry_information8 = 'FIXED' AND p_entry_information9 IS NULL) THEN
183 hr_cn_api.set_location(g_debug,l_procedure,70);
184 p_message_name := 'HR_374622_DPND_FIELD_ABSENT';
185 p_token_name(1) := 'FIELD1';
186 p_token_value(1) := hr_cn_api.get_dff_tl_value('ER Fixed Amount', 'Element Entry Developer DF' , 'CN_PHF AND SI INFORMATION');
187 p_token_name(2) := 'FIELD2';
188 p_token_value(2) := hr_cn_api.get_dff_tl_value('ER Cont Base Method', 'Element Entry Developer DF' , 'CN_PHF AND SI INFORMATION');
189
190 IF g_debug THEN
191 hr_utility.trace('====================================================================');
192 hr_utility.trace('p_message_name '||p_message_name);
193 hr_utility.trace('====================================================================');
194 END IF;
195 /* Raised error message for bug 8838185 */
196 hr_cn_api.raise_message(800
197 ,p_message_name
198 ,p_token_name
199 ,p_token_value);
200 END IF;
201
202 IF (p_entry_information7 IS NOT NULL AND p_entry_information6 IS NULL) THEN
203 hr_cn_api.set_location(g_debug,l_procedure,110);
204 p_message_name := 'HR_374622_DPND_FIELD_ABSENT';
205 p_token_name(1) := 'FIELD1';
206 p_token_value(1) := hr_cn_api.get_dff_tl_value('EE Cont Base Method', 'Element Entry Developer DF' , 'CN_PHF AND SI INFORMATION');
207 p_token_name(2) := 'FIELD2';
208 p_token_value(2) := hr_cn_api.get_dff_tl_value('EE Fixed Amount', 'Element Entry Developer DF' , 'CN_PHF AND SI INFORMATION');
209
210 IF g_debug THEN
211 hr_utility.trace('====================================================================');
212 hr_utility.trace('p_message_name '||p_message_name);
213 hr_utility.trace('====================================================================');
214 END IF;
215 /* Raised error message for bug 8838185 */
216 hr_cn_api.raise_message(800
217 ,p_message_name
218 ,p_token_name
219 ,p_token_value);
220 END IF;
221
222 IF (p_entry_information9 IS NOT NULL AND p_entry_information8 IS NULL) THEN
223 hr_cn_api.set_location(g_debug,l_procedure,120);
224 p_message_name := 'HR_374622_DPND_FIELD_ABSENT';
225 p_token_name(1) := 'FIELD1';
226 p_token_value(1) := hr_cn_api.get_dff_tl_value('ER Cont Base Method', 'Element Entry Developer DF' , 'CN_PHF AND SI INFORMATION');
227 p_token_name(2) := 'FIELD2';
228 p_token_value(2) := hr_cn_api.get_dff_tl_value('ER Fixed Amount', 'Element Entry Developer DF' , 'CN_PHF AND SI INFORMATION');
229
230 IF g_debug THEN
231 hr_utility.trace('====================================================================');
232 hr_utility.trace('p_message_name '||p_message_name);
233 hr_utility.trace('====================================================================');
234 END IF;
235 /* Raised error message for bug 8838185 */
236 hr_cn_api.raise_message(800
237 ,p_message_name
238 ,p_token_name
239 ,p_token_value);
240 END IF;
241
242 IF (p_entry_information6 <> 'FIXED' AND p_entry_information7 IS NOT NULL) THEN
243 hr_cn_api.set_location(g_debug,l_procedure,80);
244 p_message_name := 'HR_374623_DPND_FIELD_MISMATCH';
245 p_token_name(1) := 'FIELD1';
246 p_token_value(1) := hr_cn_api.get_dff_tl_value('EE Cont Base Method', 'Element Entry Developer DF' , 'CN_PHF AND SI INFORMATION');
247 p_token_name(2) := 'VALUE1';
248 p_token_value(2) := hr_general.decode_lookup('CN_CONT_BASE_CALC_METHOD', 'FIXED');
249 p_token_name(3) := 'FIELD2';
250 p_token_value(3) := hr_cn_api.get_dff_tl_value('EE Fixed Amount', 'Element Entry Developer DF' , 'CN_PHF AND SI INFORMATION');
251
252 IF g_debug THEN
253 hr_utility.trace('====================================================================');
254 hr_utility.trace('p_message_name '||p_message_name);
255 hr_utility.trace('====================================================================');
256 END IF;
257 /* Raised error message for bug 8838185 */
258 hr_cn_api.raise_message(800
259 ,p_message_name
260 ,p_token_name
261 ,p_token_value);
262 END IF;
263
264 IF (p_entry_information8 <> 'FIXED' AND p_entry_information9 IS NOT NULL) THEN
265 hr_cn_api.set_location(g_debug,l_procedure,90);
266 p_message_name := 'HR_374623_DPND_FIELD_MISMATCH';
267 p_token_name(1) := 'FIELD1';
268 p_token_value(1) := hr_cn_api.get_dff_tl_value('ER Cont Base Method', 'Element Entry Developer DF' , 'CN_PHF AND SI INFORMATION');
269 p_token_name(2) := 'VALUE1';
270 p_token_value(2) := hr_general.decode_lookup('CN_CONT_BASE_CALC_METHOD', 'FIXED');
271 p_token_name(3) := 'FIELD2';
272 p_token_value(3) := hr_cn_api.get_dff_tl_value('ER Fixed Amount', 'Element Entry Developer DF' , 'CN_PHF AND SI INFORMATION');
273
274 IF g_debug THEN
275 hr_utility.trace('====================================================================');
276 hr_utility.trace('p_message_name '||p_message_name);
277 hr_utility.trace('====================================================================');
278 END IF;
279 /* Raised error message for bug 8838185 */
280 hr_cn_api.raise_message(800
281 ,p_message_name
282 ,p_token_name
283 ,p_token_value);
284 END IF;
285
286 hr_cn_api.set_location(g_debug,'Leaving: '||l_procedure,130);
287 RETURN;
288 END check_ee_phf_si_setup;
289
290 --------------------------------------------------------------------------
291 -- --
292 -- Name : CHECK_EFF_DATE --
293 -- Type : PROCEDURE --
294 -- Access : Private --
295 -- Description : Internal Procedure for CN localization --
299 -- p_entry_information3 IN VARCHAR2 --
296 -- Parameters : --
297 -- IN : p_effective_start_date IN DATE --
298 -- p_entry_information2 IN VARCHAR2 --
300 -- p_entry_information4 IN VARCHAR2 --
301 -- p_entry_information5 IN VARCHAR2 --
302 -- p_entry_information6 IN VARCHAR2 --
303 -- p_entry_information7 IN VARCHAR2 --
304 -- p_entry_information8 IN VARCHAR2 --
305 -- p_entry_information9 IN VARCHAR2 --
306 -- p_calling_procedure IN VARCHAR2 --
307 -- OUT: --
308 -- p_message_name VARCHAR2 --
309 -- p_token_name PL/SQL table --
310 -- p_token_value PL/SQL table --
311 -- --
312 -- Change History : --
313 --------------------------------------------------------------------------
314 -- Rev# Date Userid Bug Description --
315 --------------------------------------------------------------------------
316 -- 1.0 29-Nov-06 abhjain 5686269 Created this procedure --
317 --------------------------------------------------------------------------
318 PROCEDURE check_eff_date( p_effective_date IN DATE
319 ,p_effective_start_date IN DATE
320 ,p_entry_information2 IN VARCHAR2
321 ,p_entry_information3 IN VARCHAR2
322 ,p_entry_information4 IN VARCHAR2
323 ,p_entry_information5 IN VARCHAR2
324 ,p_entry_information6 IN VARCHAR2
325 ,p_entry_information7 IN VARCHAR2
326 ,p_entry_information8 IN VARCHAR2
327 ,p_entry_information9 IN VARCHAR2
328 ,p_calling_procedure IN VARCHAR2
329 ,p_message_name OUT NOCOPY VARCHAR2
330 ,p_token_name OUT NOCOPY hr_cn_api.char_tab_type
331 ,p_token_value OUT NOCOPY hr_cn_api.char_tab_type
332 )
333 IS
334
335 l_procedure VARCHAR2(100);
336 l_stat_upd_eff_date DATE := TO_DATE('01-01-2006', 'DD-MM-YYYY');
337
338 BEGIN
339 l_procedure := g_package||'check_eff_date';
340 g_debug := hr_utility.debug_enabled;
341 hr_cn_api.set_location(g_debug, 'Entering: ' || l_procedure, 10);
342
343 IF g_debug THEN
344 hr_utility.trace('====================================================================');
345 hr_utility.trace('p_effective_start_date'||p_effective_start_date);
346 hr_utility.trace('p_entry_information2 '||p_entry_information2 );
347 hr_utility.trace('p_entry_information3 '||p_entry_information3 );
348 hr_utility.trace('p_entry_information4 '||p_entry_information4 );
349 hr_utility.trace('p_entry_information5 '||p_entry_information5 );
350 hr_utility.trace('p_entry_information6 '||p_entry_information6 );
351 hr_utility.trace('p_entry_information7 '||p_entry_information7 );
352 hr_utility.trace('p_entry_information8 '||p_entry_information8 );
353 hr_utility.trace('p_entry_information9 '||p_entry_information9 );
354 hr_utility.trace('p_calling_procedure '||p_calling_procedure );
355 hr_utility.trace('====================================================================');
356 END IF;
357
358 IF ((p_entry_information2 IS NOT NULL OR
359 p_entry_information3 IS NOT NULL OR
360 p_entry_information4 IS NOT NULL OR
361 p_entry_information5 IS NOT NULL OR
362 p_entry_information6 IS NOT NULL OR
363 p_entry_information7 IS NOT NULL OR
364 p_entry_information8 IS NOT NULL OR
365 p_entry_information9 IS NOT NULL ) AND
366 p_effective_start_date < l_stat_upd_eff_date) THEN
367
368 hr_cn_api.set_location(g_debug,l_procedure,30);
369 p_message_name := 'HR_374626_EFF_DATE_WRONG';
370 p_token_name(1) := 'DATE';
371 p_token_value(1) := fnd_date.date_to_displaydate(l_stat_upd_eff_date);
372
373 IF g_debug THEN
374 hr_utility.trace('====================================================================');
375 hr_utility.trace('p_message_name '||p_message_name);
376 hr_utility.trace('====================================================================');
377 END IF;
378
379 hr_cn_api.set_location(g_debug,'Leaving: '||l_procedure,40);
380 RETURN;
381 END IF;
382
383 END check_eff_date;
384
385 --------------------------------------------------------------------------
386 -- --
387 -- Name : CHECK_ENTRY_VALUE_INT --
388 -- Type : PROCEDURE --
389 -- Access : Private --
390 -- Description : Internal Procedure for CN localization --
391 -- Parameters : --
395 -- p_effective_end_date IN DATE --
392 -- IN : p_effective_date IN DATE --
393 -- p_element_entry_id IN NUMBER --
394 -- p_effective_start_date IN DATE --
396 -- p_entry_information2 IN VARCHAR2 --
397 -- p_entry_information3 IN VARCHAR2 --
398 -- p_entry_information4 IN VARCHAR2 --
399 -- p_entry_information5 IN VARCHAR2 --
400 -- p_entry_information6 IN VARCHAR2 --
401 -- p_entry_information7 IN VARCHAR2 --
402 -- p_entry_information8 IN VARCHAR2 --
403 -- p_entry_information9 IN VARCHAR2 --
404 -- p_calling_procedure IN VARCHAR2 --
405 -- OUT: --
406 -- p_message_name VARCHAR2 --
407 -- p_token_name PL/SQL table --
408 -- p_token_value PL/SQL table --
409 -- --
410 -- Change History : --
411 --------------------------------------------------------------------------
412 -- Rev# Date Userid Bug Description --
413 --------------------------------------------------------------------------
414 -- 1.0 07-Oct-06 abhjain 5563042 Created this procedure --
415 --------------------------------------------------------------------------
416 PROCEDURE check_entry_value_int(p_effective_date IN DATE
417 ,p_element_entry_id IN NUMBER
418 ,p_effective_start_date IN DATE
419 ,p_effective_end_date IN DATE
420 ,p_entry_information2 IN VARCHAR2
421 ,p_entry_information3 IN VARCHAR2
422 ,p_entry_information4 IN VARCHAR2
423 ,p_entry_information5 IN VARCHAR2
424 ,p_entry_information6 IN VARCHAR2
425 ,p_entry_information7 IN VARCHAR2
426 ,p_entry_information8 IN VARCHAR2
427 ,p_entry_information9 IN VARCHAR2
428 ,p_calling_procedure IN VARCHAR2
429 ,p_message_name OUT NOCOPY VARCHAR2
430 ,p_token_name OUT NOCOPY hr_cn_api.char_tab_type
431 ,p_token_value OUT NOCOPY hr_cn_api.char_tab_type
432 )
433 IS
434
435 CURSOR csr_check_element(p_element_entry_id NUMBER
436 ,p_effective_date DATE)
437 IS
438
439 SELECT decode(pet.element_name
440 ,'Medical Information', '1'
441 ,'PHF Information', '1'
442 ,'Pension Information', '1'
443 ,'Unemployment Insurance Information', '1'
444 ,'Injury Insurance Information', '2'
445 ,'Maternity Insurance Information', '2'
446 ,'Supplementary Medical Information', '2'
447 ,'Enterprise Annuity Information', '2'
448 ,'0')
449 ,pet.element_name
450 FROM pay_element_types_f pet
451 ,pay_element_entries_f pee
452 ,pay_element_classifications pec
453 WHERE pet.element_type_id = pee.element_type_id
454 AND pee.element_entry_id = p_element_entry_id
455 AND pec.classification_id = pet.classification_id
456 AND pec.classification_name = 'PHF and SI Information'
457 AND pec.legislation_code = 'CN'
458 AND pet.legislation_code = 'CN'
459 AND p_effective_date BETWEEN pet.effective_start_date AND pet.effective_end_date
460 AND p_effective_date BETWEEN pee.effective_start_date AND pee.effective_end_date;
461
462 l_procedure VARCHAR2(100);
463 l_check_element NUMBER;
464 l_element_name VARCHAR2(100);
465
466 BEGIN
467 l_procedure := g_package||'check_entry_value_int';
468 g_debug := hr_utility.debug_enabled;
469 hr_cn_api.set_location(g_debug, 'Entering: ' || l_procedure, 10);
470
471 IF g_debug THEN
472 hr_utility.trace('====================================================================');
473 hr_utility.trace('p_effective_date '||p_effective_date );
474 hr_utility.trace('p_element_entry_id '||p_element_entry_id );
475 hr_utility.trace('p_effective_start_date'||p_effective_start_date);
476 hr_utility.trace('p_effective_end_date '||p_effective_end_date );
477 hr_utility.trace('p_entry_information2 '||p_entry_information2 );
478 hr_utility.trace('p_entry_information3 '||p_entry_information3 );
479 hr_utility.trace('p_entry_information4 '||p_entry_information4 );
480 hr_utility.trace('p_entry_information5 '||p_entry_information5 );
481 hr_utility.trace('p_entry_information6 '||p_entry_information6 );
482 hr_utility.trace('p_entry_information7 '||p_entry_information7 );
483 hr_utility.trace('p_entry_information8 '||p_entry_information8 );
484 hr_utility.trace('p_entry_information9 '||p_entry_information9 );
485 hr_utility.trace('p_calling_procedure '||p_calling_procedure );
486 hr_utility.trace('====================================================================');
487 END IF;
488 --
489 -- Code to check if the element will have phf and si further element info enabled
490 --
491 l_check_element := 0;
492
493 OPEN csr_check_element(p_element_entry_id, p_effective_date);
494 FETCH csr_check_element INTO l_check_element, l_element_name;
495 CLOSE csr_check_element;
496
497 IF (l_check_element = 0) THEN
498 hr_cn_api.set_location(g_debug,l_procedure,20);
499 hr_cn_api.set_location(g_debug,'Leaving: '||l_procedure,25);
500 RETURN;
501
502 ELSIF (l_check_element = 2) THEN
503
504 hr_cn_api.set_location(g_debug,l_procedure,30);
505 IF (p_entry_information2 IS NOT NULL OR
506 p_entry_information3 IS NOT NULL OR
507 p_entry_information4 IS NOT NULL OR
508 p_entry_information5 IS NOT NULL OR
509 p_entry_information6 IS NOT NULL OR
510 p_entry_information7 IS NOT NULL OR
511 p_entry_information8 IS NOT NULL OR
512 p_entry_information9 IS NOT NULL ) THEN
513
514 p_message_name := 'HR_374625_WRONG_ELEMENT';
515 p_token_name(1) := 'ELEMENT';
516 p_token_value(1) := l_element_name;
517
518 IF g_debug THEN
519 hr_utility.trace('====================================================================');
520 hr_utility.trace('p_message_name '||p_message_name);
521 hr_utility.trace('====================================================================');
522 END IF;
523 END IF;
524
525 ELSIF (l_check_element = 1) THEN
526 hr_cn_api.set_location(g_debug,l_procedure,30);
527 check_ee_phf_si_setup(
528 p_entry_information2 => p_entry_information2
529 ,p_entry_information3 => p_entry_information3
530 ,p_entry_information4 => p_entry_information4
531 ,p_entry_information5 => p_entry_information5
532 ,p_entry_information6 => p_entry_information6
533 ,p_entry_information7 => p_entry_information7
534 ,p_entry_information8 => p_entry_information8
535 ,p_entry_information9 => p_entry_information9
536 ,p_calling_procedure => l_procedure
537 ,p_message_name => p_message_name
538 ,p_token_name => p_token_name
539 ,p_token_value => p_token_value
540 );
541 IF g_debug THEN
542 hr_utility.trace('====================================================================');
543 hr_utility.trace('p_message_name '||p_message_name);
544 hr_utility.trace('====================================================================');
545 END IF;
546
547 check_eff_date(
548 p_effective_date => p_effective_date
549 ,p_effective_start_date => p_effective_start_date
550 ,p_entry_information2 => p_entry_information2
551 ,p_entry_information3 => p_entry_information3
552 ,p_entry_information4 => p_entry_information4
553 ,p_entry_information5 => p_entry_information5
554 ,p_entry_information6 => p_entry_information6
555 ,p_entry_information7 => p_entry_information7
556 ,p_entry_information8 => p_entry_information8
557 ,p_entry_information9 => p_entry_information9
558 ,p_calling_procedure => l_procedure
559 ,p_message_name => p_message_name
560 ,p_token_name => p_token_name
561 ,p_token_value => p_token_value
562 );
563 IF g_debug THEN
564 hr_utility.trace('====================================================================');
565 hr_utility.trace('p_message_name '||p_message_name);
566 hr_utility.trace('====================================================================');
567 END IF;
568
569 END IF;
570 hr_cn_api.set_location(g_debug,'Leaving: '||l_procedure,40);
571 RETURN;
572
573 END check_entry_value_int;
574 --------------------------------------------------------------------------
575 -- --
576 -- Name : CHECK_ENTRY_VALUE --
577 -- Type : PROCEDURE --
578 -- Access : Public --
579 -- Description : Procedure for CN localization --
580 -- Parameters : --
581 -- IN : p_effective_date IN DATE --
582 -- p_element_entry_id IN NUMBER --
583 -- p_effective_start_date IN DATE --
584 -- p_effective_end_date IN DATE --
585 -- p_entry_information2 IN VARCHAR2 --
586 -- p_entry_information3 IN VARCHAR2 --
587 -- p_entry_information4 IN VARCHAR2 --
588 -- p_entry_information5 IN VARCHAR2 --
589 -- p_entry_information6 IN VARCHAR2 --
590 -- p_entry_information7 IN VARCHAR2 --
591 -- p_entry_information8 IN VARCHAR2 --
592 -- p_entry_information9 IN VARCHAR2 --
593 -- OUT : N/A --
594 -- RETURN : N/A --
595 -- --
596 -- Change History : --
597 --------------------------------------------------------------------------
598 -- Rev# Date Userid Bug Description --
599 --------------------------------------------------------------------------
600 -- 1.0 07-Oct-06 abhjain 5563042 Created this procedure --
601 --------------------------------------------------------------------------
602 PROCEDURE check_entry_value(p_effective_date IN DATE
603 ,p_element_entry_id IN NUMBER
604 ,p_effective_start_date IN DATE
605 ,p_effective_end_date IN DATE
606 ,p_entry_information2 IN VARCHAR2
607 ,p_entry_information3 IN VARCHAR2
608 ,p_entry_information4 IN VARCHAR2
609 ,p_entry_information5 IN VARCHAR2
610 ,p_entry_information6 IN VARCHAR2
611 ,p_entry_information7 IN VARCHAR2
612 ,p_entry_information8 IN VARCHAR2
613 ,p_entry_information9 IN VARCHAR2
614 )
615 IS
616 l_procedure VARCHAR2(100);
617 --
618
619 --
620 BEGIN
621 --
622 l_procedure := g_package||'check_entry_value';
623 g_debug := hr_utility.debug_enabled;
624 hr_cn_api.set_location(g_debug, 'Entering: ' || l_procedure, 10);
625
626 IF g_debug THEN
627 hr_utility.trace('====================================================================');
628 hr_utility.trace('p_effective_date '||p_effective_date );
629 hr_utility.trace('p_element_entry_id '||p_element_entry_id );
630 hr_utility.trace('p_effective_start_date'||p_effective_start_date);
634 hr_utility.trace('p_entry_information4 '||p_entry_information4 );
631 hr_utility.trace('p_effective_end_date '||p_effective_end_date );
632 hr_utility.trace('p_entry_information2 '||p_entry_information2 );
633 hr_utility.trace('p_entry_information3 '||p_entry_information3 );
635 hr_utility.trace('p_entry_information5 '||p_entry_information5 );
636 hr_utility.trace('p_entry_information6 '||p_entry_information6 );
637 hr_utility.trace('p_entry_information7 '||p_entry_information7 );
638 hr_utility.trace('p_entry_information8 '||p_entry_information8 );
639 hr_utility.trace('p_entry_information9 '||p_entry_information9 );
640 hr_utility.trace('====================================================================');
641 END IF;
642
643 g_message_name := 'SUCCESS';
644 --
645 -- Check whether PAY is installed for China Localization
646 --
647 IF hr_utility.chk_product_install('Oracle Payroll','CN') THEN
648
649 hr_cn_api.set_location(g_debug,l_procedure,20);
650
651 check_entry_value_int(p_effective_date => p_effective_date
655 ,p_entry_information2 => p_entry_information2
652 ,p_element_entry_id => p_element_entry_id
653 ,p_effective_start_date => p_effective_start_date
654 ,p_effective_end_date => p_effective_end_date
656 ,p_entry_information3 => p_entry_information3
657 ,p_entry_information4 => p_entry_information4
658 ,p_entry_information5 => p_entry_information5
659 ,p_entry_information6 => p_entry_information6
660 ,p_entry_information7 => p_entry_information7
661 ,p_entry_information8 => p_entry_information8
662 ,p_entry_information9 => p_entry_information9
663 ,p_calling_procedure => l_procedure
664 ,p_message_name => g_message_name
665 ,p_token_name => g_token_name
666 ,p_token_value => g_token_value
667 );
668 --
669 IF g_debug THEN
670 hr_utility.trace('====================================================================');
671 hr_utility.trace('g_message_name '||g_message_name );
672 hr_utility.trace('====================================================================');
673 END IF;
674
675 IF g_message_name <> 'SUCCESS' THEN
676 hr_cn_api.set_location(g_debug,l_procedure,30);
677 hr_cn_api.raise_message(800
678 ,g_message_name
679 ,g_token_name
680 ,g_token_value);
681 END IF;
682
683 END IF ;
684
685
686 hr_cn_api.set_location(g_debug,'Leaving : '||l_procedure, 40);
687
688 END check_entry_value;
689
690 END pay_cn_entry_value_leg_hook;