148: AND p_date_earned BETWEEN paf.effective_start_date AND paf.effective_end_date;
149: --
150: BEGIN
151: --
152: -- hr_utility.set_location('Entering:'|| l_proc, 5);
153:
154: --
155: OPEN get_period_dates;
156: FETCH get_period_dates INTO l_period_start_date,l_period_end_date;
161: OPEN get_dob;
162: FETCH get_dob INTO l_dob,v_last_name,v_asg_number;
163: CLOSE get_dob;
164:
165: hr_utility.set_location('- Name = '|| v_last_name, 5);
166: hr_utility.set_location('- Asg No = '|| v_asg_number, 5);
167:
168: l_age_last_day_month := TRUNC(MONTHS_BETWEEN(last_day(p_date_earned),l_dob)/12);
169:
162: FETCH get_dob INTO l_dob,v_last_name,v_asg_number;
163: CLOSE get_dob;
164:
165: hr_utility.set_location('- Name = '|| v_last_name, 5);
166: hr_utility.set_location('- Asg No = '|| v_asg_number, 5);
167:
168: l_age_last_day_month := TRUNC(MONTHS_BETWEEN(last_day(p_date_earned),l_dob)/12);
169:
170: IF l_dob >= l_period_start_date AND l_dob <= l_period_end_date THEN
176: RETURN(TRUNC(MONTHS_BETWEEN(p_date_earned,l_dob)/12));
177: END IF;
178: END IF;
179: --
180: -- hr_utility.set_location('-l_dob = '|| l_dob, 5);
181: --
182: END get_age_payroll_period;
183: --
184: --
232: AND v_period_end_date between gbl.effective_start_date and gbl.effective_end_date;
233: --
234: BEGIN
235: --
236: -- hr_utility.set_location('Entering:'|| l_proc, 5);
237:
238: --
239: OPEN get_period_dates;
240: FETCH get_period_dates INTO l_period_start_date,l_period_end_date;
248: OPEN get_dob;
249: FETCH get_dob INTO l_dob,v_last_name,v_asg_number;
250: CLOSE get_dob;
251:
252: hr_utility.set_location('- Name = '|| v_last_name, 5);
253: hr_utility.set_location('- Asg No = '|| v_asg_number, 5);
254:
255: l_age_last_day_month := TRUNC(MONTHS_BETWEEN(last_day(p_date_earned),l_dob));
256:
249: FETCH get_dob INTO l_dob,v_last_name,v_asg_number;
250: CLOSE get_dob;
251:
252: hr_utility.set_location('- Name = '|| v_last_name, 5);
253: hr_utility.set_location('- Asg No = '|| v_asg_number, 5);
254:
255: l_age_last_day_month := TRUNC(MONTHS_BETWEEN(last_day(p_date_earned),l_dob));
256:
257: IF l_dob >= l_period_start_date AND l_dob <= l_period_end_date THEN
263: RETURN(TRUNC(MONTHS_BETWEEN(p_date_earned,l_dob)));
264: END IF;
265: END IF;
266: --
267: -- hr_utility.set_location('-l_dob = '|| l_dob, 5);
268: --
269: END get_age_payroll_period_months;
270:
271: --
423:
424: --
425: BEGIN
426: --
427: hr_utility.set_location('Entering:'|| l_proc, 5);
428: --
429: OPEN get_dob;
430: FETCH get_dob INTO l_dob;
431: CLOSE get_dob;
463:
464: --
465: BEGIN
466: --
467: hr_utility.set_location('Entering:'|| l_proc, 5);
468: --
469: OPEN get_dob;
470: FETCH get_dob INTO l_dob;
471: CLOSE get_dob;
554: WHEN NO_DATA_FOUND THEN
555: l_found:=FALSE;
556: return l_found;
557: when others then
558: hr_utility.set_location('Exception :'||l_proc||SQLERRM(SQLCODE),999);
559: END chk_lbr_tx_indicator;
560:
561: FUNCTION get_payroll_prd(p_payroll_id number)
562: RETURN VARCHAR2 IS
583: FETCH get_pay_prd into l_pay_prd;
584: return l_pay_prd;
585: EXCEPTION
586: when others then
587: hr_utility.set_location('Exception :'||l_proc||SQLERRM(SQLCODE),999);
588: --
589: END get_payroll_prd;
590:
591: PROCEDURE chk_tax_code (p_tax_code in varchar2,
603: --
604: BEGIN
605:
606: p_valid:=TRUE;
607: --hr_utility.set_location('tax code'||p_tax_code||'len'||length(p_tax_code),999);
608: IF length(p_tax_code) <> 3 then
609: p_valid:=false;
610: ELSE
611: p_1_digit:=to_number(substr(p_tax_code,1,1));
963: l_discount_type NUMBER :=-1;
964: l_proc varchar2(100) := g_package||'get_temporary_tax_discount';
965:
966: BEGIN
967: hr_utility.set_location('Entering ' || l_proc, 100);
968: hr_utility.set_location('p_assignment_id ' || p_assignment_id, 110);
969: hr_utility.set_location('p_date_earned ' || p_date_earned, 110);
970:
971: Open Cur_ttd_details;
964: l_proc varchar2(100) := g_package||'get_temporary_tax_discount';
965:
966: BEGIN
967: hr_utility.set_location('Entering ' || l_proc, 100);
968: hr_utility.set_location('p_assignment_id ' || p_assignment_id, 110);
969: hr_utility.set_location('p_date_earned ' || p_date_earned, 110);
970:
971: Open Cur_ttd_details;
972: Fetch Cur_ttd_details INTO l_discount_type;
965:
966: BEGIN
967: hr_utility.set_location('Entering ' || l_proc, 100);
968: hr_utility.set_location('p_assignment_id ' || p_assignment_id, 110);
969: hr_utility.set_location('p_date_earned ' || p_date_earned, 110);
970:
971: Open Cur_ttd_details;
972: Fetch Cur_ttd_details INTO l_discount_type;
973: