39: l_uid_caeoy_person_id number;
40: --
41: begin
42:
43: --hr_utility.trace_on('Y','ORACLE');
44: hr_utility.trace('begining of range_cursor 1 ');
45:
46: select legislative_parameters
47: into leg_param
40: --
41: begin
42:
43: --hr_utility.trace_on('Y','ORACLE');
44: hr_utility.trace('begining of range_cursor 1 ');
45:
46: select legislative_parameters
47: into leg_param
48: from pay_payroll_actions ppa
86: and fai4.value = nvl(pay_ca_t4_reg.get_parameter(''PER_ID'',
87: ppa.legislative_parameters),fai4.value)
88: order by to_number(fai4.value)';
89:
90: hr_utility.trace('End of range_cursor 2 ');
91:
92: end range_cursor;
93: ---------------------------------- action_creation -------------------------
94: --
275: ln_arch_pact_id number;
276:
277: begin
278:
279: hr_utility.trace('begining of action creation 1 '||to_char(pactid));
280: hr_utility.trace('Start Person ID = ' || to_char(stperson));
281: hr_utility.trace('End Person ID = ' || to_char(endperson));
282: hr_utility.trace('Chunk # = ' || to_char(chunk));
283:
276:
277: begin
278:
279: hr_utility.trace('begining of action creation 1 '||to_char(pactid));
280: hr_utility.trace('Start Person ID = ' || to_char(stperson));
281: hr_utility.trace('End Person ID = ' || to_char(endperson));
282: hr_utility.trace('Chunk # = ' || to_char(chunk));
283:
284: /* get report type and effective date */
277: begin
278:
279: hr_utility.trace('begining of action creation 1 '||to_char(pactid));
280: hr_utility.trace('Start Person ID = ' || to_char(stperson));
281: hr_utility.trace('End Person ID = ' || to_char(endperson));
282: hr_utility.trace('Chunk # = ' || to_char(chunk));
283:
284: /* get report type and effective date */
285:
278:
279: hr_utility.trace('begining of action creation 1 '||to_char(pactid));
280: hr_utility.trace('Start Person ID = ' || to_char(stperson));
281: hr_utility.trace('End Person ID = ' || to_char(endperson));
282: hr_utility.trace('Chunk # = ' || to_char(chunk));
283:
284: /* get report type and effective date */
285:
286: select effective_date,
293: l_legislative_parameters
294: from pay_payroll_actions
295: where payroll_action_id = pactid;
296:
297: hr_utility.trace('begining of action creation 2 '||to_char(l_bus_group_id));
298: hr_utility.trace('legislative parameters is '||l_legislative_parameters);
299:
300: l_year := pay_ca_t4_reg.get_parameter('TAX_YEAR',l_legislative_parameters);
301: l_year_start := trunc(to_date(l_year,'YYYY'), 'Y');
294: from pay_payroll_actions
295: where payroll_action_id = pactid;
296:
297: hr_utility.trace('begining of action creation 2 '||to_char(l_bus_group_id));
298: hr_utility.trace('legislative parameters is '||l_legislative_parameters);
299:
300: l_year := pay_ca_t4_reg.get_parameter('TAX_YEAR',l_legislative_parameters);
301: l_year_start := trunc(to_date(l_year,'YYYY'), 'Y');
302: l_year_end := add_months(trunc(to_date(l_year,'YYYY'), 'Y'),12) - 1;
308:
309: lv_per_id := pay_ca_t4_reg.get_parameter('PER_ID',
310: l_legislative_parameters);
311:
312: hr_utility.trace('begining of action creation 4 '||
313: to_char(l_t4reg_tax_unit_id));
314:
315: l_uid_caeoy_tax_year := get_user_entity_id('CAEOY_TAXATION_YEAR');
316: l_uid_caeoy_tax_unit_id := get_user_entity_id('CAEOY_TAX_UNIT_ID');
340: open c_all_asg(l_arch_payroll_action_id,
341: l_province);
342: end if;
343:
344: hr_utility.trace('begining of if condition 5 '||to_char(l_tax_unit_id));
345:
346: else
347:
348: open c_all_gres;
346: else
347:
348: open c_all_gres;
349:
350: hr_utility.trace('else condition after open c_all_gres c_all_asg cursor 6 ');
351:
352: end if;
353:
354:
377: exit when c_all_asg%notfound;
378: end if;
379:
380:
381: hr_utility.trace('Begining of if part loop for c_all_asg 10 '||
382: to_char(l_asg_id));
383:
384:
385: lv_negative_bal_flag := 'N';
403: l_asg_id,
404: pactid,
405: chunk,
406: l_tax_unit_id);
407: hr_utility.trace('in if loop after calling hr_nonrun_asact.insact pkg 11 '
408: ||to_char(l_asg_id));
409: /* Added this to implement T4 Register and T4 Amendment Register
410: using the same report file */
411:
411:
412: lv_serial_number := l_prov_cd||lpad(to_char(ln_arch_asgact_id),14,0)||
413: lpad(to_char(ln_arch_pact_id),14,0);
414:
415: hr_utility.trace('lv_serial_number :' ||lv_serial_number);
416:
417: update pay_assignment_actions paa
418: set paa.serial_number = lv_serial_number
419: where paa.assignment_action_id = lockingactid;
455: close c_single_asg;
456: else
457: close c_all_asg;
458: end if;
459: hr_utility.trace('End of cursor c_all_asg 12');
460:
461: else
462:
463: loop
465: l_tax_unit_id,
466: l_arch_payroll_action_id,
467: l_session_date;
468:
469: hr_utility.trace('Begining of else loop for c_all_gres 7 '||to_char(l_tax_unit_id));
470: exit when c_all_gres%notfound;
471:
472: /* Added this validation to fix bug#2135545 */
473: if l_asg_set_id is not null then
504: ln_arch_pact_id;
505: exit when c_all_asg%notfound;
506: end if;
507:
508: hr_utility.trace('Begining of loop for c_all_asg 8 '||to_char(l_asg_id));
509:
510: lv_negative_bal_flag := 'N';
511: if l_report_type in ('PYT4PR','T4_XML') then
512:
529: pactid,
530: chunk,
531: l_tax_unit_id);
532:
533: hr_utility.trace('in if loop after calling hr_nonrun_asact.insact pkg 9 '
534: ||to_char(l_asg_id));
535:
536: /* Added this to implement T4 Register and T4 Amendment Register
537: using the same report file */
538:
539: lv_serial_number := l_prov_cd||lpad(to_char(ln_arch_asgact_id),14,0)||
540: lpad(to_char(ln_arch_pact_id),14,0);
541:
542: hr_utility.trace('lv_serial_number :' ||lv_serial_number);
543:
544: update pay_assignment_actions paa
545: set paa.serial_number = lv_serial_number
546: where paa.assignment_action_id = lockingactid;
586: end loop;
587: close c_all_gres;
588: end if;
589:
590: hr_utility.trace('End of If Condition for Loop 13');
591:
592: end action_creation;
593:
594: ---------------------------------- sort_action -----------------------------
598: sqlstr in out nocopy varchar2, /* string holding the sql statement */
599: len out nocopy number /* length of the sql string */
600: ) is
601: begin
602: hr_utility.trace('Start of Sort_Action 1');
603:
604: sqlstr := 'select paa1.rowid
605: from hr_all_organization_units hou,
606: hr_all_organization_units hou1,
649: ppf.last_name,first_name
650: for update of paa1.assignment_action_id';
651:
652: len := length(sqlstr); -- return the length of the string.
653: hr_utility.trace('End of Sort_Action 2');
654: end sort_action;
655: --
656: ------------------------------ get_parameter -------------------------------
657: function get_parameter(name in varchar2,