275: g_country VARCHAR2(80);
276: g_full_address VARCHAR2(320); -- temp var used in address ordering
277: g_postal_code VARCHAR2(9);
278: g_tax_code VARCHAR2(7);
279: g_assignment_id per_all_assignments_f.assignment_id%type;
280: g_w1_m1_indicator VARCHAR2(1);
281: g_ssp NUMBER;
282: g_smp NUMBER;
283: g_spp NUMBER; --P35/P14 EOY 2003/2004
774: p_tax_dist_ref VARCHAR2,
775: p_tax_ref VARCHAR2) RETURN NUMBER IS
776: -- Get the number of assignments for the person in the tax year
777: p_assg_count NUMBER;
778: l_person_id per_all_assignments_f.person_id%type := 0;
779:
780: cursor csr_pers_id(c_assignment_id per_all_assignments_f.assignment_id%type) IS
781: select person_id from per_all_assignments_f where
782: assignment_id=c_assignment_id order by effective_end_date DESC;
776: -- Get the number of assignments for the person in the tax year
777: p_assg_count NUMBER;
778: l_person_id per_all_assignments_f.person_id%type := 0;
779:
780: cursor csr_pers_id(c_assignment_id per_all_assignments_f.assignment_id%type) IS
781: select person_id from per_all_assignments_f where
782: assignment_id=c_assignment_id order by effective_end_date DESC;
783:
784: cursor csr_pers_assg_count (p_person_id per_all_assignments_f.person_id%type,
777: p_assg_count NUMBER;
778: l_person_id per_all_assignments_f.person_id%type := 0;
779:
780: cursor csr_pers_id(c_assignment_id per_all_assignments_f.assignment_id%type) IS
781: select person_id from per_all_assignments_f where
782: assignment_id=c_assignment_id order by effective_end_date DESC;
783:
784: cursor csr_pers_assg_count (p_person_id per_all_assignments_f.person_id%type,
785: p_min_start_year_date DATE,
780: cursor csr_pers_id(c_assignment_id per_all_assignments_f.assignment_id%type) IS
781: select person_id from per_all_assignments_f where
782: assignment_id=c_assignment_id order by effective_end_date DESC;
783:
784: cursor csr_pers_assg_count (p_person_id per_all_assignments_f.person_id%type,
785: p_min_start_year_date DATE,
786: p_max_end_year_date DATE,
787: p_tax_dist_ref VARCHAR2,
788: p_tax_ref VARCHAR2) IS
792: flex HR_SOFT_CODING_KEYFLEX_PK,
793: org HR_ORGANIZATION_INFORMATIO_FK1)
794: USE_NL(asg,ppf,flex,org) */
795: distinct asg.assignment_id, asg.effective_start_date, asg.effective_end_date
796: FROM per_all_assignments_f asg,
797: pay_all_payrolls_f ppf,
798: hr_soft_coding_keyflex flex,
799: hr_organization_information org
800: WHERE asg.person_id = p_person_id
820: flex HR_SOFT_CODING_KEYFLEX_PK,
821: org HR_ORGANIZATION_INFORMATIO_FK1)
822: USE_NL(asg,ppf,flex,org) */
823: distinct asg.assignment_id, asg.effective_start_date, asg.effective_end_date
824: FROM per_all_assignments_f asg,
825: pay_all_payrolls_f ppf,
826: hr_soft_coding_keyflex flex,
827: hr_organization_information org
828: WHERE asg.person_id = p_person_id