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