815: ,p_old_start_date DATE) is
816: cursor csr_people_change is
817: select 'x' from dual where exists
818: (select 1
819: from per_people_f p
820: where p.effective_start_date between p_earlier_date and p_later_date
821: and p.effective_start_date <> p_old_start_date
822: and p.person_id = p_person_id
823: union
821: and p.effective_start_date <> p_old_start_date
822: and p.person_id = p_person_id
823: union
824: select 1
825: from per_people_f p
826: where p.effective_start_date = p_old_start_date
827: and p.current_applicant_flag = 'Y'
828: and p.person_id = p_person_id
829: -- Start changes for bug 9304366
1508: procedure update_tax(p_person_id number
1509: ,p_new_start_date date) is
1510: cursor csr_get_bg is
1511: select business_group_id
1512: from per_people_f
1513: where person_id = p_person_id;
1514: --
1515: l_business_group_id number;
1516: l_ret_code number;
1652: update per_applications a1
1653: set a1.date_end = p_new_start_date - 1
1654: where a1.application_id = l_application_id
1655: and not exists (select 1
1656: from per_people_f peo
1657: where peo.person_id = p_person_id
1658: and a1.person_id = peo.person_id
1659: and peo.effective_start_date = p_old_start_date
1660: and peo.current_applicant_flag = 'Y');
1826: ,p_new_start_date date
1827: ,p_type VARCHAR2) is
1828: cursor csr_get_bg is
1829: select business_group_id
1830: from per_people_f
1831: where person_id = p_person_id;
1832: --
1833: cursor ass_cur is
1834: select assignment_id
2465: (p_person_id IN per_all_people_f.person_id%TYPE
2466: ,p_effective_date IN DATE
2467: ) IS
2468: SELECT bus.legislation_code
2469: FROM per_people_f per
2470: ,per_business_groups bus
2471: WHERE per.person_id = csr_legislation.p_person_id
2472: AND per.business_group_id+0 = bus.business_group_id
2473: AND csr_legislation.p_effective_date BETWEEN per.effective_start_date
2806: -- Process Logic: now we must update the relevant records in line with the new start date
2807: --
2808: -- Fix for bug 3390731 starts here. update the start_date with min(effective_start_date).
2809: --
2810: update per_people_f p
2811: set p.effective_start_date = decode(p.effective_start_date
2812: ,l_old_start_date,l_new_start_date,p.effective_start_date)
2813: ,p.effective_end_date = decode(p.effective_end_date
2814: ,l_old_start_date-1,l_new_start_date-1,p.effective_end_date)
2820: hr_utility.set_message_token('TABLE','PER_ALL_PEOPLE_F');
2821: hr_utility.raise_error;
2822: end if;
2823: --
2824: update per_people_f p
2825: set p.start_date = (select min(ppf.effective_start_date)
2826: from per_people_f ppf
2827: where ppf.person_id = p_person_id)
2828: where p.person_id = p_person_id;
2822: end if;
2823: --
2824: update per_people_f p
2825: set p.start_date = (select min(ppf.effective_start_date)
2826: from per_people_f ppf
2827: where ppf.person_id = p_person_id)
2828: where p.person_id = p_person_id;
2829: --
2830: -- Fix for bug 3390731 ends here.