39: l_uid_caeoy_person_id number;
40: --
41: begin
42:
43: --hr_utility.trace_on('Y','ORACLE');
44: hr_utility.trace('begining of range_cursor 1 ');
45:
46: select legislative_parameters
47: into leg_param
40: --
41: begin
42:
43: --hr_utility.trace_on('Y','ORACLE');
44: hr_utility.trace('begining of range_cursor 1 ');
45:
46: select legislative_parameters
47: into leg_param
48: from pay_payroll_actions ppa
86: and fai4.value = nvl(pay_ca_t4_reg.get_parameter(''PER_ID'',
87: ppa.legislative_parameters),fai4.value)
88: order by to_number(fai4.value)';
89:
90: hr_utility.trace('End of range_cursor 2 ');
91:
92: end range_cursor;
93: ---------------------------------- action_creation -------------------------
94: --
572:
573:
574: begin
575:
576: hr_utility.trace('begining of action creation 1 '||to_char(pactid));
577: hr_utility.trace('Start Person ID = ' || to_char(stperson));
578: hr_utility.trace('End Person ID = ' || to_char(endperson));
579: hr_utility.trace('Chunk # = ' || to_char(chunk));
580: hr_utility.trace('l_uid_caeoy_gross_earning '||l_uid_caeoy_gross_earning);
573:
574: begin
575:
576: hr_utility.trace('begining of action creation 1 '||to_char(pactid));
577: hr_utility.trace('Start Person ID = ' || to_char(stperson));
578: hr_utility.trace('End Person ID = ' || to_char(endperson));
579: hr_utility.trace('Chunk # = ' || to_char(chunk));
580: hr_utility.trace('l_uid_caeoy_gross_earning '||l_uid_caeoy_gross_earning);
581:
574: begin
575:
576: hr_utility.trace('begining of action creation 1 '||to_char(pactid));
577: hr_utility.trace('Start Person ID = ' || to_char(stperson));
578: hr_utility.trace('End Person ID = ' || to_char(endperson));
579: hr_utility.trace('Chunk # = ' || to_char(chunk));
580: hr_utility.trace('l_uid_caeoy_gross_earning '||l_uid_caeoy_gross_earning);
581:
582: /* get report type and effective date */
575:
576: hr_utility.trace('begining of action creation 1 '||to_char(pactid));
577: hr_utility.trace('Start Person ID = ' || to_char(stperson));
578: hr_utility.trace('End Person ID = ' || to_char(endperson));
579: hr_utility.trace('Chunk # = ' || to_char(chunk));
580: hr_utility.trace('l_uid_caeoy_gross_earning '||l_uid_caeoy_gross_earning);
581:
582: /* get report type and effective date */
583:
576: hr_utility.trace('begining of action creation 1 '||to_char(pactid));
577: hr_utility.trace('Start Person ID = ' || to_char(stperson));
578: hr_utility.trace('End Person ID = ' || to_char(endperson));
579: hr_utility.trace('Chunk # = ' || to_char(chunk));
580: hr_utility.trace('l_uid_caeoy_gross_earning '||l_uid_caeoy_gross_earning);
581:
582: /* get report type and effective date */
583:
584: select effective_date,
599: -- Added for bug 10399514
600: from pay_payroll_actions
601: where payroll_action_id = pactid;
602:
603: hr_utility.trace('begining of action creation 2 '||to_char(l_bus_group_id));
604: hr_utility.trace('legislative parameters is '||l_legislative_parameters);
605:
606: l_year := pay_ca_t4_reg.get_parameter('TAX_YEAR',l_legislative_parameters);
607: l_year_start := trunc(to_date(l_year,'YYYY'), 'Y');
600: from pay_payroll_actions
601: where payroll_action_id = pactid;
602:
603: hr_utility.trace('begining of action creation 2 '||to_char(l_bus_group_id));
604: hr_utility.trace('legislative parameters is '||l_legislative_parameters);
605:
606: l_year := pay_ca_t4_reg.get_parameter('TAX_YEAR',l_legislative_parameters);
607: l_year_start := trunc(to_date(l_year,'YYYY'), 'Y');
608: l_year_end := add_months(trunc(to_date(l_year,'YYYY'), 'Y'),12) - 1;
615:
616: lv_per_id := pay_ca_t4_reg.get_parameter('PER_ID',
617: l_legislative_parameters);
618:
619: hr_utility.trace('begining of action creation 4 '||
620: to_char(l_t4reg_tax_unit_id));
621:
622: l_uid_caeoy_tax_year := get_user_entity_id('CAEOY_TAXATION_YEAR');
623: l_uid_caeoy_tax_unit_id := get_user_entity_id('CAEOY_TAX_UNIT_ID');
638: Exception
639: When Others Then
640: l_report_format := Null ;
641: End ;
642: hr_utility.trace('l_report_format: '||l_report_format);
643: hr_utility.trace('l_report_type: '||l_report_type);
644: hr_utility.trace('l_state '||l_state);
645: hr_utility.trace('l_report_cat: '||l_report_cat);
646: l_person_on := pay_ac_utility.range_person_on( p_report_type => l_report_type,
639: When Others Then
640: l_report_format := Null ;
641: End ;
642: hr_utility.trace('l_report_format: '||l_report_format);
643: hr_utility.trace('l_report_type: '||l_report_type);
644: hr_utility.trace('l_state '||l_state);
645: hr_utility.trace('l_report_cat: '||l_report_cat);
646: l_person_on := pay_ac_utility.range_person_on( p_report_type => l_report_type,
647: p_report_format => l_report_format,
640: l_report_format := Null ;
641: End ;
642: hr_utility.trace('l_report_format: '||l_report_format);
643: hr_utility.trace('l_report_type: '||l_report_type);
644: hr_utility.trace('l_state '||l_state);
645: hr_utility.trace('l_report_cat: '||l_report_cat);
646: l_person_on := pay_ac_utility.range_person_on( p_report_type => l_report_type,
647: p_report_format => l_report_format,
648: p_report_qualifier => l_state,
641: End ;
642: hr_utility.trace('l_report_format: '||l_report_format);
643: hr_utility.trace('l_report_type: '||l_report_type);
644: hr_utility.trace('l_state '||l_state);
645: hr_utility.trace('l_report_cat: '||l_report_cat);
646: l_person_on := pay_ac_utility.range_person_on( p_report_type => l_report_type,
647: p_report_format => l_report_format,
648: p_report_qualifier => l_state,
649: p_report_category => l_report_cat) ;
664: if l_person_on then
665: if nvl(l_print_term,'N') = 'Y' then
666: open c_all_asg_in_asgset_range_term(l_arch_payroll_action_id,
667: l_province);
668: hr_utility.trace('opening c_all_asg_in_asgset_range_term CURSOR');
669: else
670: open c_all_asg_in_asgset_range(l_arch_payroll_action_id,
671: l_province);
672: hr_utility.trace('opening c_all_asg_in_asgset_range CURSOR');
668: hr_utility.trace('opening c_all_asg_in_asgset_range_term CURSOR');
669: else
670: open c_all_asg_in_asgset_range(l_arch_payroll_action_id,
671: l_province);
672: hr_utility.trace('opening c_all_asg_in_asgset_range CURSOR');
673: end if;
674: else
675: if nvl(l_print_term,'N') = 'Y' then
676: open c_all_asg_in_asgset_term(l_arch_payroll_action_id,
674: else
675: if nvl(l_print_term,'N') = 'Y' then
676: open c_all_asg_in_asgset_term(l_arch_payroll_action_id,
677: l_province);
678: hr_utility.trace('opening c_all_asg_in_asgset_term CURSOR');
679: else
680: open c_all_asg_in_asgset(l_arch_payroll_action_id,
681: l_province);
682: hr_utility.trace('opening c_all_asg_in_asgset CURSOR');
678: hr_utility.trace('opening c_all_asg_in_asgset_term CURSOR');
679: else
680: open c_all_asg_in_asgset(l_arch_payroll_action_id,
681: l_province);
682: hr_utility.trace('opening c_all_asg_in_asgset CURSOR');
683: end if;
684: end if;
685: /* to run for single employee entered at SRS level */
686: elsif lv_per_id is not null then
687: if nvl(l_print_term,'N') = 'Y' then
688: open c_single_asg_term(l_arch_payroll_action_id,
689: lv_per_id,
690: l_province);
691: hr_utility.trace('opening c_single_asg_term CURSOR');
692: else
693: open c_single_asg(l_arch_payroll_action_id,
694: lv_per_id,
695: l_province);
692: else
693: open c_single_asg(l_arch_payroll_action_id,
694: lv_per_id,
695: l_province);
696: hr_utility.trace('opening c_single_asg CURSOR');
697: end if;
698: else
699: if l_person_on then
700: if nvl(l_print_term,'N') = 'Y' then
699: if l_person_on then
700: if nvl(l_print_term,'N') = 'Y' then
701: open c_all_asg_range_term(l_arch_payroll_action_id,
702: l_province);
703: hr_utility.trace('opening c_all_asg_range_term CURSOR');
704: else
705: open c_all_asg_range(l_arch_payroll_action_id,
706: l_province);
707: hr_utility.trace('opening c_all_asg_range CURSOR');
703: hr_utility.trace('opening c_all_asg_range_term CURSOR');
704: else
705: open c_all_asg_range(l_arch_payroll_action_id,
706: l_province);
707: hr_utility.trace('opening c_all_asg_range CURSOR');
708: end if;
709: else
710: if nvl(l_print_term,'N') = 'Y' then
711: open c_all_asg_term(l_arch_payroll_action_id,
709: else
710: if nvl(l_print_term,'N') = 'Y' then
711: open c_all_asg_term(l_arch_payroll_action_id,
712: l_province);
713: hr_utility.trace('opening c_all_asg_term CURSOR');
714: else
715: open c_all_asg(l_arch_payroll_action_id,
716: l_province);
717: hr_utility.trace('opening c_all_asg CURSOR');
713: hr_utility.trace('opening c_all_asg_term CURSOR');
714: else
715: open c_all_asg(l_arch_payroll_action_id,
716: l_province);
717: hr_utility.trace('opening c_all_asg CURSOR');
718: end if;
719: end if;
720: end if;
721:
718: end if;
719: end if;
720: end if;
721:
722: hr_utility.trace('begining of if condition 5 '||to_char(l_tax_unit_id));
723:
724: else
725:
726: open c_all_gres;
724: else
725:
726: open c_all_gres;
727:
728: hr_utility.trace('else condition after open c_all_gres c_all_asg cursor 6 ');
729:
730: end if;
731:
732:
736: /* Added this validation to fix bug#2135545 */
737: if l_asg_set_id is not null then
738: if l_person_on then
739: if nvl(l_print_term,'N') = 'Y' then
740: hr_utility.trace('fetching c_all_asg_in_asgset_range_term CURSOR');
741: fetch c_all_asg_in_asgset_range_term into l_asg_id,
742: l_prov_cd,
743: ln_arch_asgact_id,
744: ln_arch_pact_id,
744: ln_arch_pact_id,
745: l_effective_end_date;
746: exit when c_all_asg_in_asgset_range_term%notfound;
747: else
748: hr_utility.trace('fetching c_all_asg_in_asgset_range CURSOR');
749: fetch c_all_asg_in_asgset_range into l_asg_id,
750: l_prov_cd,
751: ln_arch_asgact_id,
752: ln_arch_pact_id,
754: exit when c_all_asg_in_asgset_range%notfound;
755: end if;
756: else
757: if nvl(l_print_term,'N') = 'Y' then
758: hr_utility.trace('fetching c_all_asg_in_asgset_term CURSOR');
759: fetch c_all_asg_in_asgset_term into l_asg_id,
760: l_prov_cd,
761: ln_arch_asgact_id,
762: ln_arch_pact_id,
762: ln_arch_pact_id,
763: l_effective_end_date;
764: exit when c_all_asg_in_asgset_term%notfound;
765: else
766: hr_utility.trace('fetching c_all_asg_in_asgset CURSOR');
767: fetch c_all_asg_in_asgset into l_asg_id,
768: l_prov_cd,
769: ln_arch_asgact_id,
770: ln_arch_pact_id,
774: end if;
775: /* added to run for single employee entered at SRS level */
776: elsif lv_per_id is not null then
777: if nvl(l_print_term,'N') = 'Y' then
778: hr_utility.trace('fetching c_single_asg_term CURSOR');
779: fetch c_single_asg_term into l_asg_id,
780: l_prov_cd,
781: ln_arch_asgact_id,
782: ln_arch_pact_id,
782: ln_arch_pact_id,
783: l_effective_end_date;
784: exit when c_single_asg_term%notfound;
785: else
786: hr_utility.trace('fetching c_single_asg CURSOR');
787: fetch c_single_asg into l_asg_id,
788: l_prov_cd,
789: ln_arch_asgact_id,
790: ln_arch_pact_id,
793: end if;
794: else
795: if l_person_on then
796: if nvl(l_print_term,'N') = 'Y' then
797: hr_utility.trace('fetching c_all_asg_range_term CURSOR');
798: fetch c_all_asg_range_term into l_asg_id,
799: l_prov_cd,
800: ln_arch_asgact_id,
801: ln_arch_pact_id,
801: ln_arch_pact_id,
802: l_effective_end_date;
803: exit when c_all_asg_range_term%notfound;
804: else
805: hr_utility.trace('fetching c_all_asg_range CURSOR');
806: fetch c_all_asg_range into l_asg_id,
807: l_prov_cd,
808: ln_arch_asgact_id,
809: ln_arch_pact_id,
811: exit when c_all_asg_range%notfound;
812: end if;
813: else
814: if nvl(l_print_term,'N') = 'Y' then
815: hr_utility.trace('fetching c_all_asg_term CURSOR');
816: fetch c_all_asg_term into l_asg_id,
817: l_prov_cd,
818: ln_arch_asgact_id,
819: ln_arch_pact_id,
819: ln_arch_pact_id,
820: l_effective_end_date;
821: exit when c_all_asg_term%notfound;
822: else
823: hr_utility.trace('fetching c_all_asg CURSOR');
824: fetch c_all_asg into l_asg_id,
825: l_prov_cd,
826: ln_arch_asgact_id,
827: ln_arch_pact_id,
831: end if;
832: end if;
833:
834:
835: hr_utility.trace('Begining of if part loop for c_all_asg 10 '||
836: to_char(l_asg_id));
837:
838:
839: lv_negative_bal_flag := 'N';
845: 'JURISDICTION_CODE',
846: 'CAEOY_T4_NEGATIVE_BALANCE_EXISTS');
847: end if;
848:
849: hr_utility.trace('lv_negative_bal_flag '||lv_negative_bal_flag);
850: hr_utility.trace('l_asg_id '||l_asg_id);
851: hr_utility.trace('l_effective_end_date '||l_effective_end_date);
852:
853: if (lv_negative_bal_flag = 'N' or
846: 'CAEOY_T4_NEGATIVE_BALANCE_EXISTS');
847: end if;
848:
849: hr_utility.trace('lv_negative_bal_flag '||lv_negative_bal_flag);
850: hr_utility.trace('l_asg_id '||l_asg_id);
851: hr_utility.trace('l_effective_end_date '||l_effective_end_date);
852:
853: if (lv_negative_bal_flag = 'N' or
854: lv_negative_bal_flag is null) then
847: end if;
848:
849: hr_utility.trace('lv_negative_bal_flag '||lv_negative_bal_flag);
850: hr_utility.trace('l_asg_id '||l_asg_id);
851: hr_utility.trace('l_effective_end_date '||l_effective_end_date);
852:
853: if (lv_negative_bal_flag = 'N' or
854: lv_negative_bal_flag is null) then
855:
868: l_asg_id,
869: pactid,
870: chunk,
871: l_tax_unit_id);
872: hr_utility.trace('in if loop after calling hr_nonrun_asact.insact pkg 11 '
873: ||to_char(l_asg_id));
874: /* Added this to implement T4 Register and T4 Amendment Register
875: using the same report file */
876:
876:
877: lv_serial_number := l_prov_cd||lpad(to_char(ln_arch_asgact_id),14,0)||
878: lpad(to_char(ln_arch_pact_id),14,0);
879:
880: hr_utility.trace('lv_serial_number :' ||lv_serial_number);
881:
882: update pay_assignment_actions paa
883: set paa.serial_number = lv_serial_number
884: where paa.assignment_action_id = lockingactid;
917: /* Added this validation to fix bug#2135545 */
918: if l_asg_set_id is not null then
919: if l_person_on then
920: if nvl(l_print_term,'N') = 'Y' then
921: hr_utility.trace('Closing c_all_asg_in_asgset_range_term CURSOR');
922: close c_all_asg_in_asgset_range_term;
923: else
924: hr_utility.trace('Closing c_all_asg_in_asgset_range CURSOR');
925: close c_all_asg_in_asgset_range;
920: if nvl(l_print_term,'N') = 'Y' then
921: hr_utility.trace('Closing c_all_asg_in_asgset_range_term CURSOR');
922: close c_all_asg_in_asgset_range_term;
923: else
924: hr_utility.trace('Closing c_all_asg_in_asgset_range CURSOR');
925: close c_all_asg_in_asgset_range;
926: end if;
927: else
928: if nvl(l_print_term,'N') = 'Y' then
925: close c_all_asg_in_asgset_range;
926: end if;
927: else
928: if nvl(l_print_term,'N') = 'Y' then
929: hr_utility.trace('Closing c_all_asg_in_asgset_term CURSOR');
930: close c_all_asg_in_asgset_term;
931: else
932: hr_utility.trace('Closing c_all_asg_in_asgset CURSOR');
933: close c_all_asg_in_asgset;
928: if nvl(l_print_term,'N') = 'Y' then
929: hr_utility.trace('Closing c_all_asg_in_asgset_term CURSOR');
930: close c_all_asg_in_asgset_term;
931: else
932: hr_utility.trace('Closing c_all_asg_in_asgset CURSOR');
933: close c_all_asg_in_asgset;
934: end if;
935: end if;
936: elsif lv_per_id is not null then
934: end if;
935: end if;
936: elsif lv_per_id is not null then
937: if nvl(l_print_term,'N') = 'Y' then
938: hr_utility.trace('Closing c_single_asg_term CURSOR');
939: close c_single_asg_term;
940: else
941: hr_utility.trace('Closing c_single_asg CURSOR');
942: close c_single_asg;
937: if nvl(l_print_term,'N') = 'Y' then
938: hr_utility.trace('Closing c_single_asg_term CURSOR');
939: close c_single_asg_term;
940: else
941: hr_utility.trace('Closing c_single_asg CURSOR');
942: close c_single_asg;
943: end if;
944: else
945: if l_person_on then
943: end if;
944: else
945: if l_person_on then
946: if nvl(l_print_term,'N') = 'Y' then
947: hr_utility.trace('Closing c_all_asg_range_term CURSOR');
948: close c_all_asg_range_term;
949: else
950: hr_utility.trace('Closing c_all_asg_range CURSOR');
951: close c_all_asg_range;
946: if nvl(l_print_term,'N') = 'Y' then
947: hr_utility.trace('Closing c_all_asg_range_term CURSOR');
948: close c_all_asg_range_term;
949: else
950: hr_utility.trace('Closing c_all_asg_range CURSOR');
951: close c_all_asg_range;
952: end if;
953: else
954: if nvl(l_print_term,'N') = 'Y' then
951: close c_all_asg_range;
952: end if;
953: else
954: if nvl(l_print_term,'N') = 'Y' then
955: hr_utility.trace('Closing c_all_asg_term CURSOR');
956: close c_all_asg_term;
957: else
958: hr_utility.trace('Closing c_all_asg CURSOR');
959: close c_all_asg;
954: if nvl(l_print_term,'N') = 'Y' then
955: hr_utility.trace('Closing c_all_asg_term CURSOR');
956: close c_all_asg_term;
957: else
958: hr_utility.trace('Closing c_all_asg CURSOR');
959: close c_all_asg;
960: end if;
961: end if;
962: end if;
959: close c_all_asg;
960: end if;
961: end if;
962: end if;
963: hr_utility.trace('End of cursor c_all_asg 12');
964:
965: else
966:
967: loop
969: l_tax_unit_id,
970: l_arch_payroll_action_id,
971: l_session_date;
972:
973: hr_utility.trace('Begining of else loop for c_all_gres 7 '||to_char(l_tax_unit_id));
974: exit when c_all_gres%notfound;
975:
976: /* Added this validation to fix bug#2135545 */
977: if l_asg_set_id is not null then
976: /* Added this validation to fix bug#2135545 */
977: if l_asg_set_id is not null then
978: if l_person_on then
979: if nvl(l_print_term,'N') = 'Y' then
980: hr_utility.trace('opening c_all_asg_in_asgset_range_term CURSOR');
981: open c_all_asg_in_asgset_range_term(l_arch_payroll_action_id,
982: l_province);
983: else
984: hr_utility.trace('opening c_all_asg_in_asgset_range CURSOR');
980: hr_utility.trace('opening c_all_asg_in_asgset_range_term CURSOR');
981: open c_all_asg_in_asgset_range_term(l_arch_payroll_action_id,
982: l_province);
983: else
984: hr_utility.trace('opening c_all_asg_in_asgset_range CURSOR');
985: open c_all_asg_in_asgset_range(l_arch_payroll_action_id,
986: l_province);
987: end if;
988: else
986: l_province);
987: end if;
988: else
989: if nvl(l_print_term,'N') = 'Y' then
990: hr_utility.trace('opening c_all_asg_in_asgset_term CURSOR');
991: open c_all_asg_in_asgset_term(l_arch_payroll_action_id,
992: l_province);
993: else
994: hr_utility.trace('opening c_all_asg_in_asgset CURSOR');
990: hr_utility.trace('opening c_all_asg_in_asgset_term CURSOR');
991: open c_all_asg_in_asgset_term(l_arch_payroll_action_id,
992: l_province);
993: else
994: hr_utility.trace('opening c_all_asg_in_asgset CURSOR');
995: open c_all_asg_in_asgset(l_arch_payroll_action_id,
996: l_province);
997: end if;
998: end if;
997: end if;
998: end if;
999: elsif lv_per_id is not null then
1000: if nvl(l_print_term,'N') = 'Y' then
1001: hr_utility.trace('opening c_single_asg_term CURSOR');
1002: open c_single_asg_term(l_arch_payroll_action_id,
1003: lv_per_id,
1004: l_province);
1005: else
1002: open c_single_asg_term(l_arch_payroll_action_id,
1003: lv_per_id,
1004: l_province);
1005: else
1006: hr_utility.trace('opening c_single_asg CURSOR');
1007: open c_single_asg(l_arch_payroll_action_id,
1008: lv_per_id,
1009: l_province);
1010: end if;
1010: end if;
1011: else
1012: if l_person_on then
1013: if nvl(l_print_term,'N') = 'Y' then
1014: hr_utility.trace('opening c_all_asg_range_term CURSOR');
1015: open c_all_asg_range_term(l_arch_payroll_action_id,
1016: l_province);
1017: else
1018: hr_utility.trace('opening c_all_asg_range CURSOR');
1014: hr_utility.trace('opening c_all_asg_range_term CURSOR');
1015: open c_all_asg_range_term(l_arch_payroll_action_id,
1016: l_province);
1017: else
1018: hr_utility.trace('opening c_all_asg_range CURSOR');
1019: open c_all_asg_range(l_arch_payroll_action_id,
1020: l_province);
1021: end if;
1022: else
1020: l_province);
1021: end if;
1022: else
1023: if nvl(l_print_term,'N') = 'Y' then
1024: hr_utility.trace('opening c_all_asg_term CURSOR');
1025: open c_all_asg_term(l_arch_payroll_action_id,
1026: l_province);
1027: else
1028: hr_utility.trace('opening c_all_asg CURSOR');
1024: hr_utility.trace('opening c_all_asg_term CURSOR');
1025: open c_all_asg_term(l_arch_payroll_action_id,
1026: l_province);
1027: else
1028: hr_utility.trace('opening c_all_asg CURSOR');
1029: open c_all_asg(l_arch_payroll_action_id,
1030: l_province);
1031: end if;
1032: end if;
1036: /* Added this validation to fix bug#2135545 */
1037: if l_asg_set_id is not null then
1038: if l_person_on then
1039: if nvl(l_print_term,'N') = 'Y' then
1040: hr_utility.trace('fetching c_all_asg_in_asgset_range_term CURSOR');
1041: fetch c_all_asg_in_asgset_range_term into l_asg_id,
1042: l_prov_cd,
1043: ln_arch_asgact_id,
1044: ln_arch_pact_id,
1044: ln_arch_pact_id,
1045: l_effective_end_date;
1046: exit when c_all_asg_in_asgset_range_term%notfound;
1047: else
1048: hr_utility.trace('fetching c_all_asg_in_asgset_range CURSOR');
1049: fetch c_all_asg_in_asgset_range into l_asg_id,
1050: l_prov_cd,
1051: ln_arch_asgact_id,
1052: ln_arch_pact_id,
1054: exit when c_all_asg_in_asgset_range%notfound;
1055: end if;
1056: else
1057: if nvl(l_print_term,'N') = 'Y' then
1058: hr_utility.trace('fetching c_all_asg_in_asgset_term CURSOR');
1059: fetch c_all_asg_in_asgset_term into l_asg_id,
1060: l_prov_cd,
1061: ln_arch_asgact_id,
1062: ln_arch_pact_id,
1062: ln_arch_pact_id,
1063: l_effective_end_date;
1064: exit when c_all_asg_in_asgset_term%notfound;
1065: else
1066: hr_utility.trace('fetching c_all_asg_in_asgset CURSOR');
1067: fetch c_all_asg_in_asgset into l_asg_id,
1068: l_prov_cd,
1069: ln_arch_asgact_id,
1070: ln_arch_pact_id,
1074: end if; -- if l_person_on then
1075: /* added to run for single employee entered at SRS level */
1076: elsif lv_per_id is not null then
1077: if nvl(l_print_term,'N') = 'Y' then
1078: hr_utility.trace('fetching c_single_asg_term CURSOR');
1079: fetch c_single_asg_term into l_asg_id,
1080: l_prov_cd,
1081: ln_arch_asgact_id,
1082: ln_arch_pact_id,
1082: ln_arch_pact_id,
1083: l_effective_end_date;
1084: exit when c_single_asg_term%notfound;
1085: else
1086: hr_utility.trace('fetching c_single_asg CURSOR');
1087: fetch c_single_asg into l_asg_id,
1088: l_prov_cd,
1089: ln_arch_asgact_id,
1090: ln_arch_pact_id,
1093: end if;
1094: else
1095: if l_person_on then
1096: if nvl(l_print_term,'N') = 'Y' then
1097: hr_utility.trace('fetching c_all_asg_range_term CURSOR');
1098: fetch c_all_asg_range_term into l_asg_id,
1099: l_prov_cd,
1100: ln_arch_asgact_id,
1101: ln_arch_pact_id,
1101: ln_arch_pact_id,
1102: l_effective_end_date;
1103: exit when c_all_asg_range_term%notfound;
1104: else
1105: hr_utility.trace('fetching c_all_asg_range CURSOR');
1106: fetch c_all_asg_range into l_asg_id,
1107: l_prov_cd,
1108: ln_arch_asgact_id,
1109: ln_arch_pact_id,
1111: exit when c_all_asg_range%notfound;
1112: end if;
1113: else
1114: if nvl(l_print_term,'N') = 'Y' then
1115: hr_utility.trace('fetching c_all_asg_term CURSOR');
1116: fetch c_all_asg_term into l_asg_id,
1117: l_prov_cd,
1118: ln_arch_asgact_id,
1119: ln_arch_pact_id,
1119: ln_arch_pact_id,
1120: l_effective_end_date;
1121: exit when c_all_asg_term%notfound;
1122: else
1123: hr_utility.trace('fetching c_all_asg CURSOR');
1124: fetch c_all_asg into l_asg_id,
1125: l_prov_cd,
1126: ln_arch_asgact_id,
1127: ln_arch_pact_id,
1130: end if;
1131: end if;
1132: end if;
1133:
1134: hr_utility.trace('Begining of loop for c_all_asg 8 '||to_char(l_asg_id));
1135:
1136: lv_negative_bal_flag := 'N';
1137: if l_report_type in ('PYT4PR','T4_XML') then
1138:
1161: pactid,
1162: chunk,
1163: l_tax_unit_id);
1164:
1165: hr_utility.trace('in if loop after calling hr_nonrun_asact.insact pkg 9 '
1166: ||to_char(l_asg_id));
1167:
1168: /* Added this to implement T4 Register and T4 Amendment Register
1169: using the same report file */
1170:
1171: lv_serial_number := l_prov_cd||lpad(to_char(ln_arch_asgact_id),14,0)||
1172: lpad(to_char(ln_arch_pact_id),14,0);
1173:
1174: hr_utility.trace('lv_serial_number :' ||lv_serial_number);
1175:
1176: update pay_assignment_actions paa
1177: set paa.serial_number = lv_serial_number
1178: where paa.assignment_action_id = lockingactid;
1211: /* Added this validation to fix bug#2135545 */
1212: if l_asg_set_id is not null then
1213: if l_person_on then
1214: if nvl(l_print_term,'N') = 'Y' then
1215: hr_utility.trace('Closing c_all_asg_in_asgset_range_term CURSOR');
1216: close c_all_asg_in_asgset_range_term;
1217: else
1218: hr_utility.trace('Closing c_all_asg_in_asgset_range CURSOR');
1219: close c_all_asg_in_asgset_range;
1214: if nvl(l_print_term,'N') = 'Y' then
1215: hr_utility.trace('Closing c_all_asg_in_asgset_range_term CURSOR');
1216: close c_all_asg_in_asgset_range_term;
1217: else
1218: hr_utility.trace('Closing c_all_asg_in_asgset_range CURSOR');
1219: close c_all_asg_in_asgset_range;
1220: end if;
1221: else
1222: if nvl(l_print_term,'N') = 'Y' then
1219: close c_all_asg_in_asgset_range;
1220: end if;
1221: else
1222: if nvl(l_print_term,'N') = 'Y' then
1223: hr_utility.trace('Closing c_all_asg_in_asgset_term CURSOR');
1224: close c_all_asg_in_asgset_term;
1225: else
1226: hr_utility.trace('Closing c_all_asg_in_asgset CURSOR');
1227: close c_all_asg_in_asgset;
1222: if nvl(l_print_term,'N') = 'Y' then
1223: hr_utility.trace('Closing c_all_asg_in_asgset_term CURSOR');
1224: close c_all_asg_in_asgset_term;
1225: else
1226: hr_utility.trace('Closing c_all_asg_in_asgset CURSOR');
1227: close c_all_asg_in_asgset;
1228: end if;
1229: end if;
1230: elsif lv_per_id is not null then
1228: end if;
1229: end if;
1230: elsif lv_per_id is not null then
1231: if nvl(l_print_term,'N') = 'Y' then
1232: hr_utility.trace('Closing c_single_asg_term CURSOR');
1233: close c_single_asg_term;
1234: else
1235: hr_utility.trace('Closing c_single_asg CURSOR');
1236: close c_single_asg;
1231: if nvl(l_print_term,'N') = 'Y' then
1232: hr_utility.trace('Closing c_single_asg_term CURSOR');
1233: close c_single_asg_term;
1234: else
1235: hr_utility.trace('Closing c_single_asg CURSOR');
1236: close c_single_asg;
1237: end if;
1238: else
1239: if l_person_on then
1237: end if;
1238: else
1239: if l_person_on then
1240: if nvl(l_print_term,'N') = 'Y' then
1241: hr_utility.trace('Closing c_all_asg_range_term CURSOR');
1242: close c_all_asg_range_term;
1243: else
1244: hr_utility.trace('Closing c_all_asg_range CURSOR');
1245: close c_all_asg_range;
1240: if nvl(l_print_term,'N') = 'Y' then
1241: hr_utility.trace('Closing c_all_asg_range_term CURSOR');
1242: close c_all_asg_range_term;
1243: else
1244: hr_utility.trace('Closing c_all_asg_range CURSOR');
1245: close c_all_asg_range;
1246: end if;
1247: else
1248: if nvl(l_print_term,'N') = 'Y' then
1245: close c_all_asg_range;
1246: end if;
1247: else
1248: if nvl(l_print_term,'N') = 'Y' then
1249: hr_utility.trace('Closing c_all_asg_term CURSOR');
1250: close c_all_asg_term;
1251: else
1252: hr_utility.trace('Closing c_all_asg CURSOR');
1253: close c_all_asg;
1248: if nvl(l_print_term,'N') = 'Y' then
1249: hr_utility.trace('Closing c_all_asg_term CURSOR');
1250: close c_all_asg_term;
1251: else
1252: hr_utility.trace('Closing c_all_asg CURSOR');
1253: close c_all_asg;
1254: end if;
1255: end if;
1256: end if;
1258: end loop;
1259: close c_all_gres;
1260: end if;
1261:
1262: hr_utility.trace('End of If Condition for Loop 13');
1263:
1264: end action_creation;
1265:
1266: ---------------------------------- sort_action -----------------------------
1270: sqlstr in out nocopy varchar2, /* string holding the sql statement */
1271: len out nocopy number /* length of the sql string */
1272: ) is
1273: begin
1274: hr_utility.trace('Start of Sort_Action 1');
1275:
1276: sqlstr := 'select paa1.rowid
1277: from hr_all_organization_units hou,
1278: hr_all_organization_units hou1,
1321: ppf.last_name,first_name
1322: for update of paa1.assignment_action_id';
1323:
1324: len := length(sqlstr); -- return the length of the string.
1325: hr_utility.trace('End of Sort_Action 2');
1326: end sort_action;
1327: --
1328: ------------------------------ get_parameter -------------------------------
1329: function get_parameter(name in varchar2,