47: l_effective_date := TRUNC(pqp_car_mileage_functions.pqp_get_date_paid
48: (p_payroll_action_id));
49: END IF;
50:
51: hr_utility.set_location('Start of GET_PQP_LIMIT', 5);
52:
53: open Cur_403b_limit (l_effective_date);
54:
55: fetch Cur_403b_limit into
66:
67: if Cur_403b_limit%notfound then
68: close Cur_403b_limit;
69: -- Error : No limits defined for 403b
70: hr_utility.set_message(801, 'PAY_PQP_LIMITS_NOT_DEFINED');
71: hr_utility.raise_error;
72: return 0;
73: end if;
74:
67: if Cur_403b_limit%notfound then
68: close Cur_403b_limit;
69: -- Error : No limits defined for 403b
70: hr_utility.set_message(801, 'PAY_PQP_LIMITS_NOT_DEFINED');
71: hr_utility.raise_error;
72: return 0;
73: end if;
74:
75: hr_utility.set_location('GET_PQP_LIMIT', 10);
71: hr_utility.raise_error;
72: return 0;
73: end if;
74:
75: hr_utility.set_location('GET_PQP_LIMIT', 10);
76:
77: l_limit_name := upper(p_limit);
78:
79: l_403b_limit := 0;
99: end if;
100:
101: close Cur_403b_limit;
102:
103: hr_utility.set_location('GET_PQP_LIMIT',15);
104:
105:
106: return NVL(l_403b_limit,0);
107:
122: l_effective_date date;
123: begin
124: l_effective_date := TRUNC(pqp_car_mileage_functions.pqp_get_date_paid
125: (p_payroll_action_id));
126: hr_utility.set_location('Start of Calc_max_excl_allow ', 5);
127: max_excl_allow := (0.20 * p_ee_incld_annual_comp * p_years_of_service) -
128: p_total_er_contr_prior_years;
129:
130: hr_utility.set_location('End of Calc_max_excl_allow ', 10);
126: hr_utility.set_location('Start of Calc_max_excl_allow ', 5);
127: max_excl_allow := (0.20 * p_ee_incld_annual_comp * p_years_of_service) -
128: p_total_er_contr_prior_years;
129:
130: hr_utility.set_location('End of Calc_max_excl_allow ', 10);
131:
132: return max_excl_allow;
133: end;
134: --------------------------------------
157: begin
158:
159: l_effective_date := TRUNC(pqp_car_mileage_functions.pqp_get_date_paid
160: (p_payroll_action_id));
161: hr_utility.set_location('Start of Calc_overall_limit ', 5);
162:
163: l_incld_annual_comp_limit := pay_ff_functions.get_pqp_limit(
164: p_payroll_action_id =>p_payroll_action_id,
165: p_limit =>'includable_annual_comp_limit');
183: if overall_limit > l_overall_er_limit then
184: overall_limit := l_overall_er_limit;
185: end if;
186:
187: hr_utility.set_location('End of Calc_overall_limit ',10);
188:
189: return overall_limit;
190:
191: end;
211: l_effective_date date; -- of the same name
212: begin
213: l_effective_date := TRUNC(pqp_car_mileage_functions.pqp_get_date_paid
214: (p_payroll_action_id));
215: hr_utility.set_location('Start of Calc_any_year_limit ', 5);
216: l_additional_any_year_amount := pay_ff_functions.get_pqp_limit(
217: p_payroll_action_id=>p_payroll_action_id,
218: p_limit =>'additional_any_year_amount');
219:
242: if this_limit > l_any_year_limit then
243: this_limit := l_any_year_limit;
244: end if;
245:
246: hr_utility.set_location('End of Calc_any_year_limit ', 5);
247:
248: return this_limit;
249:
250: end;
345: end if;
346:
347: exception
348: when others then
349: hr_utility.set_message(801, 'PAY_YEAR_OF_SEP_LIMIT_FAILURE');
350: -- probable cause is that the payroll has not been assigned to
351: -- the employee as of date of hire
352: hr_utility.raise_error;
353: return 0;
348: when others then
349: hr_utility.set_message(801, 'PAY_YEAR_OF_SEP_LIMIT_FAILURE');
350: -- probable cause is that the payroll has not been assigned to
351: -- the employee as of date of hire
352: hr_utility.raise_error;
353: return 0;
354: end;
355: --
356: --
618: ELSE
619: l_effective_date := TRUNC(pqp_car_mileage_functions.pqp_get_date_paid
620: (p_payroll_action_id));
621: END IF;
622: hr_utility.set_location('Start of GET_457_LIMIT', 5);
623:
624: open Cur_457_limit (l_effective_date);
625:
626: fetch Cur_457_limit into
630:
631: if Cur_457_limit%notfound then
632: close Cur_457_limit;
633: -- Error : No limits defined for 457
634: hr_utility.set_message(801, 'PAY_PQP_LIMITS_NOT_DEFINED');
635: hr_utility.raise_error;
636: return 0;
637: end if;
638:
631: if Cur_457_limit%notfound then
632: close Cur_457_limit;
633: -- Error : No limits defined for 457
634: hr_utility.set_message(801, 'PAY_PQP_LIMITS_NOT_DEFINED');
635: hr_utility.raise_error;
636: return 0;
637: end if;
638:
639: hr_utility.set_location('GET_457_LIMIT', 10);
635: hr_utility.raise_error;
636: return 0;
637: end if;
638:
639: hr_utility.set_location('GET_457_LIMIT', 10);
640:
641: l_limit_name := upper(p_limit);
642:
643: l_457_limit := 0;
651: end if;
652:
653: close Cur_457_limit;
654:
655: hr_utility.set_location('GET_457_LIMIT',15);
656:
657:
658: return l_457_limit;
659:
711: l_effective_date date;
712: begin
713: l_effective_date := TRUNC(pqp_car_mileage_functions.pqp_get_date_paid
714: (p_payroll_action_id));
715: hr_utility.set_location('Start of get_457_calc_limit ', 5);
716:
717: l_calc_457_limit := (p_ee_incld_annual_comp / 3) ;
718:
719: hr_utility.set_location('End of get_457_calc_limit', 10);
715: hr_utility.set_location('Start of get_457_calc_limit ', 5);
716:
717: l_calc_457_limit := (p_ee_incld_annual_comp / 3) ;
718:
719: hr_utility.set_location('End of get_457_calc_limit', 10);
720:
721: return l_calc_457_limit;
722: end;
723:
732: l_effective_date date;
733: begin
734: l_effective_date := TRUNC(pqp_car_mileage_functions.pqp_get_date_paid
735: (p_payroll_action_id));
736: hr_utility.set_location('Start of get_457_vested_amt ', 5);
737:
738: return 0;
739:
740: hr_utility.set_location('End of get_457_vested_amt', 10);
736: hr_utility.set_location('Start of get_457_vested_amt ', 5);
737:
738: return 0;
739:
740: hr_utility.set_location('End of get_457_vested_amt', 10);
741:
742: end;
743:
744: --------------------------------------------------------------------------
754: l_effective_date date;
755: begin
756: l_effective_date := TRUNC(pqp_car_mileage_functions.pqp_get_date_paid
757: (p_payroll_action_id));
758: hr_utility.set_location('Start of Run Year ', 5);
759: return to_number(to_char(l_effective_date,'YYYY'));
760: hr_utility.set_location('End of Run Year ', 10);
761:
762: end;
756: l_effective_date := TRUNC(pqp_car_mileage_functions.pqp_get_date_paid
757: (p_payroll_action_id));
758: hr_utility.set_location('Start of Run Year ', 5);
759: return to_number(to_char(l_effective_date,'YYYY'));
760: hr_utility.set_location('End of Run Year ', 10);
761:
762: end;
763: --------------------------------------------------------------------------
764:
793:
794: /*
795: * Value of the Parameters passed
796: */
797: hr_utility.trace('Original Entry ID = ' || p_ctx_original_entry_id);
798: hr_utility.trace('Template Earnings = ' || p_template_earnings);
799: hr_utility.trace('Accrued Value = ' || p_accrued_value);
800: hr_utility.trace('Maximum Amount = ' || p_maximum_amount);
801: hr_utility.trace('Prorate Start Date = ' || p_prorate_start_date);
794: /*
795: * Value of the Parameters passed
796: */
797: hr_utility.trace('Original Entry ID = ' || p_ctx_original_entry_id);
798: hr_utility.trace('Template Earnings = ' || p_template_earnings);
799: hr_utility.trace('Accrued Value = ' || p_accrued_value);
800: hr_utility.trace('Maximum Amount = ' || p_maximum_amount);
801: hr_utility.trace('Prorate Start Date = ' || p_prorate_start_date);
802: hr_utility.trace('Prorate End Date = ' || p_prorate_end_date);
795: * Value of the Parameters passed
796: */
797: hr_utility.trace('Original Entry ID = ' || p_ctx_original_entry_id);
798: hr_utility.trace('Template Earnings = ' || p_template_earnings);
799: hr_utility.trace('Accrued Value = ' || p_accrued_value);
800: hr_utility.trace('Maximum Amount = ' || p_maximum_amount);
801: hr_utility.trace('Prorate Start Date = ' || p_prorate_start_date);
802: hr_utility.trace('Prorate End Date = ' || p_prorate_end_date);
803: hr_utility.trace('Payroll Start Date = ' || p_payroll_start_date);
796: */
797: hr_utility.trace('Original Entry ID = ' || p_ctx_original_entry_id);
798: hr_utility.trace('Template Earnings = ' || p_template_earnings);
799: hr_utility.trace('Accrued Value = ' || p_accrued_value);
800: hr_utility.trace('Maximum Amount = ' || p_maximum_amount);
801: hr_utility.trace('Prorate Start Date = ' || p_prorate_start_date);
802: hr_utility.trace('Prorate End Date = ' || p_prorate_end_date);
803: hr_utility.trace('Payroll Start Date = ' || p_payroll_start_date);
804: hr_utility.trace('Payroll End Date = ' || p_payroll_end_date);
797: hr_utility.trace('Original Entry ID = ' || p_ctx_original_entry_id);
798: hr_utility.trace('Template Earnings = ' || p_template_earnings);
799: hr_utility.trace('Accrued Value = ' || p_accrued_value);
800: hr_utility.trace('Maximum Amount = ' || p_maximum_amount);
801: hr_utility.trace('Prorate Start Date = ' || p_prorate_start_date);
802: hr_utility.trace('Prorate End Date = ' || p_prorate_end_date);
803: hr_utility.trace('Payroll Start Date = ' || p_payroll_start_date);
804: hr_utility.trace('Payroll End Date = ' || p_payroll_end_date);
805:
798: hr_utility.trace('Template Earnings = ' || p_template_earnings);
799: hr_utility.trace('Accrued Value = ' || p_accrued_value);
800: hr_utility.trace('Maximum Amount = ' || p_maximum_amount);
801: hr_utility.trace('Prorate Start Date = ' || p_prorate_start_date);
802: hr_utility.trace('Prorate End Date = ' || p_prorate_end_date);
803: hr_utility.trace('Payroll Start Date = ' || p_payroll_start_date);
804: hr_utility.trace('Payroll End Date = ' || p_payroll_end_date);
805:
806: /*
799: hr_utility.trace('Accrued Value = ' || p_accrued_value);
800: hr_utility.trace('Maximum Amount = ' || p_maximum_amount);
801: hr_utility.trace('Prorate Start Date = ' || p_prorate_start_date);
802: hr_utility.trace('Prorate End Date = ' || p_prorate_end_date);
803: hr_utility.trace('Payroll Start Date = ' || p_payroll_start_date);
804: hr_utility.trace('Payroll End Date = ' || p_payroll_end_date);
805:
806: /*
807: * Resetting the Global variables whenever a new element is getting processed
800: hr_utility.trace('Maximum Amount = ' || p_maximum_amount);
801: hr_utility.trace('Prorate Start Date = ' || p_prorate_start_date);
802: hr_utility.trace('Prorate End Date = ' || p_prorate_end_date);
803: hr_utility.trace('Payroll Start Date = ' || p_payroll_start_date);
804: hr_utility.trace('Payroll End Date = ' || p_payroll_end_date);
805:
806: /*
807: * Resetting the Global variables whenever a new element is getting processed
808: */
884: p_stop_entry_flag := 'Y';
885: end if;
886: end if;
887:
888: hr_utility.trace('Calculated Earnings = ' || ln_template_earnings);
889: hr_utility.trace('');
890: -- hr_utility.trace_off();
891:
892: return to_number(ln_template_earnings);
885: end if;
886: end if;
887:
888: hr_utility.trace('Calculated Earnings = ' || ln_template_earnings);
889: hr_utility.trace('');
890: -- hr_utility.trace_off();
891:
892: return to_number(ln_template_earnings);
893: end;
886: end if;
887:
888: hr_utility.trace('Calculated Earnings = ' || ln_template_earnings);
889: hr_utility.trace('');
890: -- hr_utility.trace_off();
891:
892: return to_number(ln_template_earnings);
893: end;
894:
920:
921: /*
922: * Value of the Parameters passed
923: */
924: hr_utility.trace('Original Entry ID = ' || p_ctx_original_entry_id);
925: hr_utility.trace('Auth End Date = ' || p_auth_end_date);
926: hr_utility.trace('Prorate Start Date = ' || p_prorate_end_date);
927: hr_utility.trace('Prorate End Date = ' || p_prorate_end_date);
928:
921: /*
922: * Value of the Parameters passed
923: */
924: hr_utility.trace('Original Entry ID = ' || p_ctx_original_entry_id);
925: hr_utility.trace('Auth End Date = ' || p_auth_end_date);
926: hr_utility.trace('Prorate Start Date = ' || p_prorate_end_date);
927: hr_utility.trace('Prorate End Date = ' || p_prorate_end_date);
928:
929: /*
922: * Value of the Parameters passed
923: */
924: hr_utility.trace('Original Entry ID = ' || p_ctx_original_entry_id);
925: hr_utility.trace('Auth End Date = ' || p_auth_end_date);
926: hr_utility.trace('Prorate Start Date = ' || p_prorate_end_date);
927: hr_utility.trace('Prorate End Date = ' || p_prorate_end_date);
928:
929: /*
930: * Get the element entry start dates and end dates
923: */
924: hr_utility.trace('Original Entry ID = ' || p_ctx_original_entry_id);
925: hr_utility.trace('Auth End Date = ' || p_auth_end_date);
926: hr_utility.trace('Prorate Start Date = ' || p_prorate_end_date);
927: hr_utility.trace('Prorate End Date = ' || p_prorate_end_date);
928:
929: /*
930: * Get the element entry start dates and end dates
931: * to correctly set the Global variables
983: l_amt_difference number;
984:
985: begin
986:
987: hr_utility.trace('Entering GET_CORRECT_FLSA_EARNINGS');
988: hr_utility.trace('ORIGINAL ENTRY ID........' || p_ctx_original_entry_id);
989: hr_utility.trace('ADJUST FLAG..............' || p_adjust_flag);
990: hr_utility.trace('MAX ADJUST AMOUNT .......' || p_max_adjust_amount);
991: hr_utility.trace('TOTAL EARNINGS...........' || p_total_earnings);
984:
985: begin
986:
987: hr_utility.trace('Entering GET_CORRECT_FLSA_EARNINGS');
988: hr_utility.trace('ORIGINAL ENTRY ID........' || p_ctx_original_entry_id);
989: hr_utility.trace('ADJUST FLAG..............' || p_adjust_flag);
990: hr_utility.trace('MAX ADJUST AMOUNT .......' || p_max_adjust_amount);
991: hr_utility.trace('TOTAL EARNINGS...........' || p_total_earnings);
992: hr_utility.trace('PERIOD EARNINGS..........' || p_period_earnings);
985: begin
986:
987: hr_utility.trace('Entering GET_CORRECT_FLSA_EARNINGS');
988: hr_utility.trace('ORIGINAL ENTRY ID........' || p_ctx_original_entry_id);
989: hr_utility.trace('ADJUST FLAG..............' || p_adjust_flag);
990: hr_utility.trace('MAX ADJUST AMOUNT .......' || p_max_adjust_amount);
991: hr_utility.trace('TOTAL EARNINGS...........' || p_total_earnings);
992: hr_utility.trace('PERIOD EARNINGS..........' || p_period_earnings);
993: hr_utility.trace('PRORATE END DATE.........' || p_prorate_end_date);
986:
987: hr_utility.trace('Entering GET_CORRECT_FLSA_EARNINGS');
988: hr_utility.trace('ORIGINAL ENTRY ID........' || p_ctx_original_entry_id);
989: hr_utility.trace('ADJUST FLAG..............' || p_adjust_flag);
990: hr_utility.trace('MAX ADJUST AMOUNT .......' || p_max_adjust_amount);
991: hr_utility.trace('TOTAL EARNINGS...........' || p_total_earnings);
992: hr_utility.trace('PERIOD EARNINGS..........' || p_period_earnings);
993: hr_utility.trace('PRORATE END DATE.........' || p_prorate_end_date);
994: hr_utility.trace('PAYROLL END DATE.........' || p_payroll_end_date);
987: hr_utility.trace('Entering GET_CORRECT_FLSA_EARNINGS');
988: hr_utility.trace('ORIGINAL ENTRY ID........' || p_ctx_original_entry_id);
989: hr_utility.trace('ADJUST FLAG..............' || p_adjust_flag);
990: hr_utility.trace('MAX ADJUST AMOUNT .......' || p_max_adjust_amount);
991: hr_utility.trace('TOTAL EARNINGS...........' || p_total_earnings);
992: hr_utility.trace('PERIOD EARNINGS..........' || p_period_earnings);
993: hr_utility.trace('PRORATE END DATE.........' || p_prorate_end_date);
994: hr_utility.trace('PAYROLL END DATE.........' || p_payroll_end_date);
995: hr_utility.trace('GLB_ORIGINAL_ENTRY_ID_2..' || GLB_ORIGINAL_ENTRY_ID_2);
988: hr_utility.trace('ORIGINAL ENTRY ID........' || p_ctx_original_entry_id);
989: hr_utility.trace('ADJUST FLAG..............' || p_adjust_flag);
990: hr_utility.trace('MAX ADJUST AMOUNT .......' || p_max_adjust_amount);
991: hr_utility.trace('TOTAL EARNINGS...........' || p_total_earnings);
992: hr_utility.trace('PERIOD EARNINGS..........' || p_period_earnings);
993: hr_utility.trace('PRORATE END DATE.........' || p_prorate_end_date);
994: hr_utility.trace('PAYROLL END DATE.........' || p_payroll_end_date);
995: hr_utility.trace('GLB_ORIGINAL_ENTRY_ID_2..' || GLB_ORIGINAL_ENTRY_ID_2);
996: l_period_earnings := 0;
989: hr_utility.trace('ADJUST FLAG..............' || p_adjust_flag);
990: hr_utility.trace('MAX ADJUST AMOUNT .......' || p_max_adjust_amount);
991: hr_utility.trace('TOTAL EARNINGS...........' || p_total_earnings);
992: hr_utility.trace('PERIOD EARNINGS..........' || p_period_earnings);
993: hr_utility.trace('PRORATE END DATE.........' || p_prorate_end_date);
994: hr_utility.trace('PAYROLL END DATE.........' || p_payroll_end_date);
995: hr_utility.trace('GLB_ORIGINAL_ENTRY_ID_2..' || GLB_ORIGINAL_ENTRY_ID_2);
996: l_period_earnings := 0;
997:
990: hr_utility.trace('MAX ADJUST AMOUNT .......' || p_max_adjust_amount);
991: hr_utility.trace('TOTAL EARNINGS...........' || p_total_earnings);
992: hr_utility.trace('PERIOD EARNINGS..........' || p_period_earnings);
993: hr_utility.trace('PRORATE END DATE.........' || p_prorate_end_date);
994: hr_utility.trace('PAYROLL END DATE.........' || p_payroll_end_date);
995: hr_utility.trace('GLB_ORIGINAL_ENTRY_ID_2..' || GLB_ORIGINAL_ENTRY_ID_2);
996: l_period_earnings := 0;
997:
998: -- Initialize GLB_ORIGINAL_ENTRY_ID_2
991: hr_utility.trace('TOTAL EARNINGS...........' || p_total_earnings);
992: hr_utility.trace('PERIOD EARNINGS..........' || p_period_earnings);
993: hr_utility.trace('PRORATE END DATE.........' || p_prorate_end_date);
994: hr_utility.trace('PAYROLL END DATE.........' || p_payroll_end_date);
995: hr_utility.trace('GLB_ORIGINAL_ENTRY_ID_2..' || GLB_ORIGINAL_ENTRY_ID_2);
996: l_period_earnings := 0;
997:
998: -- Initialize GLB_ORIGINAL_ENTRY_ID_2
999: if GLB_ORIGINAL_ENTRY_ID_2 is NULL then
1000: GLB_ORIGINAL_ENTRY_ID_2 := -9999;
1001: end if;
1002:
1003: if GLB_ORIGINAL_ENTRY_ID_2 <> p_ctx_original_entry_id then
1004: hr_utility.trace('Initializing Variables');
1005: GLB_ORIGINAL_ENTRY_ID_2 := p_ctx_original_entry_id;
1006: GLB_PERIOD_EARNINGS := 0;
1007: end if;
1008:
1010: -- during the last FLSA Period
1011: if p_adjust_flag = 'Y' then
1012: if p_payroll_end_date = p_prorate_end_date then
1013: l_amt_difference := p_total_earnings - GLB_PERIOD_EARNINGS - p_period_earnings;
1014: hr_utility.trace('Difference = ' || l_amt_difference);
1015: if l_amt_difference < p_max_adjust_amount then
1016: l_period_earnings := p_total_earnings - GLB_PERIOD_EARNINGS;
1017: hr_utility.trace('l_period_earnings1 = ' || l_period_earnings);
1018: else
1013: l_amt_difference := p_total_earnings - GLB_PERIOD_EARNINGS - p_period_earnings;
1014: hr_utility.trace('Difference = ' || l_amt_difference);
1015: if l_amt_difference < p_max_adjust_amount then
1016: l_period_earnings := p_total_earnings - GLB_PERIOD_EARNINGS;
1017: hr_utility.trace('l_period_earnings1 = ' || l_period_earnings);
1018: else
1019: l_period_earnings := round(p_period_earnings,2);
1020: hr_utility.trace('l_period_earnings1 = ' || l_period_earnings);
1021: end if;
1016: l_period_earnings := p_total_earnings - GLB_PERIOD_EARNINGS;
1017: hr_utility.trace('l_period_earnings1 = ' || l_period_earnings);
1018: else
1019: l_period_earnings := round(p_period_earnings,2);
1020: hr_utility.trace('l_period_earnings1 = ' || l_period_earnings);
1021: end if;
1022: else
1023: l_period_earnings := round(p_period_earnings,2);
1024: GLB_PERIOD_EARNINGS := GLB_PERIOD_EARNINGS + l_period_earnings;
1021: end if;
1022: else
1023: l_period_earnings := round(p_period_earnings,2);
1024: GLB_PERIOD_EARNINGS := GLB_PERIOD_EARNINGS + l_period_earnings;
1025: hr_utility.trace('l_period_earnings2 = ' || l_period_earnings);
1026: hr_utility.trace('GLB_PERIOD_EARNINGS = ' || GLB_PERIOD_EARNINGS);
1027: end if; -- if p_payroll_end_date
1028: else
1029: l_period_earnings := p_period_earnings;
1022: else
1023: l_period_earnings := round(p_period_earnings,2);
1024: GLB_PERIOD_EARNINGS := GLB_PERIOD_EARNINGS + l_period_earnings;
1025: hr_utility.trace('l_period_earnings2 = ' || l_period_earnings);
1026: hr_utility.trace('GLB_PERIOD_EARNINGS = ' || GLB_PERIOD_EARNINGS);
1027: end if; -- if p_payroll_end_date
1028: else
1029: l_period_earnings := p_period_earnings;
1030: hr_utility.trace('No Adjustment Done');
1026: hr_utility.trace('GLB_PERIOD_EARNINGS = ' || GLB_PERIOD_EARNINGS);
1027: end if; -- if p_payroll_end_date
1028: else
1029: l_period_earnings := p_period_earnings;
1030: hr_utility.trace('No Adjustment Done');
1031: end if; -- if p_adjust_flag = 'Y'
1032:
1033: return l_period_earnings;
1034:
1120:
1121: begin
1122:
1123: -- Value of the Parameters passed
1124: hr_utility.trace('GLB_RR_ORIGINAL_ENTRY_ID = ' || GLB_RR_ORIGINAL_ENTRY_ID);
1125: hr_utility.trace('GLB_RR_SAL_BASIS_ELEMENT = ' || GLB_RR_SAL_BASIS_ELEMENT);
1126: hr_utility.trace('GLB_RED_REG_ELE = ' || GLB_RED_REG_ELE);
1127: hr_utility.trace('stop_run_flag = ' || stop_run_flag);
1128:
1121: begin
1122:
1123: -- Value of the Parameters passed
1124: hr_utility.trace('GLB_RR_ORIGINAL_ENTRY_ID = ' || GLB_RR_ORIGINAL_ENTRY_ID);
1125: hr_utility.trace('GLB_RR_SAL_BASIS_ELEMENT = ' || GLB_RR_SAL_BASIS_ELEMENT);
1126: hr_utility.trace('GLB_RED_REG_ELE = ' || GLB_RED_REG_ELE);
1127: hr_utility.trace('stop_run_flag = ' || stop_run_flag);
1128:
1129: hr_utility.trace('Original Entry ID = ' || original_entry_id);
1122:
1123: -- Value of the Parameters passed
1124: hr_utility.trace('GLB_RR_ORIGINAL_ENTRY_ID = ' || GLB_RR_ORIGINAL_ENTRY_ID);
1125: hr_utility.trace('GLB_RR_SAL_BASIS_ELEMENT = ' || GLB_RR_SAL_BASIS_ELEMENT);
1126: hr_utility.trace('GLB_RED_REG_ELE = ' || GLB_RED_REG_ELE);
1127: hr_utility.trace('stop_run_flag = ' || stop_run_flag);
1128:
1129: hr_utility.trace('Original Entry ID = ' || original_entry_id);
1130: hr_utility.trace('Template Earning = ' || template_earning);
1123: -- Value of the Parameters passed
1124: hr_utility.trace('GLB_RR_ORIGINAL_ENTRY_ID = ' || GLB_RR_ORIGINAL_ENTRY_ID);
1125: hr_utility.trace('GLB_RR_SAL_BASIS_ELEMENT = ' || GLB_RR_SAL_BASIS_ELEMENT);
1126: hr_utility.trace('GLB_RED_REG_ELE = ' || GLB_RED_REG_ELE);
1127: hr_utility.trace('stop_run_flag = ' || stop_run_flag);
1128:
1129: hr_utility.trace('Original Entry ID = ' || original_entry_id);
1130: hr_utility.trace('Template Earning = ' || template_earning);
1131: hr_utility.trace('hours_passed = ' || hours_passed);
1125: hr_utility.trace('GLB_RR_SAL_BASIS_ELEMENT = ' || GLB_RR_SAL_BASIS_ELEMENT);
1126: hr_utility.trace('GLB_RED_REG_ELE = ' || GLB_RED_REG_ELE);
1127: hr_utility.trace('stop_run_flag = ' || stop_run_flag);
1128:
1129: hr_utility.trace('Original Entry ID = ' || original_entry_id);
1130: hr_utility.trace('Template Earning = ' || template_earning);
1131: hr_utility.trace('hours_passed = ' || hours_passed);
1132: hr_utility.trace('red_reg_earnings = ' || red_reg_earnings);
1133: hr_utility.trace('red_reg_hours = ' || red_reg_hours);
1126: hr_utility.trace('GLB_RED_REG_ELE = ' || GLB_RED_REG_ELE);
1127: hr_utility.trace('stop_run_flag = ' || stop_run_flag);
1128:
1129: hr_utility.trace('Original Entry ID = ' || original_entry_id);
1130: hr_utility.trace('Template Earning = ' || template_earning);
1131: hr_utility.trace('hours_passed = ' || hours_passed);
1132: hr_utility.trace('red_reg_earnings = ' || red_reg_earnings);
1133: hr_utility.trace('red_reg_hours = ' || red_reg_hours);
1134: hr_utility.trace('Prorate Start Date = ' || prorate_start);
1127: hr_utility.trace('stop_run_flag = ' || stop_run_flag);
1128:
1129: hr_utility.trace('Original Entry ID = ' || original_entry_id);
1130: hr_utility.trace('Template Earning = ' || template_earning);
1131: hr_utility.trace('hours_passed = ' || hours_passed);
1132: hr_utility.trace('red_reg_earnings = ' || red_reg_earnings);
1133: hr_utility.trace('red_reg_hours = ' || red_reg_hours);
1134: hr_utility.trace('Prorate Start Date = ' || prorate_start);
1135: hr_utility.trace('Prorate End Date = ' || prorate_end);
1128:
1129: hr_utility.trace('Original Entry ID = ' || original_entry_id);
1130: hr_utility.trace('Template Earning = ' || template_earning);
1131: hr_utility.trace('hours_passed = ' || hours_passed);
1132: hr_utility.trace('red_reg_earnings = ' || red_reg_earnings);
1133: hr_utility.trace('red_reg_hours = ' || red_reg_hours);
1134: hr_utility.trace('Prorate Start Date = ' || prorate_start);
1135: hr_utility.trace('Prorate End Date = ' || prorate_end);
1136: hr_utility.trace('Prorate Start Date = ' || prorate_start);
1129: hr_utility.trace('Original Entry ID = ' || original_entry_id);
1130: hr_utility.trace('Template Earning = ' || template_earning);
1131: hr_utility.trace('hours_passed = ' || hours_passed);
1132: hr_utility.trace('red_reg_earnings = ' || red_reg_earnings);
1133: hr_utility.trace('red_reg_hours = ' || red_reg_hours);
1134: hr_utility.trace('Prorate Start Date = ' || prorate_start);
1135: hr_utility.trace('Prorate End Date = ' || prorate_end);
1136: hr_utility.trace('Prorate Start Date = ' || prorate_start);
1137: hr_utility.trace('Prorate End Date = ' || prorate_end);
1130: hr_utility.trace('Template Earning = ' || template_earning);
1131: hr_utility.trace('hours_passed = ' || hours_passed);
1132: hr_utility.trace('red_reg_earnings = ' || red_reg_earnings);
1133: hr_utility.trace('red_reg_hours = ' || red_reg_hours);
1134: hr_utility.trace('Prorate Start Date = ' || prorate_start);
1135: hr_utility.trace('Prorate End Date = ' || prorate_end);
1136: hr_utility.trace('Prorate Start Date = ' || prorate_start);
1137: hr_utility.trace('Prorate End Date = ' || prorate_end);
1138: hr_utility.trace('Payroll Start Date = ' || payroll_start_date);
1131: hr_utility.trace('hours_passed = ' || hours_passed);
1132: hr_utility.trace('red_reg_earnings = ' || red_reg_earnings);
1133: hr_utility.trace('red_reg_hours = ' || red_reg_hours);
1134: hr_utility.trace('Prorate Start Date = ' || prorate_start);
1135: hr_utility.trace('Prorate End Date = ' || prorate_end);
1136: hr_utility.trace('Prorate Start Date = ' || prorate_start);
1137: hr_utility.trace('Prorate End Date = ' || prorate_end);
1138: hr_utility.trace('Payroll Start Date = ' || payroll_start_date);
1139: hr_utility.trace('Payroll End Date = ' || payroll_end_date);
1132: hr_utility.trace('red_reg_earnings = ' || red_reg_earnings);
1133: hr_utility.trace('red_reg_hours = ' || red_reg_hours);
1134: hr_utility.trace('Prorate Start Date = ' || prorate_start);
1135: hr_utility.trace('Prorate End Date = ' || prorate_end);
1136: hr_utility.trace('Prorate Start Date = ' || prorate_start);
1137: hr_utility.trace('Prorate End Date = ' || prorate_end);
1138: hr_utility.trace('Payroll Start Date = ' || payroll_start_date);
1139: hr_utility.trace('Payroll End Date = ' || payroll_end_date);
1140: hr_utility.trace('Flsa_time_definition = ' || flsa_time_definition);
1133: hr_utility.trace('red_reg_hours = ' || red_reg_hours);
1134: hr_utility.trace('Prorate Start Date = ' || prorate_start);
1135: hr_utility.trace('Prorate End Date = ' || prorate_end);
1136: hr_utility.trace('Prorate Start Date = ' || prorate_start);
1137: hr_utility.trace('Prorate End Date = ' || prorate_end);
1138: hr_utility.trace('Payroll Start Date = ' || payroll_start_date);
1139: hr_utility.trace('Payroll End Date = ' || payroll_end_date);
1140: hr_utility.trace('Flsa_time_definition = ' || flsa_time_definition);
1141: hr_utility.trace('red_reg_adjust_amount = ' || red_reg_adjust_amount);
1134: hr_utility.trace('Prorate Start Date = ' || prorate_start);
1135: hr_utility.trace('Prorate End Date = ' || prorate_end);
1136: hr_utility.trace('Prorate Start Date = ' || prorate_start);
1137: hr_utility.trace('Prorate End Date = ' || prorate_end);
1138: hr_utility.trace('Payroll Start Date = ' || payroll_start_date);
1139: hr_utility.trace('Payroll End Date = ' || payroll_end_date);
1140: hr_utility.trace('Flsa_time_definition = ' || flsa_time_definition);
1141: hr_utility.trace('red_reg_adjust_amount = ' || red_reg_adjust_amount);
1142: hr_utility.trace('red_reg_adjust_hours = ' || red_reg_adjust_hours);
1135: hr_utility.trace('Prorate End Date = ' || prorate_end);
1136: hr_utility.trace('Prorate Start Date = ' || prorate_start);
1137: hr_utility.trace('Prorate End Date = ' || prorate_end);
1138: hr_utility.trace('Payroll Start Date = ' || payroll_start_date);
1139: hr_utility.trace('Payroll End Date = ' || payroll_end_date);
1140: hr_utility.trace('Flsa_time_definition = ' || flsa_time_definition);
1141: hr_utility.trace('red_reg_adjust_amount = ' || red_reg_adjust_amount);
1142: hr_utility.trace('red_reg_adjust_hours = ' || red_reg_adjust_hours);
1143: hr_utility.trace('red_reg_raise_error = ' || red_reg_raise_error);
1136: hr_utility.trace('Prorate Start Date = ' || prorate_start);
1137: hr_utility.trace('Prorate End Date = ' || prorate_end);
1138: hr_utility.trace('Payroll Start Date = ' || payroll_start_date);
1139: hr_utility.trace('Payroll End Date = ' || payroll_end_date);
1140: hr_utility.trace('Flsa_time_definition = ' || flsa_time_definition);
1141: hr_utility.trace('red_reg_adjust_amount = ' || red_reg_adjust_amount);
1142: hr_utility.trace('red_reg_adjust_hours = ' || red_reg_adjust_hours);
1143: hr_utility.trace('red_reg_raise_error = ' || red_reg_raise_error);
1144:
1137: hr_utility.trace('Prorate End Date = ' || prorate_end);
1138: hr_utility.trace('Payroll Start Date = ' || payroll_start_date);
1139: hr_utility.trace('Payroll End Date = ' || payroll_end_date);
1140: hr_utility.trace('Flsa_time_definition = ' || flsa_time_definition);
1141: hr_utility.trace('red_reg_adjust_amount = ' || red_reg_adjust_amount);
1142: hr_utility.trace('red_reg_adjust_hours = ' || red_reg_adjust_hours);
1143: hr_utility.trace('red_reg_raise_error = ' || red_reg_raise_error);
1144:
1145: ln_reduced_hours_passed := 0;
1138: hr_utility.trace('Payroll Start Date = ' || payroll_start_date);
1139: hr_utility.trace('Payroll End Date = ' || payroll_end_date);
1140: hr_utility.trace('Flsa_time_definition = ' || flsa_time_definition);
1141: hr_utility.trace('red_reg_adjust_amount = ' || red_reg_adjust_amount);
1142: hr_utility.trace('red_reg_adjust_hours = ' || red_reg_adjust_hours);
1143: hr_utility.trace('red_reg_raise_error = ' || red_reg_raise_error);
1144:
1145: ln_reduced_hours_passed := 0;
1146: ln_reduced_template_earnings := 0;
1139: hr_utility.trace('Payroll End Date = ' || payroll_end_date);
1140: hr_utility.trace('Flsa_time_definition = ' || flsa_time_definition);
1141: hr_utility.trace('red_reg_adjust_amount = ' || red_reg_adjust_amount);
1142: hr_utility.trace('red_reg_adjust_hours = ' || red_reg_adjust_hours);
1143: hr_utility.trace('red_reg_raise_error = ' || red_reg_raise_error);
1144:
1145: ln_reduced_hours_passed := 0;
1146: ln_reduced_template_earnings := 0;
1147:
1153: stop_run_flag := 'N' ;
1154: ln_reduced_hours_passed := 0;
1155: ln_reduced_template_earnings := 0;
1156:
1157: hr_utility.trace('GLB_RR_ORIGINAL_ENTRY_ID = '
1158: || GLB_RR_ORIGINAL_ENTRY_ID);
1159: hr_utility.trace('GLB_RR_SAL_BASIS_ELEMENT = '
1160: || GLB_RR_SAL_BASIS_ELEMENT);
1161: hr_utility.trace('GLB_RED_REG_ELE = ' || GLB_RED_REG_ELE);
1155: ln_reduced_template_earnings := 0;
1156:
1157: hr_utility.trace('GLB_RR_ORIGINAL_ENTRY_ID = '
1158: || GLB_RR_ORIGINAL_ENTRY_ID);
1159: hr_utility.trace('GLB_RR_SAL_BASIS_ELEMENT = '
1160: || GLB_RR_SAL_BASIS_ELEMENT);
1161: hr_utility.trace('GLB_RED_REG_ELE = ' || GLB_RED_REG_ELE);
1162: hr_utility.trace('stop_run_flag = '|| stop_run_flag);
1163: end if; -- if GLB_RR_ORIGINAL_ENTRY_ID
1157: hr_utility.trace('GLB_RR_ORIGINAL_ENTRY_ID = '
1158: || GLB_RR_ORIGINAL_ENTRY_ID);
1159: hr_utility.trace('GLB_RR_SAL_BASIS_ELEMENT = '
1160: || GLB_RR_SAL_BASIS_ELEMENT);
1161: hr_utility.trace('GLB_RED_REG_ELE = ' || GLB_RED_REG_ELE);
1162: hr_utility.trace('stop_run_flag = '|| stop_run_flag);
1163: end if; -- if GLB_RR_ORIGINAL_ENTRY_ID
1164:
1165: if GLB_RR_ORIGINAL_ENTRY_ID <> original_entry_id then
1158: || GLB_RR_ORIGINAL_ENTRY_ID);
1159: hr_utility.trace('GLB_RR_SAL_BASIS_ELEMENT = '
1160: || GLB_RR_SAL_BASIS_ELEMENT);
1161: hr_utility.trace('GLB_RED_REG_ELE = ' || GLB_RED_REG_ELE);
1162: hr_utility.trace('stop_run_flag = '|| stop_run_flag);
1163: end if; -- if GLB_RR_ORIGINAL_ENTRY_ID
1164:
1165: if GLB_RR_ORIGINAL_ENTRY_ID <> original_entry_id then
1166: GLB_RR_ORIGINAL_ENTRY_ID := original_entry_id ;
1170: stop_run_flag := 'N' ;
1171: ln_reduced_hours_passed := 0;
1172: ln_reduced_template_earnings := 0;
1173:
1174: hr_utility.trace('GLB_RR_ORIGINAL_ENTRY_ID Reset = '
1175: || GLB_RR_ORIGINAL_ENTRY_ID);
1176: hr_utility.trace('GLB_RR_SAL_BASIS_ELEMENT Reset = '
1177: || GLB_RR_SAL_BASIS_ELEMENT);
1178: hr_utility.trace('GLB_RED_REG_ELE Reset = ' || GLB_RED_REG_ELE);
1172: ln_reduced_template_earnings := 0;
1173:
1174: hr_utility.trace('GLB_RR_ORIGINAL_ENTRY_ID Reset = '
1175: || GLB_RR_ORIGINAL_ENTRY_ID);
1176: hr_utility.trace('GLB_RR_SAL_BASIS_ELEMENT Reset = '
1177: || GLB_RR_SAL_BASIS_ELEMENT);
1178: hr_utility.trace('GLB_RED_REG_ELE Reset = ' || GLB_RED_REG_ELE);
1179: hr_utility.trace('stop_run_flag Reset = ' || stop_run_flag);
1180:
1174: hr_utility.trace('GLB_RR_ORIGINAL_ENTRY_ID Reset = '
1175: || GLB_RR_ORIGINAL_ENTRY_ID);
1176: hr_utility.trace('GLB_RR_SAL_BASIS_ELEMENT Reset = '
1177: || GLB_RR_SAL_BASIS_ELEMENT);
1178: hr_utility.trace('GLB_RED_REG_ELE Reset = ' || GLB_RED_REG_ELE);
1179: hr_utility.trace('stop_run_flag Reset = ' || stop_run_flag);
1180:
1181: open c_get_ele_type_id(original_entry_id);
1182: fetch c_get_ele_type_id into ln_element_type_id
1175: || GLB_RR_ORIGINAL_ENTRY_ID);
1176: hr_utility.trace('GLB_RR_SAL_BASIS_ELEMENT Reset = '
1177: || GLB_RR_SAL_BASIS_ELEMENT);
1178: hr_utility.trace('GLB_RED_REG_ELE Reset = ' || GLB_RED_REG_ELE);
1179: hr_utility.trace('stop_run_flag Reset = ' || stop_run_flag);
1180:
1181: open c_get_ele_type_id(original_entry_id);
1182: fetch c_get_ele_type_id into ln_element_type_id
1183: ,lv_element_name
1194: GLB_REG_ELEM := 'NONREG';
1195: end if; -- if lv_reg_elem = 'REG'
1196:
1197:
1198: hr_utility.trace(' ln_assignment_id = ' ||to_char(ln_assignment_id));
1199: hr_utility.trace('ln_element_type_id Curr = '
1200: ||to_char(ln_element_type_id));
1201: hr_utility.trace('lv_element_name Curr = ' ||lv_element_name);
1202: hr_utility.trace('GLB_RED_REG_ELE = ' || GLB_RED_REG_ELE);
1195: end if; -- if lv_reg_elem = 'REG'
1196:
1197:
1198: hr_utility.trace(' ln_assignment_id = ' ||to_char(ln_assignment_id));
1199: hr_utility.trace('ln_element_type_id Curr = '
1200: ||to_char(ln_element_type_id));
1201: hr_utility.trace('lv_element_name Curr = ' ||lv_element_name);
1202: hr_utility.trace('GLB_RED_REG_ELE = ' || GLB_RED_REG_ELE);
1203:
1197:
1198: hr_utility.trace(' ln_assignment_id = ' ||to_char(ln_assignment_id));
1199: hr_utility.trace('ln_element_type_id Curr = '
1200: ||to_char(ln_element_type_id));
1201: hr_utility.trace('lv_element_name Curr = ' ||lv_element_name);
1202: hr_utility.trace('GLB_RED_REG_ELE = ' || GLB_RED_REG_ELE);
1203:
1204: open c_get_salary_basis_element(ln_assignment_id,prorate_end);
1205: fetch c_get_salary_basis_element into ln_sal_element_type_id
1198: hr_utility.trace(' ln_assignment_id = ' ||to_char(ln_assignment_id));
1199: hr_utility.trace('ln_element_type_id Curr = '
1200: ||to_char(ln_element_type_id));
1201: hr_utility.trace('lv_element_name Curr = ' ||lv_element_name);
1202: hr_utility.trace('GLB_RED_REG_ELE = ' || GLB_RED_REG_ELE);
1203:
1204: open c_get_salary_basis_element(ln_assignment_id,prorate_end);
1205: fetch c_get_salary_basis_element into ln_sal_element_type_id
1206: ,lv_sal_element_name;
1205: fetch c_get_salary_basis_element into ln_sal_element_type_id
1206: ,lv_sal_element_name;
1207: close c_get_salary_basis_element;
1208:
1209: hr_utility.trace('ln_sal_element_type_id SB= '
1210: ||to_char(ln_sal_element_type_id));
1211: hr_utility.trace('lv_sal_element_name SB = '
1212: ||lv_sal_element_name);
1213:
1207: close c_get_salary_basis_element;
1208:
1209: hr_utility.trace('ln_sal_element_type_id SB= '
1210: ||to_char(ln_sal_element_type_id));
1211: hr_utility.trace('lv_sal_element_name SB = '
1212: ||lv_sal_element_name);
1213:
1214: if ln_element_type_id = ln_sal_element_type_id then
1215: GLB_RR_SAL_BASIS_ELEMENT := 'Y';
1212: ||lv_sal_element_name);
1213:
1214: if ln_element_type_id = ln_sal_element_type_id then
1215: GLB_RR_SAL_BASIS_ELEMENT := 'Y';
1216: hr_utility.trace('GLB_RR_SAL_BASIS_ELEMENT Matches = '
1217: || GLB_RR_SAL_BASIS_ELEMENT);
1218: end if;
1219: end if; -- if GLB_RR_ORIGINAL_ENTRY_ID <>
1220:
1227: -- Regular Earnings and Reduce Regular Earnings
1228: ln_diff_earn := template_earning - red_reg_earnings +
1229: red_reg_adjust_amount;
1230: if (ln_diff_earn >= 0 or red_reg_raise_error = 'N') then
1231: hr_utility.trace('Earnigs greated than Reduce Regular');
1232:
1233: ln_reduced_template_earnings := template_earning - red_reg_earnings;
1234: if ln_reduced_template_earnings <= 0 then
1235: reduced_template_earnings := 0;
1235: reduced_template_earnings := 0;
1236: else
1237: reduced_template_earnings := ln_reduced_template_earnings;
1238: end if; -- if
1239: hr_utility.trace('Reduced Template Earnings = '
1240: ||reduced_template_earnings);
1241: else
1242: hr_utility.trace('Else of earnings FLSA');
1243: reduced_template_earnings := 0;
1238: end if; -- if
1239: hr_utility.trace('Reduced Template Earnings = '
1240: ||reduced_template_earnings);
1241: else
1242: hr_utility.trace('Else of earnings FLSA');
1243: reduced_template_earnings := 0;
1244: stop_run_flag := 'Y';
1245: hr_utility.trace(' stop_run_flag = '||stop_run_flag);
1246: end if; -- if (template_earning >=
1241: else
1242: hr_utility.trace('Else of earnings FLSA');
1243: reduced_template_earnings := 0;
1244: stop_run_flag := 'Y';
1245: hr_utility.trace(' stop_run_flag = '||stop_run_flag);
1246: end if; -- if (template_earning >=
1247:
1248: -- Add the adjust hours passed in and find the difference between
1249: -- Regular Hours and Reduce Regular Hours
1249: -- Regular Hours and Reduce Regular Hours
1250: ln_diff_hours := hours_passed - red_reg_hours +
1251: red_reg_adjust_hours;
1252: if (ln_diff_hours >= 0 or red_reg_raise_error = 'N') then
1253: hr_utility.trace('Hours greater than Red Reg Hours');
1254:
1255: ln_reduced_hours_passed := hours_passed - red_reg_hours;
1256: if ln_reduced_hours_passed <=0 then
1257: reduced_hours_passed := 0;
1257: reduced_hours_passed := 0;
1258: else
1259: reduced_hours_passed := ln_reduced_hours_passed;
1260: end if; -- if
1261: hr_utility.trace('Reduced Hours Passed = ' ||reduced_hours_passed);
1262: else
1263: hr_utility.trace('Else of hours FLSA');
1264: reduced_hours_passed := 0;
1265: stop_run_flag := 'Y';
1259: reduced_hours_passed := ln_reduced_hours_passed;
1260: end if; -- if
1261: hr_utility.trace('Reduced Hours Passed = ' ||reduced_hours_passed);
1262: else
1263: hr_utility.trace('Else of hours FLSA');
1264: reduced_hours_passed := 0;
1265: stop_run_flag := 'Y';
1266: hr_utility.trace(' stop_run_flag = '||stop_run_flag);
1267: end if; -- if hours_passed >=
1262: else
1263: hr_utility.trace('Else of hours FLSA');
1264: reduced_hours_passed := 0;
1265: stop_run_flag := 'Y';
1266: hr_utility.trace(' stop_run_flag = '||stop_run_flag);
1267: end if; -- if hours_passed >=
1268: end if; -- if GLB_RED_REG_ELE = 'N'
1269:
1270: -- Override stopr_run_flag to 'N' when no error is to be raised
1269:
1270: -- Override stopr_run_flag to 'N' when no error is to be raised
1271: if red_reg_raise_error = 'N' then
1272: stop_run_flag := 'N';
1273: hr_utility.trace('Overriden Value of Stop Run Flag to N');
1274: end if; -- if red_reg_raise_error =
1275:
1276: hr_utility.trace('OUT stop_run_flag = ' || stop_run_flag);
1277: hr_utility.trace('OUT reduced_template_earnings = ' || reduced_template_earnings);
1272: stop_run_flag := 'N';
1273: hr_utility.trace('Overriden Value of Stop Run Flag to N');
1274: end if; -- if red_reg_raise_error =
1275:
1276: hr_utility.trace('OUT stop_run_flag = ' || stop_run_flag);
1277: hr_utility.trace('OUT reduced_template_earnings = ' || reduced_template_earnings);
1278: hr_utility.trace('OUT reduced_hours_passed = ' || reduced_hours_passed);
1279: -- Return Values
1280: -- 'Y' ==> Salary Element
1273: hr_utility.trace('Overriden Value of Stop Run Flag to N');
1274: end if; -- if red_reg_raise_error =
1275:
1276: hr_utility.trace('OUT stop_run_flag = ' || stop_run_flag);
1277: hr_utility.trace('OUT reduced_template_earnings = ' || reduced_template_earnings);
1278: hr_utility.trace('OUT reduced_hours_passed = ' || reduced_hours_passed);
1279: -- Return Values
1280: -- 'Y' ==> Salary Element
1281: -- Old formulae should work as instead of sending 'N' for
1274: end if; -- if red_reg_raise_error =
1275:
1276: hr_utility.trace('OUT stop_run_flag = ' || stop_run_flag);
1277: hr_utility.trace('OUT reduced_template_earnings = ' || reduced_template_earnings);
1278: hr_utility.trace('OUT reduced_hours_passed = ' || reduced_hours_passed);
1279: -- Return Values
1280: -- 'Y' ==> Salary Element
1281: -- Old formulae should work as instead of sending 'N' for
1282: -- elements that are not Salary Basis we are passing other
1286: if GLB_RED_REG_ELE = 'N' then
1287: if GLB_RR_SAL_BASIS_ELEMENT = 'N' then
1288: if GLB_REG_ELEM = 'REG' then
1289: lv_return_val := 'REG';
1290: hr_utility.trace('Returning Regular Element');
1291: else
1292: lv_return_val := 'NONREG';
1293: hr_utility.trace('Returning Regular Element');
1294: end if; -- if GLB_REG_ELEM = 'REG'
1289: lv_return_val := 'REG';
1290: hr_utility.trace('Returning Regular Element');
1291: else
1292: lv_return_val := 'NONREG';
1293: hr_utility.trace('Returning Regular Element');
1294: end if; -- if GLB_REG_ELEM = 'REG'
1295: else
1296: lv_return_val := 'Y';
1297: hr_utility.trace('Returning Salary Basis');
1293: hr_utility.trace('Returning Regular Element');
1294: end if; -- if GLB_REG_ELEM = 'REG'
1295: else
1296: lv_return_val := 'Y';
1297: hr_utility.trace('Returning Salary Basis');
1298: end if; -- if GLB_RR_SAL_BASIS_ELEMENT =
1299: else
1300: lv_return_val := 'REDREG';
1301: hr_utility.trace('Returning Reduce Regular');
1297: hr_utility.trace('Returning Salary Basis');
1298: end if; -- if GLB_RR_SAL_BASIS_ELEMENT =
1299: else
1300: lv_return_val := 'REDREG';
1301: hr_utility.trace('Returning Reduce Regular');
1302: end if; -- if GLB_RED_REG_ELE =
1303:
1304: return lv_return_val;
1305:
1321: if GLB_TIME_DEFINITION_ID is NULL then
1322: GLB_TIME_DEFINITION_ID := -9999;
1323: end if;
1324:
1325: hr_utility.trace(' GLB_TIME_DEFINITION_ID = '||
1326: to_char(GLB_TIME_DEFINITION_ID));
1327:
1328: if GLB_TIME_DEFINITION_ID <> TIME_DEFINITION_ID then
1329:
1330: open c_get_time_defn(TIME_DEFINITION_ID);
1331: fetch c_get_time_defn into GLB_TIME_DEFINITION_NAME;
1332: close c_get_time_defn ;
1333:
1334: hr_utility.trace(' GLB_TIME_DEFINITION_NAME = '||
1335: GLB_TIME_DEFINITION_NAME);
1336:
1337: if GLB_TIME_DEFINITION_NAME = 'Non Allocated Time Definition' then
1338: GLB_FLSA_TIME_DEFN := 'N';
1340: GLB_FLSA_TIME_DEFN := 'Y';
1341: end if;
1342: end if;
1343:
1344: hr_utility.trace(' GLB_FLSA_TIME_DEFN = '||
1345: GLB_FLSA_TIME_DEFN);
1346: --hr_utility.trace_off;
1347:
1348: return GLB_FLSA_TIME_DEFN;
1342: end if;
1343:
1344: hr_utility.trace(' GLB_FLSA_TIME_DEFN = '||
1345: GLB_FLSA_TIME_DEFN);
1346: --hr_utility.trace_off;
1347:
1348: return GLB_FLSA_TIME_DEFN;
1349:
1350: