240: begin
241: lv_context_value := '-1';
242: ln_step := 1;
243: lv_procedure_name := '.get_context_value';
244: hr_utility.set_location(gv_package || lv_procedure_name, 10);
245:
246: open cur_context;
247: fetch cur_context into lv_context_value;
248: close cur_context;
246: open cur_context;
247: fetch cur_context into lv_context_value;
248: close cur_context;
249:
250: hr_utility.set_location(gv_package || lv_procedure_name, 20);
251: ln_step := 2;
252: if lv_context_value = 'No Tax Group' then
253: lv_context_value := '-1';
254: end if;
255: return(lv_context_value);
256:
257: EXCEPTION
258: when others then
259: hr_utility.set_location(gv_package || lv_procedure_name, 500);
260: lv_error_message := 'Error at step ' || ln_step ||
261: ' in ' || gv_package || lv_procedure_name;
262: hr_utility.trace(lv_error_message || '-' || sqlerrm);
263:
258: when others then
259: hr_utility.set_location(gv_package || lv_procedure_name, 500);
260: lv_error_message := 'Error at step ' || ln_step ||
261: ' in ' || gv_package || lv_procedure_name;
262: hr_utility.trace(lv_error_message || '-' || sqlerrm);
263:
264: lv_error_message :=
265: pay_emp_action_arch.set_error_message(lv_error_message);
266:
263:
264: lv_error_message :=
265: pay_emp_action_arch.set_error_message(lv_error_message);
266:
267: hr_utility.set_message(801,'HR_ELE_ENTRY_FORMULA_HINT');
268: hr_utility.set_message_token('FORMULA_TEXT', lv_error_message);
269: hr_utility.raise_error;
270: return(lv_context_value);
271:
264: lv_error_message :=
265: pay_emp_action_arch.set_error_message(lv_error_message);
266:
267: hr_utility.set_message(801,'HR_ELE_ENTRY_FORMULA_HINT');
268: hr_utility.set_message_token('FORMULA_TEXT', lv_error_message);
269: hr_utility.raise_error;
270: return(lv_context_value);
271:
272: end get_context_val;
265: pay_emp_action_arch.set_error_message(lv_error_message);
266:
267: hr_utility.set_message(801,'HR_ELE_ENTRY_FORMULA_HINT');
268: hr_utility.set_message_token('FORMULA_TEXT', lv_error_message);
269: hr_utility.raise_error;
270: return(lv_context_value);
271:
272: end get_context_val;
273:
368: BEGIN
369:
370: ln_step := 1;
371: lv_procedure_name := '.get_payroll_action_info';
372: hr_utility.set_location(gv_package || lv_procedure_name, 10);
373: open c_payroll_action_info(p_payroll_action_id);
374: fetch c_payroll_action_info into ld_end_date,
375: ld_start_date,
376: ln_business_group_id,
378: ln_payroll_id;
379: close c_payroll_action_info;
380:
381: ln_step := 2;
382: hr_utility.set_location(gv_package || lv_procedure_name, 30);
383: p_end_date := ld_end_date;
384: p_start_date := ld_start_date;
385: p_business_group_id := ln_business_group_id;
386: p_cons_set_id := ln_cons_set_id;
384: p_start_date := ld_start_date;
385: p_business_group_id := ln_business_group_id;
386: p_cons_set_id := ln_cons_set_id;
387: p_payroll_id := ln_payroll_id;
388: hr_utility.set_location(gv_package || lv_procedure_name, 50);
389:
390: EXCEPTION
391: when others then
392: hr_utility.set_location(gv_package || lv_procedure_name, 500);
388: hr_utility.set_location(gv_package || lv_procedure_name, 50);
389:
390: EXCEPTION
391: when others then
392: hr_utility.set_location(gv_package || lv_procedure_name, 500);
393: lv_error_message := 'Error at step ' || ln_step ||
394: ' in ' || gv_package || lv_procedure_name;
395: hr_utility.trace(lv_error_message || '-' || sqlerrm);
396:
391: when others then
392: hr_utility.set_location(gv_package || lv_procedure_name, 500);
393: lv_error_message := 'Error at step ' || ln_step ||
394: ' in ' || gv_package || lv_procedure_name;
395: hr_utility.trace(lv_error_message || '-' || sqlerrm);
396:
397: lv_error_message :=
398: pay_emp_action_arch.set_error_message(lv_error_message);
399:
396:
397: lv_error_message :=
398: pay_emp_action_arch.set_error_message(lv_error_message);
399:
400: hr_utility.set_message(801,'HR_ELE_ENTRY_FORMULA_HINT');
401: hr_utility.set_message_token('FORMULA_TEXT', lv_error_message);
402: hr_utility.raise_error;
403:
404: END get_payroll_action_info;
397: lv_error_message :=
398: pay_emp_action_arch.set_error_message(lv_error_message);
399:
400: hr_utility.set_message(801,'HR_ELE_ENTRY_FORMULA_HINT');
401: hr_utility.set_message_token('FORMULA_TEXT', lv_error_message);
402: hr_utility.raise_error;
403:
404: END get_payroll_action_info;
405:
398: pay_emp_action_arch.set_error_message(lv_error_message);
399:
400: hr_utility.set_message(801,'HR_ELE_ENTRY_FORMULA_HINT');
401: hr_utility.set_message_token('FORMULA_TEXT', lv_error_message);
402: hr_utility.raise_error;
403:
404: END get_payroll_action_info;
405:
406:
433:
434: BEGIN
435: ln_step := 1;
436: lv_procedure_name := '.populate_fed_prov_bal';
437: hr_utility.set_location(gv_package || lv_procedure_name, 10);
438: i := 0;
439: j := 0;
440:
441: if pay_ac_action_arch.gv_reporting_level = 'TAXGRP' then
443: else
444: pay_balance_pkg.set_context('TAX_UNIT_ID', gn_taxgrp_gre_id);
445: end if;
446:
447: hr_utility.set_location(gv_package || lv_procedure_name, 20);
448: ln_step := 2;
449: for i in dbt.first..dbt.last loop
450:
451: ln_pymt_amount := 0;
495: dbt(i).gre_ytd_def_bal_id,
496: p_ytd_balcall_aaid),0);
497: end if;
498:
499: hr_utility.set_location(gv_package || lv_procedure_name, 30);
500: ln_step := 8;
501: if ( ln_pymt_amount + ln_ytd_amount <> 0 ) then
502:
503:
500: ln_step := 8;
501: if ( ln_pymt_amount + ln_ytd_amount <> 0 ) then
502:
503:
504: hr_utility.trace('lv_lookup_code : '||lv_lookup_code);
505: hr_utility.set_location(gv_package || lv_procedure_name, 40);
506:
507: ln_step := 9;
508: j := 0;
501: if ( ln_pymt_amount + ln_ytd_amount <> 0 ) then
502:
503:
504: hr_utility.trace('lv_lookup_code : '||lv_lookup_code);
505: hr_utility.set_location(gv_package || lv_procedure_name, 40);
506:
507: ln_step := 9;
508: j := 0;
509: for j in tax.first..tax.last loop
515: end if;
516: end loop;
517:
518: /*Insert this into the plsql table */
519: hr_utility.trace('Tax Balance Name : '|| dbt(i).bal_name );
520: hr_utility.trace('lv_reporting_name : '||lv_reporting_name);
521: hr_utility.set_location(gv_package || lv_procedure_name, 50);
522:
523: ln_step := 10;
516: end loop;
517:
518: /*Insert this into the plsql table */
519: hr_utility.trace('Tax Balance Name : '|| dbt(i).bal_name );
520: hr_utility.trace('lv_reporting_name : '||lv_reporting_name);
521: hr_utility.set_location(gv_package || lv_procedure_name, 50);
522:
523: ln_step := 10;
524: ln_index := pay_ac_action_arch.lrr_act_tab.count;
517:
518: /*Insert this into the plsql table */
519: hr_utility.trace('Tax Balance Name : '|| dbt(i).bal_name );
520: hr_utility.trace('lv_reporting_name : '||lv_reporting_name);
521: hr_utility.set_location(gv_package || lv_procedure_name, 50);
522:
523: ln_step := 10;
524: ln_index := pay_ac_action_arch.lrr_act_tab.count;
525:
522:
523: ln_step := 10;
524: ln_index := pay_ac_action_arch.lrr_act_tab.count;
525:
526: hr_utility.trace('ln_index is '
527: || pay_ac_action_arch.lrr_act_tab.count);
528:
529: pay_ac_action_arch.lrr_act_tab(ln_index).action_info_category
530: := 'AC DEDUCTIONS';
548: := fnd_number.number_to_canonical(ln_ytd_amount);
549: pay_ac_action_arch.lrr_act_tab(ln_index).act_info10
550: := lv_reporting_name; --lv_reporting_name bug#2077373;
551:
552: hr_utility.set_location(gv_package || lv_procedure_name, 60);
553:
554: ln_step := 11;
555: ln_element_index := pay_ac_action_arch.emp_elements_tab.count;
556: pay_ac_action_arch.emp_elements_tab(ln_element_index).element_classfn
561: := dbt(i).bal_name;
562: pay_ac_action_arch.emp_elements_tab(ln_element_index).element_primary_balance_id
563: := dbt(i).bal_type_id;
564:
565: hr_utility.set_location(gv_package || lv_procedure_name, 70);
566:
567:
568: end if;
569:
568: end if;
569:
570: end loop;
571:
572: hr_utility.set_location(gv_package || lv_procedure_name, 80);
573:
574: EXCEPTION
575: when others then
576: hr_utility.set_location(gv_package || lv_procedure_name, 500);
572: hr_utility.set_location(gv_package || lv_procedure_name, 80);
573:
574: EXCEPTION
575: when others then
576: hr_utility.set_location(gv_package || lv_procedure_name, 500);
577: lv_error_message := 'Error at step ' || ln_step ||
578: ' in ' || gv_package || lv_procedure_name;
579: hr_utility.trace(lv_error_message || '-' || sqlerrm);
580:
575: when others then
576: hr_utility.set_location(gv_package || lv_procedure_name, 500);
577: lv_error_message := 'Error at step ' || ln_step ||
578: ' in ' || gv_package || lv_procedure_name;
579: hr_utility.trace(lv_error_message || '-' || sqlerrm);
580:
581: lv_error_message :=
582: pay_emp_action_arch.set_error_message(lv_error_message);
583:
580:
581: lv_error_message :=
582: pay_emp_action_arch.set_error_message(lv_error_message);
583:
584: hr_utility.set_message(801,'HR_ELE_ENTRY_FORMULA_HINT');
585: hr_utility.set_message_token('FORMULA_TEXT', lv_error_message);
586: hr_utility.raise_error;
587:
588: END populate_fed_prov_bal;
581: lv_error_message :=
582: pay_emp_action_arch.set_error_message(lv_error_message);
583:
584: hr_utility.set_message(801,'HR_ELE_ENTRY_FORMULA_HINT');
585: hr_utility.set_message_token('FORMULA_TEXT', lv_error_message);
586: hr_utility.raise_error;
587:
588: END populate_fed_prov_bal;
589:
582: pay_emp_action_arch.set_error_message(lv_error_message);
583:
584: hr_utility.set_message(801,'HR_ELE_ENTRY_FORMULA_HINT');
585: hr_utility.set_message_token('FORMULA_TEXT', lv_error_message);
586: hr_utility.raise_error;
587:
588: END populate_fed_prov_bal;
589:
590: --payslip
626: ln_step NUMBER;
627:
628: BEGIN
629:
630: hr_utility.trace('Entering get_last_pymt_info');
631: lv_procedure_name := '.get_last_pymt_info';
632:
633: ln_step := 1;
634: open c_last_payment_info(p_assignment_id,p_curr_pymt_eff_date);
637: ln_last_pymt_ass_act_id ;
638:
639: if c_last_payment_info%NOTFOUND then
640:
641: hr_utility.trace('This process has not been run earlier');
642:
643: end if;
644: close c_last_payment_info ;
645:
646:
647: p_last_pymt_eff_date := ld_last_pymt_eff_date;
648: p_last_pymt_ass_act_id := ln_last_pymt_ass_act_id;
649:
650: hr_utility.trace('Leaving get_last_pymt_info');
651:
652: EXCEPTION
653: when others then
654: hr_utility.set_location(gv_package || lv_procedure_name, 500);
650: hr_utility.trace('Leaving get_last_pymt_info');
651:
652: EXCEPTION
653: when others then
654: hr_utility.set_location(gv_package || lv_procedure_name, 500);
655: lv_error_message := 'Error at step ' || ln_step ||
656: ' in ' || gv_package || lv_procedure_name;
657: hr_utility.trace(lv_error_message || '-' || sqlerrm);
658:
653: when others then
654: hr_utility.set_location(gv_package || lv_procedure_name, 500);
655: lv_error_message := 'Error at step ' || ln_step ||
656: ' in ' || gv_package || lv_procedure_name;
657: hr_utility.trace(lv_error_message || '-' || sqlerrm);
658:
659: lv_error_message :=
660: pay_emp_action_arch.set_error_message(lv_error_message);
661:
658:
659: lv_error_message :=
660: pay_emp_action_arch.set_error_message(lv_error_message);
661:
662: hr_utility.set_message(801,'HR_ELE_ENTRY_FORMULA_HINT');
663: hr_utility.set_message_token('FORMULA_TEXT', lv_error_message);
664: hr_utility.raise_error;
665:
666: END get_last_pymt_info;
659: lv_error_message :=
660: pay_emp_action_arch.set_error_message(lv_error_message);
661:
662: hr_utility.set_message(801,'HR_ELE_ENTRY_FORMULA_HINT');
663: hr_utility.set_message_token('FORMULA_TEXT', lv_error_message);
664: hr_utility.raise_error;
665:
666: END get_last_pymt_info;
667:
660: pay_emp_action_arch.set_error_message(lv_error_message);
661:
662: hr_utility.set_message(801,'HR_ELE_ENTRY_FORMULA_HINT');
663: hr_utility.set_message_token('FORMULA_TEXT', lv_error_message);
664: hr_utility.raise_error;
665:
666: END get_last_pymt_info;
667:
668:
891: ln_run_result_id NUMBER;
892: l_printed NUMBER;
893:
894: BEGIN -- begin get 3rd party checks
895: hr_utility.trace('p_xfr_action_id = ' || p_xfr_action_id);
896: hr_utility.trace('p_pre_pay_action_id = ' || p_pre_pay_action_id);
897: hr_utility.trace('p_assignment_id = ' || p_assignment_id);
898: hr_utility.trace('p_curr_pymt_eff_date = ' || p_curr_pymt_eff_date);
899: hr_utility.trace('p_ppp_source_action_id = ' || p_ppp_source_action_id);
892: l_printed NUMBER;
893:
894: BEGIN -- begin get 3rd party checks
895: hr_utility.trace('p_xfr_action_id = ' || p_xfr_action_id);
896: hr_utility.trace('p_pre_pay_action_id = ' || p_pre_pay_action_id);
897: hr_utility.trace('p_assignment_id = ' || p_assignment_id);
898: hr_utility.trace('p_curr_pymt_eff_date = ' || p_curr_pymt_eff_date);
899: hr_utility.trace('p_ppp_source_action_id = ' || p_ppp_source_action_id);
900: hr_utility.trace('p_payroll_id = ' || p_payroll_id);
893:
894: BEGIN -- begin get 3rd party checks
895: hr_utility.trace('p_xfr_action_id = ' || p_xfr_action_id);
896: hr_utility.trace('p_pre_pay_action_id = ' || p_pre_pay_action_id);
897: hr_utility.trace('p_assignment_id = ' || p_assignment_id);
898: hr_utility.trace('p_curr_pymt_eff_date = ' || p_curr_pymt_eff_date);
899: hr_utility.trace('p_ppp_source_action_id = ' || p_ppp_source_action_id);
900: hr_utility.trace('p_payroll_id = ' || p_payroll_id);
901: hr_utility.trace('p_business_group_id = ' || p_business_group_id);
894: BEGIN -- begin get 3rd party checks
895: hr_utility.trace('p_xfr_action_id = ' || p_xfr_action_id);
896: hr_utility.trace('p_pre_pay_action_id = ' || p_pre_pay_action_id);
897: hr_utility.trace('p_assignment_id = ' || p_assignment_id);
898: hr_utility.trace('p_curr_pymt_eff_date = ' || p_curr_pymt_eff_date);
899: hr_utility.trace('p_ppp_source_action_id = ' || p_ppp_source_action_id);
900: hr_utility.trace('p_payroll_id = ' || p_payroll_id);
901: hr_utility.trace('p_business_group_id = ' || p_business_group_id);
902:
895: hr_utility.trace('p_xfr_action_id = ' || p_xfr_action_id);
896: hr_utility.trace('p_pre_pay_action_id = ' || p_pre_pay_action_id);
897: hr_utility.trace('p_assignment_id = ' || p_assignment_id);
898: hr_utility.trace('p_curr_pymt_eff_date = ' || p_curr_pymt_eff_date);
899: hr_utility.trace('p_ppp_source_action_id = ' || p_ppp_source_action_id);
900: hr_utility.trace('p_payroll_id = ' || p_payroll_id);
901: hr_utility.trace('p_business_group_id = ' || p_business_group_id);
902:
903: pay_emp_action_arch.gv_error_message := NULL;
896: hr_utility.trace('p_pre_pay_action_id = ' || p_pre_pay_action_id);
897: hr_utility.trace('p_assignment_id = ' || p_assignment_id);
898: hr_utility.trace('p_curr_pymt_eff_date = ' || p_curr_pymt_eff_date);
899: hr_utility.trace('p_ppp_source_action_id = ' || p_ppp_source_action_id);
900: hr_utility.trace('p_payroll_id = ' || p_payroll_id);
901: hr_utility.trace('p_business_group_id = ' || p_business_group_id);
902:
903: pay_emp_action_arch.gv_error_message := NULL;
904: hr_utility.set_location(gv_package || lv_procedure_name, 10);
897: hr_utility.trace('p_assignment_id = ' || p_assignment_id);
898: hr_utility.trace('p_curr_pymt_eff_date = ' || p_curr_pymt_eff_date);
899: hr_utility.trace('p_ppp_source_action_id = ' || p_ppp_source_action_id);
900: hr_utility.trace('p_payroll_id = ' || p_payroll_id);
901: hr_utility.trace('p_business_group_id = ' || p_business_group_id);
902:
903: pay_emp_action_arch.gv_error_message := NULL;
904: hr_utility.set_location(gv_package || lv_procedure_name, 10);
905: ln_step := 1;
900: hr_utility.trace('p_payroll_id = ' || p_payroll_id);
901: hr_utility.trace('p_business_group_id = ' || p_business_group_id);
902:
903: pay_emp_action_arch.gv_error_message := NULL;
904: hr_utility.set_location(gv_package || lv_procedure_name, 10);
905: ln_step := 1;
906: k:=0;
907:
908: -- Check if Multi assignment payment is enabled
911: := pay_emp_action_arch.get_multi_assignment_flag(
912: p_payroll_id => p_payroll_id
913: ,p_effective_date => p_curr_pymt_eff_date);
914: end if;
915: hr_utility.set_location(gv_package || lv_procedure_name,20);
916: ln_step := 2;
917:
918: if nvl(pay_emp_action_arch.gv_multi_payroll_pymt, 'N') = 'Y' then
919: -- If Multi Assignment Payment is enabled, get the child prepayment
922: for cval in c_child_action(p_pre_pay_action_id, p_assignment_id) loop
923: ltt_actions(k) := cval.assignment_action_id;
924: k := k + 1;
925: end loop;
926: hr_utility.set_location(gv_package || lv_procedure_name,30);
927: ln_step := 3;
928: else
929: ltt_actions(k) := p_pre_pay_action_id;
930: k := k + 1;
927: ln_step := 3;
928: else
929: ltt_actions(k) := p_pre_pay_action_id;
930: k := k + 1;
931: hr_utility.set_location(gv_package || lv_procedure_name,40);
932: ln_step := 4;
933: end if;
934:
935: -- Value of k will be zero only if the payroll is enabled for multi
936: -- assignment payments and we are processing seperate check action.
937: -- In this case, passed assignment action is added to pl/sql table.
938: if k = 0 then
939: ltt_actions(k) := p_pre_pay_action_id;
940: hr_utility.set_location(gv_package || lv_procedure_name,50);
941: ln_step := 5;
942: end if;
943:
944: for j in ltt_actions.first .. ltt_actions.last loop
941: ln_step := 5;
942: end if;
943:
944: for j in ltt_actions.first .. ltt_actions.last loop
945: hr_utility.trace('assignment action = ' || ltt_actions(j));
946: end loop;
947:
948: for j in ltt_actions.first .. ltt_actions.last loop
949: open c_third_party_pay(ltt_actions(j)
958: ,lv_org_payment_method_name
959: ,ln_emp_payment_method_id
960: ,ln_payee_id
961: ,ln_payee_type;
962: hr_utility.trace('Fetched get_3rdparty_pay_distribution ');
963: if c_third_party_pay%notfound then
964: exit;
965: end if;
966:
966:
967: open c_legislation (p_business_group_id);
968: fetch c_legislation into lv_legislation_code ;
969: close c_legislation;
970: hr_utility.trace('lv_legislation_code := '||lv_legislation_code);
971:
972: if ln_payee_id is not null and ln_payee_type is not null then
973: if ln_payee_type='O' then
974: open get_payee_org_dets(ln_payee_id
981: ,ln_town_or_city
982: ,ln_region1
983: ,ln_postal_code;
984: ln_step := 6;
985: hr_utility.trace('Fetched get_payee_org_dets for payee ID '||ln_payee_id);
986: close get_payee_org_dets;
987: elsif ln_payee_type='P' then
988: open get_payee_person_dets(ln_payee_id, p_business_group_id,
989: p_curr_pymt_eff_date);
994: ,ln_town_or_city
995: ,ln_region1
996: ,ln_postal_code;
997: ln_step := 7;
998: hr_utility.trace('Fetched get_payee_person_dets for payee ID '||ln_payee_id);
999: close get_payee_person_dets;
1000: end if;
1001: end if;
1002:
1023:
1024: if g_assignment_id <> p_assignment_id then
1025: g_assignment_id := p_assignment_id;
1026: g_printed := '-1';
1027: hr_utility.set_location(gv_package || lv_procedure_name,60);
1028: ln_step := 9;
1029: end if;
1030:
1031: l_printed := instr(g_printed,to_char(ln_run_result_id));
1031: l_printed := instr(g_printed,to_char(ln_run_result_id));
1032:
1033: if l_printed<=0 then
1034: g_printed := g_printed || ',' || to_char(ln_run_result_id);
1035: hr_utility.trace('Exiting attachno, g_printed = '||g_printed);
1036: hr_utility.set_location(gv_package || lv_procedure_name,70);
1037: ln_step := 10;
1038: exit;
1039: end if;
1032:
1033: if l_printed<=0 then
1034: g_printed := g_printed || ',' || to_char(ln_run_result_id);
1035: hr_utility.trace('Exiting attachno, g_printed = '||g_printed);
1036: hr_utility.set_location(gv_package || lv_procedure_name,70);
1037: ln_step := 10;
1038: exit;
1039: end if;
1040: end loop;
1043: /* Create the table type and assign the segment values to be archived*/
1044:
1045: ln_index := pay_ac_action_arch.lrr_act_tab.count;
1046:
1047: hr_utility.set_location(gv_package || lv_procedure_name,80);
1048: ln_step := 11;
1049: hr_utility.trace('ln_index in get_3rdparty_pay_distribution proc is '
1050: || pay_ac_action_arch.lrr_act_tab.count);
1051:
1045: ln_index := pay_ac_action_arch.lrr_act_tab.count;
1046:
1047: hr_utility.set_location(gv_package || lv_procedure_name,80);
1048: ln_step := 11;
1049: hr_utility.trace('ln_index in get_3rdparty_pay_distribution proc is '
1050: || pay_ac_action_arch.lrr_act_tab.count);
1051:
1052: hr_utility.trace('Attach details ln_earned_date = '|| ln_earned_date);
1053: hr_utility.trace('ln_garn_ref_no = '|| ln_garn_ref_no);
1048: ln_step := 11;
1049: hr_utility.trace('ln_index in get_3rdparty_pay_distribution proc is '
1050: || pay_ac_action_arch.lrr_act_tab.count);
1051:
1052: hr_utility.trace('Attach details ln_earned_date = '|| ln_earned_date);
1053: hr_utility.trace('ln_garn_ref_no = '|| ln_garn_ref_no);
1054: hr_utility.trace('ln_payment_date = '|| ln_payment_date);
1055:
1056: pay_ac_action_arch.lrr_act_tab(ln_index).action_info_category
1049: hr_utility.trace('ln_index in get_3rdparty_pay_distribution proc is '
1050: || pay_ac_action_arch.lrr_act_tab.count);
1051:
1052: hr_utility.trace('Attach details ln_earned_date = '|| ln_earned_date);
1053: hr_utility.trace('ln_garn_ref_no = '|| ln_garn_ref_no);
1054: hr_utility.trace('ln_payment_date = '|| ln_payment_date);
1055:
1056: pay_ac_action_arch.lrr_act_tab(ln_index).action_info_category
1057: := 'CA THIRD PARTY CHEQUES';
1050: || pay_ac_action_arch.lrr_act_tab.count);
1051:
1052: hr_utility.trace('Attach details ln_earned_date = '|| ln_earned_date);
1053: hr_utility.trace('ln_garn_ref_no = '|| ln_garn_ref_no);
1054: hr_utility.trace('ln_payment_date = '|| ln_payment_date);
1055:
1056: pay_ac_action_arch.lrr_act_tab(ln_index).action_info_category
1057: := 'CA THIRD PARTY CHEQUES';
1058: pay_ac_action_arch.lrr_act_tab(ln_index).jurisdiction_code
1058: pay_ac_action_arch.lrr_act_tab(ln_index).jurisdiction_code
1059: := '00-000-0000';
1060: pay_ac_action_arch.lrr_act_tab(ln_index).act_info1
1061: := NULL;
1062: hr_utility.trace('ln_org_payment_method_id'||ln_org_payment_method_id);
1063: pay_ac_action_arch.lrr_act_tab(ln_index).act_info2
1064: := ln_pre_payment_id;
1065: pay_ac_action_arch.lrr_act_tab(ln_index).act_info3
1066: := fnd_number.number_to_canonical(ln_value);
1099: close c_third_party_pay;
1100: end loop;
1101:
1102:
1103: hr_utility.set_location(gv_package || lv_procedure_name,100);
1104: EXCEPTION
1105: when others then
1106: lv_error_message := 'Error at step ' || ln_step || ' in ' ||
1107: gv_package || lv_procedure_name;
1105: when others then
1106: lv_error_message := 'Error at step ' || ln_step || ' in ' ||
1107: gv_package || lv_procedure_name;
1108:
1109: hr_utility.trace(lv_error_message || '-' || sqlerrm);
1110:
1111: lv_error_message :=
1112: pay_emp_action_arch.set_error_message(lv_error_message);
1113:
1110:
1111: lv_error_message :=
1112: pay_emp_action_arch.set_error_message(lv_error_message);
1113:
1114: hr_utility.set_message(801,'HR_ELE_ENTRY_FORMULA_HINT');
1115: hr_utility.set_message_token('FORMULA_TEXT', lv_error_message);
1116: hr_utility.raise_error;
1117:
1118: END get_3rdparty_cheque;
1111: lv_error_message :=
1112: pay_emp_action_arch.set_error_message(lv_error_message);
1113:
1114: hr_utility.set_message(801,'HR_ELE_ENTRY_FORMULA_HINT');
1115: hr_utility.set_message_token('FORMULA_TEXT', lv_error_message);
1116: hr_utility.raise_error;
1117:
1118: END get_3rdparty_cheque;
1119: -- 13029997 changes to support/archive Third Party Cheque end.
1112: pay_emp_action_arch.set_error_message(lv_error_message);
1113:
1114: hr_utility.set_message(801,'HR_ELE_ENTRY_FORMULA_HINT');
1115: hr_utility.set_message_token('FORMULA_TEXT', lv_error_message);
1116: hr_utility.raise_error;
1117:
1118: END get_3rdparty_cheque;
1119: -- 13029997 changes to support/archive Third Party Cheque end.
1120:
1267: lv_procedure_name := '.process_actions';
1268: lv_person_lang := 'US';
1269: ln_taxgrp_gre_id := -1;
1270:
1271: hr_utility.set_location(gv_package || lv_procedure_name, 10);
1272: ln_step := 1;
1273:
1274: /****************************************************************
1275: ** For Seperate Check we do the YTD balance calls with the Run
1285: if p_seperate_check_flag = 'N' and p_archive_balance_info <> 'N' then
1286:
1287: -- if pay_ac_action_arch.gv_reporting_level = 'GRE' then
1288: --
1289: -- hr_utility.set_location(gv_package || lv_procedure_name, 40);
1290: -- ln_step := 2;
1291: -- open c_ytd_aaid_for_gre(p_rqp_action_id,
1292: -- p_assignment_id,
1293: -- p_tax_unit_id,
1293: -- p_tax_unit_id,
1294: -- p_sepcheck_run_type_id);
1295: -- fetch c_ytd_aaid_for_gre into ln_ytd_balcall_aaid;
1296: -- if c_ytd_aaid_for_gre%notfound then
1297: -- hr_utility.set_location(gv_package || lv_procedure_name, 50);
1298: -- hr_utility.raise_error;
1299: -- end if;
1300: -- close c_ytd_aaid_for_gre;
1301: --
1294: -- p_sepcheck_run_type_id);
1295: -- fetch c_ytd_aaid_for_gre into ln_ytd_balcall_aaid;
1296: -- if c_ytd_aaid_for_gre%notfound then
1297: -- hr_utility.set_location(gv_package || lv_procedure_name, 50);
1298: -- hr_utility.raise_error;
1299: -- end if;
1300: -- close c_ytd_aaid_for_gre;
1301: --
1302: -- else
1300: -- close c_ytd_aaid_for_gre;
1301: --
1302: -- else
1303:
1304: hr_utility.set_location(gv_package || lv_procedure_name, 40);
1305: ln_step := 2;
1306: open c_ytd_aaid(p_rqp_action_id,
1307: p_assignment_id,
1308: p_sepcheck_run_type_id);
1307: p_assignment_id,
1308: p_sepcheck_run_type_id);
1309: fetch c_ytd_aaid into ln_ytd_balcall_aaid;
1310: --if c_ytd_aaid%notfound then
1311: -- hr_utility.set_location(gv_package || lv_procedure_name, 50);
1312: -- hr_utility.raise_error;
1313: --end if;
1314: close c_ytd_aaid;
1315:
1308: p_sepcheck_run_type_id);
1309: fetch c_ytd_aaid into ln_ytd_balcall_aaid;
1310: --if c_ytd_aaid%notfound then
1311: -- hr_utility.set_location(gv_package || lv_procedure_name, 50);
1312: -- hr_utility.raise_error;
1313: --end if;
1314: close c_ytd_aaid;
1315:
1316: -- end if;
1318: end if;
1319:
1320: end if;
1321:
1322: hr_utility.set_location(gv_package || lv_procedure_name, 60);
1323:
1324: ln_step := 3;
1325: -- if p_seperate_check_flag = 'N' and p_archive_balance_info <> 'N' then
1326: open c_time_period(ln_ytd_balcall_aaid);
1328: ld_run_date_earned,
1329: ld_run_effective_date;
1330: close c_time_period;
1331:
1332: hr_utility.set_location(gv_package || lv_procedure_name, 70);
1333: -- end if;
1334: open cur_get_base_lang;
1335: fetch cur_get_base_lang into lv_base_lang;
1336: close cur_get_base_lang;
1353: pay_ac_action_arch.gv_person_lang := lv_person_lang;
1354: /* Bug 3559626 */
1355: pay_emp_action_arch.gv_correspondence_language := lv_person_lang;
1356:
1357: hr_utility.trace('Correspondance Lang: '|| pay_ac_action_arch.gv_person_lang);
1358: hr_utility.trace('ln_ytd_balcall_aaid: '|| ln_ytd_balcall_aaid);
1359:
1360: -- if p_seperate_check_flag = 'N' and p_archive_balance_info <> 'N' then
1361: if pay_ac_action_arch.gv_reporting_level = 'TAXGRP' then
1354: /* Bug 3559626 */
1355: pay_emp_action_arch.gv_correspondence_language := lv_person_lang;
1356:
1357: hr_utility.trace('Correspondance Lang: '|| pay_ac_action_arch.gv_person_lang);
1358: hr_utility.trace('ln_ytd_balcall_aaid: '|| ln_ytd_balcall_aaid);
1359:
1360: -- if p_seperate_check_flag = 'N' and p_archive_balance_info <> 'N' then
1361: if pay_ac_action_arch.gv_reporting_level = 'TAXGRP' then
1362: ln_step := 5;
1371: end if;
1372:
1373: gn_taxgrp_gre_id := ln_taxgrp_gre_id;
1374:
1375: hr_utility.trace('Reporting Level : '|| pay_ac_action_arch.gv_reporting_level);
1376: hr_utility.trace('gv_taxgrp_gre_id : '|| gn_taxgrp_gre_id);
1377:
1378: ln_step := 7;
1379: gv_jurisdiction_cd := get_context_val(
1372:
1373: gn_taxgrp_gre_id := ln_taxgrp_gre_id;
1374:
1375: hr_utility.trace('Reporting Level : '|| pay_ac_action_arch.gv_reporting_level);
1376: hr_utility.trace('gv_taxgrp_gre_id : '|| gn_taxgrp_gre_id);
1377:
1378: ln_step := 7;
1379: gv_jurisdiction_cd := get_context_val(
1380: p_context_name => 'JURISDICTION_CODE'
1380: p_context_name => 'JURISDICTION_CODE'
1381: , p_assignment_id => p_assignment_id
1382: , p_asg_act_id => ln_ytd_balcall_aaid);
1383:
1384: hr_utility.trace('gv_jurisdiction_cd : ' || gv_jurisdiction_cd);
1385:
1386: ln_step := 8;
1387:
1388: -- end if;
1396: ,p_last_xfr_eff_date => ld_last_xfr_eff_date
1397: ,p_last_xfr_action_id => ln_last_xfr_action_id
1398: );
1399:
1400: hr_utility.trace('p_xfr_payroll_action_id= '|| p_xfr_payroll_action_id);
1401: hr_utility.trace('p_xfr_action_id = ' || p_xfr_action_id);
1402: hr_utility.trace('p_seperate_check_flag = ' || p_seperate_check_flag);
1403: hr_utility.trace('p_action_type = ' || p_action_type);
1404: hr_utility.trace('p_pre_pay_action_id = ' || p_pre_pay_action_id);
1397: ,p_last_xfr_action_id => ln_last_xfr_action_id
1398: );
1399:
1400: hr_utility.trace('p_xfr_payroll_action_id= '|| p_xfr_payroll_action_id);
1401: hr_utility.trace('p_xfr_action_id = ' || p_xfr_action_id);
1402: hr_utility.trace('p_seperate_check_flag = ' || p_seperate_check_flag);
1403: hr_utility.trace('p_action_type = ' || p_action_type);
1404: hr_utility.trace('p_pre_pay_action_id = ' || p_pre_pay_action_id);
1405: hr_utility.trace('p_payment_action_id = ' || p_payment_action_id);
1398: );
1399:
1400: hr_utility.trace('p_xfr_payroll_action_id= '|| p_xfr_payroll_action_id);
1401: hr_utility.trace('p_xfr_action_id = ' || p_xfr_action_id);
1402: hr_utility.trace('p_seperate_check_flag = ' || p_seperate_check_flag);
1403: hr_utility.trace('p_action_type = ' || p_action_type);
1404: hr_utility.trace('p_pre_pay_action_id = ' || p_pre_pay_action_id);
1405: hr_utility.trace('p_payment_action_id = ' || p_payment_action_id);
1406: hr_utility.trace('p_rqp_action_id = ' || p_rqp_action_id);
1399:
1400: hr_utility.trace('p_xfr_payroll_action_id= '|| p_xfr_payroll_action_id);
1401: hr_utility.trace('p_xfr_action_id = ' || p_xfr_action_id);
1402: hr_utility.trace('p_seperate_check_flag = ' || p_seperate_check_flag);
1403: hr_utility.trace('p_action_type = ' || p_action_type);
1404: hr_utility.trace('p_pre_pay_action_id = ' || p_pre_pay_action_id);
1405: hr_utility.trace('p_payment_action_id = ' || p_payment_action_id);
1406: hr_utility.trace('p_rqp_action_id = ' || p_rqp_action_id);
1407: hr_utility.trace('p_sepcheck_run_type_id = '|| p_sepcheck_run_type_id);
1400: hr_utility.trace('p_xfr_payroll_action_id= '|| p_xfr_payroll_action_id);
1401: hr_utility.trace('p_xfr_action_id = ' || p_xfr_action_id);
1402: hr_utility.trace('p_seperate_check_flag = ' || p_seperate_check_flag);
1403: hr_utility.trace('p_action_type = ' || p_action_type);
1404: hr_utility.trace('p_pre_pay_action_id = ' || p_pre_pay_action_id);
1405: hr_utility.trace('p_payment_action_id = ' || p_payment_action_id);
1406: hr_utility.trace('p_rqp_action_id = ' || p_rqp_action_id);
1407: hr_utility.trace('p_sepcheck_run_type_id = '|| p_sepcheck_run_type_id);
1408: hr_utility.trace('p_assignment_id = ' || p_assignment_id);
1401: hr_utility.trace('p_xfr_action_id = ' || p_xfr_action_id);
1402: hr_utility.trace('p_seperate_check_flag = ' || p_seperate_check_flag);
1403: hr_utility.trace('p_action_type = ' || p_action_type);
1404: hr_utility.trace('p_pre_pay_action_id = ' || p_pre_pay_action_id);
1405: hr_utility.trace('p_payment_action_id = ' || p_payment_action_id);
1406: hr_utility.trace('p_rqp_action_id = ' || p_rqp_action_id);
1407: hr_utility.trace('p_sepcheck_run_type_id = '|| p_sepcheck_run_type_id);
1408: hr_utility.trace('p_assignment_id = ' || p_assignment_id);
1409: hr_utility.trace('p_xfr_start_date = ' || p_xfr_start_date );
1402: hr_utility.trace('p_seperate_check_flag = ' || p_seperate_check_flag);
1403: hr_utility.trace('p_action_type = ' || p_action_type);
1404: hr_utility.trace('p_pre_pay_action_id = ' || p_pre_pay_action_id);
1405: hr_utility.trace('p_payment_action_id = ' || p_payment_action_id);
1406: hr_utility.trace('p_rqp_action_id = ' || p_rqp_action_id);
1407: hr_utility.trace('p_sepcheck_run_type_id = '|| p_sepcheck_run_type_id);
1408: hr_utility.trace('p_assignment_id = ' || p_assignment_id);
1409: hr_utility.trace('p_xfr_start_date = ' || p_xfr_start_date );
1410: hr_utility.trace('p_xfr_end_date = ' || p_xfr_end_date );
1403: hr_utility.trace('p_action_type = ' || p_action_type);
1404: hr_utility.trace('p_pre_pay_action_id = ' || p_pre_pay_action_id);
1405: hr_utility.trace('p_payment_action_id = ' || p_payment_action_id);
1406: hr_utility.trace('p_rqp_action_id = ' || p_rqp_action_id);
1407: hr_utility.trace('p_sepcheck_run_type_id = '|| p_sepcheck_run_type_id);
1408: hr_utility.trace('p_assignment_id = ' || p_assignment_id);
1409: hr_utility.trace('p_xfr_start_date = ' || p_xfr_start_date );
1410: hr_utility.trace('p_xfr_end_date = ' || p_xfr_end_date );
1411: hr_utility.trace('p_curr_pymt_eff_date = ' || p_curr_pymt_eff_date);
1404: hr_utility.trace('p_pre_pay_action_id = ' || p_pre_pay_action_id);
1405: hr_utility.trace('p_payment_action_id = ' || p_payment_action_id);
1406: hr_utility.trace('p_rqp_action_id = ' || p_rqp_action_id);
1407: hr_utility.trace('p_sepcheck_run_type_id = '|| p_sepcheck_run_type_id);
1408: hr_utility.trace('p_assignment_id = ' || p_assignment_id);
1409: hr_utility.trace('p_xfr_start_date = ' || p_xfr_start_date );
1410: hr_utility.trace('p_xfr_end_date = ' || p_xfr_end_date );
1411: hr_utility.trace('p_curr_pymt_eff_date = ' || p_curr_pymt_eff_date);
1412: hr_utility.trace('ld_run_effective_date = ' || ld_run_effective_date);
1405: hr_utility.trace('p_payment_action_id = ' || p_payment_action_id);
1406: hr_utility.trace('p_rqp_action_id = ' || p_rqp_action_id);
1407: hr_utility.trace('p_sepcheck_run_type_id = '|| p_sepcheck_run_type_id);
1408: hr_utility.trace('p_assignment_id = ' || p_assignment_id);
1409: hr_utility.trace('p_xfr_start_date = ' || p_xfr_start_date );
1410: hr_utility.trace('p_xfr_end_date = ' || p_xfr_end_date );
1411: hr_utility.trace('p_curr_pymt_eff_date = ' || p_curr_pymt_eff_date);
1412: hr_utility.trace('ld_run_effective_date = ' || ld_run_effective_date);
1413: hr_utility.trace('ln_ytd_balcall_aaid = ' || ln_ytd_balcall_aaid);
1406: hr_utility.trace('p_rqp_action_id = ' || p_rqp_action_id);
1407: hr_utility.trace('p_sepcheck_run_type_id = '|| p_sepcheck_run_type_id);
1408: hr_utility.trace('p_assignment_id = ' || p_assignment_id);
1409: hr_utility.trace('p_xfr_start_date = ' || p_xfr_start_date );
1410: hr_utility.trace('p_xfr_end_date = ' || p_xfr_end_date );
1411: hr_utility.trace('p_curr_pymt_eff_date = ' || p_curr_pymt_eff_date);
1412: hr_utility.trace('ld_run_effective_date = ' || ld_run_effective_date);
1413: hr_utility.trace('ln_ytd_balcall_aaid = ' || ln_ytd_balcall_aaid);
1414: hr_utility.trace('p_ppp_source_action_id = '|| p_ppp_source_action_id);
1407: hr_utility.trace('p_sepcheck_run_type_id = '|| p_sepcheck_run_type_id);
1408: hr_utility.trace('p_assignment_id = ' || p_assignment_id);
1409: hr_utility.trace('p_xfr_start_date = ' || p_xfr_start_date );
1410: hr_utility.trace('p_xfr_end_date = ' || p_xfr_end_date );
1411: hr_utility.trace('p_curr_pymt_eff_date = ' || p_curr_pymt_eff_date);
1412: hr_utility.trace('ld_run_effective_date = ' || ld_run_effective_date);
1413: hr_utility.trace('ln_ytd_balcall_aaid = ' || ln_ytd_balcall_aaid);
1414: hr_utility.trace('p_ppp_source_action_id = '|| p_ppp_source_action_id);
1415: hr_utility.trace('ld_run_date_earned = ' || ld_run_date_earned);
1408: hr_utility.trace('p_assignment_id = ' || p_assignment_id);
1409: hr_utility.trace('p_xfr_start_date = ' || p_xfr_start_date );
1410: hr_utility.trace('p_xfr_end_date = ' || p_xfr_end_date );
1411: hr_utility.trace('p_curr_pymt_eff_date = ' || p_curr_pymt_eff_date);
1412: hr_utility.trace('ld_run_effective_date = ' || ld_run_effective_date);
1413: hr_utility.trace('ln_ytd_balcall_aaid = ' || ln_ytd_balcall_aaid);
1414: hr_utility.trace('p_ppp_source_action_id = '|| p_ppp_source_action_id);
1415: hr_utility.trace('ld_run_date_earned = ' || ld_run_date_earned);
1416: hr_utility.trace('ld_last_xfr_eff_date = ' || ld_last_xfr_eff_date);
1409: hr_utility.trace('p_xfr_start_date = ' || p_xfr_start_date );
1410: hr_utility.trace('p_xfr_end_date = ' || p_xfr_end_date );
1411: hr_utility.trace('p_curr_pymt_eff_date = ' || p_curr_pymt_eff_date);
1412: hr_utility.trace('ld_run_effective_date = ' || ld_run_effective_date);
1413: hr_utility.trace('ln_ytd_balcall_aaid = ' || ln_ytd_balcall_aaid);
1414: hr_utility.trace('p_ppp_source_action_id = '|| p_ppp_source_action_id);
1415: hr_utility.trace('ld_run_date_earned = ' || ld_run_date_earned);
1416: hr_utility.trace('ld_last_xfr_eff_date = ' || ld_last_xfr_eff_date);
1417: hr_utility.trace('ln_last_xfr_action_id = ' || ln_last_xfr_action_id);
1410: hr_utility.trace('p_xfr_end_date = ' || p_xfr_end_date );
1411: hr_utility.trace('p_curr_pymt_eff_date = ' || p_curr_pymt_eff_date);
1412: hr_utility.trace('ld_run_effective_date = ' || ld_run_effective_date);
1413: hr_utility.trace('ln_ytd_balcall_aaid = ' || ln_ytd_balcall_aaid);
1414: hr_utility.trace('p_ppp_source_action_id = '|| p_ppp_source_action_id);
1415: hr_utility.trace('ld_run_date_earned = ' || ld_run_date_earned);
1416: hr_utility.trace('ld_last_xfr_eff_date = ' || ld_last_xfr_eff_date);
1417: hr_utility.trace('ln_last_xfr_action_id = ' || ln_last_xfr_action_id);
1418:
1411: hr_utility.trace('p_curr_pymt_eff_date = ' || p_curr_pymt_eff_date);
1412: hr_utility.trace('ld_run_effective_date = ' || ld_run_effective_date);
1413: hr_utility.trace('ln_ytd_balcall_aaid = ' || ln_ytd_balcall_aaid);
1414: hr_utility.trace('p_ppp_source_action_id = '|| p_ppp_source_action_id);
1415: hr_utility.trace('ld_run_date_earned = ' || ld_run_date_earned);
1416: hr_utility.trace('ld_last_xfr_eff_date = ' || ld_last_xfr_eff_date);
1417: hr_utility.trace('ln_last_xfr_action_id = ' || ln_last_xfr_action_id);
1418:
1419: ln_step := 9;
1412: hr_utility.trace('ld_run_effective_date = ' || ld_run_effective_date);
1413: hr_utility.trace('ln_ytd_balcall_aaid = ' || ln_ytd_balcall_aaid);
1414: hr_utility.trace('p_ppp_source_action_id = '|| p_ppp_source_action_id);
1415: hr_utility.trace('ld_run_date_earned = ' || ld_run_date_earned);
1416: hr_utility.trace('ld_last_xfr_eff_date = ' || ld_last_xfr_eff_date);
1417: hr_utility.trace('ln_last_xfr_action_id = ' || ln_last_xfr_action_id);
1418:
1419: ln_step := 9;
1420: pay_ac_action_arch.initialization_process;
1413: hr_utility.trace('ln_ytd_balcall_aaid = ' || ln_ytd_balcall_aaid);
1414: hr_utility.trace('p_ppp_source_action_id = '|| p_ppp_source_action_id);
1415: hr_utility.trace('ld_run_date_earned = ' || ld_run_date_earned);
1416: hr_utility.trace('ld_last_xfr_eff_date = ' || ld_last_xfr_eff_date);
1417: hr_utility.trace('ln_last_xfr_action_id = ' || ln_last_xfr_action_id);
1418:
1419: ln_step := 9;
1420: pay_ac_action_arch.initialization_process;
1421:
1442: ****************************************************/
1443: pay_balance_pkg.set_context('TAX_UNIT_ID', p_tax_unit_id);
1444: end if;
1445:
1446: hr_utility.set_location(gv_package || lv_procedure_name, 90);
1447:
1448: /******************************************************************
1449: ** For seperate check cases, the ld_last_xfr_eff_date is never null
1450: ** as the master is always processed before the child actions. The
1453: ******************************************************************/
1454: ln_step := 12;
1455: -- if p_seperate_check_flag = 'N' and p_archive_balance_info <> 'N' then
1456: if ld_last_xfr_eff_date is null then
1457: hr_utility.set_location(gv_package || lv_procedure_name, 100);
1458: ln_step := 13;
1459: pay_ac_action_arch.first_time_process(
1460: p_xfr_action_id => p_xfr_action_id
1461: ,p_assignment_id => p_assignment_id
1538: ,p_run_action_id => p_payment_action_id
1539: ,p_ytd_balcall_aaid => ln_ytd_balcall_aaid
1540: );
1541:
1542: hr_utility.set_location(gv_package || lv_procedure_name, 160);
1543:
1544: -- added for 13029997, call to the procedure to get Third Party Cheque Information.
1545:
1546: open cur_busgrp;
1556: ,p_xfr_action_id => p_xfr_action_id
1557: ,p_business_group_id => ln_business_group_id
1558: );
1559:
1560: hr_utility.set_location(gv_package || lv_procedure_name, 170);
1561:
1562: pay_emp_action_arch.insert_rows_thro_api_process(
1563: p_action_context_id => p_xfr_action_id
1564: ,p_action_context_type=> 'AAP'
1569: );
1570:
1571: EXCEPTION
1572: when others then
1573: hr_utility.set_location(gv_package || lv_procedure_name, 500);
1574: lv_error_message := 'Error at step ' || ln_step ||
1575: ' in ' || gv_package || lv_procedure_name;
1576: hr_utility.trace(lv_error_message || '-' || sqlerrm);
1577:
1572: when others then
1573: hr_utility.set_location(gv_package || lv_procedure_name, 500);
1574: lv_error_message := 'Error at step ' || ln_step ||
1575: ' in ' || gv_package || lv_procedure_name;
1576: hr_utility.trace(lv_error_message || '-' || sqlerrm);
1577:
1578: lv_error_message :=
1579: pay_emp_action_arch.set_error_message(lv_error_message);
1580:
1577:
1578: lv_error_message :=
1579: pay_emp_action_arch.set_error_message(lv_error_message);
1580:
1581: hr_utility.set_message(801,'HR_ELE_ENTRY_FORMULA_HINT');
1582: hr_utility.set_message_token('FORMULA_TEXT', lv_error_message);
1583: hr_utility.raise_error;
1584:
1585: END process_actions;
1578: lv_error_message :=
1579: pay_emp_action_arch.set_error_message(lv_error_message);
1580:
1581: hr_utility.set_message(801,'HR_ELE_ENTRY_FORMULA_HINT');
1582: hr_utility.set_message_token('FORMULA_TEXT', lv_error_message);
1583: hr_utility.raise_error;
1584:
1585: END process_actions;
1586:
1579: pay_emp_action_arch.set_error_message(lv_error_message);
1580:
1581: hr_utility.set_message(801,'HR_ELE_ENTRY_FORMULA_HINT');
1582: hr_utility.set_message_token('FORMULA_TEXT', lv_error_message);
1583: hr_utility.raise_error;
1584:
1585: END process_actions;
1586:
1587:
1707:
1708: BEGIN
1709:
1710: lv_procedure_name := '.create_child_act_for_taxgrp';
1711: hr_utility.set_location('Entering create_child_act_for_taxgrp ', 10 );
1712: hr_utility.trace('GRE p_master_prepay_action_id : ' ||
1713: p_master_prepay_action_id);
1714:
1715: /* Initialising local variables to avoid GSCC warnings */
1708: BEGIN
1709:
1710: lv_procedure_name := '.create_child_act_for_taxgrp';
1711: hr_utility.set_location('Entering create_child_act_for_taxgrp ', 10 );
1712: hr_utility.trace('GRE p_master_prepay_action_id : ' ||
1713: p_master_prepay_action_id);
1714:
1715: /* Initialising local variables to avoid GSCC warnings */
1716: ln_step := 1;
1754: /* Added this to archive Bal Adj's 'B' current amounts with
1755: pre-payments for Tax Group reporting. Bug#3498653 */
1756:
1757: if c_run_master_aa_id%found then
1758: hr_utility.trace('c_run_master_aa_id ran, ln_master_run_aa_id = '||to_char(ln_master_run_aa_id));
1759:
1760: if lv_run_action_type = 'B' then
1761: ln_master_run_aa_id := ln_prepay_asg_act_id;
1762: end if;
1763: end if;
1764: /* End of addition bug#3498653 */
1765: close c_run_master_aa_id;
1766:
1767: hr_utility.trace('TAXGRP ln_master_run_aa_id = ' ||
1768: ln_master_run_aa_id);
1769:
1770: ln_rqp_action_id := ln_prepay_asg_act_id;
1771: ln_ppp_source_action_id := NULL;
1798: ln_ppp_source_action_id := ln_source_action_id; -- Sep Chk
1799:
1800: end if;
1801:
1802: hr_utility.set_location(gv_package || lv_procedure_name, 20);
1803: hr_utility.trace('TAXGRP ln_prepay_asg_act_id : '||ln_prepay_asg_act_id);
1804: hr_utility.trace('TAXGRP ln_assignment_id : ' || ln_assignment_id);
1805: hr_utility.trace('TAXGRP ln_source_action_id : ' || ln_source_action_id);
1806: hr_utility.trace('TAXGRP lv_seperate_check_flag : ' ||
1799:
1800: end if;
1801:
1802: hr_utility.set_location(gv_package || lv_procedure_name, 20);
1803: hr_utility.trace('TAXGRP ln_prepay_asg_act_id : '||ln_prepay_asg_act_id);
1804: hr_utility.trace('TAXGRP ln_assignment_id : ' || ln_assignment_id);
1805: hr_utility.trace('TAXGRP ln_source_action_id : ' || ln_source_action_id);
1806: hr_utility.trace('TAXGRP lv_seperate_check_flag : ' ||
1807: lv_seperate_check_flag);
1800: end if;
1801:
1802: hr_utility.set_location(gv_package || lv_procedure_name, 20);
1803: hr_utility.trace('TAXGRP ln_prepay_asg_act_id : '||ln_prepay_asg_act_id);
1804: hr_utility.trace('TAXGRP ln_assignment_id : ' || ln_assignment_id);
1805: hr_utility.trace('TAXGRP ln_source_action_id : ' || ln_source_action_id);
1806: hr_utility.trace('TAXGRP lv_seperate_check_flag : ' ||
1807: lv_seperate_check_flag);
1808:
1801:
1802: hr_utility.set_location(gv_package || lv_procedure_name, 20);
1803: hr_utility.trace('TAXGRP ln_prepay_asg_act_id : '||ln_prepay_asg_act_id);
1804: hr_utility.trace('TAXGRP ln_assignment_id : ' || ln_assignment_id);
1805: hr_utility.trace('TAXGRP ln_source_action_id : ' || ln_source_action_id);
1806: hr_utility.trace('TAXGRP lv_seperate_check_flag : ' ||
1807: lv_seperate_check_flag);
1808:
1809: ln_step := 2;
1802: hr_utility.set_location(gv_package || lv_procedure_name, 20);
1803: hr_utility.trace('TAXGRP ln_prepay_asg_act_id : '||ln_prepay_asg_act_id);
1804: hr_utility.trace('TAXGRP ln_assignment_id : ' || ln_assignment_id);
1805: hr_utility.trace('TAXGRP ln_source_action_id : ' || ln_source_action_id);
1806: hr_utility.trace('TAXGRP lv_seperate_check_flag : ' ||
1807: lv_seperate_check_flag);
1808:
1809: ln_step := 2;
1810:
1822: select pay_assignment_actions_s.nextval
1823: into ln_child_xfr_action_id
1824: from dual;
1825:
1826: hr_utility.set_location(gv_package || lv_procedure_name, 30);
1827:
1828: -- insert into pay_assignment_actions.
1829:
1830: ln_step := 3;
1837: null,
1838: 'C',
1839: p_master_xfr_action_id);
1840:
1841: hr_utility.set_location(gv_package || lv_procedure_name, 40);
1842:
1843: hr_utility.trace('GRE Locking Action = ' || ln_child_xfr_action_id);
1844: hr_utility.trace('GRE Locked Action = ' || ln_prepay_asg_act_id);
1845:
1839: p_master_xfr_action_id);
1840:
1841: hr_utility.set_location(gv_package || lv_procedure_name, 40);
1842:
1843: hr_utility.trace('GRE Locking Action = ' || ln_child_xfr_action_id);
1844: hr_utility.trace('GRE Locked Action = ' || ln_prepay_asg_act_id);
1845:
1846: -- insert an interlock to this action
1847:
1840:
1841: hr_utility.set_location(gv_package || lv_procedure_name, 40);
1842:
1843: hr_utility.trace('GRE Locking Action = ' || ln_child_xfr_action_id);
1844: hr_utility.trace('GRE Locked Action = ' || ln_prepay_asg_act_id);
1845:
1846: -- insert an interlock to this action
1847:
1848: ln_step := 4;
1863: update pay_assignment_actions
1864: set serial_number = lv_serial_number
1865: where assignment_action_id = ln_child_xfr_action_id;
1866:
1867: hr_utility.trace('Processing Child action for Master for Multi GRE ' ||
1868: p_master_xfr_action_id);
1869:
1870:
1871: end if;
1869:
1870:
1871: end if;
1872:
1873: hr_utility.trace('GRE ln_master_run_aa_id = ' ||
1874: ln_master_run_aa_id);
1875: hr_utility.trace('GRE B4 Calling Process Actions ln_prepay_asg_act_id : '
1876: || ln_prepay_asg_act_id);
1877:
1871: end if;
1872:
1873: hr_utility.trace('GRE ln_master_run_aa_id = ' ||
1874: ln_master_run_aa_id);
1875: hr_utility.trace('GRE B4 Calling Process Actions ln_prepay_asg_act_id : '
1876: || ln_prepay_asg_act_id);
1877:
1878: /****************************************************************
1879: ** Archive the data for the Child Action
1878: /****************************************************************
1879: ** Archive the data for the Child Action
1880: ****************************************************************/
1881:
1882: hr_utility.set_location(gv_package || lv_procedure_name, 50);
1883: ln_step := 7;
1884:
1885: process_actions(p_xfr_payroll_action_id => p_xfr_payroll_action_id
1886: ,p_xfr_action_id => ln_child_xfr_action_id
1904: end loop; -- c_payment_info
1905:
1906: close c_payment_info;
1907:
1908: hr_utility.set_location('Leaving create_child_act_for_taxgrp ',60 );
1909:
1910: EXCEPTION
1911: when others then
1912: hr_utility.set_location(gv_package || lv_procedure_name, 500);
1908: hr_utility.set_location('Leaving create_child_act_for_taxgrp ',60 );
1909:
1910: EXCEPTION
1911: when others then
1912: hr_utility.set_location(gv_package || lv_procedure_name, 500);
1913: lv_error_message := 'Error at step ' || ln_step ||
1914: ' in ' || gv_package || lv_procedure_name;
1915: hr_utility.trace(lv_error_message || '-' || sqlerrm);
1916:
1911: when others then
1912: hr_utility.set_location(gv_package || lv_procedure_name, 500);
1913: lv_error_message := 'Error at step ' || ln_step ||
1914: ' in ' || gv_package || lv_procedure_name;
1915: hr_utility.trace(lv_error_message || '-' || sqlerrm);
1916:
1917: lv_error_message :=
1918: pay_emp_action_arch.set_error_message(lv_error_message);
1919:
1916:
1917: lv_error_message :=
1918: pay_emp_action_arch.set_error_message(lv_error_message);
1919:
1920: hr_utility.set_message(801,'HR_ELE_ENTRY_FORMULA_HINT');
1921: hr_utility.set_message_token('FORMULA_TEXT', lv_error_message);
1922: hr_utility.raise_error;
1923:
1924:
1917: lv_error_message :=
1918: pay_emp_action_arch.set_error_message(lv_error_message);
1919:
1920: hr_utility.set_message(801,'HR_ELE_ENTRY_FORMULA_HINT');
1921: hr_utility.set_message_token('FORMULA_TEXT', lv_error_message);
1922: hr_utility.raise_error;
1923:
1924:
1925: END create_child_act_for_taxgrp;
1918: pay_emp_action_arch.set_error_message(lv_error_message);
1919:
1920: hr_utility.set_message(801,'HR_ELE_ENTRY_FORMULA_HINT');
1921: hr_utility.set_message_token('FORMULA_TEXT', lv_error_message);
1922: hr_utility.raise_error;
1923:
1924:
1925: END create_child_act_for_taxgrp;
1926:
2041: lv_primary_flag VARCHAR2(2);/*Bug 9600575*/
2042:
2043: BEGIN
2044:
2045: -- hr_utility.trace_on (null, 'PYARCH');
2046: lv_procedure_name := '.create_child_actions_for_gre';
2047: hr_utility.set_location('Entering create_child_actions_for_gre ', 10 );
2048: hr_utility.trace('GRE p_master_prepay_action_id : ' ||
2049: p_master_prepay_action_id);
2043: BEGIN
2044:
2045: -- hr_utility.trace_on (null, 'PYARCH');
2046: lv_procedure_name := '.create_child_actions_for_gre';
2047: hr_utility.set_location('Entering create_child_actions_for_gre ', 10 );
2048: hr_utility.trace('GRE p_master_prepay_action_id : ' ||
2049: p_master_prepay_action_id);
2050:
2051: ln_step := 1;
2044:
2045: -- hr_utility.trace_on (null, 'PYARCH');
2046: lv_procedure_name := '.create_child_actions_for_gre';
2047: hr_utility.set_location('Entering create_child_actions_for_gre ', 10 );
2048: hr_utility.trace('GRE p_master_prepay_action_id : ' ||
2049: p_master_prepay_action_id);
2050:
2051: ln_step := 1;
2052: /* Initialising local variables to avoid GSCC warnings */
2132: ,ln_assignment_id
2133: ,ln_tax_unit_id);
2134: fetch c_run_aa_id into ln_run_aa_id
2135: ,ln_run_source_aa_id;
2136: hr_utility.trace('GRE ln_run_aa_id = ' || ln_run_aa_id);
2137: hr_utility.trace('GRE ln_run_source_aa_id = ' || ln_run_source_aa_id); /* Balance Adjustments source_action_id is null, even if we
2138: correct the c_run_aa_id cursor, it will pass the balance
2139: adjustment run asg_act_id for balance calls to archive.
2140: But ASG_PAYMENTS will not return any value with balance
2133: ,ln_tax_unit_id);
2134: fetch c_run_aa_id into ln_run_aa_id
2135: ,ln_run_source_aa_id;
2136: hr_utility.trace('GRE ln_run_aa_id = ' || ln_run_aa_id);
2137: hr_utility.trace('GRE ln_run_source_aa_id = ' || ln_run_source_aa_id); /* Balance Adjustments source_action_id is null, even if we
2138: correct the c_run_aa_id cursor, it will pass the balance
2139: adjustment run asg_act_id for balance calls to archive.
2140: But ASG_PAYMENTS will not return any value with balance
2141: adjustments run asg_act_id, we have to pass the balance
2145: will be assigned the ln_prepay_asg_act_id that is nothing
2146: but balance adjustment pre-payment asg_act_id. Bug#3498653 */
2147:
2148: if c_run_aa_id%NOTFOUND then
2149: hr_utility.trace('Procedure name: '||lv_procedure_name);
2150: hr_utility.trace('c_run_aa_id%NOT FOUND satisfied with action type B');
2151: ln_master_run_aa_id := ln_prepay_asg_act_id;
2152: hr_utility.trace('ln_master_run_aa_id :'||to_char(ln_master_run_aa_id));
2153: else
2146: but balance adjustment pre-payment asg_act_id. Bug#3498653 */
2147:
2148: if c_run_aa_id%NOTFOUND then
2149: hr_utility.trace('Procedure name: '||lv_procedure_name);
2150: hr_utility.trace('c_run_aa_id%NOT FOUND satisfied with action type B');
2151: ln_master_run_aa_id := ln_prepay_asg_act_id;
2152: hr_utility.trace('ln_master_run_aa_id :'||to_char(ln_master_run_aa_id));
2153: else
2154: if pay_ac_action_arch.gv_multi_gre_payment = 'N' then
2148: if c_run_aa_id%NOTFOUND then
2149: hr_utility.trace('Procedure name: '||lv_procedure_name);
2150: hr_utility.trace('c_run_aa_id%NOT FOUND satisfied with action type B');
2151: ln_master_run_aa_id := ln_prepay_asg_act_id;
2152: hr_utility.trace('ln_master_run_aa_id :'||to_char(ln_master_run_aa_id));
2153: else
2154: if pay_ac_action_arch.gv_multi_gre_payment = 'N' then
2155: hr_utility.trace('Procedure name: '||lv_procedure_name);
2156: hr_utility.trace('gv_multi_gre_payment = N satisfied');
2151: ln_master_run_aa_id := ln_prepay_asg_act_id;
2152: hr_utility.trace('ln_master_run_aa_id :'||to_char(ln_master_run_aa_id));
2153: else
2154: if pay_ac_action_arch.gv_multi_gre_payment = 'N' then
2155: hr_utility.trace('Procedure name: '||lv_procedure_name);
2156: hr_utility.trace('gv_multi_gre_payment = N satisfied');
2157:
2158: ln_master_run_aa_id := ln_run_aa_id; -- Sub Master for Multi GRE
2159: hr_utility.trace('ln_master_run_aa_id :'||to_char(ln_master_run_aa_id));
2152: hr_utility.trace('ln_master_run_aa_id :'||to_char(ln_master_run_aa_id));
2153: else
2154: if pay_ac_action_arch.gv_multi_gre_payment = 'N' then
2155: hr_utility.trace('Procedure name: '||lv_procedure_name);
2156: hr_utility.trace('gv_multi_gre_payment = N satisfied');
2157:
2158: ln_master_run_aa_id := ln_run_aa_id; -- Sub Master for Multi GRE
2159: hr_utility.trace('ln_master_run_aa_id :'||to_char(ln_master_run_aa_id));
2160: else
2155: hr_utility.trace('Procedure name: '||lv_procedure_name);
2156: hr_utility.trace('gv_multi_gre_payment = N satisfied');
2157:
2158: ln_master_run_aa_id := ln_run_aa_id; -- Sub Master for Multi GRE
2159: hr_utility.trace('ln_master_run_aa_id :'||to_char(ln_master_run_aa_id));
2160: else
2161: hr_utility.trace('gv_multi_gre_payment = N did not satisfied');
2162: ln_master_run_aa_id := ln_run_source_aa_id; -- Main Master
2163: hr_utility.trace('ln_master_run_aa_id :'||to_char(ln_master_run_aa_id));
2157:
2158: ln_master_run_aa_id := ln_run_aa_id; -- Sub Master for Multi GRE
2159: hr_utility.trace('ln_master_run_aa_id :'||to_char(ln_master_run_aa_id));
2160: else
2161: hr_utility.trace('gv_multi_gre_payment = N did not satisfied');
2162: ln_master_run_aa_id := ln_run_source_aa_id; -- Main Master
2163: hr_utility.trace('ln_master_run_aa_id :'||to_char(ln_master_run_aa_id));
2164: end if;
2165: end if; -- c_run_aa_id%NOTFOUND
2159: hr_utility.trace('ln_master_run_aa_id :'||to_char(ln_master_run_aa_id));
2160: else
2161: hr_utility.trace('gv_multi_gre_payment = N did not satisfied');
2162: ln_master_run_aa_id := ln_run_source_aa_id; -- Main Master
2163: hr_utility.trace('ln_master_run_aa_id :'||to_char(ln_master_run_aa_id));
2164: end if;
2165: end if; -- c_run_aa_id%NOTFOUND
2166: close c_run_aa_id;
2167:
2165: end if; -- c_run_aa_id%NOTFOUND
2166: close c_run_aa_id;
2167:
2168: /* Old code before bug#3498653 fix
2169: hr_utility.trace('GRE ln_run_aa_id = ' || ln_run_aa_id);
2170: hr_utility.trace('GRE ln_run_source_aa_id = ' || ln_run_source_aa_id);
2171:
2172: if pay_ac_action_arch.gv_multi_gre_payment = 'N' then
2173: ln_master_run_aa_id := ln_run_aa_id; -- Sub Master for Multi GRE
2166: close c_run_aa_id;
2167:
2168: /* Old code before bug#3498653 fix
2169: hr_utility.trace('GRE ln_run_aa_id = ' || ln_run_aa_id);
2170: hr_utility.trace('GRE ln_run_source_aa_id = ' || ln_run_source_aa_id);
2171:
2172: if pay_ac_action_arch.gv_multi_gre_payment = 'N' then
2173: ln_master_run_aa_id := ln_run_aa_id; -- Sub Master for Multi GRE
2174: else
2185: ** zero) if yes then create assignment action and archive
2186: ** otherwise don't create assignment action and don't
2187: ** archive too.
2188: ****************************************************************/
2189: hr_utility.trace('GRE gn_gross_earn_def_bal_id : ' || gn_gross_earn_def_bal_id);
2190: hr_utility.trace('GRE gn_payments_def_bal_id : ' || gn_payments_def_bal_id);
2191:
2192: if gn_gross_earn_def_bal_id + gn_payments_def_bal_id <> 0 then
2193: open c_all_runs(p_master_prepay_action_id,
2186: ** otherwise don't create assignment action and don't
2187: ** archive too.
2188: ****************************************************************/
2189: hr_utility.trace('GRE gn_gross_earn_def_bal_id : ' || gn_gross_earn_def_bal_id);
2190: hr_utility.trace('GRE gn_payments_def_bal_id : ' || gn_payments_def_bal_id);
2191:
2192: if gn_gross_earn_def_bal_id + gn_payments_def_bal_id <> 0 then
2193: open c_all_runs(p_master_prepay_action_id,
2194: ln_assignment_id,
2208: ** For Non-payroll Payments element is processed
2209: ** alone, the gross earning balance returns zero.
2210: ** In this case check payment.
2211: **************************************************/
2212: hr_utility.trace('GRE ln_gross_earn_bal using gn_gross_earn_def_bal_id: ' || ln_gross_earn_bal);
2213:
2214:
2215: if ln_gross_earn_bal = 0 then
2216:
2216:
2217: ln_gross_earn_bal := nvl(pay_balance_pkg.get_value(
2218: gn_payments_def_bal_id,
2219: ln_assignment_action_id),0);
2220: hr_utility.trace('GRE ln_gross_earn_bal using gn_payments_def_bal_id: ' || ln_gross_earn_bal);
2221:
2222: end if;
2223:
2224: if ln_gross_earn_bal <> 0 then
2270: lv_archive_balance_info := 'Y';
2271: end if;
2272: /* Bug 3960157 */
2273:
2274: hr_utility.set_location(gv_package || lv_procedure_name, 20);
2275: hr_utility.trace('GRE ln_prepay_asg_act_id : ' || ln_prepay_asg_act_id);
2276: hr_utility.trace('GRE ln_tax_unit_id : ' || ln_tax_unit_id);
2277: hr_utility.trace('GRE ln_assignment_id : ' || ln_assignment_id);
2278: hr_utility.trace('GRE ln_source_action_id : ' || ln_source_action_id);
2271: end if;
2272: /* Bug 3960157 */
2273:
2274: hr_utility.set_location(gv_package || lv_procedure_name, 20);
2275: hr_utility.trace('GRE ln_prepay_asg_act_id : ' || ln_prepay_asg_act_id);
2276: hr_utility.trace('GRE ln_tax_unit_id : ' || ln_tax_unit_id);
2277: hr_utility.trace('GRE ln_assignment_id : ' || ln_assignment_id);
2278: hr_utility.trace('GRE ln_source_action_id : ' || ln_source_action_id);
2279: hr_utility.trace('GRE lv_seperate_check_flag : ' || lv_seperate_check_flag);
2272: /* Bug 3960157 */
2273:
2274: hr_utility.set_location(gv_package || lv_procedure_name, 20);
2275: hr_utility.trace('GRE ln_prepay_asg_act_id : ' || ln_prepay_asg_act_id);
2276: hr_utility.trace('GRE ln_tax_unit_id : ' || ln_tax_unit_id);
2277: hr_utility.trace('GRE ln_assignment_id : ' || ln_assignment_id);
2278: hr_utility.trace('GRE ln_source_action_id : ' || ln_source_action_id);
2279: hr_utility.trace('GRE lv_seperate_check_flag : ' || lv_seperate_check_flag);
2280: hr_utility.trace('GRE ln_gross_earn_bal : ' || ln_gross_earn_bal);
2273:
2274: hr_utility.set_location(gv_package || lv_procedure_name, 20);
2275: hr_utility.trace('GRE ln_prepay_asg_act_id : ' || ln_prepay_asg_act_id);
2276: hr_utility.trace('GRE ln_tax_unit_id : ' || ln_tax_unit_id);
2277: hr_utility.trace('GRE ln_assignment_id : ' || ln_assignment_id);
2278: hr_utility.trace('GRE ln_source_action_id : ' || ln_source_action_id);
2279: hr_utility.trace('GRE lv_seperate_check_flag : ' || lv_seperate_check_flag);
2280: hr_utility.trace('GRE ln_gross_earn_bal : ' || ln_gross_earn_bal);
2281: hr_utility.trace('GRE lv_archive_balance_info : ' || lv_archive_balance_info);
2274: hr_utility.set_location(gv_package || lv_procedure_name, 20);
2275: hr_utility.trace('GRE ln_prepay_asg_act_id : ' || ln_prepay_asg_act_id);
2276: hr_utility.trace('GRE ln_tax_unit_id : ' || ln_tax_unit_id);
2277: hr_utility.trace('GRE ln_assignment_id : ' || ln_assignment_id);
2278: hr_utility.trace('GRE ln_source_action_id : ' || ln_source_action_id);
2279: hr_utility.trace('GRE lv_seperate_check_flag : ' || lv_seperate_check_flag);
2280: hr_utility.trace('GRE ln_gross_earn_bal : ' || ln_gross_earn_bal);
2281: hr_utility.trace('GRE lv_archive_balance_info : ' || lv_archive_balance_info);
2282: ln_step := 2;
2275: hr_utility.trace('GRE ln_prepay_asg_act_id : ' || ln_prepay_asg_act_id);
2276: hr_utility.trace('GRE ln_tax_unit_id : ' || ln_tax_unit_id);
2277: hr_utility.trace('GRE ln_assignment_id : ' || ln_assignment_id);
2278: hr_utility.trace('GRE ln_source_action_id : ' || ln_source_action_id);
2279: hr_utility.trace('GRE lv_seperate_check_flag : ' || lv_seperate_check_flag);
2280: hr_utility.trace('GRE ln_gross_earn_bal : ' || ln_gross_earn_bal);
2281: hr_utility.trace('GRE lv_archive_balance_info : ' || lv_archive_balance_info);
2282: ln_step := 2;
2283:
2276: hr_utility.trace('GRE ln_tax_unit_id : ' || ln_tax_unit_id);
2277: hr_utility.trace('GRE ln_assignment_id : ' || ln_assignment_id);
2278: hr_utility.trace('GRE ln_source_action_id : ' || ln_source_action_id);
2279: hr_utility.trace('GRE lv_seperate_check_flag : ' || lv_seperate_check_flag);
2280: hr_utility.trace('GRE ln_gross_earn_bal : ' || ln_gross_earn_bal);
2281: hr_utility.trace('GRE lv_archive_balance_info : ' || lv_archive_balance_info);
2282: ln_step := 2;
2283:
2284: if ln_gross_earn_bal <> 0 then
2277: hr_utility.trace('GRE ln_assignment_id : ' || ln_assignment_id);
2278: hr_utility.trace('GRE ln_source_action_id : ' || ln_source_action_id);
2279: hr_utility.trace('GRE lv_seperate_check_flag : ' || lv_seperate_check_flag);
2280: hr_utility.trace('GRE ln_gross_earn_bal : ' || ln_gross_earn_bal);
2281: hr_utility.trace('GRE lv_archive_balance_info : ' || lv_archive_balance_info);
2282: ln_step := 2;
2283:
2284: if ln_gross_earn_bal <> 0 then
2285:
2298: select pay_assignment_actions_s.nextval
2299: into ln_child_xfr_action_id
2300: from dual;
2301:
2302: hr_utility.set_location(gv_package || lv_procedure_name, 30);
2303:
2304: -- insert into pay_assignment_actions.
2305:
2306: ln_step := 3;
2313: null,
2314: 'C',
2315: p_master_xfr_action_id);
2316:
2317: hr_utility.set_location(gv_package || lv_procedure_name, 40);
2318:
2319: hr_utility.trace('GRE Locking Action = ' || ln_child_xfr_action_id);
2320: hr_utility.trace('GRE Locked Action = ' || ln_prepay_asg_act_id);
2321:
2315: p_master_xfr_action_id);
2316:
2317: hr_utility.set_location(gv_package || lv_procedure_name, 40);
2318:
2319: hr_utility.trace('GRE Locking Action = ' || ln_child_xfr_action_id);
2320: hr_utility.trace('GRE Locked Action = ' || ln_prepay_asg_act_id);
2321:
2322: -- insert an interlock to this action
2323:
2316:
2317: hr_utility.set_location(gv_package || lv_procedure_name, 40);
2318:
2319: hr_utility.trace('GRE Locking Action = ' || ln_child_xfr_action_id);
2320: hr_utility.trace('GRE Locked Action = ' || ln_prepay_asg_act_id);
2321:
2322: -- insert an interlock to this action
2323:
2324: ln_step := 4;
2339: update pay_assignment_actions
2340: set serial_number = lv_serial_number
2341: where assignment_action_id = ln_child_xfr_action_id;
2342:
2343: hr_utility.trace('Processing Child action for Master for Multi GRE ' ||
2344: p_master_xfr_action_id);
2345:
2346:
2347: end if;
2345:
2346:
2347: end if;
2348:
2349: hr_utility.trace('GRE ln_master_run_aa_id = ' ||
2350: ln_master_run_aa_id);
2351: hr_utility.trace('GRE B4 Calling Process Actions ln_prepay_asg_act_id : '
2352: || ln_prepay_asg_act_id);
2353:
2347: end if;
2348:
2349: hr_utility.trace('GRE ln_master_run_aa_id = ' ||
2350: ln_master_run_aa_id);
2351: hr_utility.trace('GRE B4 Calling Process Actions ln_prepay_asg_act_id : '
2352: || ln_prepay_asg_act_id);
2353:
2354: /****************************************************************
2355: ** Archive the data for the Child Action
2354: /****************************************************************
2355: ** Archive the data for the Child Action
2356: ****************************************************************/
2357:
2358: hr_utility.set_location(gv_package || lv_procedure_name, 50);
2359: ln_step := 7;
2360: end if;
2361:
2362:
2390: end loop; -- c_payment_info
2391:
2392: close c_payment_info;
2393:
2394: hr_utility.set_location('Leaving create_child_actions_for_gre ',60 );
2395:
2396: EXCEPTION
2397: when others then
2398: hr_utility.set_location(gv_package || lv_procedure_name, 500);
2394: hr_utility.set_location('Leaving create_child_actions_for_gre ',60 );
2395:
2396: EXCEPTION
2397: when others then
2398: hr_utility.set_location(gv_package || lv_procedure_name, 500);
2399: lv_error_message := 'Error at step ' || ln_step ||
2400: ' in ' || gv_package || lv_procedure_name;
2401: hr_utility.trace(lv_error_message || '-' || sqlerrm);
2402:
2397: when others then
2398: hr_utility.set_location(gv_package || lv_procedure_name, 500);
2399: lv_error_message := 'Error at step ' || ln_step ||
2400: ' in ' || gv_package || lv_procedure_name;
2401: hr_utility.trace(lv_error_message || '-' || sqlerrm);
2402:
2403: lv_error_message :=
2404: pay_emp_action_arch.set_error_message(lv_error_message);
2405:
2402:
2403: lv_error_message :=
2404: pay_emp_action_arch.set_error_message(lv_error_message);
2405:
2406: hr_utility.set_message(801,'HR_ELE_ENTRY_FORMULA_HINT');
2407: hr_utility.set_message_token('FORMULA_TEXT', lv_error_message);
2408: hr_utility.raise_error;
2409:
2410:
2403: lv_error_message :=
2404: pay_emp_action_arch.set_error_message(lv_error_message);
2405:
2406: hr_utility.set_message(801,'HR_ELE_ENTRY_FORMULA_HINT');
2407: hr_utility.set_message_token('FORMULA_TEXT', lv_error_message);
2408: hr_utility.raise_error;
2409:
2410:
2411: END create_child_actions_for_gre;
2404: pay_emp_action_arch.set_error_message(lv_error_message);
2405:
2406: hr_utility.set_message(801,'HR_ELE_ENTRY_FORMULA_HINT');
2407: hr_utility.set_message_token('FORMULA_TEXT', lv_error_message);
2408: hr_utility.raise_error;
2409:
2410:
2411: END create_child_actions_for_gre;
2412:
2504:
2505: BEGIN
2506:
2507: lv_procedure_name := '.create_chld_act_for_multi_gre';
2508: hr_utility.set_location('Entering create_chld_act_for_multi_gre ', 10 );
2509: hr_utility.trace('MG p_master_prepay_action_id : ' ||
2510: p_master_prepay_action_id);
2511:
2512: ln_step := 1;
2505: BEGIN
2506:
2507: lv_procedure_name := '.create_chld_act_for_multi_gre';
2508: hr_utility.set_location('Entering create_chld_act_for_multi_gre ', 10 );
2509: hr_utility.trace('MG p_master_prepay_action_id : ' ||
2510: p_master_prepay_action_id);
2511:
2512: ln_step := 1;
2513: ln_child_aa_count := 0;
2537:
2538: ln_child_aa_count := ln_child_aa_count + 1;
2539:
2540: ln_step := 2;
2541: hr_utility.set_location(gv_package || lv_procedure_name, 20);
2542:
2543: if ln_tax_unit_id is null then
2544: open c_tax_unit(ln_pp_asg_act_id);
2545: fetch c_tax_unit into ln_tax_unit_id;
2545: fetch c_tax_unit into ln_tax_unit_id;
2546: close c_tax_unit;
2547: end if;
2548:
2549: hr_utility.trace('MG ln_pp_asg_act_id : ' || ln_pp_asg_act_id);
2550: hr_utility.trace('MG ln_tax_unit_id : ' || ln_tax_unit_id);
2551:
2552: select pay_assignment_actions_s.nextval
2553: into ln_child_xfr_action_id
2546: close c_tax_unit;
2547: end if;
2548:
2549: hr_utility.trace('MG ln_pp_asg_act_id : ' || ln_pp_asg_act_id);
2550: hr_utility.trace('MG ln_tax_unit_id : ' || ln_tax_unit_id);
2551:
2552: select pay_assignment_actions_s.nextval
2553: into ln_child_xfr_action_id
2554: from dual;
2552: select pay_assignment_actions_s.nextval
2553: into ln_child_xfr_action_id
2554: from dual;
2555:
2556: hr_utility.set_location(gv_package || lv_procedure_name, 30);
2557:
2558: -- insert into pay_assignment_actions.
2559:
2560: ln_step := 3;
2567: null,
2568: 'C',
2569: p_master_xfr_action_id);
2570:
2571: hr_utility.set_location(gv_package || lv_procedure_name, 40);
2572:
2573: hr_utility.trace('MG Locking Action = ' || ln_child_xfr_action_id);
2574: hr_utility.trace('MG Locked Action = ' || ln_pp_asg_act_id);
2575:
2569: p_master_xfr_action_id);
2570:
2571: hr_utility.set_location(gv_package || lv_procedure_name, 40);
2572:
2573: hr_utility.trace('MG Locking Action = ' || ln_child_xfr_action_id);
2574: hr_utility.trace('MG Locked Action = ' || ln_pp_asg_act_id);
2575:
2576: -- insert an interlock to this action
2577:
2570:
2571: hr_utility.set_location(gv_package || lv_procedure_name, 40);
2572:
2573: hr_utility.trace('MG Locking Action = ' || ln_child_xfr_action_id);
2574: hr_utility.trace('MG Locked Action = ' || ln_pp_asg_act_id);
2575:
2576: -- insert an interlock to this action
2577:
2578: ln_step := 4;
2587: update pay_assignment_actions
2588: set serial_number = lv_serial_number
2589: where assignment_action_id = ln_child_xfr_action_id;
2590:
2591: hr_utility.trace('Processing Child action for Master for Multi GRE ' ||
2592: p_master_xfr_action_id);
2593:
2594: ln_step := 6;
2595:
2597: fetch c_run_aa_id into ln_run_aa_id
2598: ,ln_source_aa_id;
2599: close c_run_aa_id;
2600:
2601: hr_utility.trace('MG ln_run_aa_id = ' || ln_run_aa_id);
2602: hr_utility.trace('MG ln_source_aa_id = ' || ln_source_aa_id);
2603:
2604: if pay_ac_action_arch.gv_multi_gre_payment = 'N' then
2605: ln_master_run_aa_id := ln_run_aa_id;
2598: ,ln_source_aa_id;
2599: close c_run_aa_id;
2600:
2601: hr_utility.trace('MG ln_run_aa_id = ' || ln_run_aa_id);
2602: hr_utility.trace('MG ln_source_aa_id = ' || ln_source_aa_id);
2603:
2604: if pay_ac_action_arch.gv_multi_gre_payment = 'N' then
2605: ln_master_run_aa_id := ln_run_aa_id;
2606: else
2610: --ln_sub_master_run_aa_id := ln_run_aa_id;
2611:
2612: --ln_master_run_aa_id := ln_pp_asg_act_id;
2613:
2614: hr_utility.trace('MG ln_master_run_aa_id = ' ||
2615: ln_master_run_aa_id);
2616:
2617: /****************************************************************
2618: ** Archive the data for the Child Action
2617: /****************************************************************
2618: ** Archive the data for the Child Action
2619: ****************************************************************/
2620:
2621: hr_utility.set_location(gv_package || lv_procedure_name, 50);
2622: ln_step := 7;
2623:
2624: process_actions(p_xfr_payroll_action_id => p_xfr_payroll_action_id
2625: ,p_xfr_action_id => ln_child_xfr_action_id
2640: end loop;
2641:
2642: close c_prepay_act;
2643:
2644: hr_utility.set_location('Leaving create_chld_act_for_multi_gre ',60 );
2645:
2646: EXCEPTION
2647: when others then
2648: hr_utility.set_location(gv_package || lv_procedure_name, 500);
2644: hr_utility.set_location('Leaving create_chld_act_for_multi_gre ',60 );
2645:
2646: EXCEPTION
2647: when others then
2648: hr_utility.set_location(gv_package || lv_procedure_name, 500);
2649: lv_error_message := 'Error at step ' || ln_step ||
2650: ' in ' || gv_package || lv_procedure_name;
2651: hr_utility.trace(lv_error_message || '-' || sqlerrm);
2652:
2647: when others then
2648: hr_utility.set_location(gv_package || lv_procedure_name, 500);
2649: lv_error_message := 'Error at step ' || ln_step ||
2650: ' in ' || gv_package || lv_procedure_name;
2651: hr_utility.trace(lv_error_message || '-' || sqlerrm);
2652:
2653: lv_error_message :=
2654: pay_emp_action_arch.set_error_message(lv_error_message);
2655:
2652:
2653: lv_error_message :=
2654: pay_emp_action_arch.set_error_message(lv_error_message);
2655:
2656: hr_utility.set_message(801,'HR_ELE_ENTRY_FORMULA_HINT');
2657: hr_utility.set_message_token('FORMULA_TEXT', lv_error_message);
2658: hr_utility.raise_error;
2659:
2660: END create_chld_act_for_multi_gre;
2653: lv_error_message :=
2654: pay_emp_action_arch.set_error_message(lv_error_message);
2655:
2656: hr_utility.set_message(801,'HR_ELE_ENTRY_FORMULA_HINT');
2657: hr_utility.set_message_token('FORMULA_TEXT', lv_error_message);
2658: hr_utility.raise_error;
2659:
2660: END create_chld_act_for_multi_gre;
2661:
2654: pay_emp_action_arch.set_error_message(lv_error_message);
2655:
2656: hr_utility.set_message(801,'HR_ELE_ENTRY_FORMULA_HINT');
2657: hr_utility.set_message_token('FORMULA_TEXT', lv_error_message);
2658: hr_utility.raise_error;
2659:
2660: END create_chld_act_for_multi_gre;
2661:
2662: /************************************************************
2773: ln_step NUMBER;
2774:
2775: BEGIN
2776: lv_procedure_name := '.create_child_actions';
2777: hr_utility.set_location('Entering create_child_actions ', 10 );
2778:
2779: ln_step := 1;
2780: -- Initialising local variables to avoid GSCC warnings
2781: ln_assignment_id := 0;
2787: ,p_end_date => ld_end_date
2788: ,p_business_group_id => ln_business_group_id
2789: ,p_cons_set_id => ln_cons_set_id
2790: ,p_payroll_id => ln_payroll_id);
2791: hr_utility.set_location(gv_package || lv_procedure_name, 20);
2792:
2793: ln_step := 2;
2794: pay_emp_action_arch.gv_multi_payroll_pymt
2795: := pay_emp_action_arch.get_multi_assignment_flag(
2795: := pay_emp_action_arch.get_multi_assignment_flag(
2796: p_payroll_id => ln_payroll_id
2797: ,p_effective_date => ld_end_date);
2798:
2799: hr_utility.trace('pay_emp_action_arch.gv_multi_payroll_pymt = ' ||
2800: pay_emp_action_arch.gv_multi_payroll_pymt);
2801: ln_step := 3;
2802: if ((pay_emp_action_arch.gv_multi_payroll_pymt = 'N' or
2803: pay_emp_action_arch.gv_multi_payroll_pymt is null) and
2802: if ((pay_emp_action_arch.gv_multi_payroll_pymt = 'N' or
2803: pay_emp_action_arch.gv_multi_payroll_pymt is null) and
2804: pay_ac_action_arch.gv_multi_gre_payment = 'Y' ) then
2805:
2806: hr_utility.set_location(gv_package || lv_procedure_name, 30);
2807: hr_utility.trace('ln_master_prepay_action_id ' ||
2808: p_master_prepay_action_id);
2809: ln_step := 4;
2810: open c_asg_child_action(p_master_prepay_action_id
2803: pay_emp_action_arch.gv_multi_payroll_pymt is null) and
2804: pay_ac_action_arch.gv_multi_gre_payment = 'Y' ) then
2805:
2806: hr_utility.set_location(gv_package || lv_procedure_name, 30);
2807: hr_utility.trace('ln_master_prepay_action_id ' ||
2808: p_master_prepay_action_id);
2809: ln_step := 4;
2810: open c_asg_child_action(p_master_prepay_action_id
2811: ,p_curr_pymt_eff_date);
2809: ln_step := 4;
2810: open c_asg_child_action(p_master_prepay_action_id
2811: ,p_curr_pymt_eff_date);
2812: else
2813: hr_utility.set_location(gv_package || lv_procedure_name, 40);
2814: ln_step := 5;
2815: open c_multi_asg_child_action(
2816: p_master_prepay_action_id
2817: ,ln_cons_set_id
2820: ,ld_start_date
2821: ,ld_end_date
2822: ,p_curr_pymt_eff_date);
2823: end if;
2824: hr_utility.set_location(gv_package || lv_procedure_name, 50);
2825:
2826: ln_step := 6;
2827: loop
2828: if ((pay_emp_action_arch.gv_multi_payroll_pymt = 'N' or
2828: if ((pay_emp_action_arch.gv_multi_payroll_pymt = 'N' or
2829: pay_emp_action_arch.gv_multi_payroll_pymt is null) and
2830: pay_ac_action_arch.gv_multi_gre_payment = 'Y' ) then
2831:
2832: hr_utility.set_location(gv_package || lv_procedure_name, 60);
2833: ln_step := 7;
2834: fetch c_asg_child_action into ln_assignment_id,
2835: ln_tax_unit_id,
2836: ln_asg_action_id,
2837: ln_run_action_id;
2838: exit when c_asg_child_action%notfound;
2839: else
2840: ln_step := 8;
2841: hr_utility.set_location(gv_package || lv_procedure_name, 70);
2842: fetch c_multi_asg_child_action into ln_assignment_id,
2843: ln_tax_unit_id,
2844: ln_asg_action_id,
2845: ln_run_action_id;
2844: ln_asg_action_id,
2845: ln_run_action_id;
2846: exit when c_multi_asg_child_action%notfound;
2847: end if;
2848: hr_utility.set_location(gv_package || lv_procedure_name, 80);
2849:
2850: if ln_tax_unit_id is null then
2851: ln_step := 81;
2852: open c_tax_unit(ln_run_action_id);
2859: select pay_assignment_actions_s.nextval
2860: into ln_child_xfr_action_id
2861: from dual;
2862:
2863: hr_utility.set_location(gv_package || lv_procedure_name, 90);
2864: -- insert into pay_assignment_actions.
2865: ln_step := 10;
2866: hr_nonrun_asact.insact(ln_child_xfr_action_id,
2867: ln_assignment_id,
2870: ln_tax_unit_id,
2871: null,
2872: 'C',
2873: p_master_xfr_action_id);
2874: hr_utility.set_location(gv_package || lv_procedure_name, 100);
2875: hr_utility.trace('Locking Action = ' || ln_child_xfr_action_id);
2876: hr_utility.trace('Locked Action = ' || ln_asg_action_id);
2877: -- insert an interlock to this action
2878: ln_step := 11;
2871: null,
2872: 'C',
2873: p_master_xfr_action_id);
2874: hr_utility.set_location(gv_package || lv_procedure_name, 100);
2875: hr_utility.trace('Locking Action = ' || ln_child_xfr_action_id);
2876: hr_utility.trace('Locked Action = ' || ln_asg_action_id);
2877: -- insert an interlock to this action
2878: ln_step := 11;
2879: hr_nonrun_asact.insint(ln_child_xfr_action_id,
2872: 'C',
2873: p_master_xfr_action_id);
2874: hr_utility.set_location(gv_package || lv_procedure_name, 100);
2875: hr_utility.trace('Locking Action = ' || ln_child_xfr_action_id);
2876: hr_utility.trace('Locked Action = ' || ln_asg_action_id);
2877: -- insert an interlock to this action
2878: ln_step := 11;
2879: hr_nonrun_asact.insint(ln_child_xfr_action_id,
2880: ln_asg_action_id);
2878: ln_step := 11;
2879: hr_nonrun_asact.insint(ln_child_xfr_action_id,
2880: ln_asg_action_id);
2881:
2882: hr_utility.set_location(gv_package || lv_procedure_name, 110);
2883: -- if pay_ac_action_arch.gv_multi_asg_enabled = 'Y' then
2884: -- open c_pre_pay_run_action (ln_asg_action_id, p_sepchk_run_type_id);
2885: -- fetch c_pre_pay_run_action into ln_run_action_id;
2886: -- close c_pre_pay_run_action;
2892: update pay_assignment_actions
2893: set serial_number = lv_serial_number
2894: where assignment_action_id = ln_child_xfr_action_id;
2895:
2896: hr_utility.trace('Processing Child action for Master ' ||
2897: p_master_xfr_action_id);
2898:
2899: /****************************************************************
2900: ** Archive the data for the Child Action
2917: ,p_ppp_source_action_id => ln_run_action_id
2918: );
2919:
2920: end loop;
2921: hr_utility.set_location(gv_package || lv_procedure_name, 120);
2922:
2923: ln_step := 14;
2924: if ((pay_emp_action_arch.gv_multi_payroll_pymt = 'N' or
2925: pay_emp_action_arch.gv_multi_payroll_pymt is null) and
2927: close c_asg_child_action;
2928: else
2929: close c_multi_asg_child_action;
2930: end if;
2931: hr_utility.set_location('Leaving create_child_actions ',130 );
2932:
2933: EXCEPTION
2934: when others then
2935: hr_utility.set_location(gv_package || lv_procedure_name, 500);
2931: hr_utility.set_location('Leaving create_child_actions ',130 );
2932:
2933: EXCEPTION
2934: when others then
2935: hr_utility.set_location(gv_package || lv_procedure_name, 500);
2936: lv_error_message := 'Error at step ' || ln_step ||
2937: ' in ' || gv_package || lv_procedure_name;
2938: hr_utility.trace(lv_error_message || '-' || sqlerrm);
2939:
2934: when others then
2935: hr_utility.set_location(gv_package || lv_procedure_name, 500);
2936: lv_error_message := 'Error at step ' || ln_step ||
2937: ' in ' || gv_package || lv_procedure_name;
2938: hr_utility.trace(lv_error_message || '-' || sqlerrm);
2939:
2940: lv_error_message :=
2941: pay_emp_action_arch.set_error_message(lv_error_message);
2942:
2939:
2940: lv_error_message :=
2941: pay_emp_action_arch.set_error_message(lv_error_message);
2942:
2943: hr_utility.set_message(801,'HR_ELE_ENTRY_FORMULA_HINT');
2944: hr_utility.set_message_token('FORMULA_TEXT', lv_error_message);
2945: hr_utility.raise_error;
2946:
2947: END create_child_actions;
2940: lv_error_message :=
2941: pay_emp_action_arch.set_error_message(lv_error_message);
2942:
2943: hr_utility.set_message(801,'HR_ELE_ENTRY_FORMULA_HINT');
2944: hr_utility.set_message_token('FORMULA_TEXT', lv_error_message);
2945: hr_utility.raise_error;
2946:
2947: END create_child_actions;
2948:
2941: pay_emp_action_arch.set_error_message(lv_error_message);
2942:
2943: hr_utility.set_message(801,'HR_ELE_ENTRY_FORMULA_HINT');
2944: hr_utility.set_message_token('FORMULA_TEXT', lv_error_message);
2945: hr_utility.raise_error;
2946:
2947: END create_child_actions;
2948:
2949: /************************************************************
3091: BEGIN
3092:
3093: lv_procedure_name := '.action_archive_data';
3094: pay_emp_action_arch.gv_error_message := NULL;
3095: hr_utility.trace('Entered py_archive_data');
3096: hr_utility.trace('p_xfr_action_id '||to_char(p_xfr_action_id));
3097: hr_utility.trace('Cursor c_xfr_info');
3098:
3099: ln_step := 1;
3092:
3093: lv_procedure_name := '.action_archive_data';
3094: pay_emp_action_arch.gv_error_message := NULL;
3095: hr_utility.trace('Entered py_archive_data');
3096: hr_utility.trace('p_xfr_action_id '||to_char(p_xfr_action_id));
3097: hr_utility.trace('Cursor c_xfr_info');
3098:
3099: ln_step := 1;
3100: open c_xfr_info (p_xfr_action_id);
3093: lv_procedure_name := '.action_archive_data';
3094: pay_emp_action_arch.gv_error_message := NULL;
3095: hr_utility.trace('Entered py_archive_data');
3096: hr_utility.trace('p_xfr_action_id '||to_char(p_xfr_action_id));
3097: hr_utility.trace('Cursor c_xfr_info');
3098:
3099: ln_step := 1;
3100: open c_xfr_info (p_xfr_action_id);
3101: fetch c_xfr_info into ln_xfr_payroll_action_id,
3119: := pay_emp_action_arch.get_multi_assignment_flag(
3120: p_payroll_id => ln_payroll_id
3121: ,p_effective_date => ld_end_date);
3122:
3123: hr_utility.trace('pay_emp_action_arch.gv_multi_payroll_pymt = ' ||
3124: pay_emp_action_arch.gv_multi_payroll_pymt);
3125:
3126: ln_step := 3;
3127: open c_legislation (ln_business_group_id);
3126: ln_step := 3;
3127: open c_legislation (ln_business_group_id);
3128: fetch c_legislation into lv_legislation_code ;
3129: if c_legislation%notfound then
3130: hr_utility.trace('Business Group for Interface Process Not Found');
3131: hr_utility.raise_error;
3132: end if;
3133: close c_legislation;
3134: hr_utility.trace('lv_legislation_code '||lv_legislation_code);
3127: open c_legislation (ln_business_group_id);
3128: fetch c_legislation into lv_legislation_code ;
3129: if c_legislation%notfound then
3130: hr_utility.trace('Business Group for Interface Process Not Found');
3131: hr_utility.raise_error;
3132: end if;
3133: close c_legislation;
3134: hr_utility.trace('lv_legislation_code '||lv_legislation_code);
3135:
3130: hr_utility.trace('Business Group for Interface Process Not Found');
3131: hr_utility.raise_error;
3132: end if;
3133: close c_legislation;
3134: hr_utility.trace('lv_legislation_code '||lv_legislation_code);
3135:
3136: ln_step := 4;
3137: open c_sepchk_run_type;
3138: fetch c_sepchk_run_type into ln_sepchk_run_type_id;
3136: ln_step := 4;
3137: open c_sepchk_run_type;
3138: fetch c_sepchk_run_type into ln_sepchk_run_type_id;
3139: if c_sepchk_run_type%notfound then
3140: hr_utility.set_location(gv_package || lv_procedure_name, 20);
3141: hr_utility.raise_error;
3142: end if;
3143: close c_sepchk_run_type;
3144:
3137: open c_sepchk_run_type;
3138: fetch c_sepchk_run_type into ln_sepchk_run_type_id;
3139: if c_sepchk_run_type%notfound then
3140: hr_utility.set_location(gv_package || lv_procedure_name, 20);
3141: hr_utility.raise_error;
3142: end if;
3143: close c_sepchk_run_type;
3144:
3145: ln_step := 5;
3153: ln_step := 6;
3154: open c_pymt_eff_date(ln_asg_action_id);
3155: fetch c_pymt_eff_date into ld_curr_pymt_eff_date;
3156: if c_pymt_eff_date%notfound then
3157: hr_utility.trace('PayrollAction for InterfaceProcess NotFound');
3158: hr_utility.raise_error;
3159: end if;
3160: close c_pymt_eff_date;
3161:
3154: open c_pymt_eff_date(ln_asg_action_id);
3155: fetch c_pymt_eff_date into ld_curr_pymt_eff_date;
3156: if c_pymt_eff_date%notfound then
3157: hr_utility.trace('PayrollAction for InterfaceProcess NotFound');
3158: hr_utility.raise_error;
3159: end if;
3160: close c_pymt_eff_date;
3161:
3162: ln_step := 7;
3159: end if;
3160: close c_pymt_eff_date;
3161:
3162: ln_step := 7;
3163: hr_utility.trace('End Date=' || to_char(ld_end_date, 'dd-mon-yyyy'));
3164: hr_utility.trace('Start Date='||to_char(ld_start_date, 'dd-mon-yyyy'));
3165: hr_utility.trace('Business Group Id='||to_char(ln_business_group_id));
3166: hr_utility.trace('Serial Number='||lv_xfr_master_serial_number);
3167: hr_utility.trace('ln_xfr_payroll_action_id ='||
3160: close c_pymt_eff_date;
3161:
3162: ln_step := 7;
3163: hr_utility.trace('End Date=' || to_char(ld_end_date, 'dd-mon-yyyy'));
3164: hr_utility.trace('Start Date='||to_char(ld_start_date, 'dd-mon-yyyy'));
3165: hr_utility.trace('Business Group Id='||to_char(ln_business_group_id));
3166: hr_utility.trace('Serial Number='||lv_xfr_master_serial_number);
3167: hr_utility.trace('ln_xfr_payroll_action_id ='||
3168: to_char(ln_xfr_payroll_action_id));
3161:
3162: ln_step := 7;
3163: hr_utility.trace('End Date=' || to_char(ld_end_date, 'dd-mon-yyyy'));
3164: hr_utility.trace('Start Date='||to_char(ld_start_date, 'dd-mon-yyyy'));
3165: hr_utility.trace('Business Group Id='||to_char(ln_business_group_id));
3166: hr_utility.trace('Serial Number='||lv_xfr_master_serial_number);
3167: hr_utility.trace('ln_xfr_payroll_action_id ='||
3168: to_char(ln_xfr_payroll_action_id));
3169:
3162: ln_step := 7;
3163: hr_utility.trace('End Date=' || to_char(ld_end_date, 'dd-mon-yyyy'));
3164: hr_utility.trace('Start Date='||to_char(ld_start_date, 'dd-mon-yyyy'));
3165: hr_utility.trace('Business Group Id='||to_char(ln_business_group_id));
3166: hr_utility.trace('Serial Number='||lv_xfr_master_serial_number);
3167: hr_utility.trace('ln_xfr_payroll_action_id ='||
3168: to_char(ln_xfr_payroll_action_id));
3169:
3170: if lv_master_action_type in ( 'P','U') then
3163: hr_utility.trace('End Date=' || to_char(ld_end_date, 'dd-mon-yyyy'));
3164: hr_utility.trace('Start Date='||to_char(ld_start_date, 'dd-mon-yyyy'));
3165: hr_utility.trace('Business Group Id='||to_char(ln_business_group_id));
3166: hr_utility.trace('Serial Number='||lv_xfr_master_serial_number);
3167: hr_utility.trace('ln_xfr_payroll_action_id ='||
3168: to_char(ln_xfr_payroll_action_id));
3169:
3170: if lv_master_action_type in ( 'P','U') then
3171: /************************************************************
3174: *************************************************************/
3175: lv_run_action_type := Null;
3176: open c_master_run_action_type(ln_asg_action_id,ln_assignment_id);
3177: fetch c_master_run_action_type into lv_run_action_type;
3178: hr_utility.trace('lv_run_action_type ='||lv_run_action_type);
3179:
3180: if pay_ac_action_arch.gv_reporting_level = 'TAXGRP' then
3181: /* Added this validation to avoid creating child assignment actions,
3182: when reversals to be picked up based on Pre-payments. Reversals
3198: ,p_xfr_end_date => ld_end_date
3199: ,p_chunk => ln_chunk_number
3200: );
3201: else
3202: hr_utility.trace('Dont create child actions for Reversals: '||
3203: 'py_archive_date Tax Gruop level');
3204: null;
3205:
3206: end if; -- c_master_run_action_type%found
3225: ,p_xfr_end_date => ld_end_date
3226: ,p_chunk => ln_chunk_number
3227: );
3228: else
3229: hr_utility.trace('Dont create child actions for Reversals: '||
3230: 'py_archive_date GRE level');
3231: null;
3232: end if; -- c_master_run_action_type%found
3233: close c_master_run_action_type;
3273: -- fetch c_master_run_action into ln_master_run_action_id,
3274: -- ln_master_run_pact_id,
3275: -- lv_master_run_action_type;
3276: -- if c_master_run_action%notfound then
3277: -- hr_utility.raise_error;
3278: -- end if;
3279: -- close c_master_run_action;
3280: --
3281: -- ln_step := 10;
3328: ln_step := 13;
3329: if lv_master_action_type = 'V' then
3330: /* ln_asg_action_id is nothing but reversal run action id */
3331: ln_pymt_balcall_aaid := ln_asg_action_id ;
3332: hr_utility.trace('Reversal ln_pymt_balcall_aaid'
3333: ||to_char(ln_pymt_balcall_aaid));
3334: /* Added this code to archive the tax balances and other elements
3335: for reversals in Canada. Bug#3498653 */
3336: ln_step := 14;
3335: for reversals in Canada. Bug#3498653 */
3336: ln_step := 14;
3337: pay_ac_action_arch.initialization_process;
3338:
3339: hr_utility.trace('Populating Tax Balances for Reversals');
3340: hr_utility.trace('ln_tax_unit_id : '||to_char(ln_tax_unit_id));
3341: hr_utility.trace('ln_pymt_balcall_aaid :'||to_char(ln_pymt_balcall_aaid));
3342: hr_utility.trace('ld_curr_pymt_eff_date :'||to_char(ld_curr_pymt_eff_date,'DD-MON-YYYY'));
3343: hr_utility.trace('ln_assignment_id :'||to_char(ln_assignment_id));
3336: ln_step := 14;
3337: pay_ac_action_arch.initialization_process;
3338:
3339: hr_utility.trace('Populating Tax Balances for Reversals');
3340: hr_utility.trace('ln_tax_unit_id : '||to_char(ln_tax_unit_id));
3341: hr_utility.trace('ln_pymt_balcall_aaid :'||to_char(ln_pymt_balcall_aaid));
3342: hr_utility.trace('ld_curr_pymt_eff_date :'||to_char(ld_curr_pymt_eff_date,'DD-MON-YYYY'));
3343: hr_utility.trace('ln_assignment_id :'||to_char(ln_assignment_id));
3344:
3337: pay_ac_action_arch.initialization_process;
3338:
3339: hr_utility.trace('Populating Tax Balances for Reversals');
3340: hr_utility.trace('ln_tax_unit_id : '||to_char(ln_tax_unit_id));
3341: hr_utility.trace('ln_pymt_balcall_aaid :'||to_char(ln_pymt_balcall_aaid));
3342: hr_utility.trace('ld_curr_pymt_eff_date :'||to_char(ld_curr_pymt_eff_date,'DD-MON-YYYY'));
3343: hr_utility.trace('ln_assignment_id :'||to_char(ln_assignment_id));
3344:
3345: /* Added this to support tax group level reporting for
3338:
3339: hr_utility.trace('Populating Tax Balances for Reversals');
3340: hr_utility.trace('ln_tax_unit_id : '||to_char(ln_tax_unit_id));
3341: hr_utility.trace('ln_pymt_balcall_aaid :'||to_char(ln_pymt_balcall_aaid));
3342: hr_utility.trace('ld_curr_pymt_eff_date :'||to_char(ld_curr_pymt_eff_date,'DD-MON-YYYY'));
3343: hr_utility.trace('ln_assignment_id :'||to_char(ln_assignment_id));
3344:
3345: /* Added this to support tax group level reporting for
3346: Reversals. Need to set both contexts for
3339: hr_utility.trace('Populating Tax Balances for Reversals');
3340: hr_utility.trace('ln_tax_unit_id : '||to_char(ln_tax_unit_id));
3341: hr_utility.trace('ln_pymt_balcall_aaid :'||to_char(ln_pymt_balcall_aaid));
3342: hr_utility.trace('ld_curr_pymt_eff_date :'||to_char(ld_curr_pymt_eff_date,'DD-MON-YYYY'));
3343: hr_utility.trace('ln_assignment_id :'||to_char(ln_assignment_id));
3344:
3345: /* Added this to support tax group level reporting for
3346: Reversals. Need to set both contexts for
3347: Tax Group reporting because for current amounts we
3392: ,p_ytd_balcall_aaid => ln_pymt_balcall_aaid
3393: );
3394:
3395: ln_step := 16;
3396: hr_utility.trace('Populating Current Elements for Reversals');
3397: pay_ac_action_arch.get_current_elements(
3398: p_xfr_action_id => p_xfr_action_id
3399: ,p_curr_pymt_action_id => ln_pymt_balcall_aaid
3400: ,p_curr_pymt_eff_date => ld_curr_pymt_eff_date
3406: ,p_sepchk_flag => lv_master_sepcheck_flag
3407: ,p_legislation_code => lv_legislation_code
3408: ,p_action_type => lv_master_action_type);
3409:
3410: hr_utility.trace('Done Populating Tax Balances for Reversals');
3411: ln_step := 17;
3412: pay_emp_action_arch.insert_rows_thro_api_process(
3413: p_action_context_id => p_xfr_action_id
3414: ,p_action_context_type=> 'AAP'
3425: Payslip Archiver, this will be useful for historical reporting
3426: purposes when run_results table is purged. Bug#3498653 */
3427:
3428: if lv_master_action_type = 'B' then
3429: hr_utility.trace('Populating Current Elements for Balance Adjustments');
3430: /* ln_asg_action_id is nothing but Balance Adjustment run action id */
3431: ln_asg_action_id := -1;
3432: pay_ac_action_arch.initialization_process;
3433: open c_get_emp_adjbal(p_xfr_action_id);
3435: fetch c_get_emp_adjbal into ln_asg_action_id;
3436: exit when c_get_emp_adjbal%NOTFOUND;
3437:
3438: ln_pymt_balcall_aaid := ln_asg_action_id ;
3439: hr_utility.trace('Bal Adjustment ln_pymt_balcall_aaid'
3440: ||to_char(ln_pymt_balcall_aaid));
3441:
3442: ln_step := 18;
3443:
3440: ||to_char(ln_pymt_balcall_aaid));
3441:
3442: ln_step := 18;
3443:
3444: hr_utility.trace('ln_tax_unit_id : '||to_char(ln_tax_unit_id));
3445: hr_utility.trace('ln_pymt_balcall_aaid :'||to_char(ln_pymt_balcall_aaid));
3446: hr_utility.trace('ld_curr_pymt_eff_date :'||to_char(ld_curr_pymt_eff_date,'DD-MON-YYYY'));
3447: hr_utility.trace('ln_assignment_id :'||to_char(ln_assignment_id));
3448:
3441:
3442: ln_step := 18;
3443:
3444: hr_utility.trace('ln_tax_unit_id : '||to_char(ln_tax_unit_id));
3445: hr_utility.trace('ln_pymt_balcall_aaid :'||to_char(ln_pymt_balcall_aaid));
3446: hr_utility.trace('ld_curr_pymt_eff_date :'||to_char(ld_curr_pymt_eff_date,'DD-MON-YYYY'));
3447: hr_utility.trace('ln_assignment_id :'||to_char(ln_assignment_id));
3448:
3449: /* Added this to support tax group level reporting for
3442: ln_step := 18;
3443:
3444: hr_utility.trace('ln_tax_unit_id : '||to_char(ln_tax_unit_id));
3445: hr_utility.trace('ln_pymt_balcall_aaid :'||to_char(ln_pymt_balcall_aaid));
3446: hr_utility.trace('ld_curr_pymt_eff_date :'||to_char(ld_curr_pymt_eff_date,'DD-MON-YYYY'));
3447: hr_utility.trace('ln_assignment_id :'||to_char(ln_assignment_id));
3448:
3449: /* Added this to support tax group level reporting for
3450: Balance Adjustments. Need to set both contexts for
3443:
3444: hr_utility.trace('ln_tax_unit_id : '||to_char(ln_tax_unit_id));
3445: hr_utility.trace('ln_pymt_balcall_aaid :'||to_char(ln_pymt_balcall_aaid));
3446: hr_utility.trace('ld_curr_pymt_eff_date :'||to_char(ld_curr_pymt_eff_date,'DD-MON-YYYY'));
3447: hr_utility.trace('ln_assignment_id :'||to_char(ln_assignment_id));
3448:
3449: /* Added this to support tax group level reporting for
3450: Balance Adjustments. Need to set both contexts for
3451: Tax Group reporting because for current amounts we
3527: ** chunk number is 1. Also check if this has not been archived
3528: ** earlier
3529: *****************************************************************/
3530: ln_step := 21;
3531: hr_utility.set_location(gv_package || lv_procedure_name,210);
3532: open c_check_pay_action( ln_xfr_payroll_action_id);
3533: fetch c_check_pay_action into ln_pay_action_count;
3534: close c_check_pay_action;
3535: if ln_pay_action_count = 0 then
3532: open c_check_pay_action( ln_xfr_payroll_action_id);
3533: fetch c_check_pay_action into ln_pay_action_count;
3534: close c_check_pay_action;
3535: if ln_pay_action_count = 0 then
3536: hr_utility.set_location(gv_package || lv_procedure_name,215);
3537: ln_step := 22;
3538: if ln_chunk_number = 1 then
3539: pay_emp_action_arch.arch_pay_action_level_data(
3540: p_payroll_action_id => ln_xfr_payroll_action_id
3546: end if;
3547:
3548: EXCEPTION
3549: when others then
3550: hr_utility.set_location(gv_package || lv_procedure_name, 500);
3551: lv_error_message := 'Error at step ' || ln_step ||
3552: ' in ' || gv_package || lv_procedure_name;
3553: hr_utility.trace(lv_error_message || '-' || sqlerrm);
3554:
3549: when others then
3550: hr_utility.set_location(gv_package || lv_procedure_name, 500);
3551: lv_error_message := 'Error at step ' || ln_step ||
3552: ' in ' || gv_package || lv_procedure_name;
3553: hr_utility.trace(lv_error_message || '-' || sqlerrm);
3554:
3555: lv_error_message :=
3556: pay_emp_action_arch.set_error_message(lv_error_message);
3557:
3554:
3555: lv_error_message :=
3556: pay_emp_action_arch.set_error_message(lv_error_message);
3557:
3558: hr_utility.set_message(801,'HR_ELE_ENTRY_FORMULA_HINT');
3559: hr_utility.set_message_token('FORMULA_TEXT', lv_error_message);
3560: hr_utility.raise_error;
3561:
3562: END py_archive_data;
3555: lv_error_message :=
3556: pay_emp_action_arch.set_error_message(lv_error_message);
3557:
3558: hr_utility.set_message(801,'HR_ELE_ENTRY_FORMULA_HINT');
3559: hr_utility.set_message_token('FORMULA_TEXT', lv_error_message);
3560: hr_utility.raise_error;
3561:
3562: END py_archive_data;
3563:
3556: pay_emp_action_arch.set_error_message(lv_error_message);
3557:
3558: hr_utility.set_message(801,'HR_ELE_ENTRY_FORMULA_HINT');
3559: hr_utility.set_message_token('FORMULA_TEXT', lv_error_message);
3560: hr_utility.raise_error;
3561:
3562: END py_archive_data;
3563:
3564: /******************************************************************
3586:
3587: begin
3588:
3589: lv_procedure_name := '.py_range_cursor';
3590: hr_utility.set_location(gv_package || lv_procedure_name, 10);
3591: pay_emp_action_arch.gv_error_message := NULL;
3592:
3593: ln_step := 1;
3594: get_payroll_action_info(p_payroll_action_id => p_payroll_action_id
3596: ,p_end_date => ld_end_date
3597: ,p_business_group_id => ln_business_group_id
3598: ,p_cons_set_id => ln_cons_set_id
3599: ,p_payroll_id => ln_payroll_id);
3600: hr_utility.set_location(gv_package || lv_procedure_name, 20);
3601:
3602: ln_step := 2;
3603: /* removed the reversal validation from range cursor SQL STMT
3604: ''V'', nvl(ppa.future_process_mode, ''Y''). Bug#3498653 */
3633: and ppa1.report_type = ''PY_ARCHIVER'')
3634: and :payroll_action_id > 0
3635: order by paa.assignment_id';
3636:
3637: hr_utility.set_location(gv_package || lv_procedure_name, 30);
3638: ln_step := 3;
3639: p_sqlstr := lv_sql_string;
3640: hr_utility.set_location(gv_package || lv_procedure_name, 50);
3641:
3636:
3637: hr_utility.set_location(gv_package || lv_procedure_name, 30);
3638: ln_step := 3;
3639: p_sqlstr := lv_sql_string;
3640: hr_utility.set_location(gv_package || lv_procedure_name, 50);
3641:
3642: EXCEPTION
3643: when others then
3644: hr_utility.set_location(gv_package || lv_procedure_name, 500);
3640: hr_utility.set_location(gv_package || lv_procedure_name, 50);
3641:
3642: EXCEPTION
3643: when others then
3644: hr_utility.set_location(gv_package || lv_procedure_name, 500);
3645: lv_error_message := 'Error at step ' || ln_step ||
3646: ' in ' || gv_package || lv_procedure_name;
3647: hr_utility.trace(lv_error_message || '-' || sqlerrm);
3648:
3643: when others then
3644: hr_utility.set_location(gv_package || lv_procedure_name, 500);
3645: lv_error_message := 'Error at step ' || ln_step ||
3646: ' in ' || gv_package || lv_procedure_name;
3647: hr_utility.trace(lv_error_message || '-' || sqlerrm);
3648:
3649: lv_error_message :=
3650: pay_emp_action_arch.set_error_message(lv_error_message);
3651:
3648:
3649: lv_error_message :=
3650: pay_emp_action_arch.set_error_message(lv_error_message);
3651:
3652: hr_utility.set_message(801,'HR_ELE_ENTRY_FORMULA_HINT');
3653: hr_utility.set_message_token('FORMULA_TEXT', lv_error_message);
3654: hr_utility.raise_error;
3655:
3656: END py_range_cursor;
3649: lv_error_message :=
3650: pay_emp_action_arch.set_error_message(lv_error_message);
3651:
3652: hr_utility.set_message(801,'HR_ELE_ENTRY_FORMULA_HINT');
3653: hr_utility.set_message_token('FORMULA_TEXT', lv_error_message);
3654: hr_utility.raise_error;
3655:
3656: END py_range_cursor;
3657:
3650: pay_emp_action_arch.set_error_message(lv_error_message);
3651:
3652: hr_utility.set_message(801,'HR_ELE_ENTRY_FORMULA_HINT');
3653: hr_utility.set_message_token('FORMULA_TEXT', lv_error_message);
3654: hr_utility.raise_error;
3655:
3656: END py_range_cursor;
3657:
3658:
3764: ln_step NUMBER;
3765:
3766: BEGIN
3767:
3768: --- hr_utility.trace_on(null, 'PYARCH');
3769:
3770: lv_procedure_name := '.py_action_creation';
3771: hr_utility.set_location(gv_package || lv_procedure_name, 10);
3772: pay_emp_action_arch.gv_error_message := NULL;
3767:
3768: --- hr_utility.trace_on(null, 'PYARCH');
3769:
3770: lv_procedure_name := '.py_action_creation';
3771: hr_utility.set_location(gv_package || lv_procedure_name, 10);
3772: pay_emp_action_arch.gv_error_message := NULL;
3773:
3774: ln_step := 1;
3775: /* Initialising local variables to avoid GSCC warnings */
3790: ,p_end_date => ld_end_date
3791: ,p_business_group_id => ln_business_group_id
3792: ,p_cons_set_id => ln_cons_set_id
3793: ,p_payroll_id => ln_payroll_id);
3794: hr_utility.set_location(gv_package || lv_procedure_name, 20);
3795:
3796: hr_utility.trace('ld_start_date '||ld_start_date);
3797: hr_utility.trace('ld_end_date '||ld_end_date);
3798: hr_utility.trace('ln_business_group_id '||ln_business_group_id);
3792: ,p_cons_set_id => ln_cons_set_id
3793: ,p_payroll_id => ln_payroll_id);
3794: hr_utility.set_location(gv_package || lv_procedure_name, 20);
3795:
3796: hr_utility.trace('ld_start_date '||ld_start_date);
3797: hr_utility.trace('ld_end_date '||ld_end_date);
3798: hr_utility.trace('ln_business_group_id '||ln_business_group_id);
3799: hr_utility.trace('ln_cons_set_id '||ln_cons_set_id);
3800: hr_utility.trace('ln_payroll_id '||ln_payroll_id);
3793: ,p_payroll_id => ln_payroll_id);
3794: hr_utility.set_location(gv_package || lv_procedure_name, 20);
3795:
3796: hr_utility.trace('ld_start_date '||ld_start_date);
3797: hr_utility.trace('ld_end_date '||ld_end_date);
3798: hr_utility.trace('ln_business_group_id '||ln_business_group_id);
3799: hr_utility.trace('ln_cons_set_id '||ln_cons_set_id);
3800: hr_utility.trace('ln_payroll_id '||ln_payroll_id);
3801:
3794: hr_utility.set_location(gv_package || lv_procedure_name, 20);
3795:
3796: hr_utility.trace('ld_start_date '||ld_start_date);
3797: hr_utility.trace('ld_end_date '||ld_end_date);
3798: hr_utility.trace('ln_business_group_id '||ln_business_group_id);
3799: hr_utility.trace('ln_cons_set_id '||ln_cons_set_id);
3800: hr_utility.trace('ln_payroll_id '||ln_payroll_id);
3801:
3802:
3795:
3796: hr_utility.trace('ld_start_date '||ld_start_date);
3797: hr_utility.trace('ld_end_date '||ld_end_date);
3798: hr_utility.trace('ln_business_group_id '||ln_business_group_id);
3799: hr_utility.trace('ln_cons_set_id '||ln_cons_set_id);
3800: hr_utility.trace('ln_payroll_id '||ln_payroll_id);
3801:
3802:
3803: ln_step := 2;
3796: hr_utility.trace('ld_start_date '||ld_start_date);
3797: hr_utility.trace('ld_end_date '||ld_end_date);
3798: hr_utility.trace('ln_business_group_id '||ln_business_group_id);
3799: hr_utility.trace('ln_cons_set_id '||ln_cons_set_id);
3800: hr_utility.trace('ln_payroll_id '||ln_payroll_id);
3801:
3802:
3803: ln_step := 2;
3804: open c_get_xfr_emp( p_start_assignment_id
3809: ,ld_start_date
3810: ,ld_end_date);
3811:
3812: -- Loop for all rows returned for SQL statement.
3813: hr_utility.set_location(gv_package || lv_procedure_name, 30);
3814: loop
3815: ln_step := 3;
3816: fetch c_get_xfr_emp into ln_assignment_id,
3817: ln_tax_unit_id,
3822: ln_payroll_action_id;
3823:
3824: exit when c_get_xfr_emp%notfound;
3825:
3826: hr_utility.set_location(gv_package || lv_procedure_name, 40);
3827: hr_utility.trace('ln_assignment_id = ' ||
3828: to_char(ln_assignment_id));
3829:
3830: /********************************************************
3823:
3824: exit when c_get_xfr_emp%notfound;
3825:
3826: hr_utility.set_location(gv_package || lv_procedure_name, 40);
3827: hr_utility.trace('ln_assignment_id = ' ||
3828: to_char(ln_assignment_id));
3829:
3830: /********************************************************
3831: ** If Balance Adjustment, only create one assignment
3844: lv_action_type = 'B' and
3845: ln_asg_action_id <> ln_prev_asg_action_id then
3846:
3847: ln_step := 5;
3848: hr_utility.set_location(gv_package || lv_procedure_name, 50);
3849: hr_utility.trace('Locking Action = ' || ln_xfr_action_id);
3850: hr_utility.trace('Locked Action = ' || ln_asg_action_id);
3851: hr_nonrun_asact.insint(ln_xfr_action_id
3852: ,ln_asg_action_id);
3845: ln_asg_action_id <> ln_prev_asg_action_id then
3846:
3847: ln_step := 5;
3848: hr_utility.set_location(gv_package || lv_procedure_name, 50);
3849: hr_utility.trace('Locking Action = ' || ln_xfr_action_id);
3850: hr_utility.trace('Locked Action = ' || ln_asg_action_id);
3851: hr_nonrun_asact.insint(ln_xfr_action_id
3852: ,ln_asg_action_id);
3853: else
3846:
3847: ln_step := 5;
3848: hr_utility.set_location(gv_package || lv_procedure_name, 50);
3849: hr_utility.trace('Locking Action = ' || ln_xfr_action_id);
3850: hr_utility.trace('Locked Action = ' || ln_asg_action_id);
3851: hr_nonrun_asact.insint(ln_xfr_action_id
3852: ,ln_asg_action_id);
3853: else
3854: hr_utility.set_location(gv_package || lv_procedure_name, 60);
3850: hr_utility.trace('Locked Action = ' || ln_asg_action_id);
3851: hr_nonrun_asact.insint(ln_xfr_action_id
3852: ,ln_asg_action_id);
3853: else
3854: hr_utility.set_location(gv_package || lv_procedure_name, 60);
3855: hr_utility.trace('Action_type = '||lv_action_type );
3856:
3857: ln_step := 6;
3858: select pay_assignment_actions_s.nextval
3851: hr_nonrun_asact.insint(ln_xfr_action_id
3852: ,ln_asg_action_id);
3853: else
3854: hr_utility.set_location(gv_package || lv_procedure_name, 60);
3855: hr_utility.trace('Action_type = '||lv_action_type );
3856:
3857: ln_step := 6;
3858: select pay_assignment_actions_s.nextval
3859: into ln_xfr_action_id
3868: ln_tax_unit_id,
3869: null,
3870: 'U',
3871: null);
3872: hr_utility.set_location(gv_package || lv_procedure_name, 70);
3873: hr_utility.trace('ln_asg_action_id = ' || ln_asg_action_id);
3874: hr_utility.trace('ln_xfr_action_id = ' || ln_xfr_action_id);
3875: hr_utility.trace('p_payroll_action_id = ' || p_payroll_action_id);
3876: hr_utility.trace('ln_tax_unit_id = ' || ln_tax_unit_id);
3869: null,
3870: 'U',
3871: null);
3872: hr_utility.set_location(gv_package || lv_procedure_name, 70);
3873: hr_utility.trace('ln_asg_action_id = ' || ln_asg_action_id);
3874: hr_utility.trace('ln_xfr_action_id = ' || ln_xfr_action_id);
3875: hr_utility.trace('p_payroll_action_id = ' || p_payroll_action_id);
3876: hr_utility.trace('ln_tax_unit_id = ' || ln_tax_unit_id);
3877: hr_utility.set_location(gv_package || lv_procedure_name, 80);
3870: 'U',
3871: null);
3872: hr_utility.set_location(gv_package || lv_procedure_name, 70);
3873: hr_utility.trace('ln_asg_action_id = ' || ln_asg_action_id);
3874: hr_utility.trace('ln_xfr_action_id = ' || ln_xfr_action_id);
3875: hr_utility.trace('p_payroll_action_id = ' || p_payroll_action_id);
3876: hr_utility.trace('ln_tax_unit_id = ' || ln_tax_unit_id);
3877: hr_utility.set_location(gv_package || lv_procedure_name, 80);
3878:
3871: null);
3872: hr_utility.set_location(gv_package || lv_procedure_name, 70);
3873: hr_utility.trace('ln_asg_action_id = ' || ln_asg_action_id);
3874: hr_utility.trace('ln_xfr_action_id = ' || ln_xfr_action_id);
3875: hr_utility.trace('p_payroll_action_id = ' || p_payroll_action_id);
3876: hr_utility.trace('ln_tax_unit_id = ' || ln_tax_unit_id);
3877: hr_utility.set_location(gv_package || lv_procedure_name, 80);
3878:
3879: -- insert an interlock to this action
3872: hr_utility.set_location(gv_package || lv_procedure_name, 70);
3873: hr_utility.trace('ln_asg_action_id = ' || ln_asg_action_id);
3874: hr_utility.trace('ln_xfr_action_id = ' || ln_xfr_action_id);
3875: hr_utility.trace('p_payroll_action_id = ' || p_payroll_action_id);
3876: hr_utility.trace('ln_tax_unit_id = ' || ln_tax_unit_id);
3877: hr_utility.set_location(gv_package || lv_procedure_name, 80);
3878:
3879: -- insert an interlock to this action
3880: hr_utility.trace('Locking Action = ' || ln_xfr_action_id);
3873: hr_utility.trace('ln_asg_action_id = ' || ln_asg_action_id);
3874: hr_utility.trace('ln_xfr_action_id = ' || ln_xfr_action_id);
3875: hr_utility.trace('p_payroll_action_id = ' || p_payroll_action_id);
3876: hr_utility.trace('ln_tax_unit_id = ' || ln_tax_unit_id);
3877: hr_utility.set_location(gv_package || lv_procedure_name, 80);
3878:
3879: -- insert an interlock to this action
3880: hr_utility.trace('Locking Action = ' || ln_xfr_action_id);
3881: hr_utility.trace('Locked Action = ' || ln_asg_action_id);
3876: hr_utility.trace('ln_tax_unit_id = ' || ln_tax_unit_id);
3877: hr_utility.set_location(gv_package || lv_procedure_name, 80);
3878:
3879: -- insert an interlock to this action
3880: hr_utility.trace('Locking Action = ' || ln_xfr_action_id);
3881: hr_utility.trace('Locked Action = ' || ln_asg_action_id);
3882: ln_step := 8;
3883: hr_nonrun_asact.insint(ln_xfr_action_id,
3884: ln_asg_action_id);
3877: hr_utility.set_location(gv_package || lv_procedure_name, 80);
3878:
3879: -- insert an interlock to this action
3880: hr_utility.trace('Locking Action = ' || ln_xfr_action_id);
3881: hr_utility.trace('Locked Action = ' || ln_asg_action_id);
3882: ln_step := 8;
3883: hr_nonrun_asact.insint(ln_xfr_action_id,
3884: ln_asg_action_id);
3885:
3882: ln_step := 8;
3883: hr_nonrun_asact.insint(ln_xfr_action_id,
3884: ln_asg_action_id);
3885:
3886: hr_utility.set_location(gv_package || lv_procedure_name, 90);
3887:
3888: for lock_pp_aa in c_lock_chld_pp_aa(ln_asg_action_id)
3889: loop
3890:
3887:
3888: for lock_pp_aa in c_lock_chld_pp_aa(ln_asg_action_id)
3889: loop
3890:
3891: hr_utility.trace('Locked Action by Master = ' ||
3892: lock_pp_aa.assignment_action_id);
3893: hr_nonrun_asact.insint(ln_xfr_action_id,
3894: lock_pp_aa.assignment_action_id);
3895:
3905: update pay_assignment_actions
3906: set serial_number = lv_serial_number
3907: where assignment_action_id = ln_xfr_action_id;
3908:
3909: hr_utility.set_location(gv_package || lv_procedure_name, 100);
3910:
3911: end if ; --ln_assignment_id ...
3912:
3913: ln_step := 10;
3920: close c_get_xfr_emp;
3921:
3922: EXCEPTION
3923: when others then
3924: hr_utility.set_location(gv_package || lv_procedure_name, 500);
3925: lv_error_message := 'Error at step ' || ln_step ||
3926: ' in ' || gv_package || lv_procedure_name;
3927: hr_utility.trace(lv_error_message || '-' || sqlerrm);
3928:
3923: when others then
3924: hr_utility.set_location(gv_package || lv_procedure_name, 500);
3925: lv_error_message := 'Error at step ' || ln_step ||
3926: ' in ' || gv_package || lv_procedure_name;
3927: hr_utility.trace(lv_error_message || '-' || sqlerrm);
3928:
3929: lv_error_message :=
3930: pay_emp_action_arch.set_error_message(lv_error_message);
3931:
3928:
3929: lv_error_message :=
3930: pay_emp_action_arch.set_error_message(lv_error_message);
3931:
3932: hr_utility.set_message(801,'HR_ELE_ENTRY_FORMULA_HINT');
3933: hr_utility.set_message_token('FORMULA_TEXT', lv_error_message);
3934: hr_utility.raise_error;
3935:
3936: END py_action_creation;
3929: lv_error_message :=
3930: pay_emp_action_arch.set_error_message(lv_error_message);
3931:
3932: hr_utility.set_message(801,'HR_ELE_ENTRY_FORMULA_HINT');
3933: hr_utility.set_message_token('FORMULA_TEXT', lv_error_message);
3934: hr_utility.raise_error;
3935:
3936: END py_action_creation;
3937:
3930: pay_emp_action_arch.set_error_message(lv_error_message);
3931:
3932: hr_utility.set_message(801,'HR_ELE_ENTRY_FORMULA_HINT');
3933: hr_utility.set_message_token('FORMULA_TEXT', lv_error_message);
3934: hr_utility.raise_error;
3935:
3936: END py_action_creation;
3937:
3938: /************************************************************
4012: j number;
4013:
4014: BEGIN
4015: lv_procedure_name := '.py_archinit';
4016: hr_utility.set_location(gv_package || lv_procedure_name, 10);
4017: pay_emp_action_arch.gv_error_message := NULL;
4018: lv_reporting_level := Null;
4019: i := 0;
4020: j := 0;
4064: pay_emp_action_arch.gv_multi_leg_rule
4065: := pay_emp_action_arch.get_multi_legislative_rule('CA');
4066: end if;
4067:
4068: hr_utility.trace('lv_reporting_level : '|| lv_reporting_level);
4069: hr_utility.trace('gv_multi_leg_rule : ' || pay_emp_action_arch.gv_multi_leg_rule);
4070: hr_utility.set_location(gv_package || lv_procedure_name, 20);
4071:
4072: ln_step := 30;
4065: := pay_emp_action_arch.get_multi_legislative_rule('CA');
4066: end if;
4067:
4068: hr_utility.trace('lv_reporting_level : '|| lv_reporting_level);
4069: hr_utility.trace('gv_multi_leg_rule : ' || pay_emp_action_arch.gv_multi_leg_rule);
4070: hr_utility.set_location(gv_package || lv_procedure_name, 20);
4071:
4072: ln_step := 30;
4073: if pay_emp_action_arch.gv_multi_leg_rule = 'Y' then
4066: end if;
4067:
4068: hr_utility.trace('lv_reporting_level : '|| lv_reporting_level);
4069: hr_utility.trace('gv_multi_leg_rule : ' || pay_emp_action_arch.gv_multi_leg_rule);
4070: hr_utility.set_location(gv_package || lv_procedure_name, 20);
4071:
4072: ln_step := 30;
4073: if pay_emp_action_arch.gv_multi_leg_rule = 'Y' then
4074: lv_pymt_dimension := '_ASG_PAYMENTS';
4172: dbt(i).jurisdiction_cd := 'NU';
4173: else
4174: dbt(i).jurisdiction_cd := 'QC';
4175: end if;
4176: hr_utility.trace(dbt(i).jurisdiction_cd);
4177: i := i + 1;
4178: end loop;
4179: elsif ( c_dbt.balance_name = 'QPP EE Withheld' ) then
4180: ln_step := 130;
4217: end if;
4218:
4219: end loop;
4220:
4221: hr_utility.set_location(gv_package || lv_procedure_name, 30);
4222: i := 0;
4223:
4224: ln_step := 160;
4225: for tax_short_name in cur_tax_name loop
4227: tax(i).language := tax_short_name.language;
4228: tax(i).lookup_code := tax_short_name.lookup_code;
4229: tax(i).meaning := tax_short_name.meaning;
4230:
4231: hr_utility.trace(tax(i).language);
4232: hr_utility.trace(tax(i).lookup_code);
4233: hr_utility.trace(tax(i).meaning);
4234:
4235: i := i + 1;
4228: tax(i).lookup_code := tax_short_name.lookup_code;
4229: tax(i).meaning := tax_short_name.meaning;
4230:
4231: hr_utility.trace(tax(i).language);
4232: hr_utility.trace(tax(i).lookup_code);
4233: hr_utility.trace(tax(i).meaning);
4234:
4235: i := i + 1;
4236:
4229: tax(i).meaning := tax_short_name.meaning;
4230:
4231: hr_utility.trace(tax(i).language);
4232: hr_utility.trace(tax(i).lookup_code);
4233: hr_utility.trace(tax(i).meaning);
4234:
4235: i := i + 1;
4236:
4237: end loop;
4237: end loop;
4238:
4239: ln_step := 170;
4240: for i in dbt.first..dbt.last loop
4241: hr_utility.trace(dbt(i).bal_name);
4242: hr_utility.trace(dbt(i).disp_sequence);
4243: hr_utility.trace(dbt(i).bal_type_id);
4244: hr_utility.trace(dbt(i).pymt_def_bal_id);
4245: hr_utility.trace(dbt(i).gre_ytd_def_bal_id);
4238:
4239: ln_step := 170;
4240: for i in dbt.first..dbt.last loop
4241: hr_utility.trace(dbt(i).bal_name);
4242: hr_utility.trace(dbt(i).disp_sequence);
4243: hr_utility.trace(dbt(i).bal_type_id);
4244: hr_utility.trace(dbt(i).pymt_def_bal_id);
4245: hr_utility.trace(dbt(i).gre_ytd_def_bal_id);
4246: hr_utility.trace(dbt(i).tg_ytd_def_bal_id);
4239: ln_step := 170;
4240: for i in dbt.first..dbt.last loop
4241: hr_utility.trace(dbt(i).bal_name);
4242: hr_utility.trace(dbt(i).disp_sequence);
4243: hr_utility.trace(dbt(i).bal_type_id);
4244: hr_utility.trace(dbt(i).pymt_def_bal_id);
4245: hr_utility.trace(dbt(i).gre_ytd_def_bal_id);
4246: hr_utility.trace(dbt(i).tg_ytd_def_bal_id);
4247: -- Added run_def_bal_id for reversals in canada Bug#3498653
4240: for i in dbt.first..dbt.last loop
4241: hr_utility.trace(dbt(i).bal_name);
4242: hr_utility.trace(dbt(i).disp_sequence);
4243: hr_utility.trace(dbt(i).bal_type_id);
4244: hr_utility.trace(dbt(i).pymt_def_bal_id);
4245: hr_utility.trace(dbt(i).gre_ytd_def_bal_id);
4246: hr_utility.trace(dbt(i).tg_ytd_def_bal_id);
4247: -- Added run_def_bal_id for reversals in canada Bug#3498653
4248: hr_utility.trace(dbt(i).run_def_bal_id);
4241: hr_utility.trace(dbt(i).bal_name);
4242: hr_utility.trace(dbt(i).disp_sequence);
4243: hr_utility.trace(dbt(i).bal_type_id);
4244: hr_utility.trace(dbt(i).pymt_def_bal_id);
4245: hr_utility.trace(dbt(i).gre_ytd_def_bal_id);
4246: hr_utility.trace(dbt(i).tg_ytd_def_bal_id);
4247: -- Added run_def_bal_id for reversals in canada Bug#3498653
4248: hr_utility.trace(dbt(i).run_def_bal_id);
4249: hr_utility.trace(dbt(i).jurisdiction_cd);
4242: hr_utility.trace(dbt(i).disp_sequence);
4243: hr_utility.trace(dbt(i).bal_type_id);
4244: hr_utility.trace(dbt(i).pymt_def_bal_id);
4245: hr_utility.trace(dbt(i).gre_ytd_def_bal_id);
4246: hr_utility.trace(dbt(i).tg_ytd_def_bal_id);
4247: -- Added run_def_bal_id for reversals in canada Bug#3498653
4248: hr_utility.trace(dbt(i).run_def_bal_id);
4249: hr_utility.trace(dbt(i).jurisdiction_cd);
4250: end loop;
4244: hr_utility.trace(dbt(i).pymt_def_bal_id);
4245: hr_utility.trace(dbt(i).gre_ytd_def_bal_id);
4246: hr_utility.trace(dbt(i).tg_ytd_def_bal_id);
4247: -- Added run_def_bal_id for reversals in canada Bug#3498653
4248: hr_utility.trace(dbt(i).run_def_bal_id);
4249: hr_utility.trace(dbt(i).jurisdiction_cd);
4250: end loop;
4251:
4252: hr_utility.set_location(gv_package || lv_procedure_name, 40);
4245: hr_utility.trace(dbt(i).gre_ytd_def_bal_id);
4246: hr_utility.trace(dbt(i).tg_ytd_def_bal_id);
4247: -- Added run_def_bal_id for reversals in canada Bug#3498653
4248: hr_utility.trace(dbt(i).run_def_bal_id);
4249: hr_utility.trace(dbt(i).jurisdiction_cd);
4250: end loop;
4251:
4252: hr_utility.set_location(gv_package || lv_procedure_name, 40);
4253:
4248: hr_utility.trace(dbt(i).run_def_bal_id);
4249: hr_utility.trace(dbt(i).jurisdiction_cd);
4250: end loop;
4251:
4252: hr_utility.set_location(gv_package || lv_procedure_name, 40);
4253:
4254: EXCEPTION
4255: when others then
4256: hr_utility.set_location(gv_package || lv_procedure_name, 500);
4252: hr_utility.set_location(gv_package || lv_procedure_name, 40);
4253:
4254: EXCEPTION
4255: when others then
4256: hr_utility.set_location(gv_package || lv_procedure_name, 500);
4257: lv_error_message := 'Error at step ' || ln_step ||
4258: ' in ' || gv_package || lv_procedure_name;
4259: hr_utility.trace(lv_error_message || '-' || sqlerrm);
4260:
4255: when others then
4256: hr_utility.set_location(gv_package || lv_procedure_name, 500);
4257: lv_error_message := 'Error at step ' || ln_step ||
4258: ' in ' || gv_package || lv_procedure_name;
4259: hr_utility.trace(lv_error_message || '-' || sqlerrm);
4260:
4261: lv_error_message :=
4262: pay_emp_action_arch.set_error_message(lv_error_message);
4263:
4260:
4261: lv_error_message :=
4262: pay_emp_action_arch.set_error_message(lv_error_message);
4263:
4264: hr_utility.set_message(801,'HR_ELE_ENTRY_FORMULA_HINT');
4265: hr_utility.set_message_token('FORMULA_TEXT', lv_error_message);
4266: hr_utility.raise_error;
4267:
4268: END py_archinit;
4261: lv_error_message :=
4262: pay_emp_action_arch.set_error_message(lv_error_message);
4263:
4264: hr_utility.set_message(801,'HR_ELE_ENTRY_FORMULA_HINT');
4265: hr_utility.set_message_token('FORMULA_TEXT', lv_error_message);
4266: hr_utility.raise_error;
4267:
4268: END py_archinit;
4269:
4262: pay_emp_action_arch.set_error_message(lv_error_message);
4263:
4264: hr_utility.set_message(801,'HR_ELE_ENTRY_FORMULA_HINT');
4265: hr_utility.set_message_token('FORMULA_TEXT', lv_error_message);
4266: hr_utility.raise_error;
4267:
4268: END py_archinit;
4269:
4270: --begin
4267:
4268: END py_archinit;
4269:
4270: --begin
4271: --hr_utility.trace_on (null, 'PYARCH');
4272:
4273: end pay_ca_payroll_arch;