80: BEGIN
81: -- Just in case there is more than one retained grade with the same earliest start
82: -- date we have to return the one with the highest plan_table_value!!
83: -- I'm sure this is very very unlikely to happen!!
84: hr_utility.set_location(' get_retained_grade_details',1);
85: FOR cur_pei_rec IN cur_pei LOOP
86: hr_utility.set_location(' get_retained_grade_details',2);
87: IF l_record_found THEN
88: -- If we have already been here once store all the last details before we get the new ones
82: -- date we have to return the one with the highest plan_table_value!!
83: -- I'm sure this is very very unlikely to happen!!
84: hr_utility.set_location(' get_retained_grade_details',1);
85: FOR cur_pei_rec IN cur_pei LOOP
86: hr_utility.set_location(' get_retained_grade_details',2);
87: IF l_record_found THEN
88: -- If we have already been here once store all the last details before we get the new ones
89: -- the main record group will always keep the last highest value!
90: l_last_retained_grade_rec := l_retained_grade_rec;
88: -- If we have already been here once store all the last details before we get the new ones
89: -- the main record group will always keep the last highest value!
90: l_last_retained_grade_rec := l_retained_grade_rec;
91: END IF;
92: hr_utility.set_location(' get_retained_grade_details person_extra_info_id' ||l_retained_grade_rec.person_extra_info_id ,3);
93: l_retained_grade_rec.person_extra_info_id := cur_pei_rec.person_extra_info_id;
94: -- Bug#4423679 Added date_from, date_to columns in the retained grade record.
95: l_retained_grade_rec.date_from := cur_pei_rec.date_from;
96: l_retained_grade_rec.date_to := cur_pei_rec.date_to;
106: OR l_retained_grade_rec.step_or_rate IS NULL
107: OR l_retained_grade_rec.pay_plan IS NULL
108: OR l_retained_grade_rec.user_table_id IS NULL
109: OR l_retained_grade_rec.pay_basis IS NULL THEN
110: hr_utility.set_message(8301, 'GHR_38255_MISSING_RETAINED_DET');
111: raise ghr_pay_calc.pay_calc_message;
112: END IF;
113: --
114: IF l_record_found THEN
111: raise ghr_pay_calc.pay_calc_message;
112: END IF;
113: --
114: IF l_record_found THEN
115: hr_utility.set_location(' get_retained_grade_details ' ,5);
116: -- only if we have previously found a retained record with the same start date do we bother
117: -- getting the values to compare
118: ghr_pay_calc.get_pay_table_value (l_retained_grade_rec.user_table_id
119: ,l_retained_grade_rec.pay_plan
149: l_retained_grade_rec := l_last_retained_grade_rec;
150: END IF;
151:
152: END IF;
153: hr_utility.set_location(' get_retained_grade_details ' ,6);
154: l_record_found := TRUE;
155:
156: END LOOP;
157:
177: IF l_noa_code = '740' THEN
178: l_retained_grade_rec.temp_step := NULL;
179: END IF;
180: -------End Temp Promotion Code changes for 703 and 866 NOACs.
181: hr_utility.set_location(' get_retained_grade_details ' ,7);
182: IF l_record_found THEN
183: hr_utility.set_location(' get_retained_grade_details ' ,7);
184: RETURN (l_retained_grade_rec);
185: ELSE
179: END IF;
180: -------End Temp Promotion Code changes for 703 and 866 NOACs.
181: hr_utility.set_location(' get_retained_grade_details ' ,7);
182: IF l_record_found THEN
183: hr_utility.set_location(' get_retained_grade_details ' ,7);
184: RETURN (l_retained_grade_rec);
185: ELSE
186: hr_utility.set_message(8301, 'GHR_38256_NO_RETAINED_GRADE');
187: raise ghr_pay_calc.pay_calc_message;
182: IF l_record_found THEN
183: hr_utility.set_location(' get_retained_grade_details ' ,7);
184: RETURN (l_retained_grade_rec);
185: ELSE
186: hr_utility.set_message(8301, 'GHR_38256_NO_RETAINED_GRADE');
187: raise ghr_pay_calc.pay_calc_message;
188: END IF;
189:
190: END get_retained_grade_details ;
252: BEGIN
253: -- Just in case there is more than one retained grade with the same earliest start
254: -- date we have to return the one with the highest plan_table_value!!
255: -- I'm sure this is very very unlikely to happen!!
256: hr_utility.set_location(' get_expired_rg_details',1);
257: FOR cur_pei_rec IN cur_pei LOOP
258: hr_utility.set_location(' get_expired_rg_details',2);
259: IF l_record_found THEN
260: -- If we have already been here once store all the last details before we get the new ones
254: -- date we have to return the one with the highest plan_table_value!!
255: -- I'm sure this is very very unlikely to happen!!
256: hr_utility.set_location(' get_expired_rg_details',1);
257: FOR cur_pei_rec IN cur_pei LOOP
258: hr_utility.set_location(' get_expired_rg_details',2);
259: IF l_record_found THEN
260: -- If we have already been here once store all the last details before we get the new ones
261: -- the main record group will always keep the last highest value!
262: l_last_retained_grade_rec := l_retained_grade_rec;
260: -- If we have already been here once store all the last details before we get the new ones
261: -- the main record group will always keep the last highest value!
262: l_last_retained_grade_rec := l_retained_grade_rec;
263: END IF;
264: hr_utility.set_location(' get_expired_rg_details person_extra_info_id' ||l_retained_grade_rec.person_extra_info_id ,3);
265: l_retained_grade_rec.person_extra_info_id := cur_pei_rec.person_extra_info_id;
266: -- Bug#4423679 Added date_from, date_to columns in the retained grade record.
267: l_retained_grade_rec.date_from := cur_pei_rec.date_from;
268: l_retained_grade_rec.date_to := cur_pei_rec.date_to;
278: OR l_retained_grade_rec.step_or_rate IS NULL
279: OR l_retained_grade_rec.pay_plan IS NULL
280: OR l_retained_grade_rec.user_table_id IS NULL
281: OR l_retained_grade_rec.pay_basis IS NULL THEN
282: hr_utility.set_message(8301, 'GHR_38255_MISSING_RETAINED_DET');
283: raise ghr_pay_calc.pay_calc_message;
284: END IF;
285: --
286: IF l_record_found THEN
283: raise ghr_pay_calc.pay_calc_message;
284: END IF;
285: --
286: IF l_record_found THEN
287: hr_utility.set_location(' get_expired_rg_details ' ,5);
288: -- only if we have previously found a retained record with the same start date do we bother
289: -- getting the values to compare
290: ghr_pay_calc.get_pay_table_value (l_retained_grade_rec.user_table_id
291: ,l_retained_grade_rec.pay_plan
321: l_retained_grade_rec := l_last_retained_grade_rec;
322: END IF;
323:
324: END IF;
325: hr_utility.set_location(' get_expired_rg_details ' ,6);
326: l_record_found := TRUE;
327:
328: END LOOP;
329:
327:
328: END LOOP;
329:
330: IF l_record_found THEN
331: hr_utility.set_location(' get_expired_rg_details ' ,7);
332: RETURN (l_retained_grade_rec);
333: ELSE
334: hr_utility.set_message(8301, 'GHR_38256_NO_RETAINED_GRADE');
335: raise ghr_pay_calc.pay_calc_message;
330: IF l_record_found THEN
331: hr_utility.set_location(' get_expired_rg_details ' ,7);
332: RETURN (l_retained_grade_rec);
333: ELSE
334: hr_utility.set_message(8301, 'GHR_38256_NO_RETAINED_GRADE');
335: raise ghr_pay_calc.pay_calc_message;
336: END IF;
337:
338: END get_expired_rg_details ;
423: p_PT_eff_end_date := cur_pay_rec.effective_end_date;
424: l_record_found := TRUE;
425: IF l_PT_value IS NULL THEN
426: -- Set tokens to give name of pay table, pay plan, grade, step and rate
427: hr_utility.set_message(8301,'GHR_38252_NULL_PAY_PLAN_VALUE');
428: hr_utility.set_message_token('PAY_TABLE_NAME',ghr_pay_calc.get_user_table_name(p_user_table_id) );
429: hr_utility.set_message_token('STEP',cur_pay_rec.step_or_rate);
430: hr_utility.set_message_token('PAY_PLAN',p_pay_plan);
431: hr_utility.set_message_token('GRADE',p_grade_or_level);
424: l_record_found := TRUE;
425: IF l_PT_value IS NULL THEN
426: -- Set tokens to give name of pay table, pay plan, grade, step and rate
427: hr_utility.set_message(8301,'GHR_38252_NULL_PAY_PLAN_VALUE');
428: hr_utility.set_message_token('PAY_TABLE_NAME',ghr_pay_calc.get_user_table_name(p_user_table_id) );
429: hr_utility.set_message_token('STEP',cur_pay_rec.step_or_rate);
430: hr_utility.set_message_token('PAY_PLAN',p_pay_plan);
431: hr_utility.set_message_token('GRADE',p_grade_or_level);
432: -- hr_utility.set_message_token('EFF_DATE',TO_CHAR(p_effective_date,'DD-MON-YYYY') );
425: IF l_PT_value IS NULL THEN
426: -- Set tokens to give name of pay table, pay plan, grade, step and rate
427: hr_utility.set_message(8301,'GHR_38252_NULL_PAY_PLAN_VALUE');
428: hr_utility.set_message_token('PAY_TABLE_NAME',ghr_pay_calc.get_user_table_name(p_user_table_id) );
429: hr_utility.set_message_token('STEP',cur_pay_rec.step_or_rate);
430: hr_utility.set_message_token('PAY_PLAN',p_pay_plan);
431: hr_utility.set_message_token('GRADE',p_grade_or_level);
432: -- hr_utility.set_message_token('EFF_DATE',TO_CHAR(p_effective_date,'DD-MON-YYYY') );
433: hr_utility.set_message_token('EFF_DATE',fnd_date.date_to_chardate(p_effective_date) );
426: -- Set tokens to give name of pay table, pay plan, grade, step and rate
427: hr_utility.set_message(8301,'GHR_38252_NULL_PAY_PLAN_VALUE');
428: hr_utility.set_message_token('PAY_TABLE_NAME',ghr_pay_calc.get_user_table_name(p_user_table_id) );
429: hr_utility.set_message_token('STEP',cur_pay_rec.step_or_rate);
430: hr_utility.set_message_token('PAY_PLAN',p_pay_plan);
431: hr_utility.set_message_token('GRADE',p_grade_or_level);
432: -- hr_utility.set_message_token('EFF_DATE',TO_CHAR(p_effective_date,'DD-MON-YYYY') );
433: hr_utility.set_message_token('EFF_DATE',fnd_date.date_to_chardate(p_effective_date) );
434: raise ghr_pay_calc.pay_calc_message;
427: hr_utility.set_message(8301,'GHR_38252_NULL_PAY_PLAN_VALUE');
428: hr_utility.set_message_token('PAY_TABLE_NAME',ghr_pay_calc.get_user_table_name(p_user_table_id) );
429: hr_utility.set_message_token('STEP',cur_pay_rec.step_or_rate);
430: hr_utility.set_message_token('PAY_PLAN',p_pay_plan);
431: hr_utility.set_message_token('GRADE',p_grade_or_level);
432: -- hr_utility.set_message_token('EFF_DATE',TO_CHAR(p_effective_date,'DD-MON-YYYY') );
433: hr_utility.set_message_token('EFF_DATE',fnd_date.date_to_chardate(p_effective_date) );
434: raise ghr_pay_calc.pay_calc_message;
435: END IF;
428: hr_utility.set_message_token('PAY_TABLE_NAME',ghr_pay_calc.get_user_table_name(p_user_table_id) );
429: hr_utility.set_message_token('STEP',cur_pay_rec.step_or_rate);
430: hr_utility.set_message_token('PAY_PLAN',p_pay_plan);
431: hr_utility.set_message_token('GRADE',p_grade_or_level);
432: -- hr_utility.set_message_token('EFF_DATE',TO_CHAR(p_effective_date,'DD-MON-YYYY') );
433: hr_utility.set_message_token('EFF_DATE',fnd_date.date_to_chardate(p_effective_date) );
434: raise ghr_pay_calc.pay_calc_message;
435: END IF;
436: EXIT;
429: hr_utility.set_message_token('STEP',cur_pay_rec.step_or_rate);
430: hr_utility.set_message_token('PAY_PLAN',p_pay_plan);
431: hr_utility.set_message_token('GRADE',p_grade_or_level);
432: -- hr_utility.set_message_token('EFF_DATE',TO_CHAR(p_effective_date,'DD-MON-YYYY') );
433: hr_utility.set_message_token('EFF_DATE',fnd_date.date_to_chardate(p_effective_date) );
434: raise ghr_pay_calc.pay_calc_message;
435: END IF;
436: EXIT;
437: END LOOP;
438: --
439: IF NOT l_record_found THEN
440: -- Set tokens to give name of pay table, pay plan, grade, step and rate
441: -- Note: the is no step!
442: hr_utility.set_message(8301,'GHR_38257_NO_MIN_PAY_PLAN_VAL');
443: hr_utility.set_message_token('PAY_TABLE_NAME',ghr_pay_calc.get_user_table_name(p_user_table_id) );
444: hr_utility.set_message_token('PAY_PLAN',p_pay_plan);
445: hr_utility.set_message_token('GRADE',p_grade_or_level);
446: -- hr_utility.set_message_token('EFF_DATE',TO_CHAR(p_effective_date,'DD-MON-YYYY') );
439: IF NOT l_record_found THEN
440: -- Set tokens to give name of pay table, pay plan, grade, step and rate
441: -- Note: the is no step!
442: hr_utility.set_message(8301,'GHR_38257_NO_MIN_PAY_PLAN_VAL');
443: hr_utility.set_message_token('PAY_TABLE_NAME',ghr_pay_calc.get_user_table_name(p_user_table_id) );
444: hr_utility.set_message_token('PAY_PLAN',p_pay_plan);
445: hr_utility.set_message_token('GRADE',p_grade_or_level);
446: -- hr_utility.set_message_token('EFF_DATE',TO_CHAR(p_effective_date,'DD-MON-YYYY') );
447: hr_utility.set_message_token('EFF_DATE',fnd_date.date_to_chardate(p_effective_date) );
440: -- Set tokens to give name of pay table, pay plan, grade, step and rate
441: -- Note: the is no step!
442: hr_utility.set_message(8301,'GHR_38257_NO_MIN_PAY_PLAN_VAL');
443: hr_utility.set_message_token('PAY_TABLE_NAME',ghr_pay_calc.get_user_table_name(p_user_table_id) );
444: hr_utility.set_message_token('PAY_PLAN',p_pay_plan);
445: hr_utility.set_message_token('GRADE',p_grade_or_level);
446: -- hr_utility.set_message_token('EFF_DATE',TO_CHAR(p_effective_date,'DD-MON-YYYY') );
447: hr_utility.set_message_token('EFF_DATE',fnd_date.date_to_chardate(p_effective_date) );
448: raise ghr_pay_calc.pay_calc_message;
441: -- Note: the is no step!
442: hr_utility.set_message(8301,'GHR_38257_NO_MIN_PAY_PLAN_VAL');
443: hr_utility.set_message_token('PAY_TABLE_NAME',ghr_pay_calc.get_user_table_name(p_user_table_id) );
444: hr_utility.set_message_token('PAY_PLAN',p_pay_plan);
445: hr_utility.set_message_token('GRADE',p_grade_or_level);
446: -- hr_utility.set_message_token('EFF_DATE',TO_CHAR(p_effective_date,'DD-MON-YYYY') );
447: hr_utility.set_message_token('EFF_DATE',fnd_date.date_to_chardate(p_effective_date) );
448: raise ghr_pay_calc.pay_calc_message;
449: END IF;
442: hr_utility.set_message(8301,'GHR_38257_NO_MIN_PAY_PLAN_VAL');
443: hr_utility.set_message_token('PAY_TABLE_NAME',ghr_pay_calc.get_user_table_name(p_user_table_id) );
444: hr_utility.set_message_token('PAY_PLAN',p_pay_plan);
445: hr_utility.set_message_token('GRADE',p_grade_or_level);
446: -- hr_utility.set_message_token('EFF_DATE',TO_CHAR(p_effective_date,'DD-MON-YYYY') );
447: hr_utility.set_message_token('EFF_DATE',fnd_date.date_to_chardate(p_effective_date) );
448: raise ghr_pay_calc.pay_calc_message;
449: END IF;
450: --
443: hr_utility.set_message_token('PAY_TABLE_NAME',ghr_pay_calc.get_user_table_name(p_user_table_id) );
444: hr_utility.set_message_token('PAY_PLAN',p_pay_plan);
445: hr_utility.set_message_token('GRADE',p_grade_or_level);
446: -- hr_utility.set_message_token('EFF_DATE',TO_CHAR(p_effective_date,'DD-MON-YYYY') );
447: hr_utility.set_message_token('EFF_DATE',fnd_date.date_to_chardate(p_effective_date) );
448: raise ghr_pay_calc.pay_calc_message;
449: END IF;
450: --
451:
503: l_record_found := TRUE;
504:
505: IF l_PT_value IS NULL THEN
506: -- Set tokens to give name of pay table, pay plan, grade, step and rate
507: hr_utility.set_message(8301,'GHR_38252_NULL_PAY_PLAN_VALUE');
508: hr_utility.set_message_token('PAY_TABLE_NAME',ghr_pay_calc.get_user_table_name(p_user_table_id) );
509: hr_utility.set_message_token('STEP',cur_pay_rec.step_or_rate);
510: hr_utility.set_message_token('PAY_PLAN',p_pay_plan);
511: hr_utility.set_message_token('GRADE',p_grade_or_level);
504:
505: IF l_PT_value IS NULL THEN
506: -- Set tokens to give name of pay table, pay plan, grade, step and rate
507: hr_utility.set_message(8301,'GHR_38252_NULL_PAY_PLAN_VALUE');
508: hr_utility.set_message_token('PAY_TABLE_NAME',ghr_pay_calc.get_user_table_name(p_user_table_id) );
509: hr_utility.set_message_token('STEP',cur_pay_rec.step_or_rate);
510: hr_utility.set_message_token('PAY_PLAN',p_pay_plan);
511: hr_utility.set_message_token('GRADE',p_grade_or_level);
512: -- hr_utility.set_message_token('EFF_DATE',TO_CHAR(p_effective_date,'DD-MON-YYYY') );
505: IF l_PT_value IS NULL THEN
506: -- Set tokens to give name of pay table, pay plan, grade, step and rate
507: hr_utility.set_message(8301,'GHR_38252_NULL_PAY_PLAN_VALUE');
508: hr_utility.set_message_token('PAY_TABLE_NAME',ghr_pay_calc.get_user_table_name(p_user_table_id) );
509: hr_utility.set_message_token('STEP',cur_pay_rec.step_or_rate);
510: hr_utility.set_message_token('PAY_PLAN',p_pay_plan);
511: hr_utility.set_message_token('GRADE',p_grade_or_level);
512: -- hr_utility.set_message_token('EFF_DATE',TO_CHAR(p_effective_date,'DD-MON-YYYY') );
513: hr_utility.set_message_token('EFF_DATE',fnd_date.date_to_chardate(p_effective_date) );
506: -- Set tokens to give name of pay table, pay plan, grade, step and rate
507: hr_utility.set_message(8301,'GHR_38252_NULL_PAY_PLAN_VALUE');
508: hr_utility.set_message_token('PAY_TABLE_NAME',ghr_pay_calc.get_user_table_name(p_user_table_id) );
509: hr_utility.set_message_token('STEP',cur_pay_rec.step_or_rate);
510: hr_utility.set_message_token('PAY_PLAN',p_pay_plan);
511: hr_utility.set_message_token('GRADE',p_grade_or_level);
512: -- hr_utility.set_message_token('EFF_DATE',TO_CHAR(p_effective_date,'DD-MON-YYYY') );
513: hr_utility.set_message_token('EFF_DATE',fnd_date.date_to_chardate(p_effective_date) );
514: raise ghr_pay_calc.pay_calc_message;
507: hr_utility.set_message(8301,'GHR_38252_NULL_PAY_PLAN_VALUE');
508: hr_utility.set_message_token('PAY_TABLE_NAME',ghr_pay_calc.get_user_table_name(p_user_table_id) );
509: hr_utility.set_message_token('STEP',cur_pay_rec.step_or_rate);
510: hr_utility.set_message_token('PAY_PLAN',p_pay_plan);
511: hr_utility.set_message_token('GRADE',p_grade_or_level);
512: -- hr_utility.set_message_token('EFF_DATE',TO_CHAR(p_effective_date,'DD-MON-YYYY') );
513: hr_utility.set_message_token('EFF_DATE',fnd_date.date_to_chardate(p_effective_date) );
514: raise ghr_pay_calc.pay_calc_message;
515: END IF;
508: hr_utility.set_message_token('PAY_TABLE_NAME',ghr_pay_calc.get_user_table_name(p_user_table_id) );
509: hr_utility.set_message_token('STEP',cur_pay_rec.step_or_rate);
510: hr_utility.set_message_token('PAY_PLAN',p_pay_plan);
511: hr_utility.set_message_token('GRADE',p_grade_or_level);
512: -- hr_utility.set_message_token('EFF_DATE',TO_CHAR(p_effective_date,'DD-MON-YYYY') );
513: hr_utility.set_message_token('EFF_DATE',fnd_date.date_to_chardate(p_effective_date) );
514: raise ghr_pay_calc.pay_calc_message;
515: END IF;
516: EXIT;
509: hr_utility.set_message_token('STEP',cur_pay_rec.step_or_rate);
510: hr_utility.set_message_token('PAY_PLAN',p_pay_plan);
511: hr_utility.set_message_token('GRADE',p_grade_or_level);
512: -- hr_utility.set_message_token('EFF_DATE',TO_CHAR(p_effective_date,'DD-MON-YYYY') );
513: hr_utility.set_message_token('EFF_DATE',fnd_date.date_to_chardate(p_effective_date) );
514: raise ghr_pay_calc.pay_calc_message;
515: END IF;
516: EXIT;
517: END LOOP;
517: END LOOP;
518: --
519: IF NOT l_record_found THEN
520: -- Set tokens to give name of pay table, pay plan, grade, step and rate
521: hr_utility.set_message(8301,'GHR_38258_NO_MAX_PAY_PLAN_VAL');
522: hr_utility.set_message_token('PAY_TABLE_NAME',ghr_pay_calc.get_user_table_name(p_user_table_id) );
523: hr_utility.set_message_token('PAY_PLAN',p_pay_plan);
524: hr_utility.set_message_token('GRADE',p_grade_or_level);
525: -- hr_utility.set_message_token('EFF_DATE',TO_CHAR(p_effective_date,'DD-MON-YYYY') );
518: --
519: IF NOT l_record_found THEN
520: -- Set tokens to give name of pay table, pay plan, grade, step and rate
521: hr_utility.set_message(8301,'GHR_38258_NO_MAX_PAY_PLAN_VAL');
522: hr_utility.set_message_token('PAY_TABLE_NAME',ghr_pay_calc.get_user_table_name(p_user_table_id) );
523: hr_utility.set_message_token('PAY_PLAN',p_pay_plan);
524: hr_utility.set_message_token('GRADE',p_grade_or_level);
525: -- hr_utility.set_message_token('EFF_DATE',TO_CHAR(p_effective_date,'DD-MON-YYYY') );
526: hr_utility.set_message_token('EFF_DATE',fnd_date.date_to_chardate(p_effective_date) );
519: IF NOT l_record_found THEN
520: -- Set tokens to give name of pay table, pay plan, grade, step and rate
521: hr_utility.set_message(8301,'GHR_38258_NO_MAX_PAY_PLAN_VAL');
522: hr_utility.set_message_token('PAY_TABLE_NAME',ghr_pay_calc.get_user_table_name(p_user_table_id) );
523: hr_utility.set_message_token('PAY_PLAN',p_pay_plan);
524: hr_utility.set_message_token('GRADE',p_grade_or_level);
525: -- hr_utility.set_message_token('EFF_DATE',TO_CHAR(p_effective_date,'DD-MON-YYYY') );
526: hr_utility.set_message_token('EFF_DATE',fnd_date.date_to_chardate(p_effective_date) );
527: raise ghr_pay_calc.pay_calc_message;
520: -- Set tokens to give name of pay table, pay plan, grade, step and rate
521: hr_utility.set_message(8301,'GHR_38258_NO_MAX_PAY_PLAN_VAL');
522: hr_utility.set_message_token('PAY_TABLE_NAME',ghr_pay_calc.get_user_table_name(p_user_table_id) );
523: hr_utility.set_message_token('PAY_PLAN',p_pay_plan);
524: hr_utility.set_message_token('GRADE',p_grade_or_level);
525: -- hr_utility.set_message_token('EFF_DATE',TO_CHAR(p_effective_date,'DD-MON-YYYY') );
526: hr_utility.set_message_token('EFF_DATE',fnd_date.date_to_chardate(p_effective_date) );
527: raise ghr_pay_calc.pay_calc_message;
528: END IF;
521: hr_utility.set_message(8301,'GHR_38258_NO_MAX_PAY_PLAN_VAL');
522: hr_utility.set_message_token('PAY_TABLE_NAME',ghr_pay_calc.get_user_table_name(p_user_table_id) );
523: hr_utility.set_message_token('PAY_PLAN',p_pay_plan);
524: hr_utility.set_message_token('GRADE',p_grade_or_level);
525: -- hr_utility.set_message_token('EFF_DATE',TO_CHAR(p_effective_date,'DD-MON-YYYY') );
526: hr_utility.set_message_token('EFF_DATE',fnd_date.date_to_chardate(p_effective_date) );
527: raise ghr_pay_calc.pay_calc_message;
528: END IF;
529: --
522: hr_utility.set_message_token('PAY_TABLE_NAME',ghr_pay_calc.get_user_table_name(p_user_table_id) );
523: hr_utility.set_message_token('PAY_PLAN',p_pay_plan);
524: hr_utility.set_message_token('GRADE',p_grade_or_level);
525: -- hr_utility.set_message_token('EFF_DATE',TO_CHAR(p_effective_date,'DD-MON-YYYY') );
526: hr_utility.set_message_token('EFF_DATE',fnd_date.date_to_chardate(p_effective_date) );
527: raise ghr_pay_calc.pay_calc_message;
528: END IF;
529: --
530:
614: l_record_found := TRUE;
615:
616: IF l_PT_value IS NULL THEN
617: -- Set tokens to give name of pay table, pay plan, grade, step and rate
618: hr_utility.set_message(8301,'GHR_38252_NULL_PAY_PLAN_VALUE');
619: hr_utility.set_message_token('PAY_TABLE_NAME',ghr_pay_calc.get_user_table_name(p_user_table_id) );
620: hr_utility.set_message_token('STEP',cur_pay_rec.step_or_rate);
621: hr_utility.set_message_token('PAY_PLAN',p_pay_plan);
622: hr_utility.set_message_token('GRADE',p_grade_or_level);
615:
616: IF l_PT_value IS NULL THEN
617: -- Set tokens to give name of pay table, pay plan, grade, step and rate
618: hr_utility.set_message(8301,'GHR_38252_NULL_PAY_PLAN_VALUE');
619: hr_utility.set_message_token('PAY_TABLE_NAME',ghr_pay_calc.get_user_table_name(p_user_table_id) );
620: hr_utility.set_message_token('STEP',cur_pay_rec.step_or_rate);
621: hr_utility.set_message_token('PAY_PLAN',p_pay_plan);
622: hr_utility.set_message_token('GRADE',p_grade_or_level);
623: -- hr_utility.set_message_token('EFF_DATE',TO_CHAR(p_effective_date,'DD-MON-YYYY') );
616: IF l_PT_value IS NULL THEN
617: -- Set tokens to give name of pay table, pay plan, grade, step and rate
618: hr_utility.set_message(8301,'GHR_38252_NULL_PAY_PLAN_VALUE');
619: hr_utility.set_message_token('PAY_TABLE_NAME',ghr_pay_calc.get_user_table_name(p_user_table_id) );
620: hr_utility.set_message_token('STEP',cur_pay_rec.step_or_rate);
621: hr_utility.set_message_token('PAY_PLAN',p_pay_plan);
622: hr_utility.set_message_token('GRADE',p_grade_or_level);
623: -- hr_utility.set_message_token('EFF_DATE',TO_CHAR(p_effective_date,'DD-MON-YYYY') );
624: hr_utility.set_message_token('EFF_DATE',fnd_date.date_to_chardate(p_effective_date) );
617: -- Set tokens to give name of pay table, pay plan, grade, step and rate
618: hr_utility.set_message(8301,'GHR_38252_NULL_PAY_PLAN_VALUE');
619: hr_utility.set_message_token('PAY_TABLE_NAME',ghr_pay_calc.get_user_table_name(p_user_table_id) );
620: hr_utility.set_message_token('STEP',cur_pay_rec.step_or_rate);
621: hr_utility.set_message_token('PAY_PLAN',p_pay_plan);
622: hr_utility.set_message_token('GRADE',p_grade_or_level);
623: -- hr_utility.set_message_token('EFF_DATE',TO_CHAR(p_effective_date,'DD-MON-YYYY') );
624: hr_utility.set_message_token('EFF_DATE',fnd_date.date_to_chardate(p_effective_date) );
625: raise ghr_pay_calc.pay_calc_message;
618: hr_utility.set_message(8301,'GHR_38252_NULL_PAY_PLAN_VALUE');
619: hr_utility.set_message_token('PAY_TABLE_NAME',ghr_pay_calc.get_user_table_name(p_user_table_id) );
620: hr_utility.set_message_token('STEP',cur_pay_rec.step_or_rate);
621: hr_utility.set_message_token('PAY_PLAN',p_pay_plan);
622: hr_utility.set_message_token('GRADE',p_grade_or_level);
623: -- hr_utility.set_message_token('EFF_DATE',TO_CHAR(p_effective_date,'DD-MON-YYYY') );
624: hr_utility.set_message_token('EFF_DATE',fnd_date.date_to_chardate(p_effective_date) );
625: raise ghr_pay_calc.pay_calc_message;
626: END IF;
619: hr_utility.set_message_token('PAY_TABLE_NAME',ghr_pay_calc.get_user_table_name(p_user_table_id) );
620: hr_utility.set_message_token('STEP',cur_pay_rec.step_or_rate);
621: hr_utility.set_message_token('PAY_PLAN',p_pay_plan);
622: hr_utility.set_message_token('GRADE',p_grade_or_level);
623: -- hr_utility.set_message_token('EFF_DATE',TO_CHAR(p_effective_date,'DD-MON-YYYY') );
624: hr_utility.set_message_token('EFF_DATE',fnd_date.date_to_chardate(p_effective_date) );
625: raise ghr_pay_calc.pay_calc_message;
626: END IF;
627: EXIT;
620: hr_utility.set_message_token('STEP',cur_pay_rec.step_or_rate);
621: hr_utility.set_message_token('PAY_PLAN',p_pay_plan);
622: hr_utility.set_message_token('GRADE',p_grade_or_level);
623: -- hr_utility.set_message_token('EFF_DATE',TO_CHAR(p_effective_date,'DD-MON-YYYY') );
624: hr_utility.set_message_token('EFF_DATE',fnd_date.date_to_chardate(p_effective_date) );
625: raise ghr_pay_calc.pay_calc_message;
626: END IF;
627: EXIT;
628: END IF;
630:
631: --
632: IF NOT l_record_found THEN
633: -- Set tokens to give name of pay table, pay plan, grade, step and rate
634: hr_utility.set_message(8301,'GHR_38258_NO_MAX_PAY_PLAN_VAL');
635: hr_utility.set_message_token('PAY_TABLE_NAME',ghr_pay_calc.get_user_table_name(p_user_table_id) );
636: hr_utility.set_message_token('PAY_PLAN',p_pay_plan);
637: hr_utility.set_message_token('GRADE',p_grade_or_level);
638: -- hr_utility.set_message_token('EFF_DATE',TO_CHAR(p_effective_date,'DD-MON-YYYY') );
631: --
632: IF NOT l_record_found THEN
633: -- Set tokens to give name of pay table, pay plan, grade, step and rate
634: hr_utility.set_message(8301,'GHR_38258_NO_MAX_PAY_PLAN_VAL');
635: hr_utility.set_message_token('PAY_TABLE_NAME',ghr_pay_calc.get_user_table_name(p_user_table_id) );
636: hr_utility.set_message_token('PAY_PLAN',p_pay_plan);
637: hr_utility.set_message_token('GRADE',p_grade_or_level);
638: -- hr_utility.set_message_token('EFF_DATE',TO_CHAR(p_effective_date,'DD-MON-YYYY') );
639: hr_utility.set_message_token('EFF_DATE',fnd_date.date_to_chardate(p_effective_date) );
632: IF NOT l_record_found THEN
633: -- Set tokens to give name of pay table, pay plan, grade, step and rate
634: hr_utility.set_message(8301,'GHR_38258_NO_MAX_PAY_PLAN_VAL');
635: hr_utility.set_message_token('PAY_TABLE_NAME',ghr_pay_calc.get_user_table_name(p_user_table_id) );
636: hr_utility.set_message_token('PAY_PLAN',p_pay_plan);
637: hr_utility.set_message_token('GRADE',p_grade_or_level);
638: -- hr_utility.set_message_token('EFF_DATE',TO_CHAR(p_effective_date,'DD-MON-YYYY') );
639: hr_utility.set_message_token('EFF_DATE',fnd_date.date_to_chardate(p_effective_date) );
640: raise ghr_pay_calc.pay_calc_message;
633: -- Set tokens to give name of pay table, pay plan, grade, step and rate
634: hr_utility.set_message(8301,'GHR_38258_NO_MAX_PAY_PLAN_VAL');
635: hr_utility.set_message_token('PAY_TABLE_NAME',ghr_pay_calc.get_user_table_name(p_user_table_id) );
636: hr_utility.set_message_token('PAY_PLAN',p_pay_plan);
637: hr_utility.set_message_token('GRADE',p_grade_or_level);
638: -- hr_utility.set_message_token('EFF_DATE',TO_CHAR(p_effective_date,'DD-MON-YYYY') );
639: hr_utility.set_message_token('EFF_DATE',fnd_date.date_to_chardate(p_effective_date) );
640: raise ghr_pay_calc.pay_calc_message;
641: END IF;
634: hr_utility.set_message(8301,'GHR_38258_NO_MAX_PAY_PLAN_VAL');
635: hr_utility.set_message_token('PAY_TABLE_NAME',ghr_pay_calc.get_user_table_name(p_user_table_id) );
636: hr_utility.set_message_token('PAY_PLAN',p_pay_plan);
637: hr_utility.set_message_token('GRADE',p_grade_or_level);
638: -- hr_utility.set_message_token('EFF_DATE',TO_CHAR(p_effective_date,'DD-MON-YYYY') );
639: hr_utility.set_message_token('EFF_DATE',fnd_date.date_to_chardate(p_effective_date) );
640: raise ghr_pay_calc.pay_calc_message;
641: END IF;
642: --
635: hr_utility.set_message_token('PAY_TABLE_NAME',ghr_pay_calc.get_user_table_name(p_user_table_id) );
636: hr_utility.set_message_token('PAY_PLAN',p_pay_plan);
637: hr_utility.set_message_token('GRADE',p_grade_or_level);
638: -- hr_utility.set_message_token('EFF_DATE',TO_CHAR(p_effective_date,'DD-MON-YYYY') );
639: hr_utility.set_message_token('EFF_DATE',fnd_date.date_to_chardate(p_effective_date) );
640: raise ghr_pay_calc.pay_calc_message;
641: END IF;
642: --
643: END IF; -- p_in_step_or_rate Comparison
844: PROCEDURE check_current_PT (p_PT_date IN DATE
845: ,p_eff_start_date IN DATE) IS
846: BEGIN
847: IF p_PT_date <> p_eff_start_date THEN
848: hr_utility.set_message(8301,'GHR_38395_NOT_CURRENT_PT');
849: -- hr_utility.set_message_token('PAY_TABLE_NAME',get_user_table_name(p_user_table_id) );
850: raise ghr_pay_calc.pay_calc_message;
851: END IF;
852: END check_current_PT;
845: ,p_eff_start_date IN DATE) IS
846: BEGIN
847: IF p_PT_date <> p_eff_start_date THEN
848: hr_utility.set_message(8301,'GHR_38395_NOT_CURRENT_PT');
849: -- hr_utility.set_message_token('PAY_TABLE_NAME',get_user_table_name(p_user_table_id) );
850: raise ghr_pay_calc.pay_calc_message;
851: END IF;
852: END check_current_PT;
853: --
855: ,p_eff_end_date IN DATE) IS
856: BEGIN
857: /* This procedure is no more required as per Bug 3837402 .
858: IF p_PT_date -1 <> p_eff_end_date THEN
859: hr_utility.set_message(8301,'GHR_38396_NOT_OLD_PT');
860: -- hr_utility.set_message_token('PAY_TABLE_NAME',get_user_table_name(p_user_table_id) );
861: raise ghr_pay_calc.pay_calc_message;
862: END IF;
863: */
856: BEGIN
857: /* This procedure is no more required as per Bug 3837402 .
858: IF p_PT_date -1 <> p_eff_end_date THEN
859: hr_utility.set_message(8301,'GHR_38396_NOT_OLD_PT');
860: -- hr_utility.set_message_token('PAY_TABLE_NAME',get_user_table_name(p_user_table_id) );
861: raise ghr_pay_calc.pay_calc_message;
862: END IF;
863: */
864: null;
1145: ,l_max_cur_basic_pay
1146: ,l_eff_start_date
1147: ,l_eff_end_date);
1148:
1149: hr_utility.set_location(' get_basic_pay_SAL894_50 After first max pay' ||l_eff_start_date,12);
1150:
1151: -- set the Pay Table efective date as this is the first lookup we have done
1152: l_PT_eff_start_date := l_eff_start_date;
1153:
1159: FOR per_pos_id in cur_per_pos(l_PT_eff_start_date-1)
1160: LOOP
1161: l_position_id := per_pos_id.position_id;
1162: l_assignment_id := per_pos_id.assignment_id;
1163: hr_utility.set_location(' get_basic_pay_SAL894_50 Position id ' ||l_position_id,12);
1164: END LOOP;
1165:
1166: IF l_assignment_id is null THEN
1167: FOR per_pos_id_2 in cur_per_pos_2
1168: LOOP
1169: l_prd_effective_date := per_pos_id_2.effective_start_date;
1170: l_position_id := per_pos_id_2.position_id;
1171: l_assignment_id := per_pos_id_2.assignment_id;
1172: hr_utility.set_location(' get_basic_pay_SAL894_50 Position id ' ||l_position_id,12);
1173: exit;
1174: END LOOP;
1175: END IF;
1176:
1175: END IF;
1176:
1177: IF l_assignment_id is not null THEN
1178: -- This is used to get the prd.
1179: hr_utility.set_location(' get_basic_pay_SAL894_50 l_assignment_id' ||l_assignment_id,10);
1180: hr_utility.set_location(' get_basic_pay_SAL894_50 l_prd_effective_date' ||l_prd_effective_date,10);
1181:
1182: ghr_history_fetch.fetch_asgei( p_assignment_id => l_assignment_id
1183: ,p_information_type => 'GHR_US_ASG_SF52'
1176:
1177: IF l_assignment_id is not null THEN
1178: -- This is used to get the prd.
1179: hr_utility.set_location(' get_basic_pay_SAL894_50 l_assignment_id' ||l_assignment_id,10);
1180: hr_utility.set_location(' get_basic_pay_SAL894_50 l_prd_effective_date' ||l_prd_effective_date,10);
1181:
1182: ghr_history_fetch.fetch_asgei( p_assignment_id => l_assignment_id
1183: ,p_information_type => 'GHR_US_ASG_SF52'
1184: ,p_date_effective => l_prd_effective_date
1184: ,p_date_effective => l_prd_effective_date
1185: ,p_asg_ei_data => l_asg_ei_data
1186: );
1187:
1188: hr_utility.set_location(' get_basic_pay_SAL894_50 l_asg_ei_data.aei_information6 ' ||l_asg_ei_data.aei_information6 ,11);
1189:
1190: IF l_asg_ei_data.aei_information6 NOT IN ('A','B','E','F','U','V') THEN
1191:
1192: l_old_user_table_id := ghr_pay_calc.get_user_table_id( l_position_id , l_prd_effective_date );
1189:
1190: IF l_asg_ei_data.aei_information6 NOT IN ('A','B','E','F','U','V') THEN
1191:
1192: l_old_user_table_id := ghr_pay_calc.get_user_table_id( l_position_id , l_prd_effective_date );
1193: hr_utility.set_location(' get_basic_pay_SAL894_50 l_old_user_table_id ' ||l_old_user_table_id ,13);
1194:
1195: ELSE
1196:
1197: --Get the retain grade info as on l_PT_eff_start_date-1
1194:
1195: ELSE
1196:
1197: --Get the retain grade info as on l_PT_eff_start_date-1
1198: hr_utility.set_location(' get_basic_pay_SAL894_50 p_pay_calc_data.person_id' ||p_pay_calc_data.person_id,14);
1199: hr_utility.set_location(' get_basic_pay_SAL894_50 l_PT_eff_start_date-1' ||l_PT_eff_start_date,14);
1200: hr_utility.set_location(' get_basic_pay_SAL894_50 p_pay_calc_data.pa_request_id' ||p_pay_calc_data.pa_request_id,14);
1201:
1202: hr_utility.set_location(' get_basic_pay_SAL894_50 l_old_user_table_id ' ||l_old_user_table_id ,14);
1195: ELSE
1196:
1197: --Get the retain grade info as on l_PT_eff_start_date-1
1198: hr_utility.set_location(' get_basic_pay_SAL894_50 p_pay_calc_data.person_id' ||p_pay_calc_data.person_id,14);
1199: hr_utility.set_location(' get_basic_pay_SAL894_50 l_PT_eff_start_date-1' ||l_PT_eff_start_date,14);
1200: hr_utility.set_location(' get_basic_pay_SAL894_50 p_pay_calc_data.pa_request_id' ||p_pay_calc_data.pa_request_id,14);
1201:
1202: hr_utility.set_location(' get_basic_pay_SAL894_50 l_old_user_table_id ' ||l_old_user_table_id ,14);
1203:
1196:
1197: --Get the retain grade info as on l_PT_eff_start_date-1
1198: hr_utility.set_location(' get_basic_pay_SAL894_50 p_pay_calc_data.person_id' ||p_pay_calc_data.person_id,14);
1199: hr_utility.set_location(' get_basic_pay_SAL894_50 l_PT_eff_start_date-1' ||l_PT_eff_start_date,14);
1200: hr_utility.set_location(' get_basic_pay_SAL894_50 p_pay_calc_data.pa_request_id' ||p_pay_calc_data.pa_request_id,14);
1201:
1202: hr_utility.set_location(' get_basic_pay_SAL894_50 l_old_user_table_id ' ||l_old_user_table_id ,14);
1203:
1204: /* We cannot use this procedure as pa_request_id is not available as of now.
1198: hr_utility.set_location(' get_basic_pay_SAL894_50 p_pay_calc_data.person_id' ||p_pay_calc_data.person_id,14);
1199: hr_utility.set_location(' get_basic_pay_SAL894_50 l_PT_eff_start_date-1' ||l_PT_eff_start_date,14);
1200: hr_utility.set_location(' get_basic_pay_SAL894_50 p_pay_calc_data.pa_request_id' ||p_pay_calc_data.pa_request_id,14);
1201:
1202: hr_utility.set_location(' get_basic_pay_SAL894_50 l_old_user_table_id ' ||l_old_user_table_id ,14);
1203:
1204: /* We cannot use this procedure as pa_request_id is not available as of now.
1205: l_retained_grade_rec := ghr_pc_basic_pay.get_retained_grade_details
1206: (p_person_id => p_pay_calc_data.person_id
1213: l_old_user_table_id := cur_pei_rec.retained_user_table_id;
1214: l_temp_step := cur_pei_rec.retained_temp_step;
1215: END LOOP;
1216:
1217: hr_utility.set_location(' get_basic_pay_SAL894_50 temp step after loop' ||l_temp_step ,14);
1218: hr_utility.set_location(' get_basic_pay_SAL894_50 l_old_user_table_id after loop' ||l_old_user_table_id ,14);
1219:
1220: --check for temp promotion and temp step is not null then use ghr_pay_calc.get_user_table_id.
1221: IF l_temp_step IS NOT NULL THEN
1214: l_temp_step := cur_pei_rec.retained_temp_step;
1215: END LOOP;
1216:
1217: hr_utility.set_location(' get_basic_pay_SAL894_50 temp step after loop' ||l_temp_step ,14);
1218: hr_utility.set_location(' get_basic_pay_SAL894_50 l_old_user_table_id after loop' ||l_old_user_table_id ,14);
1219:
1220: --check for temp promotion and temp step is not null then use ghr_pay_calc.get_user_table_id.
1221: IF l_temp_step IS NOT NULL THEN
1222: l_old_user_table_id := ghr_pay_calc.get_user_table_id( l_position_id , l_prd_effective_date );
1219:
1220: --check for temp promotion and temp step is not null then use ghr_pay_calc.get_user_table_id.
1221: IF l_temp_step IS NOT NULL THEN
1222: l_old_user_table_id := ghr_pay_calc.get_user_table_id( l_position_id , l_prd_effective_date );
1223: hr_utility.set_location(' get_basic_pay_SAL894_50 if l_old_user_table_id ' ||l_old_user_table_id ,15);
1224: END IF;
1225:
1226: END IF;
1227:
1289: IF l_ret_basic_pay > ghr_pay_calc.get_standard_pay_table_value('EX'
1290: ,'04'
1291: ,'00'
1292: ,p_pay_calc_data.effective_date) THEN
1293: hr_utility.set_message(8301, 'GHR_38587_NO_CALC_EXCEED_EX_IV');
1294: hr_utility.set_message_token('PAY_PLAN',l_pay_plan);
1295: raise ghr_pay_calc.unable_to_calculate;
1296: ELSE
1297: p_basic_pay := l_ret_basic_pay;
1290: ,'04'
1291: ,'00'
1292: ,p_pay_calc_data.effective_date) THEN
1293: hr_utility.set_message(8301, 'GHR_38587_NO_CALC_EXCEED_EX_IV');
1294: hr_utility.set_message_token('PAY_PLAN',l_pay_plan);
1295: raise ghr_pay_calc.unable_to_calculate;
1296: ELSE
1297: p_basic_pay := l_ret_basic_pay;
1298: p_step := '00';
1305: END IF;
1306: ELSE -- (pay retention is being terminated)
1307: -- Do not know what to do if pay plan is ES or IE and pay retention is terminated!
1308: IF l_pay_plan = 'CA' THEN
1309: hr_utility.set_message(8301, 'GHR_38588_NO_CALC_PAY_RET_END');
1310: hr_utility.set_message_token('PAY_PLAN',l_pay_plan);
1311: raise ghr_pay_calc.unable_to_calculate;
1312: ELSE
1313: p_basic_pay := l_pos_basic_pay;
1306: ELSE -- (pay retention is being terminated)
1307: -- Do not know what to do if pay plan is ES or IE and pay retention is terminated!
1308: IF l_pay_plan = 'CA' THEN
1309: hr_utility.set_message(8301, 'GHR_38588_NO_CALC_PAY_RET_END');
1310: hr_utility.set_message_token('PAY_PLAN',l_pay_plan);
1311: raise ghr_pay_calc.unable_to_calculate;
1312: ELSE
1313: p_basic_pay := l_pos_basic_pay;
1314: p_step := l_pos_step;
1462: END LOOP;
1463: --
1464: -- If we got here no record was returned
1465: -- set tokens to say the user table name and pay_plan that was used
1466: hr_utility.set_message(8301, 'GHR_38259_NO_WGI_STEP');
1467: hr_utility.set_message_token('PAY_PLAN',p_pay_plan);
1468: raise ghr_pay_calc.pay_calc_message;
1469: --
1470: END get_next_WGI_step;
1463: --
1464: -- If we got here no record was returned
1465: -- set tokens to say the user table name and pay_plan that was used
1466: hr_utility.set_message(8301, 'GHR_38259_NO_WGI_STEP');
1467: hr_utility.set_message_token('PAY_PLAN',p_pay_plan);
1468: raise ghr_pay_calc.pay_calc_message;
1469: --
1470: END get_next_WGI_step;
1471: --
1541: l_retained_grade.grade_or_level := p_retained_grade.grade_or_level;
1542: l_retained_grade.step_or_rate := p_retained_grade.step_or_rate;
1543: l_retained_grade.temp_step := p_retained_grade.temp_step;
1544:
1545: hr_utility.set_location('NAR inside wgi_per',0);
1546: if p_retained_grade.temp_step is not null then
1547: l_step_or_rate := p_retained_grade.temp_step;
1548: l_user_table_id := p_pay_calc_data.user_table_id;
1549: l_pay_plan := p_pay_calc_data.pay_plan;
1558: end if;
1559:
1560: IF nvl(g_noa_family_code,'XXX') = 'CORRECT' then
1561: -- Bug 3021003
1562: hr_utility.set_location('NAR inside noa_fam code = CORRECT ',5);
1563: ghr_pay_calc.is_retained_ia(p_pay_calc_data.person_id,
1564: p_pay_calc_data.effective_date,
1565: l_retained_grade.pay_plan,
1566: l_retained_grade.grade_or_level,
1567: l_retained_grade.step_or_rate,
1568: l_retained_grade.temp_step,
1569: l_ret_flag);
1570: IF l_ret_flag = TRUE THEN
1571: hr_utility.set_location('NAR ret step ' ||l_retained_grade.step_or_rate,10);
1572: hr_utility.set_location('NAR pay plan '||p_pay_calc_data.pay_plan,20);
1573: -- Check for Temp step
1574: IF p_retained_grade.temp_step is not null then
1575: l_new_step_or_rate := get_next_WGI_step (l_retained_grade.pay_plan,l_step_or_rate);
1568: l_retained_grade.temp_step,
1569: l_ret_flag);
1570: IF l_ret_flag = TRUE THEN
1571: hr_utility.set_location('NAR ret step ' ||l_retained_grade.step_or_rate,10);
1572: hr_utility.set_location('NAR pay plan '||p_pay_calc_data.pay_plan,20);
1573: -- Check for Temp step
1574: IF p_retained_grade.temp_step is not null then
1575: l_new_step_or_rate := get_next_WGI_step (l_retained_grade.pay_plan,l_step_or_rate);
1576: ELSE
1575: l_new_step_or_rate := get_next_WGI_step (l_retained_grade.pay_plan,l_step_or_rate);
1576: ELSE
1577: l_new_step_or_rate := get_next_WGI_step (l_retained_grade.pay_plan,l_retained_grade.step_or_rate);
1578: END IF;
1579: hr_utility.set_location('NAR new step after getting the step ' ||l_new_step_or_rate,30);
1580: ELSE
1581: l_new_step_or_rate := l_step_or_rate;
1582: END IF;
1583: hr_utility.set_location('NAR new step after getting the step ' ||l_new_step_or_rate,40);
1579: hr_utility.set_location('NAR new step after getting the step ' ||l_new_step_or_rate,30);
1580: ELSE
1581: l_new_step_or_rate := l_step_or_rate;
1582: END IF;
1583: hr_utility.set_location('NAR new step after getting the step ' ||l_new_step_or_rate,40);
1584: ELSE
1585: l_new_step_or_rate := get_next_WGI_step (l_pay_plan
1586: ,l_step_or_rate);
1587: END IF;
1658:
1659: l_new_std_relative_rate NUMBER;
1660:
1661: BEGIN
1662: hr_utility.set_location('Entering ' || l_proc,5);
1663: -- First work out what pay table data to use
1664: --
1665: IF p_retained_grade.grade_or_level is NULL THEN
1666: hr_utility.set_location('Entering ..No Retained Grade Info.. ' || l_proc,10);
1662: hr_utility.set_location('Entering ' || l_proc,5);
1663: -- First work out what pay table data to use
1664: --
1665: IF p_retained_grade.grade_or_level is NULL THEN
1666: hr_utility.set_location('Entering ..No Retained Grade Info.. ' || l_proc,10);
1667: l_user_table_id := p_pay_calc_data.user_table_id;
1668: l_pay_plan := p_pay_calc_data.pay_plan;
1669: l_grade_or_level := p_pay_calc_data.grade_or_level;
1670: l_step_or_rate := p_pay_calc_data.step_or_rate;
1670: l_step_or_rate := p_pay_calc_data.step_or_rate;
1671: l_pay_basis := p_pay_calc_data.pay_basis;
1672: --
1673: ELSE
1674: hr_utility.set_location('Entering ..Retained Grade Info.. ' || l_proc,10);
1675: l_user_table_id := p_retained_grade.user_table_id;
1676: l_pay_plan := p_retained_grade.pay_plan;
1677: l_grade_or_level := p_retained_grade.grade_or_level;
1678: l_step_or_rate := p_retained_grade.step_or_rate;
1687: ,p_pay_calc_data.effective_date);
1688: --
1689: IF l_pay_plan = 'GS' THEN
1690:
1691: hr_utility.set_location('Calculating for GS Plan ..Basic Pay ' || l_proc,15);
1692: hr_utility.set_location('user_table_id..' || to_char(l_user_table_id) ,15);
1693:
1694: ghr_pay_calc.get_pay_table_value(l_user_table_id
1695: ,l_pay_plan
1688: --
1689: IF l_pay_plan = 'GS' THEN
1690:
1691: hr_utility.set_location('Calculating for GS Plan ..Basic Pay ' || l_proc,15);
1692: hr_utility.set_location('user_table_id..' || to_char(l_user_table_id) ,15);
1693:
1694: ghr_pay_calc.get_pay_table_value(l_user_table_id
1695: ,l_pay_plan
1696: ,l_grade_or_level
1699: ,l_basic_pay
1700: ,l_PT_eff_start_date
1701: ,l_dummy_date);
1702:
1703: hr_utility.set_location('Calculating for GS Plan ..Locality Pay ' || l_proc,20);
1704:
1705: ghr_pay_calc.get_locality_adj_894_PRDM_GS
1706: (p_user_table_id => l_user_table_id
1707: ,p_pay_plan => l_pay_plan
1751: END IF;
1752:
1753: ELSIF l_pay_plan = 'GM' THEN
1754:
1755: hr_utility.set_location('Calculating for GM Plan ..Basic Pay ' || l_proc,25);
1756:
1757: get_basic_pay_SAL894_6step(p_pay_calc_data
1758: ,p_retained_grade
1759: ,'POSITION'
1760: ,l_basic_pay
1761: ,l_PT_eff_start_date
1762: ,l_dummy_number);
1763:
1764: hr_utility.set_location('Calculating for GM Plan ..Locality Pay ' || l_proc,20);
1765:
1766: ghr_pay_calc.get_locality_adj_894_PRDM_GM
1767: (p_pay_calc_data => p_pay_calc_data
1768: ,p_retained_grade => p_retained_grade
1788: p_basic_pay := nvl(l_basic_pay,0);
1789: p_PT_eff_start_date := l_PT_eff_start_date;
1790:
1791: END IF;
1792: hr_utility.set_location('Leaving .. ' || l_proc,5);
1793:
1794: EXCEPTION
1795: WHEN others THEN
1796: -- Reset IN OUT parameters and set OUT parameters
1798: p_basic_pay := NULL;
1799: p_prd := NULL;
1800: p_PT_eff_start_date := NULL;
1801:
1802: hr_utility.set_location('Leaving .. ' || l_proc,6);
1803: RAISE;
1804: END get_basic_pay_SAL894_PRDM;
1805:
1806: ----------------------------------------------------------------------------------------
1845: BEGIN
1846:
1847: l_retained_grade := p_retained_grade ;
1848: l_fws_flag := 'FALSE'; ---Bug 1360547
1849: hr_utility.set_location('Entering ' || l_proc,5);
1850: -- get retained grade record if there is one, there MUST be one for 'A','B','E','F','U','V'
1851: -- and maybe one for 'M'
1852: IF p_pay_calc_data.pay_rate_determinant IN ('A','B','E','F','U','V','M') THEN
1853: p_retained_grade := get_retained_grade_details (p_pay_calc_data.person_id
1947: p_pay_calc_out_data.basic_pay := p_pay_calc_data.current_basic_pay;
1948: END IF;
1949: --Begin Bug# 7557159
1950: ELSE
1951: hr_utility.set_message(8301, 'GHR_38254_NO_CALC_PRD');
1952: hr_utility.set_message_token('PRD',p_pay_calc_data.pay_rate_determinant);
1953: raise ghr_pay_calc.unable_to_calculate;
1954: END IF;
1955: --
1948: END IF;
1949: --Begin Bug# 7557159
1950: ELSE
1951: hr_utility.set_message(8301, 'GHR_38254_NO_CALC_PRD');
1952: hr_utility.set_message_token('PRD',p_pay_calc_data.pay_rate_determinant);
1953: raise ghr_pay_calc.unable_to_calculate;
1954: END IF;
1955: --
1956: ELSE
1953: raise ghr_pay_calc.unable_to_calculate;
1954: END IF;
1955: --
1956: ELSE
1957: hr_utility.set_message(8301, 'GHR_38260_NO_CALC_PAY_PLAN');
1958: hr_utility.set_message_token('PAY_PLAN',l_pay_plan);
1959: raise ghr_pay_calc.unable_to_calculate;
1960: END IF;
1961: ELSIF SUBSTR(p_pay_calc_data.noa_family_code ,1,8) = 'GHR_SAL_' THEN
1954: END IF;
1955: --
1956: ELSE
1957: hr_utility.set_message(8301, 'GHR_38260_NO_CALC_PAY_PLAN');
1958: hr_utility.set_message_token('PAY_PLAN',l_pay_plan);
1959: raise ghr_pay_calc.unable_to_calculate;
1960: END IF;
1961: ELSIF SUBSTR(p_pay_calc_data.noa_family_code ,1,8) = 'GHR_SAL_' THEN
1962: -- For salary change family we need to further investigate the noac to determine
2046: --AVR
2047: ELSIF ( l_pay_plan IN ('GS','GL','GM')
2048: AND p_pay_calc_data.pay_rate_determinant = 'M' ) THEN
2049:
2050: hr_utility.set_location('Calling ..SAL894_PRDM.. ' || l_proc,15);
2051: get_basic_pay_SAL894_PRDM (p_pay_calc_data
2052: ,p_retained_grade
2053: ,p_pay_calc_out_data.basic_pay
2054: ,p_pay_calc_out_data.out_pay_rate_determinant
2052: ,p_retained_grade
2053: ,p_pay_calc_out_data.basic_pay
2054: ,p_pay_calc_out_data.out_pay_rate_determinant
2055: ,p_pay_calc_out_data.PT_eff_start_date );
2056: hr_utility.set_location('Called ..SAL894_PRDM.. ' || l_proc,25);
2057:
2058: --AVR
2059:
2060:
2059:
2060:
2061: --Begin Bug# 7557159
2062: ELSIF p_pay_calc_data.pay_rate_determinant = 'D' THEN
2063: hr_utility.set_message(8301, 'GHR_38520_PRD_D');
2064: raise ghr_pay_calc.open_pay_range_mesg;
2065: --End Bug# 7557159
2066: ELSE
2067: hr_utility.set_message(8301, 'GHR_38391_NO_CALC_PAY_PLAN_PRD');
2063: hr_utility.set_message(8301, 'GHR_38520_PRD_D');
2064: raise ghr_pay_calc.open_pay_range_mesg;
2065: --End Bug# 7557159
2066: ELSE
2067: hr_utility.set_message(8301, 'GHR_38391_NO_CALC_PAY_PLAN_PRD');
2068: hr_utility.set_message_token('PAY_PLAN',l_pay_plan);
2069: hr_utility.set_message_token('PRD',p_pay_calc_data.pay_rate_determinant);
2070: raise ghr_pay_calc.unable_to_calculate;
2071: END IF;
2064: raise ghr_pay_calc.open_pay_range_mesg;
2065: --End Bug# 7557159
2066: ELSE
2067: hr_utility.set_message(8301, 'GHR_38391_NO_CALC_PAY_PLAN_PRD');
2068: hr_utility.set_message_token('PAY_PLAN',l_pay_plan);
2069: hr_utility.set_message_token('PRD',p_pay_calc_data.pay_rate_determinant);
2070: raise ghr_pay_calc.unable_to_calculate;
2071: END IF;
2072: --
2065: --End Bug# 7557159
2066: ELSE
2067: hr_utility.set_message(8301, 'GHR_38391_NO_CALC_PAY_PLAN_PRD');
2068: hr_utility.set_message_token('PAY_PLAN',l_pay_plan);
2069: hr_utility.set_message_token('PRD',p_pay_calc_data.pay_rate_determinant);
2070: raise ghr_pay_calc.unable_to_calculate;
2071: END IF;
2072: --
2073: ELSIF (p_pay_calc_data.effective_date >= to_date('2007/01/07','YYYY/MM/DD') AND
2083: --Bug# 5132113 added pay plan GR
2084: ELSIF l_pay_plan NOT IN ('GM','GH','GR') THEN
2085: IF p_pay_calc_data.noa_code = '891' AND
2086: p_pay_calc_data.effective_date < to_date('2007/01/07','YYYY/MM/DD')THEN --Bug# 5482191
2087: hr_utility.set_message(8301, 'GHR_38248_INV_PAY_PLAN_891');
2088: hr_utility.set_message_token('PAY_PLAN',l_pay_plan);
2089: raise ghr_pay_calc.pay_calc_message;
2090: --
2091: ELSIF p_pay_calc_data.noa_code IN ('867','892','893') THEN
2084: ELSIF l_pay_plan NOT IN ('GM','GH','GR') THEN
2085: IF p_pay_calc_data.noa_code = '891' AND
2086: p_pay_calc_data.effective_date < to_date('2007/01/07','YYYY/MM/DD')THEN --Bug# 5482191
2087: hr_utility.set_message(8301, 'GHR_38248_INV_PAY_PLAN_891');
2088: hr_utility.set_message_token('PAY_PLAN',l_pay_plan);
2089: raise ghr_pay_calc.pay_calc_message;
2090: --
2091: ELSIF p_pay_calc_data.noa_code IN ('867','892','893') THEN
2092: --
2100: ,p_pay_calc_out_data.basic_pay
2101: ,p_pay_calc_out_data.out_step_or_rate);
2102: --Begin Bug# 7557159
2103: ELSIF p_pay_calc_data.pay_rate_determinant = 'D' THEN
2104: hr_utility.set_message(8301, 'GHR_38520_PRD_D');
2105: raise ghr_pay_calc.open_pay_range_mesg;
2106: --End Bug# 7557159
2107: ELSE
2108: hr_utility.set_message(8301, 'GHR_38254_NO_CALC_PRD');
2104: hr_utility.set_message(8301, 'GHR_38520_PRD_D');
2105: raise ghr_pay_calc.open_pay_range_mesg;
2106: --End Bug# 7557159
2107: ELSE
2108: hr_utility.set_message(8301, 'GHR_38254_NO_CALC_PRD');
2109: hr_utility.set_message_token('PRD',p_pay_calc_data.pay_rate_determinant);
2110: raise ghr_pay_calc.unable_to_calculate;
2111: END IF;
2112:
2105: raise ghr_pay_calc.open_pay_range_mesg;
2106: --End Bug# 7557159
2107: ELSE
2108: hr_utility.set_message(8301, 'GHR_38254_NO_CALC_PRD');
2109: hr_utility.set_message_token('PRD',p_pay_calc_data.pay_rate_determinant);
2110: raise ghr_pay_calc.unable_to_calculate;
2111: END IF;
2112:
2113: ELSIF (p_pay_calc_data.noa_code IN ('890') AND (l_fws_flag = 'TRUE' or l_es_flag = 'TRUE')) THEN
2180: ,l_dummy_date);
2181: --
2182: --Begin Bug# 7557159
2183: ELSIF p_pay_calc_data.pay_rate_determinant = 'D' THEN
2184: hr_utility.set_message(8301, 'GHR_38520_PRD_D');
2185: raise ghr_pay_calc.open_pay_range_mesg;
2186: --End Bug# 7557159
2187: ELSE
2188: hr_utility.set_message(8301, 'GHR_38254_NO_CALC_PRD');
2184: hr_utility.set_message(8301, 'GHR_38520_PRD_D');
2185: raise ghr_pay_calc.open_pay_range_mesg;
2186: --End Bug# 7557159
2187: ELSE
2188: hr_utility.set_message(8301, 'GHR_38254_NO_CALC_PRD');
2189: hr_utility.set_message_token('PRD',p_pay_calc_data.pay_rate_determinant);
2190: raise ghr_pay_calc.unable_to_calculate;
2191: END IF;
2192:
2185: raise ghr_pay_calc.open_pay_range_mesg;
2186: --End Bug# 7557159
2187: ELSE
2188: hr_utility.set_message(8301, 'GHR_38254_NO_CALC_PRD');
2189: hr_utility.set_message_token('PRD',p_pay_calc_data.pay_rate_determinant);
2190: raise ghr_pay_calc.unable_to_calculate;
2191: END IF;
2192:
2193: ELSE -- All other NoaC's for the salary change family (not GM,GH)
2212: ,l_dummy_date);
2213: --
2214: --Begin Bug# 7557159
2215: ELSIF p_pay_calc_data.pay_rate_determinant = 'D' THEN
2216: hr_utility.set_message(8301, 'GHR_38520_PRD_D');
2217: raise ghr_pay_calc.open_pay_range_mesg;
2218: --End Bug# 7557159
2219: ELSE
2220: hr_utility.set_message(8301, 'GHR_38254_NO_CALC_PRD');
2216: hr_utility.set_message(8301, 'GHR_38520_PRD_D');
2217: raise ghr_pay_calc.open_pay_range_mesg;
2218: --End Bug# 7557159
2219: ELSE
2220: hr_utility.set_message(8301, 'GHR_38254_NO_CALC_PRD');
2221: hr_utility.set_message_token('PRD',p_pay_calc_data.pay_rate_determinant);
2222: raise ghr_pay_calc.unable_to_calculate;
2223: END IF;
2224:
2217: raise ghr_pay_calc.open_pay_range_mesg;
2218: --End Bug# 7557159
2219: ELSE
2220: hr_utility.set_message(8301, 'GHR_38254_NO_CALC_PRD');
2221: hr_utility.set_message_token('PRD',p_pay_calc_data.pay_rate_determinant);
2222: raise ghr_pay_calc.unable_to_calculate;
2223: END IF;
2224:
2225: --Pradeep commented for Title 38 Changes
2236: ELSE -- Not 894, not 895 and must be GM, GH pay plans
2237: --
2238: --Bug# 5132113 added pay plan GR condition
2239: /*IF l_pay_plan in('GR') THEN
2240: hr_utility.set_message(8301, 'GHR_38254_NO_CALC_PRD');
2241: hr_utility.set_message_token('PRD',p_pay_calc_data.pay_rate_determinant);
2242: raise ghr_pay_calc.unable_to_calculate;
2243: ELS*/ --Bug# 6342011 Commented
2244: IF p_pay_calc_data.noa_code IN ('891','892') THEN
2237: --
2238: --Bug# 5132113 added pay plan GR condition
2239: /*IF l_pay_plan in('GR') THEN
2240: hr_utility.set_message(8301, 'GHR_38254_NO_CALC_PRD');
2241: hr_utility.set_message_token('PRD',p_pay_calc_data.pay_rate_determinant);
2242: raise ghr_pay_calc.unable_to_calculate;
2243: ELS*/ --Bug# 6342011 Commented
2244: IF p_pay_calc_data.noa_code IN ('891','892') THEN
2245: IF p_pay_calc_data.pay_rate_determinant IN ('0','6') THEN
2252: ,p_pay_calc_out_data.basic_pay
2253: ,p_pay_calc_out_data.out_step_or_rate);
2254: --Begin Bug# 7557159
2255: ELSIF p_pay_calc_data.pay_rate_determinant = 'D' THEN
2256: hr_utility.set_message(8301, 'GHR_38520_PRD_D');
2257: raise ghr_pay_calc.open_pay_range_mesg;
2258: --End Bug# 7557159
2259: ELSE
2260: hr_utility.set_message(8301, 'GHR_38254_NO_CALC_PRD');
2256: hr_utility.set_message(8301, 'GHR_38520_PRD_D');
2257: raise ghr_pay_calc.open_pay_range_mesg;
2258: --End Bug# 7557159
2259: ELSE
2260: hr_utility.set_message(8301, 'GHR_38254_NO_CALC_PRD');
2261: hr_utility.set_message_token('PRD',p_pay_calc_data.pay_rate_determinant);
2262: raise ghr_pay_calc.unable_to_calculate;
2263: END IF;
2264: --Begin Bug 5661441 AFHR change
2257: raise ghr_pay_calc.open_pay_range_mesg;
2258: --End Bug# 7557159
2259: ELSE
2260: hr_utility.set_message(8301, 'GHR_38254_NO_CALC_PRD');
2261: hr_utility.set_message_token('PRD',p_pay_calc_data.pay_rate_determinant);
2262: raise ghr_pay_calc.unable_to_calculate;
2263: END IF;
2264: --Begin Bug 5661441 AFHR change
2265:
2264: --Begin Bug 5661441 AFHR change
2265:
2266: ELSIF p_pay_calc_data.noa_code IN ('893') THEN
2267: IF p_pay_calc_data.effective_date < to_date('2007/01/07','YYYY/MM/DD')THEN
2268: hr_utility.set_message(8301, 'GHR_INV_PAY_PLAN_893');
2269: hr_utility.set_message_token('PAY_PLAN',l_pay_plan);
2270: hr_utility.set_message_token('NOAC',p_pay_calc_data.noa_code);
2271: raise ghr_pay_calc.pay_calc_message;
2272: ELSE
2265:
2266: ELSIF p_pay_calc_data.noa_code IN ('893') THEN
2267: IF p_pay_calc_data.effective_date < to_date('2007/01/07','YYYY/MM/DD')THEN
2268: hr_utility.set_message(8301, 'GHR_INV_PAY_PLAN_893');
2269: hr_utility.set_message_token('PAY_PLAN',l_pay_plan);
2270: hr_utility.set_message_token('NOAC',p_pay_calc_data.noa_code);
2271: raise ghr_pay_calc.pay_calc_message;
2272: ELSE
2273: IF p_pay_calc_data.pay_rate_determinant IN ('0','6') THEN
2266: ELSIF p_pay_calc_data.noa_code IN ('893') THEN
2267: IF p_pay_calc_data.effective_date < to_date('2007/01/07','YYYY/MM/DD')THEN
2268: hr_utility.set_message(8301, 'GHR_INV_PAY_PLAN_893');
2269: hr_utility.set_message_token('PAY_PLAN',l_pay_plan);
2270: hr_utility.set_message_token('NOAC',p_pay_calc_data.noa_code);
2271: raise ghr_pay_calc.pay_calc_message;
2272: ELSE
2273: IF p_pay_calc_data.pay_rate_determinant IN ('0','6') THEN
2274: get_basic_pay_SAL891_pos(p_pay_calc_data
2280: ,p_pay_calc_out_data.basic_pay
2281: ,p_pay_calc_out_data.out_step_or_rate);
2282: --Begin Bug# 7557159
2283: ELSIF p_pay_calc_data.pay_rate_determinant = 'D' THEN
2284: hr_utility.set_message(8301, 'GHR_38520_PRD_D');
2285: raise ghr_pay_calc.open_pay_range_mesg;
2286: --End Bug# 7557159
2287: ELSE
2288: hr_utility.set_message(8301, 'GHR_38254_NO_CALC_PRD');
2284: hr_utility.set_message(8301, 'GHR_38520_PRD_D');
2285: raise ghr_pay_calc.open_pay_range_mesg;
2286: --End Bug# 7557159
2287: ELSE
2288: hr_utility.set_message(8301, 'GHR_38254_NO_CALC_PRD');
2289: hr_utility.set_message_token('PRD',p_pay_calc_data.pay_rate_determinant);
2290: raise ghr_pay_calc.unable_to_calculate;
2291: END IF;
2292: END IF;
2285: raise ghr_pay_calc.open_pay_range_mesg;
2286: --End Bug# 7557159
2287: ELSE
2288: hr_utility.set_message(8301, 'GHR_38254_NO_CALC_PRD');
2289: hr_utility.set_message_token('PRD',p_pay_calc_data.pay_rate_determinant);
2290: raise ghr_pay_calc.unable_to_calculate;
2291: END IF;
2292: END IF;
2293:
2292: END IF;
2293:
2294: --end Bug 5661441 AFHR change
2295: ELSIF p_pay_calc_data.noa_code IN ('867') THEN --AFHR change 893 removed
2296: hr_utility.set_message(8301, 'GHR_INV_PAY_PLAN_893');
2297: hr_utility.set_message_token('PAY_PLAN',l_pay_plan);
2298: hr_utility.set_message_token('NOAC',p_pay_calc_data.noa_code);
2299: raise ghr_pay_calc.pay_calc_message;
2300: --
2293:
2294: --end Bug 5661441 AFHR change
2295: ELSIF p_pay_calc_data.noa_code IN ('867') THEN --AFHR change 893 removed
2296: hr_utility.set_message(8301, 'GHR_INV_PAY_PLAN_893');
2297: hr_utility.set_message_token('PAY_PLAN',l_pay_plan);
2298: hr_utility.set_message_token('NOAC',p_pay_calc_data.noa_code);
2299: raise ghr_pay_calc.pay_calc_message;
2300: --
2301: --Begin Bug# 7557159
2294: --end Bug 5661441 AFHR change
2295: ELSIF p_pay_calc_data.noa_code IN ('867') THEN --AFHR change 893 removed
2296: hr_utility.set_message(8301, 'GHR_INV_PAY_PLAN_893');
2297: hr_utility.set_message_token('PAY_PLAN',l_pay_plan);
2298: hr_utility.set_message_token('NOAC',p_pay_calc_data.noa_code);
2299: raise ghr_pay_calc.pay_calc_message;
2300: --
2301: --Begin Bug# 7557159
2302: ELSIF p_pay_calc_data.pay_rate_determinant = 'D' THEN
2299: raise ghr_pay_calc.pay_calc_message;
2300: --
2301: --Begin Bug# 7557159
2302: ELSIF p_pay_calc_data.pay_rate_determinant = 'D' THEN
2303: hr_utility.set_message(8301, 'GHR_38520_PRD_D');
2304: raise ghr_pay_calc.open_pay_range_mesg;
2305: --End Bug# 7557159
2306: ELSE
2307: hr_utility.set_message(8301, 'GHR_38260_NO_CALC_PAY_PLAN');
2303: hr_utility.set_message(8301, 'GHR_38520_PRD_D');
2304: raise ghr_pay_calc.open_pay_range_mesg;
2305: --End Bug# 7557159
2306: ELSE
2307: hr_utility.set_message(8301, 'GHR_38260_NO_CALC_PAY_PLAN');
2308: hr_utility.set_message_token('PAY_PLAN',l_pay_plan);
2309: raise ghr_pay_calc.unable_to_calculate;
2310: END IF;
2311: --
2304: raise ghr_pay_calc.open_pay_range_mesg;
2305: --End Bug# 7557159
2306: ELSE
2307: hr_utility.set_message(8301, 'GHR_38260_NO_CALC_PAY_PLAN');
2308: hr_utility.set_message_token('PAY_PLAN',l_pay_plan);
2309: raise ghr_pay_calc.unable_to_calculate;
2310: END IF;
2311: --
2312: END IF;
2311: --
2312: END IF;
2313: --Begin Bug# 7557159
2314: ELSIF p_pay_calc_data.pay_rate_determinant = 'D' THEN
2315: hr_utility.set_message(8301, 'GHR_38520_PRD_D');
2316: raise ghr_pay_calc.open_pay_range_mesg;
2317: --End Bug# 7557159
2318: ELSE
2319: hr_utility.set_message(8301, 'GHR_38261_NO_CALC_FAMILY');
2315: hr_utility.set_message(8301, 'GHR_38520_PRD_D');
2316: raise ghr_pay_calc.open_pay_range_mesg;
2317: --End Bug# 7557159
2318: ELSE
2319: hr_utility.set_message(8301, 'GHR_38261_NO_CALC_FAMILY');
2320: hr_utility.set_message_token('FAMILY',p_pay_calc_data.noa_family_code);
2321: raise ghr_pay_calc.unable_to_calculate;
2322: END IF;
2323: --
2316: raise ghr_pay_calc.open_pay_range_mesg;
2317: --End Bug# 7557159
2318: ELSE
2319: hr_utility.set_message(8301, 'GHR_38261_NO_CALC_FAMILY');
2320: hr_utility.set_message_token('FAMILY',p_pay_calc_data.noa_family_code);
2321: raise ghr_pay_calc.unable_to_calculate;
2322: END IF;
2323: --
2324: --Begin Bug# 7557159
2322: END IF;
2323: --
2324: --Begin Bug# 7557159
2325: ELSIF p_pay_calc_data.pay_rate_determinant = 'D' THEN
2326: hr_utility.set_message(8301, 'GHR_38520_PRD_D');
2327: raise ghr_pay_calc.open_pay_range_mesg;
2328: --End Bug# 7557159
2329: ELSE
2330: hr_utility.set_message(8301, 'GHR_38260_NO_CALC_PAY_PLAN');
2326: hr_utility.set_message(8301, 'GHR_38520_PRD_D');
2327: raise ghr_pay_calc.open_pay_range_mesg;
2328: --End Bug# 7557159
2329: ELSE
2330: hr_utility.set_message(8301, 'GHR_38260_NO_CALC_PAY_PLAN');
2331: hr_utility.set_message_token('PAY_PLAN',l_pay_plan);
2332: raise ghr_pay_calc.unable_to_calculate;
2333: END IF;
2334: --Begin Bug# 7557159
2327: raise ghr_pay_calc.open_pay_range_mesg;
2328: --End Bug# 7557159
2329: ELSE
2330: hr_utility.set_message(8301, 'GHR_38260_NO_CALC_PAY_PLAN');
2331: hr_utility.set_message_token('PAY_PLAN',l_pay_plan);
2332: raise ghr_pay_calc.unable_to_calculate;
2333: END IF;
2334: --Begin Bug# 7557159
2335: ELSIF p_pay_calc_data.pay_rate_determinant = 'D' THEN
2332: raise ghr_pay_calc.unable_to_calculate;
2333: END IF;
2334: --Begin Bug# 7557159
2335: ELSIF p_pay_calc_data.pay_rate_determinant = 'D' THEN
2336: hr_utility.set_message(8301, 'GHR_38520_PRD_D');
2337: raise ghr_pay_calc.open_pay_range_mesg;
2338: --End Bug# 7557159
2339: ELSE
2340: hr_utility.set_message(8301, 'GHR_38262_NO_CALC_PAY_BASIS');
2336: hr_utility.set_message(8301, 'GHR_38520_PRD_D');
2337: raise ghr_pay_calc.open_pay_range_mesg;
2338: --End Bug# 7557159
2339: ELSE
2340: hr_utility.set_message(8301, 'GHR_38262_NO_CALC_PAY_BASIS');
2341: -- It could be either the position pay basis or the retained pay basis as to why we couldn't
2342: -- calculate
2343: IF p_pay_calc_data.pay_basis NOT IN ('PA','PH','BW') THEN
2344: hr_utility.set_message_token('PAY_BASIS',
2340: hr_utility.set_message(8301, 'GHR_38262_NO_CALC_PAY_BASIS');
2341: -- It could be either the position pay basis or the retained pay basis as to why we couldn't
2342: -- calculate
2343: IF p_pay_calc_data.pay_basis NOT IN ('PA','PH','BW') THEN
2344: hr_utility.set_message_token('PAY_BASIS',
2345: ghr_pa_requests_pkg.get_lookup_meaning(800,'GHR_US_PAY_BASIS'
2346: ,p_pay_calc_data.pay_basis));
2347: ELSE
2348: hr_utility.set_message_token('PAY_BASIS',
2344: hr_utility.set_message_token('PAY_BASIS',
2345: ghr_pa_requests_pkg.get_lookup_meaning(800,'GHR_US_PAY_BASIS'
2346: ,p_pay_calc_data.pay_basis));
2347: ELSE
2348: hr_utility.set_message_token('PAY_BASIS',
2349: ghr_pa_requests_pkg.get_lookup_meaning(800,'GHR_US_PAY_BASIS'
2350: ,l_pay_basis));
2351: END IF;
2352: raise ghr_pay_calc.unable_to_calculate;
2351: END IF;
2352: raise ghr_pay_calc.unable_to_calculate;
2353: END IF;
2354: ELSE
2355: hr_utility.set_message(8301, 'GHR_38263_NO_CALC_DUAL_ACTION');
2356: raise ghr_pay_calc.unable_to_calculate;
2357: END IF;
2358: END IF;
2359:
2364: p_pay_calc_out_data := NULL;
2365: p_retained_grade := l_retained_grade;
2366:
2367: RAISE;
2368: hr_utility.set_location('Leaving ' || l_proc,8);
2369: END get_basic_pay;
2370:
2371: -- Bug#5114467 Calling proc for Calculating basic pay, locality rate and
2372: -- adjusted basic pay for employee in 'GM' pay plan and NOA 894 AC