[Home] [Help]
233: PAY_BALANCE_FEEDS_F PBF ,
234: PAY_INPUT_VALUES_F PIV,
235: PAY_ELEMENT_ENTRIES_F PEE ,
236: PAY_ELEMENT_TYPES_F PET ,
237: PER_ALL_ASSIGNMENTS_F PAA ,
238: PER_PERIODS_OF_SERVICE PPS ,
239: PAY_RUN_RESULTS PRR ,
240: PAY_ASSIGNMENT_ACTIONS PAC ,
241: PAY_PAYROLL_ACTIONS PPA
675: better performance.
676: */
677: /* Bug: 12400821 - Performance Improvement done */
678:
679: cursor c_max_asg_action_id (c_assignment_id per_all_assignments_f.assignment_id%TYPE,
680: c_business_group_id hr_all_organization_units.organization_id%TYPE,
681: c_tax_unit_id hr_all_organization_units.organization_id%TYPE,
682: c_year_start date,
683: c_year_end date ) is
1563: ,actual_termination_date
1564: ,date_start
1565: ,pps.pds_information2
1566: from per_all_people_f p,
1567: per_all_assignments_f a,
1568: per_periods_of_service pps
1569: where a.person_id = p.person_id
1570: and pps.person_id = p.person_id
1571: and pps.period_of_service_id=a.period_of_service_id /*Bug 5397790 */
1575: and p.effective_start_date = (SELECT max(pp.effective_start_date)
1576: from per_all_people_f pp
1577: where p.person_id = pp.person_id )
1578: and a.effective_start_date = (SELECT max(aa.effective_start_date)
1579: from per_all_assignments_f aa
1580: where aa.assignment_id = c_assignment_id); /*Bug 4256486 */
1581:
1582: begin
1583: if g_debug then
2267: return 0;
2268: end get_assignment_id;
2269:
2270: /* Bug: 12400821 - Performance Improvement done */
2271: function populate_exclusion_table(p_assignment_id per_all_assignments_f.assignment_id%type,
2272: p_financial_year varchar2,
2273: p_financial_year_end date,
2274: p_tax_unit_id number --2610141
2275: )
2274: p_tax_unit_id number --2610141
2275: )
2276: return number is
2277:
2278: Cursor c_ps_issued(c_assignment_id per_all_assignments_f.assignment_id%type,
2279: c_financial_year varchar2)
2280: is
2281: SELECT distinct paat.assignment_id
2282: from pay_action_interlocks pail,
2291: and pay_core_utils.get_parameter('FINANCIAL_YEAR',paas.legislative_parameters) = c_financial_year
2292: and pay_core_utils.get_parameter('REGISTERED_EMPLOYER',paas.legislative_parameters) = p_tax_unit_id; --2610141
2293:
2294:
2295: CURSOR c_get_details(c_assignment_id per_all_assignments_f.assignment_id%type,
2296: c_financial_yr_end date)
2297: is
2298: SELECT pap.last_name,
2299: paa.assignment_number
2296: c_financial_yr_end date)
2297: is
2298: SELECT pap.last_name,
2299: paa.assignment_number
2300: from per_all_people_f pap,per_all_assignments_f paa
2301: where pap.person_id=paa.person_id
2302: and paa.assignment_id=c_assignment_id
2303: and paa.effective_start_date = (SELECT max(paa1.effective_start_date)
2304: from per_all_assignments_f paa1
2300: from per_all_people_f pap,per_all_assignments_f paa
2301: where pap.person_id=paa.person_id
2302: and paa.assignment_id=c_assignment_id
2303: and paa.effective_start_date = (SELECT max(paa1.effective_start_date)
2304: from per_all_assignments_f paa1
2305: where paa1.assignment_id = c_assignment_id) /* Bug 4278407*/
2306: and pap.effective_start_date = (SELECT max(ppf.effective_start_date)
2307: from per_all_people_f ppf
2308: where pap.person_id = ppf.person_id);
2306: and pap.effective_start_date = (SELECT max(ppf.effective_start_date)
2307: from per_all_people_f ppf
2308: where pap.person_id = ppf.person_id);
2309:
2310: CURSOR c_eit_updated(c_assignment_id per_all_assignments_f.assignment_id%type,
2311: c_financial_year varchar2)
2312: is
2313: SELECT assignment_id
2314: from per_assignment_extra_info,
2323: /*Bug 4173809 - Cursor updated so that the assignment is reported in the exception section when Manual PS
2324: is issued against 'All' legal employers or a particular legal employer
2325: If the Manual PS is issued for 'All' the legal employers the aei_information2 would be -999*/
2326:
2327: l_assignment_id per_all_assignments_f.assignment_id%type;
2328: l_assignment_number per_all_assignments_f.assignment_number%type;
2329: l_employee_name per_all_people_f.last_name%type;
2330: l_reason fnd_new_messages.message_text%type;
2331:
2324: is issued against 'All' legal employers or a particular legal employer
2325: If the Manual PS is issued for 'All' the legal employers the aei_information2 would be -999*/
2326:
2327: l_assignment_id per_all_assignments_f.assignment_id%type;
2328: l_assignment_number per_all_assignments_f.assignment_number%type;
2329: l_employee_name per_all_people_f.last_name%type;
2330: l_reason fnd_new_messages.message_text%type;
2331:
2332:
2941: l_fbt_year_end date;
2942: l_lst_yr_term VARCHAR2(2);
2943:
2944:
2945: cursor get_params(c_payroll_action_id per_all_assignments_f.assignment_id%type)
2946: is
2947: select to_date('01-07-'||substr(pay_core_utils.get_parameter('FINANCIAL_YEAR',legislative_parameters),1,4),'DD-MM-YYYY')
2948: Financial_year_start
2949: ,to_date('30-06-'||substr(pay_core_utils.get_parameter('FINANCIAL_YEAR',legislative_parameters),6,4),'DD-MM-YYYY')