1 package body GHR_CPDF_CHECK2 as
2 /* $Header: ghcpdf02.pkb 120.21 2011/02/18 07:12:50 utokachi ship $ */
3 --
4 --
5 /* Name:
6 Instructional Program
7 */
8 procedure chk_instructional_pgm
9 (p_education_level in varchar2
10 ,p_academic_discipline in varchar2
11 ,p_year_degree_attained in varchar2
12 ,p_first_noac_lookup_code in varchar2
13 ,p_effective_date in date
14 ,p_tenure_group_code in varchar2
15 ,p_to_pay_plan in varchar2
16 ,p_employee_date_of_birth in Date
17 ) is
18 begin
19
20 -- 005.02.3
21 if to_number(p_education_level) > 12
22 and
23 p_academic_discipline is null
24 then
25 hr_utility.set_message(8301, 'GHR_37101_ALL_PROCEDURE_FAIL');
26 hr_utility.raise_error;
27 end if;
28 ------
29
30 -- 780.04.3
31 -- Update date By Start Date Comment
32 -- 28-Nov-2002 Madhuri From the begining added education level cond to edit
33 -- this edit has been renamed from 005.04.3
34 if p_academic_discipline is not null
35 and
36 p_year_degree_attained is null
37 and
38 to_number(p_education_level) not in (14,16,18,20,22)
39 then
40 hr_utility.set_message(8301, 'GHR_37102_ALL_PROCEDURE_FAIL');
41 hr_utility.raise_error;
42 end if;
43
44 -- 005.07.1
45 -- 28-NOV-02 Madhuri End dated the edit with 31-July-2002
46
47 if p_effective_date <= to_date('2002/07/31','yyyy/mm/dd') then
48 if (
49 p_education_level <>'06' and
50 p_education_level <>'10' and
51 to_number(p_education_level) < 13
52 ) and
53 (p_academic_discipline is not null or p_year_degree_attained is not null )
54 then
55 hr_utility.set_message(8301, 'GHR_37103_ALL_PROCEDURE_FAIL');
56 hr_utility.raise_error;
57 end if;
58 end if;
59
60 -- 780.05.1
61 -- this edit has been renamed from 005.10.1
62 if p_year_degree_attained is not null
63 and
64 p_employee_date_of_birth is not null
65 and
66 (
67 to_number(p_year_degree_attained) <
68 (to_number(to_char(p_employee_date_of_birth,'YYYY'))+17)
69 )
70 then
71 hr_utility.set_message(8301, 'GHR_37104_ALL_PROCEDURE_FAIL');
72 hr_utility.raise_error;
73 end if;
74
75 -- 005.13.2
76
77 -- updation Date By Comment
78 -- 28-NOV-2002 Madhuri End dated the edit as of 31-Jul-2002
79
80 if p_effective_date<=to_date('2002/07/31','yyyy/mm/dd') then
81 if (
82 p_education_level <> '06' and p_education_level <> '10'
83 and
84 to_number(p_education_level) < 13
85 )
86 and
87 (
88 p_academic_discipline is not null
89 or
90 p_year_degree_attained is not null
91 )
92 then
93 hr_utility.set_message(8301, 'GHR_37105_ALL_PROCEDURE_FAIL');
94 hr_utility.raise_error;
95 end if;
96 end if;
97
98 -- 005.13.3
99 -- 28-NOV-2002 Madhuri Created the edit from 01-Aug-2002
100 -- 30-DEC-2002 VNARASIM Changed condition "to_number(p_education_level) >= 13" to
101 -- "to_number(p_education_level) < 13".
102
103 if p_effective_date >= to_date('2002/08/01','yyyy/mm/dd') then
104 if (
105 p_education_level <> '06' and p_education_level <> '10'
106 and
107 to_number(p_education_level) < 13
108 )
109 and
110 (
111 p_academic_discipline is not null
112 or
113 p_year_degree_attained is not null
114 )
115 then
116 hr_utility.set_message(8301, 'GHR_37927_ALL_PROCEDURE_FAIL');
117 hr_utility.raise_error;
118 end if;
119 end if;
120
121 -- 005.15.2
122 -- U58 Raju 01-jan-2010 Bug 9503972
123 IF p_effective_date < fnd_date.canonical_to_date('2010/01/01') THEN
124 if substr(p_first_noac_lookup_code,1,1)='1' and
125 p_effective_date > TO_DATE('1993/09/30', 'YYYY/MM/DD') and
126 (p_tenure_group_code ='1' or p_tenure_group_code= '2' ) and
127 (p_education_level ='06' or p_education_level='10' ) and
128 (p_academic_discipline is null or p_year_degree_attained is null) then
129 hr_utility.set_message(8301, 'GHR_37106_ALL_PROCEDURE_FAIL');
130 hr_utility.set_message_token('EFF_DATE','and Effective Date is after 30-SEP-1993,');
131 hr_utility.raise_error;
132 end if;
133 ELSE
134 if substr(p_first_noac_lookup_code,1,1)='1' and
135 (p_tenure_group_code ='1' or p_tenure_group_code= '2' ) and
136 (p_education_level ='06' or p_education_level='10' ) and
137 (p_academic_discipline is null or p_year_degree_attained is null) then
138 hr_utility.set_message(8301, 'GHR_37106_ALL_PROCEDURE_FAIL');
139 hr_utility.set_message_token('EFF_DATE','');
140 hr_utility.raise_error;
141 end if;
142 END IF;
143
144 -- 005.20.2
145 -- U58 Raju 01-jan-2010 Bug 9503972
146 IF p_effective_date < fnd_date.canonical_to_date('2010/01/01') THEN
147 if substr(p_first_noac_lookup_code,1,1)='1' and
148 p_effective_date > TO_DATE('1993/09/30', 'YYYY/MM/DD') and
149 p_to_pay_plan ='ES' and
150 (p_education_level ='06' or p_education_level='10' ) and
151 (p_academic_discipline is null or p_year_degree_attained is null) then
152 hr_utility.set_message(8301, 'GHR_37107_ALL_PROCEDURE_FAIL');
153 hr_utility.set_message_token('EFF_DATE','and Effective Date is after 30-SEP-1993,');
154 hr_utility.raise_error;
155 end if;
156 ELSE
157 if substr(p_first_noac_lookup_code,1,1)='1' and
158 p_to_pay_plan ='ES' and
159 (p_education_level ='06' or p_education_level='10' ) and
160 (p_academic_discipline is null or p_year_degree_attained is null) then
161 hr_utility.set_message(8301, 'GHR_37107_ALL_PROCEDURE_FAIL');
162 hr_utility.set_message_token('EFF_DATE','');
163 hr_utility.raise_error;
164 end if;
165 END IF;
166
167 end chk_instructional_pgm;
168
169 /* Name:
170 chk_Award_Amount
171 */
172
173 procedure chk_Award_Amount
174 (p_First_NOAC_Lookup_Code in varchar2
175 -- Bug#4486823 RRR Changes
176 ,p_First_NOAC_Lookup_desc in varchar2
177 ,p_One_Time_Payment_Amount in number
178 ,p_To_Basic_Pay in number
179 ,p_Adj_Base_Pay in number
180 ,p_First_Action_NOA_LA_Code1 in varchar2
181 ,p_First_Action_NOA_LA_Code2 in varchar2
182 ,p_to_pay_plan in varchar2
183 ,p_effective_date in date
184 ) is
185 begin
186
187 -- 050.02.2
188 -- Award Req 8/15/00 vravikan 30-sep-2000 End date
189 -- vravikan 01-Oct-2000 Add 840-847
190 -- vnarasim 01-OCT-2000 Add 848
191 -- Ashley 10-OCT-2003 Add 849
192 -- vnarasim 22-MAR-2006 Removed 825
193 -- UPD 50(Bug 5745356) Raju 01-Oct-2006 Delete 849
194 -- UPD 51(Bug 5745356) Raju From 01-Jan-2007 add NOAs 826,849,885,886,887,889
195 -- 825 removed from the this edit as 825 is moved to incentive family
196
197 if p_effective_date <= to_date('2000/09/30','yyyy/mm/dd') then
198 if (p_First_NOAC_Lookup_Code in ('817', '849','872','873','874',
199 '875','876','877','878','879','885','889') OR
200 (p_First_NOAC_Lookup_Code = '815' AND p_First_NOAC_Lookup_desc = 'Recruitment Bonus') OR
201 (p_First_NOAC_Lookup_Code = '816' AND p_First_NOAC_Lookup_desc = 'Relocation Bonus')
202 ) and
203 (p_One_Time_Payment_Amount <= 0 or
204 p_One_Time_Payment_Amount is null)
205 then
206 hr_utility.set_message(8301, 'GHR_37108_ALL_PROCEDURE_FAIL');
207 hr_utility.raise_error;
208 end if;
209 elsif p_effective_date < to_date('2006/10/01','yyyy/mm/dd') then
210
211 if (p_First_NOAC_Lookup_Code in ('817', '840','841','842','843',
212 '844','845','846','847','848','849','878','879') OR
213 (p_First_NOAC_Lookup_Code = '815' AND p_First_NOAC_Lookup_desc = 'Recruitment Bonus') OR
214 (p_First_NOAC_Lookup_Code = '816' AND p_First_NOAC_Lookup_desc = 'Relocation Bonus')
215 ) and
216 (p_One_Time_Payment_Amount <= 0 or
217 p_One_Time_Payment_Amount is null)
218 then
219 hr_utility.set_message(8301, 'GHR_37414_ALL_PROCEDURE_FAIL');
220 hr_utility.set_message_token('NOA_CODE','815, 816, 817, 840 through 849, 878, or 879');
221 hr_utility.raise_error;
222 end if;
223 elsif p_effective_date < to_date('2007/01/01','yyyy/mm/dd') then
224 if (p_First_NOAC_Lookup_Code in ('817', '840','841','842','843',
225 '844','845','846','847','848','878','879') OR
226 (p_First_NOAC_Lookup_Code = '815' AND p_First_NOAC_Lookup_desc = 'Recruitment Bonus') OR
227 (p_First_NOAC_Lookup_Code = '816' AND p_First_NOAC_Lookup_desc = 'Relocation Bonus')
228 ) and
229 (p_One_Time_Payment_Amount <= 0 or
230 p_One_Time_Payment_Amount is null)
231 then
232 hr_utility.set_message(8301, 'GHR_37414_ALL_PROCEDURE_FAIL');
233 hr_utility.set_message_token('NOA_CODE','815, 816, 817, 840 through 848, 878, or 879');
234 hr_utility.raise_error;
235 end if;
236 else
237 if (p_First_NOAC_Lookup_Code in ('817', '826', '840','841','842','843',
238 '844','845','846','847','849','848','878','879','885','886','887','889') OR
239 (p_First_NOAC_Lookup_Code = '815' AND p_First_NOAC_Lookup_desc = 'Recruitment Bonus') OR
240 (p_First_NOAC_Lookup_Code = '816' AND p_First_NOAC_Lookup_desc = 'Relocation Bonus')
241 ) and
242 (p_One_Time_Payment_Amount <= 0 or
243 p_One_Time_Payment_Amount is null)
244 then
245 hr_utility.set_message(8301, 'GHR_37414_ALL_PROCEDURE_FAIL');
246 hr_utility.set_message_token('NOA_CODE','815, 816, 817, 826, 840 through 849, 878, 879, 885, 886, 887 or 889');
247 hr_utility.raise_error;
248 end if;
249 end if;
250
251 -- 050.04.2
252 -------------------------------------------------------------------------
253 -- Modified by Date Comments
254 -------------------------------------------------------------------------
255 -- Award Req 8/15/00 vravikan 30-sep-2000 End date
256 -- 01-Oct-2000 Add 840-847
257 -- vnarasim 01-Oct-2000 Add 848
258 -- Ashley 30-OCT-2003 Add 849
259 -- UPD 38 Madhuri 01-MAR-2005 add 826, 827 to list
260 -- UPD 41(Bug 4567571) Raju 08-Nov-2005 Delete 827 from list
261 -- vnarasim 22-Mar-2006 Delete 825
262 -- vnarasim 12-APR-2006 Added 825.
263 -- UPD 50(Bug 5745356) Raju 01-Oct-2006 Delete 849
264 -- UPD 51(Bug 5911585) AVR 03-MAR-2007 Delete the edit as of 01-JAN-2004.
265 -------------------------------------------------------------------------
266 if p_effective_date <= to_date('2000/09/30','yyyy/mm/dd') then
267 if p_One_Time_Payment_Amount is not null
268 and
269 p_First_NOAC_Lookup_Code not in ('815','816','817','825','826','849',
270 '872','873','874','875',
271 '876','877','878','879','885','889')
272 then
273 hr_utility.set_message(8301, 'GHR_37109_ALL_PROCEDURE_FAIL');
274 hr_utility.raise_error;
275 end if;
276 -----elsif p_effective_date < to_date('2006/10/01','yyyy/mm/dd') then
277 elsif p_effective_date < to_date('2004/01/01','yyyy/mm/dd') then
278 if p_One_Time_Payment_Amount is not null
279 and
280 p_First_NOAC_Lookup_Code not in ('815','816','817','825','826','840','841',
281 '842','843','844','845','846',
282 '847','848','849','878','879',
283 '885','886','887','889') --bug 5482191
284 then
285 hr_utility.set_message(8301, 'GHR_37415_ALL_PROCEDURE_FAIL');
286 hr_utility.set_message_token('NOA_CODE','815, 816, 817, 825, 840 through 849, 878, or 879');
287 hr_utility.raise_error;
288 end if;
289 else
290 null;
291 /***** Commented by AVR for Bug 5911585
292 if p_One_Time_Payment_Amount is not null and
293 p_First_NOAC_Lookup_Code not in ('815','816','817','825','826','840','841',
294 '842','843','844','845','846',
295 '847','848','878','879',
296 '885','886','887','889')
297 then
298 hr_utility.set_message(8301, 'GHR_37415_ALL_PROCEDURE_FAIL');
299 hr_utility.set_message_token('NOA_CODE','815, 816, 817, 825, 840 through 848, 878, or 879');
300 hr_utility.raise_error;
301 end if;
302 ************* AVR - Bug 5911585 end ******/
303 end if;
304 -------------------------------------------------------------------------
305
306 -- 17-Aug-00 vravikan From the Start Change from equal to 25% of basic+locality adj.
307 -- to not more than 25% of basic+locality adj.
308 -- 050.06.2
309 if p_First_NOAC_Lookup_Code ='819'
310 and
311 p_One_Time_Payment_Amount <>0
312 and
313 p_One_Time_Payment_Amount is not null
314 and
315 round(p_One_Time_Payment_Amount,0) > round(.25*(p_Adj_Base_Pay),0)
316 then
317 hr_utility.set_message(8301, 'GHR_37110_ALL_PROCEDURE_FAIL');
318 hr_utility.raise_error;
319 end if;
320
321 --Commented as per EOY 2003 cpdf changes by Ashley
322 -- 050.07.2
323 -- Award Req 8/15/00 vravikan 30-sep-2000 End date
324 /* if p_effective_date <= to_date('2000/09/30','yyyy/mm/dd') then
325 if p_First_NOAC_Lookup_Code ='889'
326 and
327 p_To_Pay_Plan ='GM'
328 and
329 p_One_Time_Payment_Amount > (p_TO_Basic_Pay * .20)
330 then
331 hr_utility.set_message(8301, 'GHR_37111_ALL_PROCEDURE_FAIL');
332 hr_utility.raise_error;
333 end if;
334 end if;*/
335
336 -- 050.10.2
337 if p_First_NOAC_Lookup_Code ='818'
338 and
339 not
340 (p_One_Time_Payment_Amount = 0
341 or
342 p_One_Time_Payment_Amount between 10 and 25)
343 and
344 p_One_Time_Payment_Amount is not null
345 then
346 hr_utility.set_message(8301, 'GHR_37112_ALL_PROCEDURE_FAIL');
347 hr_utility.raise_error;
348 end if;
349
350 -- 050.15.2
351 if p_First_NOAC_Lookup_Code ='818'
352 and
353 (substr(p_To_Pay_Plan,1,1) in ('B','W','X')
354 or
355 p_To_Pay_Plan ='ES')
356 then
357 hr_utility.set_message(8301, 'GHR_37113_ALL_PROCEDURE_FAIL');
358 hr_utility.raise_error;
359 end if;
360
361 -- 050.20.2
362 -- UPD 41(Bug 4567571) Raju 08-Nov-2005 Terminate from 01-May-2002
363 if p_effective_date < to_date('2002/05/01','yyyy/mm/dd') then
364 if p_First_NOAC_Lookup_Code ='815'
365 and
366 p_One_Time_Payment_Amount > .25 * p_TO_Basic_Pay
367 and
368 p_One_Time_Payment_Amount is not null
369 then
370 hr_utility.set_message(8301, 'GHR_37114_ALL_PROCEDURE_FAIL');
371 hr_utility.raise_error;
372 end if;
373 End if;
374
378 -- Award Req 8/15/00 vravikan 30-sep-2000 End date
375
376 --Commented as per EOY 2003 cpdf changes by Ashley
377 -- 050.28.2
379 /* if p_effective_date <= to_date('2000/09/30','yyyy/mm/dd') then
380 if p_First_NOAC_Lookup_Code ='873'
381 and
382 p_One_Time_Payment_Amount > (.05* p_TO_Basic_Pay)
383 then
384 hr_utility.set_message(8301, 'GHR_37115_ALL_PROCEDURE_FAIL');
385 hr_utility.raise_error;
386 end if;
387 end if;*/
388
389 -- 050.30.2
390
391 -- UPD 41(Bug 4567571) Raju 08-Nov-2005 Terminate from 01-May-2002
392 if p_effective_date < to_date('2002/05/01','yyyy/mm/dd') then
393 if p_First_NOAC_Lookup_Code ='816'
394 and
395 (p_First_Action_NOA_LA_Code1 <>'ZTY' or p_First_Action_NOA_LA_Code2 <> 'ZTY' )
396 and
397 p_One_Time_Payment_Amount > (.25* p_TO_Basic_Pay)
398 then
399 hr_utility.set_message(8301, 'GHR_37116_ALL_PROCEDURE_FAIL');
400 hr_utility.raise_error;
401 end if;
402 End if;
403
404 -- 050.35.2
405
406 -- UPD 41(Bug 4567571) Raju 08-Nov-2005 Terminate from 01-May-2002
407 if p_effective_date < to_date('2002/05/01','yyyy/mm/dd') then
408 if p_First_NOAC_Lookup_Code ='816'
409 and
410 (p_First_Action_NOA_LA_Code1 ='ZTY' or p_First_Action_NOA_LA_Code2 = 'ZTY' )
411 and
412 p_One_Time_Payment_Amount > (.25* p_TO_Basic_Pay)
413 and
414 p_One_Time_Payment_Amount > 15000
415 then
416 hr_utility.set_message(8301, 'GHR_37117_ALL_PROCEDURE_FAIL');
417 hr_utility.raise_error;
418 end if;
419 End if;
420 /*
421 -- 050.40.2
422 if p_First_NOAC_Lookup_Code ='825'
423 and
424 p_One_Time_Payment_Amount > 25000
425 then
426 hr_utility.set_message(8301, 'GHR_37118_ALL_PROCEDURE_FAIL');
427 hr_utility.raise_error;
428 end if;*/
429
430 end chk_Award_Amount;
431
432 /* Name:
433 -- C_Benefit_Amount
434 */
435
436 procedure chk_Benefit_Amount
437 (p_First_NOAC_Lookup_Code in varchar2
438 ,p_Benefit_Amount in varchar2 -- non SF52
439 ,p_effective_date in date
440 ) is
441 begin
442
443 --Commented as per EOY 2003 cpdf changes by Ashley
444 -- 070.02.2
445 -- Award Req 8/15/00 vravikan 30-sep-2000 End date
446 /* if p_effective_date <= to_date('2000/09/30','yyyy/mm/dd') then
447 if p_Benefit_Amount is not null
448 and
449 p_First_NOAC_Lookup_Code not in ('872','874','875','876','877')
450 then
451 hr_utility.set_message(8301, 'GHR_37165_ALL_PROCEDURE_FAIL');
452 hr_utility.raise_error;
453
454 end if;
455 end if;*/
456 null;
457
458 end chk_Benefit_Amount;
459
460
461 /* Name:
462 chk_Cur_Appt_Auth
463 */
464
465 procedure chk_Cur_Appt_Auth
466 (p_First_Action_NOA_LA_Code1 in varchar2
467 ,p_First_Action_NOA_LA_Code2 in varchar2
468 ,p_Cur_Appt_Auth_1 in varchar2 -- non SF52 item
469 ,p_Cur_Appt_Auth_2 in varchar2 -- non SF52 item
470 ,p_Agency_Subelement in varchar2 -- non SF52 item
471 ,p_To_OCC_Code in varchar2
472 ,p_First_NOAC_Lookup_Code in varchar2
473 ,p_Position_Occupied_Code in varchar2
474 ,p_To_Pay_Plan in varchar2
475 ,p_Handicap in varchar2 -- non SF52 item
476 ,p_Tenure_Goupe_Code in varchar2
477 ,p_To_Grade_Or_Level in varchar2
478 ,p_Vet_Pref_Code in varchar2
479 ,p_Duty_Station_Lookup_Code in varchar2
480 ,p_Service_Computation_Date in date
481 ,p_effective_date in date
482 ) is
483 l_Service_Computation_Date Date;
484 begin
485
486 -- 100.02.3
487 -- renamed the edit from 100.01.3 for the april release
488 if
489 (
490 p_Cur_Appt_Auth_1= 'ZVB' or p_Cur_Appt_Auth_2='ZVB'
491 )
492 and
493 p_Agency_Subelement <> 'TD03'
494 then
495 hr_utility.set_message(8301, 'GHR_37119_ALL_PROCEDURE_FAIL');
496 hr_utility.raise_error;
497 end if;
498
499 /* Commented as per December 2000 cpdf changes -- vravikan
500 --
501 -- 100.03.3 If either current appointment authority is ZTA,
502 -- And position occupied is 1,
503 -- Then agency/subelement must be DJ03.
504 if p_effective_date >= fnd_date.canonical_to_date('1998/09/01') then
505 if ( p_Cur_Appt_Auth_1= 'ZTA' or p_Cur_Appt_Auth_2='ZTA' ) and
506 p_Position_Occupied_Code = '1' and
507 p_Agency_Subelement <> 'DJ03' then
508 hr_utility.set_message(8301, 'GHR_37892_ALL_PROCEDURE_FAIL');
509 hr_utility.raise_error;
510 end if;
511 end if;
512
513 */
514 -- 100.04.1
515 -- Dec. 2001 Patch --- Delete YAM
516 if (
517 p_Cur_Appt_Auth_1 in ('YBM','YGM','Y1M','Y2M','Y3M')
518 or
519 p_Cur_Appt_Auth_2 in ('YBM','YGM','Y1M','Y2M','Y3M')
520 )
524 substr(p_to_occ_code,3,2) <>'99'
521 and
522 p_to_pay_plan = 'GS'
523 and
525 and
526 p_to_occ_code is not null
527 then
528 hr_utility.set_message(8301, 'GHR_37120_ALL_PROCEDURE_FAIL');
529 hr_utility.raise_error;
530 end if;
531
532 /* same as 100.04.1
533 -- 100.05.2
534 if
535 (
536 p_Cur_Appt_Auth_1 in ('YAM','YBM','YGM','Y1M','Y2M','Y3M')
537 or
538 p_Cur_Appt_Auth_2 in ('YAM','YBM','YGM','Y1M','Y2M','Y3M')
539 )
540 and
541 p_To_Pay_Plan='GS'
542 and
543 substr(p_To_OCC_Code,3,2) <> '99'
544 and
545 p_To_OCC_Code is not null
546 then
547 hr_utility.set_message(8301, 'GHR_37120_ALL_PROCEDURE_FAIL');
548 hr_utility.raise_error;
549 end if;
550 */
551 --100.06.3
552 -- Updation Date Updated By Remarks
553 -- ============================================
554 -- 19-MAR-2003 vnarasim Added agency/subelement HSBC.
555 -- 30-OCT-2003 Ashley Deleted agency/subelement TD19
556 --
557 if p_effective_date >= fnd_date.canonical_to_date('20'||'00/10/01') then
558 if (p_Cur_Appt_Auth_1 = 'ZVC' OR p_Cur_Appt_Auth_2 = 'ZVC') AND
559 (p_agency_subelement NOT IN ('HSBC'))
560 then
561 hr_utility.set_message(8301, 'GHR_37925_ALL_PROCEDURE_FAIL');
562 hr_utility.raise_error;
563 end if;
564 end if;
565 -- 100.07.3
566 if
567 (p_Cur_Appt_Auth_1 in ('Y1K','Y2K','Y3K','Y4K','Y5K')
568 or
569 p_Cur_Appt_Auth_2 in ('Y1K','Y2K','Y3K','Y4K','Y5K')
570 )
571 and
572 p_Tenure_Goupe_Code <> '0'
573 and
574 p_Tenure_Goupe_Code <> '3'
575 and
576 p_Tenure_Goupe_Code is not null
577 then
578 hr_utility.set_message(8301, 'GHR_37121_ALL_PROCEDURE_FAIL');
579 hr_utility.raise_error;
580 end if;
581 -- Update Date By Effective Date Comment
582 -- 11 01/03/00 vravikan 11/01/99 Add Edit
583
584 -- 100.09.3 If either current appointment authority is UDM
585 -- Then agency must be TR.
586 if p_effective_date >= fnd_date.canonical_to_date('19'||'99/11/01') then
587 if ( p_Cur_Appt_Auth_1= 'UDM' or p_Cur_Appt_Auth_2='UDM' ) and
588 substr(p_Agency_Subelement,1,2) <> 'TR' then
589 hr_utility.set_message(8301, 'GHR_37411_ALL_PROCEDURE_FAIL');
590 hr_utility.raise_error;
591 end if;
592 end if;
593
594
595 -- 100.10.3 --100.10.1 Renumbered this edit to 100.10.3
596 -- Dec 01 Patch 12/10/01 vravikan Delete KDM, KFM, KHM
597 --upd49 08-Jan-07 Raju From 01-Sep-2006 Delete JYM
598 if p_effective_date < fnd_date.canonical_to_date('2006/09/01') then
599 if (p_Cur_Appt_Auth_1 in ('BPM','H2L','J8M',
600 'JYM','UFM','V8K','VEM','VPE','ZVB','ZVC')
601 or
602 substr(p_Cur_Appt_Auth_1,1,1) in ('W','X','Y')
603 or
604 p_Cur_Appt_Auth_2 in ('BPM','H2L','J8M',
605 'JYM','UFM','V8K','VEM','VPE','ZVB','ZVC')
606 or
607 substr(p_Cur_Appt_Auth_2,1,1) in ('W','X','Y')
608 )
609 and
610 p_position_occupied_code <>'2'
611 and
612 p_position_occupied_code is not null
613 then
614 hr_utility.set_message(8301, 'GHR_37122_ALL_PROCEDURE_FAIL');
615 hr_utility.set_message_token('APP_AUTH',
616 'BPM, H2L, J8M, JYM, UFM, V8K, VEM, VPE, W--, X--, Y--, ZVB or ZVC');
617 hr_utility.raise_error;
618 end if;
619 else
620 if (p_Cur_Appt_Auth_1 in ('BPM','H2L','J8M',
621 'UFM','V8K','VEM','VPE','ZVB','ZVC') or
622 substr(p_Cur_Appt_Auth_1,1,1) in ('W','X','Y') or
623 p_Cur_Appt_Auth_2 in ('BPM','H2L','J8M',
624 'UFM','V8K','VEM','VPE','ZVB','ZVC') or
625 substr(p_Cur_Appt_Auth_2,1,1) in ('W','X','Y')
626 ) and
627 p_position_occupied_code <>'2' and
628 p_position_occupied_code is not null
629 then
630 hr_utility.set_message(8301, 'GHR_37122_ALL_PROCEDURE_FAIL');
631 hr_utility.set_message_token('APP_AUTH',
632 'BPM, H2L, J8M, UFM, V8K, VEM, VPE, W--, X--, Y--, ZVB or ZVC');
633 hr_utility.raise_error;
634 end if;
635 end if;
636
637 -- 100.11.2
638 -- Dec 01 Patch 12/10/01 vravikan Delete KDM, KFM, KHM, and TXX
639 --upd47 26-Jun-06 Raju From 01-Apr-2003 Terminate the edit
640 if p_effective_date < fnd_date.canonical_to_date('2003/04/01') then
641 if ( p_Cur_Appt_Auth_1 in ('BPM','H2L','J8M','JYM',
642 'UFM','V8K','VEM','VPE','ZVB','ZVC') or
643 substr(p_Cur_Appt_Auth_1,1,1) in ('W','X','Y') or
644 p_Cur_Appt_Auth_2 in ('BPM','H2L','J8M','JYM',
645 'UFM','V8K','VEM','VPE','ZVB','ZVC') or
646 substr(p_Cur_Appt_Auth_2,1,1) in ('W','X','Y')) and
647 (to_number(p_First_NOAC_Lookup_Code) not between 100 and 199 and
648 to_number(p_First_NOAC_Lookup_Code) not between 500 and 599
649 ) and
650 p_Position_Occupied_Code <> '2' and
651 p_Position_Occupied_Code is not null
652 then
653 hr_utility.set_message(8301, 'GHR_37123_ALL_PROCEDURE_FAIL');
654 hr_utility.raise_error;
655 end if;
659 -- Update Date By Effective Date Comment
656 end if;
657
658 --100.12.1
660 -- 8 04/01/99 vravikan 10/01/98 Add Edit
661 -- 48 26/09/06 amrchakr 01-jul-2006 Changed edit number from 100.12.1 to 100.12.3
662 if p_effective_date >= fnd_date.canonical_to_date('1998/10/01') then
663 if
664 (
665 p_Cur_Appt_Auth_1 in ('ZRL')
666 or
667 p_Cur_Appt_Auth_2 in ('ZRL') )
668 and
669 p_agency_subelement <> 'DJ02'
670 and
671 p_agency_subelement is not null
672 then
673 if p_effective_date < fnd_date.canonical_to_date('2006/07/01') then
674 hr_utility.set_message(8301, 'GHR_37055_ALL_PROCEDURE_FAIL');
675 hr_utility.raise_error;
676 else
677 hr_utility.set_message(8301, 'GHR_37691_ALL_PROCEDURE_FAIL');
678 hr_utility.raise_error;
679 end if;
680 end if;
681 end if;
682
683 -- 100.12.2
684 --
685 -- 100.12.3 is renumbered as 100.12.2 from 01-mar-1998
686 -- Hence effective date was introduced.
687 --
688 -- Update Date By Effective Date Comment
689 -- 8 04/19/99 vravikan 09/01/1998 Date Correction
690 -- from 1-mar-98 to 1-sep-98
691 -- Adding LAC P2M
692 if p_effective_date < fnd_date.canonical_to_date('1998/09/01') then
693 if p_To_Pay_Plan = 'ES' and
694 p_Cur_Appt_Auth_1 not in ('NRM','NSM','NTM','NVM','NWM','NXM','P2M','P3M','P5M','P7M',
695 'V2M','VAG','VBJ','VCJ','V4L','V4M','V6M','V4P') and
696 p_Cur_Appt_Auth_1 is not null then
697 hr_utility.set_message(8301, 'GHR_37124_ALL_PROCEDURE_FAIL');
698 hr_utility.raise_error;
699 end if;
700 end if;
701
702 -- 100.13.3 -- 100.13.1 renumbered as 100.13.3
703 --
704 -- This is renumbered from 100.12.3 B-9 from 01-mar-1998
705 --
706 -- 8 04/19/99 vravikan 09/01/1998 Date Correction
707 -- from 1-mar-98 to 1-sep-98
708 -- Adding LAC P2M
709 if p_effective_date >= fnd_date.canonical_to_date('1998/09/01') then
710 if p_To_Pay_Plan = 'ES' and
711 p_Cur_Appt_Auth_1 not in ('NRM','NSM','NTM','NVM','NWM','NXM','P2M','P3M','P5M','P7M',
712 'V2M','VAG','VBJ','VCJ','V4L','V4M','V6M','V4P') and
713 p_Cur_Appt_Auth_1 is not null then
714 hr_utility.set_message(8301, 'GHR_37875_ALL_PROCEDURE_FAIL');
715 hr_utility.raise_error;
716 end if;
717 end if;
718
719 -- 100.14.3
720 -- Dec 2001 Patch 1-Nov-01 Add AUM
721 if p_effective_date >= to_date('2001/11/01','yyyy/mm/dd') THEN
722 if p_To_Pay_Plan = 'ES'
723 and
724 p_Cur_Appt_Auth_2 not in ('AUM','AWM','BWM','HAM','ZLM')
725 and
726 p_Cur_Appt_Auth_2 is not null
727 then
728 hr_utility.set_message(8301, 'GHR_37125_ALL_PROCEDURE_FAIL');
729 hr_utility.raise_error;
730 end if;
731 else
732 if p_To_Pay_Plan = 'ES'
733 and
734 p_Cur_Appt_Auth_2 not in ('AUM','AWM','BWM','HAM','ZLM')
735 and
736 p_Cur_Appt_Auth_2 is not null
737 then
738 hr_utility.set_message(8301, 'GHR_37125_ALL_PROCEDURE_FAIL');
739 hr_utility.raise_error;
740 end if;
741 end if;
742 -- 100.16.3
743 -- Dec 01 Patch vravikan Delete YKM
744 --upd49 08-Jan-07 Raju Bug#5619873 From 01-Sep-2006 Delete WTM
745 if p_effective_date < fnd_date.canonical_to_date('2006/09/01') then
746 if (p_Cur_Appt_Auth_1 in ('WTM','WUM') or
747 p_Cur_Appt_Auth_2 in ('WTM','WUM')) and
748 p_Handicap <>'04' and
749 to_number(p_Handicap) not between 6 and 94 and
750 p_Handicap is not null then
751 hr_utility.set_message(8301, 'GHR_37126_ALL_PROCEDURE_FAIL');
752 hr_utility.set_message_token('APP_AUTH','WTM, WUM');
753 hr_utility.raise_error;
754 end if;
755 --Bug #11726461
756 ELSIF p_effective_date < fnd_date.canonical_to_date('2011/02/01') then
757 if (p_Cur_Appt_Auth_1 in ('WUM') or
758 p_Cur_Appt_Auth_2 in ('WUM')) and
759 p_Handicap <>'04' and
760 to_number(p_Handicap) not between 6 and 94 and
761 p_Handicap is not null then
762 hr_utility.set_message(8301, 'GHR_37126_ALL_PROCEDURE_FAIL');
763 hr_utility.set_message_token('APP_AUTH','WUM');
764 hr_utility.raise_error;
765 end if;
766 --Begin Bug #11726461
767 ELSE
768 if (p_Cur_Appt_Auth_1 in ('WUM') or
769 p_Cur_Appt_Auth_2 in ('WUM')) and
770 p_Handicap <>'01' and
771 to_number(p_Handicap) not between 6 and 98 and
772 p_Handicap is not null then
773 hr_utility.set_message(8301, 'GHR_38358_ALL_PROCEDURE_FAIL');
774 hr_utility.raise_error;
775 end if;
776 --End Bug #11726461
777 END IF;
778
779 --
780 -- 100.17.3 If either current appointment authority is Z2W,
781 -- Then agency must be AF, AR, DD, or NV.
785 if ( p_Cur_Appt_Auth_1 IN ('UAM','Z2U','Z2W','Z6L') or p_Cur_Appt_Auth_2 IN ('UAM','Z2U','Z2W','Z6L')) and
782 -- U58 Raju 01-Sep-2009 Bug 9503972 added UAM,Z2U,Z6L
783
784 if p_effective_date >= fnd_date.canonical_to_date('1998/09/01') then
786 substr(p_Agency_Subelement,1,2) not in ('AF','AR','DD','NV')
787 then
788 hr_utility.set_message(8301, 'GHR_37893_ALL_PROCEDURE_FAIL');
789 hr_utility.raise_error;
790 end if;
791 end if;
792
793 -- 100.19.1
794 -- deleted 'M2M','M4M' and added 'BNK' as per the changes for apr-98 release
795 -- added 'Z2W' on 9-oct-98 for update 8
796 -- 11/11 12/20/99 vravikan 01-Dec-1999 Add ZBA
797 -- Sep'00 Patch vravikan From Begining Add ZBA
798 -- Dec 01 Patch 12/10/01 vravikan Delete CTM,MYM,MZM,M1M, and NEL
799 -- 14-SEP-2004 MADHURI DELETED LEGAL AUTH - MAM, MBM.
800 -- 23-Jun-06 Raju From Beginning Added ZTU, Z5B, Z5C, Z5D, Z5E, and Z5H
801 -- 26-sep-2006 amrchakr 01-jul-2003 Changed edit number from 100.19.1 to 100.19.3
802 -- 26-sep-2006 amrchakr 01-jul-2003 Remove Authorities 'JEM','JGM','JJM','JMM','JQM','JVM','J4M' from 100.19.3
803 --------------------------------------------------------------------------------------------
804 if p_effective_date < fnd_date.canonical_to_date('2003/07/01') then
805
806 if (p_Cur_Appt_Auth_1 in
807 ('ABS','ACM','AYM','A2M','A7M','BBM','BEA','BGL','BKM','BLM','BMA','BMC',
808 'BNE','BNK','BNW','BRM','BSE','BSS','BSW','BTM','BWA','BWE','HDM',
809 'HGM','HJM','HLM','HNM','HRM','H3M','JEM','JGM','JJM','JMM','JQM',
810 'JVM','J4M','KLM','KQM','KTM','KVM','KXM','K1M','K4M','K7M','K9M',
811 'LBM','LEM','LHM','LJM','LKM','LKP','LLM','LPM','LSM','LWM','LYM',
812 'LZM','L1K','L1M','L3M','MCM','MEM','MGM','MJM','MLL',
813 'MLM','MMM','MXM','M6M','M8M','NAM',
814 'NCM','NEM','NFM','NJM','NMM','NUM','Q3M','VHM','VJM','V8L',
815 'V8N','Z2W','ZBA','ZGM','ZGY','ZJK','ZJM','ZMM','ZQM','ZTM','ZTU','Z5B', 'Z5C', 'Z5D', 'Z5E','Z5H'
816 )
817 or
818 p_Cur_Appt_Auth_2 in
819 ('ABS','ACM','AYM','A2M','A7M','BBM','BEA','BGL','BKM','BLM','BMA','BMC',
820 'BNE','BNK','BNW','BRM','BSE','BSS','BSW','BTM','BWA','BWE','HDM',
821 'HGM','HJM','HLM','HNM','HRM','H3M','JEM','JGM','JJM','JMM','JQM',
822 'JVM','J4M','KLM','KQM','KTM','KVM','KXM','K1M','K4M','K7M','K9M',
823 'LBM','LEM','LHM','LJM','LKM','LKP','LLM','LPM','LSM','LWM','LYM',
824 'LZM','L1K','L1M','L3M','MCM','MEM','MGM','MJM','MLL',
825 'MLM','MMM','MXM','M6M','M8M','NAM',
826 'NCM','NEM','NFM','NJM','NMM','NUM','Q3M','VHM','VJM','V8L',
827 'V8N','ZBA','Z2W','ZGM','ZGY','ZJK','ZJM','ZMM','ZQM','ZTM','ZTU','Z5B', 'Z5C', 'Z5D', 'Z5E','Z5H'
828 )
829 )
830 AND
831 p_position_occupied_code <> '1'
832 AND
833 p_position_occupied_code is not null
834 then
835
836 hr_utility.set_message(8301, 'GHR_37127_ALL_PROCEDURE_FAIL');
837 hr_utility.raise_error;
838
839 end if;
840 else
841 if (p_Cur_Appt_Auth_1 in
842 ('ABS','ACM','AYM','A2M','A7M','BBM','BEA','BGL','BKM','BLM','BMA','BMC',
843 'BNE','BNK','BNW','BRM','BSE','BSS','BSW','BTM','BWA','BWE','HDM',
844 'HGM','HJM','HLM','HNM','HRM','H3M',
845 'KLM','KQM','KTM','KVM','KXM','K1M','K4M','K7M','K9M',
846 'LBM','LEM','LHM','LJM','LKM','LKP','LLM','LPM','LSM','LWM','LYM',
847 'LZM','L1K','L1M','L3M','MCM','MEM','MGM','MJM','MLL',
848 'MLM','MMM','MXM','M6M','M8M','NAM',
849 'NCM','NEM','NFM','NJM','NMM','NUM','Q3M','VHM','VJM','V8L',
850 'V8N','Z2W','ZBA','ZGM','ZGY','ZJK','ZJM','ZMM','ZQM','ZTM','ZTU','Z5B', 'Z5C', 'Z5D', 'Z5E','Z5H'
851 )
852 or
853 p_Cur_Appt_Auth_2 in
854 ('ABS','ACM','AYM','A2M','A7M','BBM','BEA','BGL','BKM','BLM','BMA','BMC',
855 'BNE','BNK','BNW','BRM','BSE','BSS','BSW','BTM','BWA','BWE','HDM',
856 'HGM','HJM','HLM','HNM','HRM','H3M',
857 'KLM','KQM','KTM','KVM','KXM','K1M','K4M','K7M','K9M',
858 'LBM','LEM','LHM','LJM','LKM','LKP','LLM','LPM','LSM','LWM','LYM',
859 'LZM','L1K','L1M','L3M','MCM','MEM','MGM','MJM','MLL',
860 'MLM','MMM','MXM','M6M','M8M','NAM',
861 'NCM','NEM','NFM','NJM','NMM','NUM','Q3M','VHM','VJM','V8L',
862 'V8N','ZBA','Z2W','ZGM','ZGY','ZJK','ZJM','ZMM','ZQM','ZTM','ZTU','Z5B', 'Z5C', 'Z5D', 'Z5E','Z5H'
863 )
864 )
865 AND
866 p_position_occupied_code <> '1'
867 AND
868 p_position_occupied_code is not null
869 then
870
871 hr_utility.set_message(8301, 'GHR_37692_ALL_PROCEDURE_FAIL');
872 hr_utility.raise_error;
873
874 end if;
875 end if;
876
877 -- DATE UPDATE_BY COMMENTS
878 -------------------------------------------------------------------------------------------
879 -- 14-SEP-2004 MADHURI DELETED LEGAL AUTH - MAM, MBM.
880 --------------------------------------------------------------------------------------------
881 -- 100.20.2
882 -- deleted 'M2M','M4M' and added 'BNK' as per the changes for apr-98 release
883 -- added 'Z2W' on 9-oct-98 for update 8
884 -- 11/11 12/20/99 vravikan 01-Dec-1999 Add ZBA
885 -- Sep'00 Patch vravikan From Begining Add ZBA
886 -- Dec 01 Patch 12/10/01 vravikan Delete CTM,MYM,MZM,M1M, and NEL
887 -- 23-Jun-06 Raju From Beginning Added Z5B, Z5C, Z5D, Z5E, and Z5H
891 if (
888 -- 29-sep-2006 amrchakr 01-jul-2003 end dated the edit from 01-jul-2003
889
890 IF p_effective_date < fnd_date.canonical_to_date('2003/07/01') THEN
892 p_Cur_Appt_Auth_1 in
893 ('ABS','ACM','AYM','A2M','A7M','BBM','BEA','BGL','BKM','BLM','BMA','BMC',
894 'BNE','BNK','BNW','BRM','BSE','BSS','BSW','BTM','BWA','BWE','HDM',
895 'HGM','HJM','HLM','HNM', 'HRM','H3M','JEM','JGM','JJM','JMM','JQM',
896 'JVM','J4M','KLM','KQM','KTM','KVM','KXM','K1M', 'K4M','K7M','K9M',
897 'LBM','LEM','LHM','LJM','LKM','LKP','LLM','LPM','LSM','LWM','LYM','LZM',
898 'L1K','L1M','L3M','MCM','MEM','MGM','MJM','MLL',
899 'MLM','MMM','MXM','M6M','M8M','NAM','NCM','MEL',
900 'NEM','NFM','NJM','NMM','NUM','Q4M','VHM', 'VJM','V8L','V8N','Z2W',
901 'ZBA','ZGM','ZGY','ZJK','ZJM','ZMM','ZQM','ZTM','ZTU','Z5B', 'Z5C', 'Z5D', 'Z5E','Z5H')
902 or
903 p_Cur_Appt_Auth_2 in
904 ('ABS','ACM','AYM','A2M','A7M','BBM','BEA','BGL','BKM','BLM','BMA','BMC',
905 'BNE','BNK','BNW','BRM','BSE','BSS','BSW','BTM','BWA','BWE','HDM',
906 'HGM','HJM','HLM','HNM', 'HRM','H3M','JEM','JGM','JJM','JMM','JQM',
907 'JVM','J4M','KLM','KQM','KTM','KVM','KXM','K1M', 'K4M','K7M','K9M',
908 'LBM','LEM','LHM','LJM','LKM','LKP','LLM','LPM','LSM','LWM','LYM','LZM',
909 'L1K','L1M','L3M','MCM','MEM','MGM','MJM','MLL',
910 'MLM','MMM','MXM', 'M6M','M8M','NAM','NCM','MEL',
911 'NEM','NFM','NJM','NMM','NUM','Q4M','VHM', 'VJM','V8L','V8N','Z2W',
912 'ZBA','ZGM','ZGY','ZJK','ZJM','ZMM','ZQM','ZTM','ZTU','Z5B', 'Z5C', 'Z5D', 'Z5E','Z5H')
913 )
914 and
915 (
916 to_number(p_First_NOAC_Lookup_Code) not between 100 and 199
917 and
918 to_number(p_First_NOAC_Lookup_Code) not between 500 and 599
919 )
920 and
921 p_Position_Occupied_Code <> '1'
922 and
923 p_Position_Occupied_Code is not null
924 then
925 hr_utility.set_message(8301, 'GHR_37128_ALL_PROCEDURE_FAIL');
926 hr_utility.raise_error;
927 end if;
928 END IF;
929 --
930
931 -- 100.22.3
932 if ((
933 (
934 substr(p_Cur_Appt_Auth_1,1,1)= 'M'
935 or
936 substr(p_Cur_Appt_Auth_1,1,1)= 'N'
937 )
938 and
939 p_Cur_Appt_Auth_1 <>'NUM'
940 )
941 or
942 (
943 (
944 substr(p_Cur_Appt_Auth_2,1,1)= 'M'
945 or
946 substr(p_Cur_Appt_Auth_2,1,1)= 'N'
947 )
948 and
949 p_Cur_Appt_Auth_2 <>'NUM'
950 ))
951 and
952 p_Tenure_Goupe_Code <> '0'
953 and
954 p_Tenure_Goupe_Code <> '3'
955 and
956 p_Tenure_Goupe_Code is not null
957 then
958 hr_utility.set_message(8301, 'GHR_37129_ALL_PROCEDURE_FAIL');
959 hr_utility.raise_error;
960 end if;
961
962 -- 100.25.3
963 if ((
964 substr(p_Cur_Appt_Auth_1,1,1)='K'
965 and p_Cur_Appt_Auth_1<>'KLM'
966 )
967 or
968 (
969 substr(p_Cur_Appt_Auth_2,1,1)='K'
970 and p_Cur_Appt_Auth_2<>'KLM'
971 ))
972 and
973 p_Tenure_Goupe_Code <>'2'
974 and
975 p_Tenure_Goupe_Code <>'1'
976 and
977 p_Tenure_Goupe_Code is not null
978 then
979 hr_utility.set_message(8301, 'GHR_37130_ALL_PROCEDURE_FAIL');
980 hr_utility.raise_error;
981 end if;
982
983 -- 100.28.3
984 -- Dec 01 Patch 12/10/01 vravikan Add YCM
985 -- Delete YAM, Y4M
986 -- Upd 47 23-Jun-06 Raju From 01-Apr-06 Added condition pay plan is other than Yx
987 -- Bug 5735389 26-dec-2006 amrchakr Removed the condition 'p_Tenure_Goupe_Code <>'1'' from ELSE part.
988 --Bug 8653515 29-JUL-2009 Mani From 01-Mar-09 Removed pay plan condition
989
990 IF p_effective_date < fnd_date.canonical_to_date('2006/04/01') THEN
991 if ( p_Cur_Appt_Auth_1 in ('YBM','YCM','YGM','Y1M','Y2M','Y3M') or
992 p_Cur_Appt_Auth_2 in ('YBM','YCM','YGM','Y1M','Y2M','Y3M')) and
993 p_Tenure_Goupe_Code <>'1' and
994 p_Tenure_Goupe_Code <>'2' and
995 p_Tenure_Goupe_Code is not null
996 then
997 hr_utility.set_message(8301, 'GHR_37131_ALL_PROCEDURE_FAIL');
998 hr_utility.set_message_token('APP_ATRTY','YBM, YCM, YGM, Y1M, Y2M, or Y3M');
999 hr_utility.raise_error;
1000 end if;
1001 ELSIF p_effective_date < fnd_date.canonical_to_date('2009/03/01') THEN
1002 if ( p_Cur_Appt_Auth_1 in ('YBM','YCM','YGM','Y1M','Y2M','Y3M') or
1003 p_Cur_Appt_Auth_2 in ('YBM','YCM','YGM','Y1M','Y2M','Y3M')) and
1004 substr(p_To_Pay_Plan,1,1)<>'Y' and
1005 p_Tenure_Goupe_Code <>'2' and
1006 p_Tenure_Goupe_Code is not null
1007 then
1008 hr_utility.set_message(8301, 'GHR_37131_ALL_PROCEDURE_FAIL');
1009 hr_utility.set_message_token('APP_ATRTY','YBM, YCM, YGM, Y1M, Y2M, or Y3M, And pay plan is other than Yx');
1010 hr_utility.raise_error;
1011 end if;
1012 ELSE
1013 if ( p_Cur_Appt_Auth_1 in ('YBM','YCM','YGM','Y1M','Y2M','Y3M') or
1017 then
1014 p_Cur_Appt_Auth_2 in ('YBM','YCM','YGM','Y1M','Y2M','Y3M')) and
1015 p_Tenure_Goupe_Code <>'2' and
1016 p_Tenure_Goupe_Code is not null
1018 hr_utility.set_message(8301, 'GHR_37131_ALL_PROCEDURE_FAIL');
1019 hr_utility.set_message_token('APP_ATRTY','YBM, YCM, YGM, Y1M, Y2M, or Y3M');
1020 hr_utility.raise_error;
1021 end if;
1022 END IF;
1023
1024
1025 -- 100.31.3
1026 if (
1027 p_Cur_Appt_Auth_1 ='WXM'
1028 or p_Cur_Appt_Auth_2 ='WXM'
1029 )
1030 and
1031 p_Tenure_Goupe_Code <>'0'
1032 and
1033 p_Tenure_Goupe_Code <>'3'
1034 and
1035 p_Tenure_Goupe_Code is not null
1036 then
1037 hr_utility.set_message(8301, 'GHR_37132_ALL_PROCEDURE_FAIL');
1038 hr_utility.raise_error;
1039 end if;
1040
1041 -- 100.35.3
1042 if (
1043 p_Cur_Appt_Auth_1 ='V8V' or p_Cur_Appt_Auth_2 ='V8V'
1044 )
1045 and
1046 (
1047 substr(p_Agency_Subelement,1,2) <>'VA'
1048 or p_Position_Occupied_Code <>'2'
1049 )
1050 then
1051 hr_utility.set_message(8301, 'GHR_37133_ALL_PROCEDURE_FAIL');
1052 hr_utility.raise_error;
1053 end if;
1054
1055 -- 100.36.3
1056 if p_To_Pay_Plan='GS'
1057 and
1058 p_To_Grade_Or_Level in ('01','02','03','04','05','06','07','08','09','10')
1059 and
1060 (
1061 p_Cur_Appt_Auth_1 = 'ZKM'
1062 or
1063 p_Cur_Appt_Auth_1 = 'ZNM'
1064 or
1065 p_Cur_Appt_Auth_2 = 'ZKM'
1066 or
1067 p_Cur_Appt_Auth_2 = 'ZNM'
1068 )
1069 then
1070 hr_utility.set_message(8301, 'GHR_37134_ALL_PROCEDURE_FAIL');
1071 hr_utility.raise_error;
1072 end if;
1073
1074 -- 100.37.3
1075 if (
1076 p_Cur_Appt_Auth_1 in ('NEM','LBM','LZM')
1077 or p_Cur_Appt_Auth_2 in ('NEM','LBM','LZM')
1078 )
1079 and
1080 (
1081 p_Vet_Pref_Code = '1'
1082 or p_Vet_Pref_Code = '5'
1083 )
1084 then
1085 hr_utility.set_message(8301, 'GHR_37135_ALL_PROCEDURE_FAIL');
1086 hr_utility.raise_error;
1087 end if;
1088
1089 -- 100.38.3
1090 --
1091 -- 12/8/00 vravikan From the Start Add UAM
1092 -- If either current appointment authority is Z2U, then agency must be
1093 -- AF, AR, DD or NV.
1094 --
1095 -- BUG # 8653515 Mani added LAC Z6L from 01-Mar-2009
1096 -- U58 Raju 31-Dec-2009 Bug 9503972 Terminate the Edit
1097 if p_effective_date < fnd_date.canonical_to_date('2009/12/31') then
1098 if p_effective_date >= fnd_date.canonical_to_date('1998/03/01') then
1099 if p_effective_date < fnd_date.canonical_to_date('2009/03/01') then
1100 if (p_Cur_Appt_Auth_1 in ( 'Z2U','UAM') or
1101 p_Cur_Appt_Auth_2 in ('Z2U','UAM') ) and
1102 substr(p_Agency_Subelement,1,2) not in ('AF','AR','DD','NV') then
1103 hr_utility.set_message(8301, 'GHR_37876_ALL_PROCEDURE_FAIL');
1104 hr_utility.set_message_token('APP_ATRTY','Z2U or UAM');
1105 hr_utility.raise_error;
1106 end if;
1107 else
1108 if (p_Cur_Appt_Auth_1 in ( 'Z2U','UAM','Z6L') or
1109 p_Cur_Appt_Auth_2 in ('Z2U','UAM','Z6L') ) and
1110 substr(p_Agency_Subelement,1,2) not in ('AF','AR','DD','NV') then
1111 hr_utility.set_message(8301, 'GHR_37876_ALL_PROCEDURE_FAIL');
1112 hr_utility.set_message_token('APP_ATRTY','Z2U, UAM or Z6L');
1113 hr_utility.raise_error;
1114 end if;
1115 end if;
1116 end if;
1117 end if;
1118 /* Commented -- Dec 2001 Patch
1119 -- 100.52.3
1120 if (
1121 substr(p_Cur_Appt_Auth_1,1,1)='T'
1122 or
1123 substr(p_Cur_Appt_Auth_2,1,1)='T'
1124 )
1125 and
1126 substr(p_Duty_Station_Lookup_Code,1,2) <> 'PM'
1127 and
1128 p_Duty_Station_Lookup_Code is not null
1129 then
1130 hr_utility.set_message(8301, 'GHR_37136_ALL_PROCEDURE_FAIL');
1131 hr_utility.raise_error;
1132 end if;
1133 */
1134
1135 -- 100.55.1
1136 if ( p_Cur_Appt_Auth_1 in
1137 ('NRM','NSM','NTM','NVM','NWM','NXM','V2M','VCJ','VBJ','VAG','V6M','V4L','V4M','V4P')
1138 or
1139 p_Cur_Appt_Auth_2 in
1140 ('NRM','NSM','NTM','NVM','NWM','NXM','V2M','VCJ','VBJ','VAG','V6M','V4L','V4M','V4P')
1141 )
1142 and
1143 p_to_pay_plan <> 'ES'
1144 and
1145 p_to_pay_plan is not null
1146 then
1147 hr_utility.set_message(8301, 'GHR_37137_ALL_PROCEDURE_FAIL');
1148 hr_utility.raise_error;
1149 end if;
1150
1151 -- 100.56.2
1152 if (
1153 p_Cur_Appt_Auth_1 in ('NRM','NSM','NTM','NVM','NWM','NXM',
1154 'VAG','VBJ','VCJ','V4L','V4M','V6M','V4P')
1155 or
1156 p_Cur_Appt_Auth_2 in ('NRM','NSM','NTM','NVM','NWM','NXM','VAG',
1157 'VBJ','VCJ','V4L','V4M','V6M','V4P')
1158 )
1159 and
1160 p_To_Pay_Plan <>'ES'
1161 and
1162 p_To_Pay_Plan is not null
1163 then
1164 hr_utility.set_message(8301, 'GHR_37138_ALL_PROCEDURE_FAIL');
1165 hr_utility.raise_error;
1169 -- Raju 20-Apr-2007 UPD 53(Bug 5996938) Delete cur_appt_auth2 From Starting
1166 end if;
1167
1168 -- 100.58.3
1170 -- l_Service_Computation_Date := TO_DATE(p_Service_Computation_Date, 'DD-MON-YYYY');
1171 l_Service_Computation_Date := p_Service_Computation_Date;
1172 if (p_Cur_Appt_Auth_1='ZZZ'
1173 --or p_Cur_Appt_Auth_2='ZZZ'
1174 )
1175 and (( l_Service_Computation_Date >= TO_DATE('1982/01/01','YYYY/MM/DD')
1176 and l_Service_Computation_Date is not null
1177 )or(p_Position_Occupied_Code <> '1' and
1178 p_Position_Occupied_Code is not null )
1179 )
1180 then
1181 hr_utility.set_message(8301, 'GHR_37139_ALL_PROCEDURE_FAIL');
1182 hr_utility.raise_error;
1183 end if;
1184
1185 /*
1186 -- 100.61.2
1187 if (
1188 (
1189 substr(p_First_NOAC_Lookup_Code,1,1)='1' and p_First_NOAC_Lookup_Code <>'132'
1190 )
1191 or
1192 substr(p_First_NOAC_Lookup_Code,1,1)='5'
1193 )
1194 and
1195 (
1196 p_Cur_Appt_Auth_1 <>p_First_Action_NOA_LA_Code1
1197 or
1198 p_Cur_Appt_Auth_2 <>p_First_Action_NOA_LA_Code2
1199 )
1200 then
1201 hr_utility.set_message(8301, 'GHR_37140_ALL_PROCEDURE_FAIL');
1202 hr_utility.raise_error;
1203 end if;
1204 */
1205
1206 -- 100.64.3
1207 if (
1208 p_Cur_Appt_Auth_1='WEM' or p_Cur_Appt_Auth_2='WEM'
1209 )
1210 and
1211 p_To_OCC_Code <> '0904'
1212 and
1213 p_To_OCC_Code is not null
1214 then
1215 hr_utility.set_message(8301, 'GHR_37141_ALL_PROCEDURE_FAIL');
1216 hr_utility.raise_error;
1217 end if;
1218
1219 -- 100.70.3
1220 if (
1221 p_Cur_Appt_Auth_1='WDM' or p_Cur_Appt_Auth_2='WDM'
1222 )
1223 and
1224 not(
1225 (
1226 p_To_OCC_Code = '0905' or p_To_OCC_Code = '1222'
1227 )
1228 or
1229 p_To_OCC_Code is null
1230 )
1231 then
1232 hr_utility.set_message(8301, 'GHR_37142_ALL_PROCEDURE_FAIL');
1233 hr_utility.raise_error;
1234 end if;
1235
1236 -- 100.73.3
1237 if (
1238 p_Cur_Appt_Auth_1 in ('ACM','AYM','KQM')
1239 or
1240 p_Cur_Appt_Auth_2 in ('ACM','AYM','KQM')
1241 )
1242 and
1243 p_Agency_Subelement<>'RR00'
1244 and
1245 (p_To_OCC_Code = '0904' or p_To_OCC_Code = '0905')
1246
1247 then
1248 hr_utility.set_message(8301, 'GHR_37143_ALL_PROCEDURE_FAIL');
1249 hr_utility.raise_error;
1250 end if;
1251
1252 -- 100.76.3
1253 if (
1254 p_Cur_Appt_Auth_1='VEM' or p_Cur_Appt_Auth_2='VEM' or
1255 p_Cur_Appt_Auth_1='H2L' or p_Cur_Appt_Auth_2='H2L'
1256 )
1257 and
1258 p_To_Pay_Plan not in ('ED','EF','EH')
1259 and
1260 p_To_Pay_Plan is not null
1261 then
1262 hr_utility.set_message(8301, 'GHR_37144_ALL_PROCEDURE_FAIL');
1263 hr_utility.raise_error;
1264 end if;
1265
1266 -- 100.98.3
1267 if p_Cur_Appt_Auth_1='ZZZ'
1268 and
1269 p_Cur_Appt_Auth_2 <>'ZZZ'
1270 and
1271 p_Cur_Appt_Auth_2 is not null
1272 then
1273 hr_utility.set_message(8301, 'GHR_37145_ALL_PROCEDURE_FAIL');
1274 hr_utility.raise_error;
1275 end if;
1276
1277 -- 100.99.3
1278 if p_Cur_Appt_Auth_2='ZZZ'
1279 and
1280 p_Cur_Appt_Auth_1 <> 'ZZZ'
1281 and
1282 p_Cur_Appt_Auth_1 is not null
1283 then
1284 hr_utility.set_message(8301, 'GHR_37146_ALL_PROCEDURE_FAIL');
1285 hr_utility.raise_error;
1286 end if;
1287
1288
1289 end chk_Cur_Appt_Auth;
1290
1291 /* Name:
1292 -- C_Date_of_Birth
1293 */
1294
1295 procedure chk_Date_of_Birth
1296 ( p_First_NOAC_Lookup_Code in varchar2
1297 ,p_Effective_Date in date
1298 ,p_Employee_Date_of_Birth in date
1299 ,p_Duty_Station_Lookup_Code in varchar2
1300 ,p_as_of_date in date
1301 ) is
1302 begin
1303
1304 -- 110.02.2
1305 if p_First_NOAC_Lookup_Code ='300'
1306 and
1307 (to_number(substr(to_char(p_Effective_Date, 'MMDDYYYY'),5,4)) -
1308 to_number(substr(to_char(p_employee_date_of_birth, 'MMDDYYYY'),5,4)) ) < 50
1309 then
1310 hr_utility.set_message(8301, 'GHR_37147_ALL_PROCEDURE_FAIL');
1311 hr_utility.raise_error;
1312 end if;
1313
1314 -- 110.05.2
1315 -- Date of birth must be at least 13 years less than the
1316 -- effective date of personnel action, or be asterisks.
1317
1318 if (months_between(p_as_of_date, p_employee_date_of_birth) < 156 ) then
1319 hr_utility.set_message(8301, 'GHR_38412_ALL_PROCEDURE_FAIL');
1320 hr_utility.raise_error;
1321 end if;
1322
1323 -- 110.07.2
1324 -- end dated this edit on 27-oct-98 for bug 745246
1325 if p_effective_date <= fnd_date.canonical_to_date('1998/07/31') then
1326 if (
1327 (
1328 substr(p_Duty_Station_Lookup_Code,1,1) in ('0','1','2','3','4','5','6','7','8','9')
1329 and
1330 substr(p_Duty_Station_Lookup_Code,2,1) in ('0','1','2','3','4','5','6','7','8','9')
1331 )
1332 or
1336 (to_number(substr(to_char(p_Effective_Date, 'MMDDYYYY'),5,4)) -
1333 substr(p_Duty_Station_Lookup_Code,2,1) = 'Q'
1334 )
1335 and
1337 to_number(substr(to_char(p_employee_date_of_birth, 'MMDDYYYY'),5,4)) ) < 15
1338 then
1339 hr_utility.set_message(8301, 'GHR_37149_ALL_PROCEDURE_FAIL');
1340 hr_utility.raise_error;
1341 end if;
1342 end if;
1343
1344 end chk_Date_of_Birth;
1345
1346 /* Name:
1347 -- Duty Station
1348 */
1349
1350 procedure chk_duty_station
1351 (p_to_play_plan in varchar2
1352 ,p_agency_sub_element in varchar2
1353 ,p_duty_station_lookup in varchar2
1354 ,p_First_Action_NOA_LA_Code1 in varchar2
1355 ,p_First_Action_NOA_LA_Code2 in varchar2
1356 ,p_effective_date in date
1357 ) is
1358 begin
1359
1360 -- 120.00.1 From Part B,C, Notes
1361 if (
1362 substr(p_duty_station_lookup,1,1) not in ('0','1','2','3','4','5','6','7','8','9')
1363 and
1364 substr(p_duty_station_lookup,2,1) not in ('0','1','2','3','4','5','6','7','8','9')
1365 ) and
1366 substr(p_duty_station_lookup,-3,3) <> '000' then
1367 hr_utility.set_message(8301, 'GHR_37150_ALL_PROCEDURE_FAIL');
1368 hr_utility.raise_error;
1369 end if;
1370
1371 /* Commented -- Dec 2001 Patch
1372 -- 120.02.3
1373
1374 if substr(p_to_play_plan,1,2) in ('CZ','SZ','WZ')
1375 and
1376 p_agency_sub_element <> 'PC00'
1377 and
1378 substr( p_duty_station_lookup,1,2) <> 'PM'
1379 and
1380 p_duty_station_lookup is not null
1381 then
1382 hr_utility.set_message(8301, 'GHR_37151_ALL_PROCEDURE_FAIL');
1383 hr_utility.raise_error;
1384 end if;
1385 */
1386
1387 -- 120.03.3
1388 -- 10/4 08/13/99 vravikan 01-Apr-99 New Edit
1389 -- 20/2 20/02/03 Madhuri Commented Edit for Delete - March 2003 Legislative Patch
1390
1391 /*if p_effective_date >= fnd_date.canonical_to_date('19'||'99/04/01') then
1392 if substr(p_to_play_plan,1,2) in ('TW')
1393 and
1394 substr( p_duty_station_lookup,1,2) not in ( '11','24','51' )
1395 and
1396 p_duty_station_lookup is not null
1397 then
1398 hr_utility.set_message(8301, 'GHR_37166_ALL_PROCEDURE_FAIL');
1399 hr_utility.raise_error;
1400 end if;
1401 end if; */
1402
1403 -- 120.04.3
1404 -- Update Date By Effective Date Comment
1405 -- 9 04/28/99 vravikan Change Edit-May 99 Patch
1406 -- 48 26/09/06 amrchakr 01-jul-2006 Remove condition of agency DJ02
1407 -- UPD 56 (Bug# 8309414) Terminating the edit eff date 13-Aug-2007
1408 if p_effective_date < fnd_date.canonical_to_date('2007/08/14') then
1409 if p_effective_date < to_date('2006/07/01','yyyy/mm/dd')
1410 then
1411 if substr(p_to_play_plan,1,2) in ('WQ','WR','WU')
1412 and
1413 p_agency_sub_element <> 'DJ02'
1414 and
1415 substr(p_duty_station_lookup,1,2) <> 'RQ'
1416 and
1417 p_duty_station_lookup is not null
1418 then
1419 hr_utility.set_message(8301, 'GHR_37152_ALL_PROCEDURE_FAIL');
1420 hr_utility.raise_error;
1421 end if;
1422 else
1423 if substr(p_to_play_plan,1,2) in ('WQ','WR','WU')
1424 and
1425 substr(p_duty_station_lookup,1,2) <> 'RQ'
1426 and
1427 p_duty_station_lookup is not null
1428 then
1429 hr_utility.set_message(8301, 'GHR_37600_ALL_PROCEDURE_FAIL');
1430 hr_utility.raise_error;
1431 end if;
1432 end if;
1433 end if;
1434
1435 -- 120.07.2
1436 -- upd50 06-Feb-07 Raju From 01-Oct-2006 Bug#5745356 delete NOA 849
1437 if p_effective_date < to_date('2006/10/01','yyyy/mm/dd') then
1438 if (substr(p_First_Action_NOA_LA_Code1,1,1)='T' or
1439 substr(p_First_Action_NOA_LA_Code2,1,1)='T') and
1440 substr(p_duty_station_lookup,1,2) <>'PM' and
1441 p_duty_station_lookup is not null
1442 then
1443 hr_utility.set_message(8301, 'GHR_37153_ALL_PROCEDURE_FAIL');
1444 hr_utility.raise_error;
1445 end if;
1446 end if;
1447
1448 /*
1449 This has to be deleted according to the update 6 manual for april release
1450 -- 120.10.3
1451 if substr(p_duty_station_lookup,1,2) = 'US'
1452 and
1453 p_agency_sub_element <> 'DJ02'
1454 then
1455 hr_utility.set_message(8301, 'GHR_37154_ALL_PROCEDURE_FAIL');
1456 hr_utility.raise_error;
1457 end if;
1458 */
1459
1460 end chk_duty_station;
1461
1462
1463 /* Name:
1464 -- C_Education_Level
1465 */
1466
1467 procedure chk_Education_Level
1468 ( p_tenure_group_code in varchar2
1469 ,p_education_level in varchar2
1470 ,p_pay_plan in varchar2
1471 ) is
1472 begin
1473
1474 -- 130.02.3
1475 if (
1476 p_tenure_group_code = '1' or p_tenure_group_code = '2'
1477 )
1478 and
1479 p_education_level is null
1480 then
1481 hr_utility.set_message(8301, 'GHR_37155_ALL_PROCEDURE_FAIL');
1482 hr_utility.raise_error;
1483 end if;
1484
1485 -- 130.04.3
1486 if p_pay_plan = 'ES'
1487 and
1488 p_education_level is null
1489 then
1490 hr_utility.set_message(8301, 'GHR_37156_ALL_PROCEDURE_FAIL');
1491 hr_utility.raise_error;
1492 end if;
1493
1494 end chk_Education_Level;
1495
1496 /* Name:
1497 -- C_Effective_Date
1498 */
1499
1500 procedure chk_effective_date
1501 ( p_First_NOAC_Lookup_Code in varchar2
1502 ,p_Effective_Date in date
1503 ,p_Production_Date in date -- Non SF52 item
1504 ) is
1505 begin
1506 null;
1507 /*
1508 commented by skutteti on 7-apr-98. As per the new changes this edit has to be deleted.
1509 -- 140.02.2
1510 if (
1511 p_First_NOAC_Lookup_Code = '117' or
1512 p_First_NOAC_Lookup_Code = '517'
1513 )
1514 and
1515 not (
1516 to_char(p_Effective_Date,'MMDD')>= '0513'
1517 and
1518 to_char(p_Effective_Date,'MMDD')<= '0930'
1519 )
1520 then
1521 hr_utility.set_message(8301, 'GHR_37157_ALL_PROCEDURE_FAIL');
1522 hr_utility.raise_error;
1523 end if;
1524 */
1525
1526
1527 /* p_Production_Date can not be found.
1528 -- 140.08.2
1532
1529 if Months_Between(p_Effective_Date,p_Production_Date)>6
1530 or
1531 -- Year_Between (p_Effective_Date,p_Production_Date)<-2
1533
1534 to_number(substr(to_char(p_Effective_Date, 'MMDDYYYY'),5,4)) -
1535 to_number(substr(to_char(p_Production_Date, 'MMDDYYYY'),5,4)) ) < -2
1536 then
1537 hr_utility.set_message(8301, 'GHR_37158_ALL_PROCEDURE_FAIL');
1538 hr_utility.raise_error;
1539 end if;
1540 */
1541 --Begin Bug# 10189715
1542 if p_effective_date >= fnd_date.canonical_to_date('2010/05/01') then
1543 if Months_Between(p_Effective_Date,p_Production_Date)>6 then
1544 hr_utility.set_message(8301, 'GHR_37158_ALL_PROCEDURE_FAIL');
1545 hr_utility.raise_error;
1546 end if;
1547 end if;
1548 --End Bug# 10189715
1549 -- End of 140.08.2
1550 end chk_effective_date;
1551
1552 /* Name:
1553 Handicap
1554 */
1555
1556 procedure chk_Handicap
1557 (p_First_Action_NOA_Code1 in varchar2
1558 ,p_First_Action_NOA_Code2 in varchar2
1559 ,p_First_NOAC_Lookup_Code in varchar2
1560 ,p_Effective_Date in date --bug# 5619873
1561 ,p_Handicap in varchar2 -- non SF52 item
1562 ) is
1563 begin
1564
1565 -- 220.02.2
1566 -- Dec 01 Patch vravikan Delete YKM
1567 --upd49 08-Jan-07 Raju Bug#5619873 From 01-Sep-2006 Delete WTM
1568 if p_effective_date < fnd_date.canonical_to_date('2006/09/01') then
1569 if ( p_First_Action_NOA_Code1 in ('WTM','WUM') or
1570 p_First_Action_NOA_Code2 in ('WTM','WUM')) and
1571 to_number(p_Handicap) not between 6 and 94 and
1572 p_Handicap <>'04' and
1573 p_Handicap is not null then
1574 hr_utility.set_message(8301, 'GHR_37159_ALL_PROCEDURE_FAIL');
1575 hr_utility.set_message_token('APP_AUTH','WTM, WUM');
1576 hr_utility.raise_error;
1577 end if;
1578 --bug 11726461
1579 elsif p_effective_date < fnd_date.canonical_to_date('2011/02/01') then
1580 if ( p_First_Action_NOA_Code1 in ('WUM') or
1581 p_First_Action_NOA_Code2 in ('WUM')) and
1582 to_number(p_Handicap) not between 6 and 94 and
1583 p_Handicap <>'04' and
1584 p_Handicap is not null then
1585 hr_utility.set_message(8301, 'GHR_37159_ALL_PROCEDURE_FAIL');
1586 hr_utility.set_message_token('APP_AUTH','WUM');
1587 hr_utility.raise_error;
1588 end if;
1589 --Begin bug 11726461
1590 else
1591 if ( p_First_Action_NOA_Code1 in ('WUM') or
1592 p_First_Action_NOA_Code2 in ('WUM')) and
1593 to_number(p_Handicap) not between 6 and 98 and
1594 p_Handicap <>'01' and
1595 p_Handicap is not null then
1596 hr_utility.set_message(8301, 'GHR_38357_ALL_PROCEDURE_FAIL');
1597 hr_utility.raise_error;
1598 end if;
1599 --End bug 11726461
1600 end if;
1601
1602
1603 -- 220.05.2
1604 if substr(p_First_NOAC_Lookup_Code,1,1)='1'
1605 and
1606 p_Handicap='04'
1607 then
1608 hr_utility.set_message(8301, 'GHR_37160_ALL_PROCEDURE_FAIL');
1609 hr_utility.raise_error;
1610 end if;
1611
1612 end chk_Handicap;
1613
1614 /* Name
1615 -- Individual/Group Award
1616 */
1617
1618 procedure chk_indiv_Award
1619 (p_First_NOAC_Lookup_Code in varchar2
1620 ,p_Indiv_Award in varchar2
1621 ,p_effective_date in date
1622 ) is
1623 begin
1624
1625 --Commented as per EOY 2003 cpdf changes by Ashley
1626 -- 240.02.2
1627 -- Award Req 8/15/00 vravikan 30-sep-2000 End date
1628 /* if p_effective_date <= to_date('2000/09/30','yyyy/mm/dd') then
1629 if p_First_NOAC_Lookup_Code in ('874','875','876','877')
1630 and
1631 p_Indiv_Award is null
1632 then
1633 hr_utility.set_message(8301, 'GHR_37161_ALL_PROCEDURE_FAIL');
1634 hr_utility.raise_error;
1635 end if;
1636 end if;*/
1637 null;
1638 end chk_indiv_Award;
1639
1640 --Begin Bug# 11726461
1641
1642 procedure chk_scd_handicap
1643 (p_scd_leave in date
1644 ,p_scd_retirement in date
1645 ,p_effective_date in date
1646 ,p_Handicap in varchar2) IS
1647
1648 begin
1649 -- 220.07.3
1650 if nvl(p_scd_retirement,p_scd_leave) >= fnd_date.canonical_to_date('2010/09/26')
1651 AND p_Handicap IN ('04','16','17','57','81','89')
1652 AND to_number(p_Handicap) between 23 and 25
1653 AND to_number(p_Handicap) between 27 and 29
1654 AND to_number(p_Handicap) between 32 and 38
1655 AND to_number(p_Handicap) between 45 and 49
1656 AND to_number(p_Handicap) between 62 and 68
1657 AND to_number(p_Handicap) between 71 and 78
1658 then
1659 hr_utility.set_message(8301, 'GHR_38356_ALL_PROCEDURE_FAIL');
1660 hr_utility.raise_error;
1661 end if;
1662
1663 end chk_scd_handicap;
1664
1665 --End Bug# 11726461
1666
1667 end GHR_CPDF_CHECK2;