The following lines contain the word 'select', 'insert', 'update' or 'delete':
hr_person_extra_info_api.update_person_extra_info for US
legislation. It is used to check for the Non Resident Status
of the employee and do the necessary checks .
Change List:
------------
Name Date Version Bug Text
------------- ----------- ------- ------- ------------------------------
vaprakas 7-DEC-2006 115.0 5601735 Created.
rnestor 22-Feb-2008 115.2 6794488 Removed FIT check
*/
procedure person_check_nra_status_create(P_PERSON_ID in NUMBER
,P_INFORMATION_TYPE in VARCHAR2
,P_PEI_INFORMATION_CATEGORY in VARCHAR2
,P_PEI_INFORMATION5 in VARCHAR2
,P_PEI_INFORMATION9 in VARCHAR2)
is
l_filing_status_code varchar2(2);
select pei_information1,pei_information2
from per_people_extra_info
where person_id=l_person_id
and information_type like 'PER_US_ADDITIONAL_DETAILS'
and pei_information_category like 'PER_US_ADDITIONAL_DETAILS'
and (pei_information1 = 'Y' or pei_information2 = 'Y');
SELECT distinct assignment_id
FROM per_all_assignments_f paf ,per_all_people_f ppf
WHERE paf.person_id=ppf.person_id
and ppf.person_id=p_person_id
and paf.primary_flag='Y';
SELECT WITHHOLDING_ALLOWANCES
FROM pay_us_emp_fed_tax_rules_f fetr
WHERE fetr.assignment_id=p_assignment_id
and fetr.effective_start_date <=(select sysdate from dual)
and fetr.effective_end_date >=(select sysdate from dual);
SELECT FILING_STATUS_CODE
FROM pay_us_emp_fed_tax_rules_f fetr
WHERE fetr.assignment_id=p_assignment_id
and fetr.effective_start_date <=(select sysdate from dual)
and fetr.effective_end_date >=(select sysdate from dual);
SELECT FIT_EXEMPT
FROM pay_us_emp_fed_tax_rules_f fetr
WHERE fetr.assignment_id=p_assignment_id
and fetr.effective_start_date <=(select sysdate from dual)
and fetr.effective_end_date >=(select sysdate from dual);
procedure person_check_nra_status_update(P_PERSON_EXTRA_INFO_ID in NUMBER
,P_PEI_INFORMATION_CATEGORY in VARCHAR2
,P_PEI_INFORMATION1 in VARCHAR2
,P_PEI_INFORMATION2 in VARCHAR2
,P_PEI_INFORMATION5 in VARCHAR2
,P_PEI_INFORMATION9 in VARCHAR2)
is
l_filing_status_code varchar2(2);
select pei_information1,pei_information2
from per_people_extra_info
where person_id=l_person_id
and information_type like 'PER_US_ADDITIONAL_DETAILS'
and pei_information_category like 'PER_US_ADDITIONAL_DETAILS'
and (pei_information1 = 'Y' or pei_information2 = 'Y');
SELECT distinct assignment_id
FROM per_all_assignments_f paf ,per_all_people_f ppf
WHERE paf.person_id=ppf.person_id
and ppf.person_id=p_person_id
and paf.primary_flag='Y';
SELECT person_id
FROM per_people_extra_info pei
WHERE pei.person_extra_info_id=p_person_extra_info_id;
SELECT information_type
FROM per_people_extra_info pei
WHERE pei.person_extra_info_id=p_person_extra_info_id;
SELECT WITHHOLDING_ALLOWANCES
FROM pay_us_emp_fed_tax_rules_f fetr
WHERE fetr.assignment_id=p_assignment_id
and fetr.effective_start_date <=(select sysdate from dual)
and fetr.effective_end_date >=(select sysdate from dual);
SELECT FILING_STATUS_CODE
FROM pay_us_emp_fed_tax_rules_f fetr
WHERE fetr.assignment_id=p_assignment_id
and fetr.effective_start_date <=(select sysdate from dual)
and fetr.effective_end_date >=(select sysdate from dual);
SELECT FIT_EXEMPT
FROM pay_us_emp_fed_tax_rules_f fetr
WHERE fetr.assignment_id=p_assignment_id
and fetr.effective_start_date <=(select sysdate from dual)
and fetr.effective_end_date >=(select sysdate from dual);
hr_utility.trace('Entering PAY_US_EXTRA_PER_INFO_LEG_HOOK.person_check_nra_status_update');
/* if person is a student or a business appprentice his records are selected */
open csr_chk_student_status;
select pei_information9 into l_pei_information9_1 /* select find the country of the persosn */
from per_people_extra_info where person_id=l_person_id
and information_type like 'PER_US_ADDITIONAL_DETAILS'
and pei_information_category like 'PER_US_ADDITIONAL_DETAILS';
hr_utility.trace('Leaving PAY_US_EXTRA_PER_INFO_LEG_HOOK.person_check_nra_status_update');
end person_check_nra_status_update;