305: (select max(pap1.effective_start_date)
306: from per_all_people_f pap1
307: where pap1.person_id = p_person_id
308: and pap1.current_employee_flag = 'Y')
309: and exists (select 1 from per_people_extra_info ppei
310: where ppei.person_id=p_person_id
311: and information_type='NL_FIRST_DAY_REPORT'
312: and ppei.pei_information2='Y');
313:
379: (select max(ppos1.date_start)
380: from per_periods_of_service ppos1
381: where ppos1.person_id = ppos.person_id)
382: and ppos.date_start >= to_date('04-07-2006','DD-MM-RRRR')
383: and (exists(select 1 from per_people_extra_info ppei
384: where ppei.person_id=p_person_id
385: and information_type='NL_FIRST_DAY_REPORT'
386: and ppei.pei_information2='Y')
387: or not exists(select 1 from per_people_extra_info ppei
383: and (exists(select 1 from per_people_extra_info ppei
384: where ppei.person_id=p_person_id
385: and information_type='NL_FIRST_DAY_REPORT'
386: and ppei.pei_information2='Y')
387: or not exists(select 1 from per_people_extra_info ppei
388: where ppei.person_id=p_person_id
389: and information_type='NL_FIRST_DAY_REPORT')
390: );
391:
427: (select max(ppos1.date_start)
428: from per_periods_of_service ppos1
429: where ppos1.person_id = ppos.person_id)
430: and ppos.date_start >= to_date('04-07-2006','DD-MM-RRRR')
431: and (exists(select 1 from per_people_extra_info ppei
432: where ppei.person_id=p_person_id
433: and information_type='NL_FIRST_DAY_REPORT'
434: and ppei.pei_information2='Y')
435: or not exists(select 1 from per_people_extra_info ppei
431: and (exists(select 1 from per_people_extra_info ppei
432: where ppei.person_id=p_person_id
433: and information_type='NL_FIRST_DAY_REPORT'
434: and ppei.pei_information2='Y')
435: or not exists(select 1 from per_people_extra_info ppei
436: where ppei.person_id=p_person_id
437: and information_type='NL_FIRST_DAY_REPORT')
438: )
439: and (hr_nl_org_info.get_tax_org_id(posv.org_structure_version_id,paa.organization_id) is not null
694: and ppos.date_start >= to_date('04-07-2006','DD-MM-RRRR')
695: and pap.business_group_id=ppa.business_group_id
696: and ppa.payroll_action_id=p_payroll_action_id
697: and (EXISTS (select 1
698: from per_people_extra_info pei
699: where pei.person_id = p_person_id
700: and pei.information_type = 'NL_FIRST_DAY_REPORT'
701: and pei.pei_information2 = 'Y')
702: or NOT EXISTS
700: and pei.information_type = 'NL_FIRST_DAY_REPORT'
701: and pei.pei_information2 = 'Y')
702: or NOT EXISTS
703: (select 1
704: from per_people_extra_info pei
705: where pei.person_id = p_person_id
706: and pei.information_type = 'NL_FIRST_DAY_REPORT'));
707:
708:
751: from per_periods_of_service ppos1
752: where ppos1.person_id = ppos.person_id)
753: and ppos.date_start >= to_date('04-07-2006','DD-MM-RRRR')
754: and (EXISTS (select 1
755: from per_people_extra_info pei
756: where pei.person_id = pap.person_id
757: and pei.information_type = 'NL_FIRST_DAY_REPORT'
758: and pei.pei_information2 = 'Y')
759: or NOT EXISTS
757: and pei.information_type = 'NL_FIRST_DAY_REPORT'
758: and pei.pei_information2 = 'Y')
759: or NOT EXISTS
760: (select 1
761: from per_people_extra_info pei
762: where pei.person_id = pap.person_id
763: and pei.information_type = 'NL_FIRST_DAY_REPORT'));
764:
765:
792: from per_periods_of_service ppos1
793: where ppos1.person_id = ppos.person_id)
794: and ppos.date_start >= to_date('04-07-2006','DD-MM-RRRR')
795: and (EXISTS (select 1
796: from per_people_extra_info pei
797: where pei.person_id = pap.person_id
798: and pei.information_type = 'NL_FIRST_DAY_REPORT'
799: and pei.pei_information2 = 'Y')
800: or NOT EXISTS
798: and pei.information_type = 'NL_FIRST_DAY_REPORT'
799: and pei.pei_information2 = 'Y')
800: or NOT EXISTS
801: (select 1
802: from per_people_extra_info pei
803: where pei.person_id = pap.person_id
804: and pei.information_type = 'NL_FIRST_DAY_REPORT'))
805: and pap.person_id = paa.person_id
806: and paa.primary_flag = 'Y'
1009:
1010: CURSOR csr_get_peit(p_person_id NUMBER) IS
1011: select ppei.person_extra_info_id person_extra_info_id,
1012: ppei.object_version_number object_version_number
1013: from per_people_extra_info ppei
1014: where ppei.person_id = p_person_id
1015: and ppei.information_type = 'NL_FIRST_DAY_REPORT'
1016: and ppei.pei_information2 = 'Y';
1017:
1326: from per_periods_of_service ppos1
1327: where ppos1.person_id = ppos.person_id)
1328: and ppos.date_start >= to_date('04-07-2006','DD-MM-RRRR')
1329: and (EXISTS (select 1
1330: from per_people_extra_info pei
1331: where pei.person_id = pap.person_id
1332: and pei.information_type = 'NL_FIRST_DAY_REPORT'
1333: and pei.pei_information2 = 'Y')
1334: or NOT EXISTS
1332: and pei.information_type = 'NL_FIRST_DAY_REPORT'
1333: and pei.pei_information2 = 'Y')
1334: or NOT EXISTS
1335: (select 1
1336: from per_people_extra_info pei
1337: where pei.person_id = pap.person_id
1338: and pei.information_type = 'NL_FIRST_DAY_REPORT'))
1339: and pap.person_id = paa.person_id
1340: and paa.primary_flag = 'Y'