154:
155: cursor csr_closest_name1
156: (b_person_id in number,b_effective_date date) is
157: select full_name
158: from per_all_people_f
159: where person_id = b_person_id
160: and (effective_end_date=(select max(effective_end_date) from per_all_people_f
161: where person_id=b_person_id and(effective_end_date<= b_effective_date)));
162:
156: (b_person_id in number,b_effective_date date) is
157: select full_name
158: from per_all_people_f
159: where person_id = b_person_id
160: and (effective_end_date=(select max(effective_end_date) from per_all_people_f
161: where person_id=b_person_id and(effective_end_date<= b_effective_date)));
162:
163:
164: cursor csr_closest_name2(b_person_id in number,b_effective_date date) is
162:
163:
164: cursor csr_closest_name2(b_person_id in number,b_effective_date date) is
165: select full_name
166: from per_all_people_f
167: where person_id = b_person_id
168: and (effective_start_date=(select min(effective_start_date) from per_all_people_f
169: where person_id=b_person_id and
170: (effective_start_date>= b_effective_date)));
164: cursor csr_closest_name2(b_person_id in number,b_effective_date date) is
165: select full_name
166: from per_all_people_f
167: where person_id = b_person_id
168: and (effective_start_date=(select min(effective_start_date) from per_all_people_f
169: where person_id=b_person_id and
170: (effective_start_date>= b_effective_date)));
171:
172:
169: where person_id=b_person_id and
170: (effective_start_date>= b_effective_date)));
171:
172:
173: l_temp_name per_all_people_f.full_name%type;
174: l_name wf_users.name%type;
175: l_display_name wf_users.display_name%type;
176:
177: begin
1986: raise;
1987: end person_approval;
1988:
1989: --Function to check if a given approver is terminated (Bug#3160848)
1990: --Changed for 115.60; used per_all_people_f instead of per_people_f
1991: FUNCTION validate_person(
1992: p_person_id in number,
1993: p_effective_date in date)
1994: RETURN BOOLEAN
1995: is
1996:
1997: cursor csr_validate_person(b_person_id number, b_effective_date date) is
1998: SELECT 1
1999: FROM per_all_people_f per,
2000: per_person_types ppt,
2001: per_person_type_usages_f pptu
2002: WHERE per.person_id = b_person_id
2003: AND TRUNC(b_effective_date) between TRUNC(per.effective_Start_date) and TRUNC(per.effective_end_date)