132: l_rnd_amt number;
133:
134:
135: begin
136: g_debug := hr_utility.debug_enabled;
137: l_cents := p_actual_amt - trunc(p_actual_amt,1);
138:
139: if l_cents <= 0.025 then
140: l_rnd_amt := 0;
167:
168: l_amt_period number;
169:
170: begin
171: g_debug := hr_utility.debug_enabled;
172: if p_ann_freq = 52 then
173: l_amt_period := p_amt_week;
174: elsif p_ann_freq = 26 then
175: l_amt_period := (p_amt_week * 2);
205: l_amt_week number := 0;
206: l_new_amt number;
207:
208: begin
209: g_debug := hr_utility.debug_enabled;
210: if p_ann_freq = 52 then
211: l_amt_week := trunc (p_amt_period) + 0.99;
212: elsif p_ann_freq = 26 then
213: l_amt_week := trunc (p_amt_period / 2) + 0.99;
359: and ptp.end_date
360: between c_start_date and c_end_date;
361:
362: begin
363: g_debug := hr_utility.debug_enabled;
364:
365: if g_debug then
366: l_procedure :='pay_au_paye_ff.periods_since_hire_date';
367: hr_utility.set_location('Entering '||l_procedure,10);
363: g_debug := hr_utility.debug_enabled;
364:
365: if g_debug then
366: l_procedure :='pay_au_paye_ff.periods_since_hire_date';
367: hr_utility.set_location('Entering '||l_procedure,10);
368: hr_utility.set_location('IN p_payroll_id '||p_payroll_id,20);
369: hr_utility.set_location('IN p_assignment_id '||p_assignment_id,25);
370: hr_utility.set_location('IN p_tax_unit_id '||p_tax_unit_id,30);
371: hr_utility.set_location('IN p_assignment_action_id'||p_assignment_action_id,35);
364:
365: if g_debug then
366: l_procedure :='pay_au_paye_ff.periods_since_hire_date';
367: hr_utility.set_location('Entering '||l_procedure,10);
368: hr_utility.set_location('IN p_payroll_id '||p_payroll_id,20);
369: hr_utility.set_location('IN p_assignment_id '||p_assignment_id,25);
370: hr_utility.set_location('IN p_tax_unit_id '||p_tax_unit_id,30);
371: hr_utility.set_location('IN p_assignment_action_id'||p_assignment_action_id,35);
372: hr_utility.set_location('IN p_period_num '||p_period_num,40);
365: if g_debug then
366: l_procedure :='pay_au_paye_ff.periods_since_hire_date';
367: hr_utility.set_location('Entering '||l_procedure,10);
368: hr_utility.set_location('IN p_payroll_id '||p_payroll_id,20);
369: hr_utility.set_location('IN p_assignment_id '||p_assignment_id,25);
370: hr_utility.set_location('IN p_tax_unit_id '||p_tax_unit_id,30);
371: hr_utility.set_location('IN p_assignment_action_id'||p_assignment_action_id,35);
372: hr_utility.set_location('IN p_period_num '||p_period_num,40);
373: hr_utility.set_location('IN p_period_start '||to_char(p_period_start,'dd/mm/yyyy'),45);
366: l_procedure :='pay_au_paye_ff.periods_since_hire_date';
367: hr_utility.set_location('Entering '||l_procedure,10);
368: hr_utility.set_location('IN p_payroll_id '||p_payroll_id,20);
369: hr_utility.set_location('IN p_assignment_id '||p_assignment_id,25);
370: hr_utility.set_location('IN p_tax_unit_id '||p_tax_unit_id,30);
371: hr_utility.set_location('IN p_assignment_action_id'||p_assignment_action_id,35);
372: hr_utility.set_location('IN p_period_num '||p_period_num,40);
373: hr_utility.set_location('IN p_period_start '||to_char(p_period_start,'dd/mm/yyyy'),45);
374: hr_utility.set_location('IN p_emp_hire_date '||to_char(p_emp_hire_date,'dd/mm/yyyy'),50);
367: hr_utility.set_location('Entering '||l_procedure,10);
368: hr_utility.set_location('IN p_payroll_id '||p_payroll_id,20);
369: hr_utility.set_location('IN p_assignment_id '||p_assignment_id,25);
370: hr_utility.set_location('IN p_tax_unit_id '||p_tax_unit_id,30);
371: hr_utility.set_location('IN p_assignment_action_id'||p_assignment_action_id,35);
372: hr_utility.set_location('IN p_period_num '||p_period_num,40);
373: hr_utility.set_location('IN p_period_start '||to_char(p_period_start,'dd/mm/yyyy'),45);
374: hr_utility.set_location('IN p_emp_hire_date '||to_char(p_emp_hire_date,'dd/mm/yyyy'),50);
375: hr_utility.set_location('IN p_use_tax_flag '||p_use_tax_flag,55);
368: hr_utility.set_location('IN p_payroll_id '||p_payroll_id,20);
369: hr_utility.set_location('IN p_assignment_id '||p_assignment_id,25);
370: hr_utility.set_location('IN p_tax_unit_id '||p_tax_unit_id,30);
371: hr_utility.set_location('IN p_assignment_action_id'||p_assignment_action_id,35);
372: hr_utility.set_location('IN p_period_num '||p_period_num,40);
373: hr_utility.set_location('IN p_period_start '||to_char(p_period_start,'dd/mm/yyyy'),45);
374: hr_utility.set_location('IN p_emp_hire_date '||to_char(p_emp_hire_date,'dd/mm/yyyy'),50);
375: hr_utility.set_location('IN p_use_tax_flag '||p_use_tax_flag,55);
376:
369: hr_utility.set_location('IN p_assignment_id '||p_assignment_id,25);
370: hr_utility.set_location('IN p_tax_unit_id '||p_tax_unit_id,30);
371: hr_utility.set_location('IN p_assignment_action_id'||p_assignment_action_id,35);
372: hr_utility.set_location('IN p_period_num '||p_period_num,40);
373: hr_utility.set_location('IN p_period_start '||to_char(p_period_start,'dd/mm/yyyy'),45);
374: hr_utility.set_location('IN p_emp_hire_date '||to_char(p_emp_hire_date,'dd/mm/yyyy'),50);
375: hr_utility.set_location('IN p_use_tax_flag '||p_use_tax_flag,55);
376:
377: end if;
370: hr_utility.set_location('IN p_tax_unit_id '||p_tax_unit_id,30);
371: hr_utility.set_location('IN p_assignment_action_id'||p_assignment_action_id,35);
372: hr_utility.set_location('IN p_period_num '||p_period_num,40);
373: hr_utility.set_location('IN p_period_start '||to_char(p_period_start,'dd/mm/yyyy'),45);
374: hr_utility.set_location('IN p_emp_hire_date '||to_char(p_emp_hire_date,'dd/mm/yyyy'),50);
375: hr_utility.set_location('IN p_use_tax_flag '||p_use_tax_flag,55);
376:
377: end if;
378:
371: hr_utility.set_location('IN p_assignment_action_id'||p_assignment_action_id,35);
372: hr_utility.set_location('IN p_period_num '||p_period_num,40);
373: hr_utility.set_location('IN p_period_start '||to_char(p_period_start,'dd/mm/yyyy'),45);
374: hr_utility.set_location('IN p_emp_hire_date '||to_char(p_emp_hire_date,'dd/mm/yyyy'),50);
375: hr_utility.set_location('IN p_use_tax_flag '||p_use_tax_flag,55);
376:
377: end if;
378:
379: l_check_date := p_emp_hire_date;
461: fetch get_period_num into l_period_num;
462: close get_period_num;
463:
464: if g_debug then
465: hr_utility.trace('Value to be returned l_period_num =='||l_period_num);
466: hr_utility.set_location('Exiting '||l_procedure,60);
467: end if;
468:
469: return l_period_num;
462: close get_period_num;
463:
464: if g_debug then
465: hr_utility.trace('Value to be returned l_period_num =='||l_period_num);
466: hr_utility.set_location('Exiting '||l_procedure,60);
467: end if;
468:
469: return l_period_num;
470:
474: fetch c_get_le_period_num into l_period_num;
475: close c_get_le_period_num;
476:
477: if g_debug then
478: hr_utility.trace('Value to be returned l_period_num =='||l_period_num);
479: hr_utility.set_location('Exiting '||l_procedure,60);
480: end if;
481:
482: return l_period_num;
475: close c_get_le_period_num;
476:
477: if g_debug then
478: hr_utility.trace('Value to be returned l_period_num =='||l_period_num);
479: hr_utility.set_location('Exiting '||l_procedure,60);
480: end if;
481:
482: return l_period_num;
483: end if;
698: p_pre_tax_fixed := 0; /*bug4363057*/
699: p_pre_tax_prog := 0;
700: i := 1;
701: p_case :='USE_PREV_EARNINGS';
702: g_debug := hr_utility.debug_enabled;
703:
704: OPEN c_get_payroll_effective_date; /* Bug#4467198 */
705: FETCH c_get_payroll_effective_date INTO l_eff_date; /* Bug#4467198 */
706: CLOSE c_get_payroll_effective_date; /* Bug#4467198 */
706: CLOSE c_get_payroll_effective_date; /* Bug#4467198 */
707:
708: IF g_debug THEN
709: l_procedure := 'pay_au_paye_ff.calculate_asg_prev_value';
710: hr_utility.set_location('Entering '||l_procedure, 10);
711: hr_utility.set_location('IN p_assignment_id : ' ||p_assignment_id,20);
712: hr_utility.set_location('IN p_business_group_id ' ||p_business_group_id,25);
713: hr_utility.set_location('IN p_date_earned ' ||p_date_earned,30);
714: hr_utility.set_location('IN p_tax_unit_id ' ||p_tax_unit_id,35);
707:
708: IF g_debug THEN
709: l_procedure := 'pay_au_paye_ff.calculate_asg_prev_value';
710: hr_utility.set_location('Entering '||l_procedure, 10);
711: hr_utility.set_location('IN p_assignment_id : ' ||p_assignment_id,20);
712: hr_utility.set_location('IN p_business_group_id ' ||p_business_group_id,25);
713: hr_utility.set_location('IN p_date_earned ' ||p_date_earned,30);
714: hr_utility.set_location('IN p_tax_unit_id ' ||p_tax_unit_id,35);
715: hr_utility.set_location('IN p_period_start_date ' ||p_period_start_date,40);
708: IF g_debug THEN
709: l_procedure := 'pay_au_paye_ff.calculate_asg_prev_value';
710: hr_utility.set_location('Entering '||l_procedure, 10);
711: hr_utility.set_location('IN p_assignment_id : ' ||p_assignment_id,20);
712: hr_utility.set_location('IN p_business_group_id ' ||p_business_group_id,25);
713: hr_utility.set_location('IN p_date_earned ' ||p_date_earned,30);
714: hr_utility.set_location('IN p_tax_unit_id ' ||p_tax_unit_id,35);
715: hr_utility.set_location('IN p_period_start_date ' ||p_period_start_date,40);
716: hr_utility.set_location('IN p_case ' ||p_case,45);
709: l_procedure := 'pay_au_paye_ff.calculate_asg_prev_value';
710: hr_utility.set_location('Entering '||l_procedure, 10);
711: hr_utility.set_location('IN p_assignment_id : ' ||p_assignment_id,20);
712: hr_utility.set_location('IN p_business_group_id ' ||p_business_group_id,25);
713: hr_utility.set_location('IN p_date_earned ' ||p_date_earned,30);
714: hr_utility.set_location('IN p_tax_unit_id ' ||p_tax_unit_id,35);
715: hr_utility.set_location('IN p_period_start_date ' ||p_period_start_date,40);
716: hr_utility.set_location('IN p_case ' ||p_case,45);
717: hr_utility.set_location('IN p_date_earned ' ||to_char(p_date_earned,'dd/mm/yyyy'),50);
710: hr_utility.set_location('Entering '||l_procedure, 10);
711: hr_utility.set_location('IN p_assignment_id : ' ||p_assignment_id,20);
712: hr_utility.set_location('IN p_business_group_id ' ||p_business_group_id,25);
713: hr_utility.set_location('IN p_date_earned ' ||p_date_earned,30);
714: hr_utility.set_location('IN p_tax_unit_id ' ||p_tax_unit_id,35);
715: hr_utility.set_location('IN p_period_start_date ' ||p_period_start_date,40);
716: hr_utility.set_location('IN p_case ' ||p_case,45);
717: hr_utility.set_location('IN p_date_earned ' ||to_char(p_date_earned,'dd/mm/yyyy'),50);
718: hr_utility.set_location('IN p_use_tax_flag ' ||p_use_tax_flag,50);
711: hr_utility.set_location('IN p_assignment_id : ' ||p_assignment_id,20);
712: hr_utility.set_location('IN p_business_group_id ' ||p_business_group_id,25);
713: hr_utility.set_location('IN p_date_earned ' ||p_date_earned,30);
714: hr_utility.set_location('IN p_tax_unit_id ' ||p_tax_unit_id,35);
715: hr_utility.set_location('IN p_period_start_date ' ||p_period_start_date,40);
716: hr_utility.set_location('IN p_case ' ||p_case,45);
717: hr_utility.set_location('IN p_date_earned ' ||to_char(p_date_earned,'dd/mm/yyyy'),50);
718: hr_utility.set_location('IN p_use_tax_flag ' ||p_use_tax_flag,50);
719: END IF;
712: hr_utility.set_location('IN p_business_group_id ' ||p_business_group_id,25);
713: hr_utility.set_location('IN p_date_earned ' ||p_date_earned,30);
714: hr_utility.set_location('IN p_tax_unit_id ' ||p_tax_unit_id,35);
715: hr_utility.set_location('IN p_period_start_date ' ||p_period_start_date,40);
716: hr_utility.set_location('IN p_case ' ||p_case,45);
717: hr_utility.set_location('IN p_date_earned ' ||to_char(p_date_earned,'dd/mm/yyyy'),50);
718: hr_utility.set_location('IN p_use_tax_flag ' ||p_use_tax_flag,50);
719: END IF;
720:
713: hr_utility.set_location('IN p_date_earned ' ||p_date_earned,30);
714: hr_utility.set_location('IN p_tax_unit_id ' ||p_tax_unit_id,35);
715: hr_utility.set_location('IN p_period_start_date ' ||p_period_start_date,40);
716: hr_utility.set_location('IN p_case ' ||p_case,45);
717: hr_utility.set_location('IN p_date_earned ' ||to_char(p_date_earned,'dd/mm/yyyy'),50);
718: hr_utility.set_location('IN p_use_tax_flag ' ||p_use_tax_flag,50);
719: END IF;
720:
721: /*Bug#4467198 Find the Financial Year Start and End Dates on the basis of effective date of the current payroll run.*/
714: hr_utility.set_location('IN p_tax_unit_id ' ||p_tax_unit_id,35);
715: hr_utility.set_location('IN p_period_start_date ' ||p_period_start_date,40);
716: hr_utility.set_location('IN p_case ' ||p_case,45);
717: hr_utility.set_location('IN p_date_earned ' ||to_char(p_date_earned,'dd/mm/yyyy'),50);
718: hr_utility.set_location('IN p_use_tax_flag ' ||p_use_tax_flag,50);
719: END IF;
720:
721: /*Bug#4467198 Find the Financial Year Start and End Dates on the basis of effective date of the current payroll run.*/
722:
735:
736: END IF;
737:
738: IF g_debug THEN
739: hr_utility.set_location('l_fin_start_date: '|| l_fin_start_date, 55);
740: hr_utility.set_location('l_fin_end_date: '|| l_fin_end_date, 60);
741:
742: hr_utility.set_location('l_prev_yr_fin_start_date: '|| l_prev_yr_fin_start_date, 65);
743: hr_utility.set_location('l_prev_yr_fin_end_date: '|| l_prev_yr_fin_end_date, 70);
736: END IF;
737:
738: IF g_debug THEN
739: hr_utility.set_location('l_fin_start_date: '|| l_fin_start_date, 55);
740: hr_utility.set_location('l_fin_end_date: '|| l_fin_end_date, 60);
741:
742: hr_utility.set_location('l_prev_yr_fin_start_date: '|| l_prev_yr_fin_start_date, 65);
743: hr_utility.set_location('l_prev_yr_fin_end_date: '|| l_prev_yr_fin_end_date, 70);
744: END IF;
738: IF g_debug THEN
739: hr_utility.set_location('l_fin_start_date: '|| l_fin_start_date, 55);
740: hr_utility.set_location('l_fin_end_date: '|| l_fin_end_date, 60);
741:
742: hr_utility.set_location('l_prev_yr_fin_start_date: '|| l_prev_yr_fin_start_date, 65);
743: hr_utility.set_location('l_prev_yr_fin_end_date: '|| l_prev_yr_fin_end_date, 70);
744: END IF;
745:
746: /* Bug#4467198 - Use the below cursor to check if this is the first for the assignment in this year*/
739: hr_utility.set_location('l_fin_start_date: '|| l_fin_start_date, 55);
740: hr_utility.set_location('l_fin_end_date: '|| l_fin_end_date, 60);
741:
742: hr_utility.set_location('l_prev_yr_fin_start_date: '|| l_prev_yr_fin_start_date, 65);
743: hr_utility.set_location('l_prev_yr_fin_end_date: '|| l_prev_yr_fin_end_date, 70);
744: END IF;
745:
746: /* Bug#4467198 - Use the below cursor to check if this is the first for the assignment in this year*/
747: OPEN c_check_payroll_run(p_assignment_id,
783: END IF;
784:
785:
786: IF g_debug THEN
787: hr_utility.set_location('l_asg_act_id: '|| l_asg_act_id, 75);
788: hr_utility.set_location('g_context_table(1).tax_unit_id: '|| l_tax_unit_id, 80);
789: hr_utility.set_location('l_payroll_id: '||l_payroll_id, 85);
790: hr_utility.set_location('p_tax_unit_id : '||p_tax_unit_id, 90);
791: END IF;
784:
785:
786: IF g_debug THEN
787: hr_utility.set_location('l_asg_act_id: '|| l_asg_act_id, 75);
788: hr_utility.set_location('g_context_table(1).tax_unit_id: '|| l_tax_unit_id, 80);
789: hr_utility.set_location('l_payroll_id: '||l_payroll_id, 85);
790: hr_utility.set_location('p_tax_unit_id : '||p_tax_unit_id, 90);
791: END IF;
792:
785:
786: IF g_debug THEN
787: hr_utility.set_location('l_asg_act_id: '|| l_asg_act_id, 75);
788: hr_utility.set_location('g_context_table(1).tax_unit_id: '|| l_tax_unit_id, 80);
789: hr_utility.set_location('l_payroll_id: '||l_payroll_id, 85);
790: hr_utility.set_location('p_tax_unit_id : '||p_tax_unit_id, 90);
791: END IF;
792:
793:
786: IF g_debug THEN
787: hr_utility.set_location('l_asg_act_id: '|| l_asg_act_id, 75);
788: hr_utility.set_location('g_context_table(1).tax_unit_id: '|| l_tax_unit_id, 80);
789: hr_utility.set_location('l_payroll_id: '||l_payroll_id, 85);
790: hr_utility.set_location('p_tax_unit_id : '||p_tax_unit_id, 90);
791: END IF;
792:
793:
794: IF nvl(l_asg_act_id,-99999) = -99999 THEN
800: Average_Earnings will not be calculated.
801: */
802: p_case := 'POPULATE_MSG';
803: IF g_debug THEN
804: hr_utility.set_location('p_case: '|| p_case, 95);
805: hr_utility.set_location('Exiting '||l_procedure,105);
806: END IF;
807: RETURN 110;
808:
801: */
802: p_case := 'POPULATE_MSG';
803: IF g_debug THEN
804: hr_utility.set_location('p_case: '|| p_case, 95);
805: hr_utility.set_location('Exiting '||l_procedure,105);
806: END IF;
807: RETURN 110;
808:
809: ELSE
829: CLOSE c_get_periods;
830: END IF;
831:
832: IF g_debug THEN
833: hr_utility.set_location('p_paid_periods: '|| p_paid_periods, 100);
834: END IF;
835:
836:
837: IF NOT g_ytd_def_bals_populated THEN
888: and g_ytd_bals(i).balance_name = 'Earnings_Standard'
889: THEN
890: p_earnings_standard := nvl(g_ytd_result_table(i).balance_value,0);
891: IF g_debug THEN
892: hr_utility.set_location('p_earnings_standard: '||p_earnings_standard, 60);
893: END IF;
894: ELSIF g_ytd_result_table(i).defined_balance_id = g_ytd_bals(i).defined_balance_id
895: and g_ytd_bals(i).balance_name = 'Pre Tax Spread Deductions'
896: THEN
895: and g_ytd_bals(i).balance_name = 'Pre Tax Spread Deductions'
896: THEN
897: p_pre_tax_spread := nvl(g_ytd_result_table(i).balance_value,0);
898: IF g_debug THEN
899: hr_utility.set_location('p_pre_tax_spread_deductions: '||p_pre_tax_spread, 60);
900: END IF;
901:
902: ELSIF g_ytd_result_table(i).defined_balance_id = g_ytd_bals(i).defined_balance_id
903: and g_ytd_bals(i).balance_name = 'Pre Tax Fixed Deductions' and p_use_tax_flag = 'Y'
904: /*bug4363057*/
905: THEN
906: p_pre_tax_fixed := nvl(g_ytd_result_table(i).balance_value,0);
907: IF g_debug THEN
908: hr_utility.set_location('p_pre_tax_fixed_deductions: '||p_pre_tax_fixed, 60);
909: END IF;
910: ELSIF g_ytd_result_table(i).defined_balance_id = g_ytd_bals(i).defined_balance_id
911: and g_ytd_bals(i).balance_name = 'Pre Tax Progressive Deductions' and p_use_tax_flag = 'Y'
912: /*bug4363057*/
912: /*bug4363057*/
913: THEN
914: p_pre_tax_prog := nvl(g_ytd_result_table(i).balance_value,0);
915: IF g_debug THEN
916: hr_utility.set_location('p_pre_tax_progressive_deductions: '||p_pre_tax_prog, 60);
917: END IF;
918:
919: END IF;
920: END LOOP;
919: END IF;
920: END LOOP;
921:
922: if g_debug then
923: hr_utility.set_location('OUT p_paid_periods: '|| p_paid_periods, 100);
924: hr_utility.set_location('OUT p_earnings_standard: '||p_earnings_standard, 60);
925: hr_utility.set_location('OUT p_pre_tax_spread_deductions: '||p_pre_tax_spread, 60);
926: hr_utility.set_location('OUT p_pre_tax_fixed_deductions: '||p_pre_tax_fixed, 60);
927: hr_utility.set_location('OUT p_pre_tax_progressive_deductions: '||p_pre_tax_prog, 60);
920: END LOOP;
921:
922: if g_debug then
923: hr_utility.set_location('OUT p_paid_periods: '|| p_paid_periods, 100);
924: hr_utility.set_location('OUT p_earnings_standard: '||p_earnings_standard, 60);
925: hr_utility.set_location('OUT p_pre_tax_spread_deductions: '||p_pre_tax_spread, 60);
926: hr_utility.set_location('OUT p_pre_tax_fixed_deductions: '||p_pre_tax_fixed, 60);
927: hr_utility.set_location('OUT p_pre_tax_progressive_deductions: '||p_pre_tax_prog, 60);
928: hr_utility.set_location('Exiting '||l_procedure,105);
921:
922: if g_debug then
923: hr_utility.set_location('OUT p_paid_periods: '|| p_paid_periods, 100);
924: hr_utility.set_location('OUT p_earnings_standard: '||p_earnings_standard, 60);
925: hr_utility.set_location('OUT p_pre_tax_spread_deductions: '||p_pre_tax_spread, 60);
926: hr_utility.set_location('OUT p_pre_tax_fixed_deductions: '||p_pre_tax_fixed, 60);
927: hr_utility.set_location('OUT p_pre_tax_progressive_deductions: '||p_pre_tax_prog, 60);
928: hr_utility.set_location('Exiting '||l_procedure,105);
929: end if;
922: if g_debug then
923: hr_utility.set_location('OUT p_paid_periods: '|| p_paid_periods, 100);
924: hr_utility.set_location('OUT p_earnings_standard: '||p_earnings_standard, 60);
925: hr_utility.set_location('OUT p_pre_tax_spread_deductions: '||p_pre_tax_spread, 60);
926: hr_utility.set_location('OUT p_pre_tax_fixed_deductions: '||p_pre_tax_fixed, 60);
927: hr_utility.set_location('OUT p_pre_tax_progressive_deductions: '||p_pre_tax_prog, 60);
928: hr_utility.set_location('Exiting '||l_procedure,105);
929: end if;
930:
923: hr_utility.set_location('OUT p_paid_periods: '|| p_paid_periods, 100);
924: hr_utility.set_location('OUT p_earnings_standard: '||p_earnings_standard, 60);
925: hr_utility.set_location('OUT p_pre_tax_spread_deductions: '||p_pre_tax_spread, 60);
926: hr_utility.set_location('OUT p_pre_tax_fixed_deductions: '||p_pre_tax_fixed, 60);
927: hr_utility.set_location('OUT p_pre_tax_progressive_deductions: '||p_pre_tax_prog, 60);
928: hr_utility.set_location('Exiting '||l_procedure,105);
929: end if;
930:
931: return 1000;
924: hr_utility.set_location('OUT p_earnings_standard: '||p_earnings_standard, 60);
925: hr_utility.set_location('OUT p_pre_tax_spread_deductions: '||p_pre_tax_spread, 60);
926: hr_utility.set_location('OUT p_pre_tax_fixed_deductions: '||p_pre_tax_fixed, 60);
927: hr_utility.set_location('OUT p_pre_tax_progressive_deductions: '||p_pre_tax_prog, 60);
928: hr_utility.set_location('Exiting '||l_procedure,105);
929: end if;
930:
931: return 1000;
932: END IF;
1017:
1018:
1019:
1020: begin
1021: g_debug := hr_utility.debug_enabled;
1022:
1023: if g_debug then
1024: l_procedure :='pay_au_paye_ff.paid_periods_since_hire_date';
1025: hr_utility.set_location('Entering '||l_procedure,10);
1021: g_debug := hr_utility.debug_enabled;
1022:
1023: if g_debug then
1024: l_procedure :='pay_au_paye_ff.paid_periods_since_hire_date';
1025: hr_utility.set_location('Entering '||l_procedure,10);
1026: hr_utility.set_location('IN p_payroll_id '||p_payroll_id,20);
1027: hr_utility.set_location('IN p_assignment_id '||p_assignment_id,25);
1028: hr_utility.set_location('IN p_tax_unit_id '||p_tax_unit_id,30);
1029: hr_utility.set_location('IN p_assignment_action_id '||p_assignment_action_id,35);
1022:
1023: if g_debug then
1024: l_procedure :='pay_au_paye_ff.paid_periods_since_hire_date';
1025: hr_utility.set_location('Entering '||l_procedure,10);
1026: hr_utility.set_location('IN p_payroll_id '||p_payroll_id,20);
1027: hr_utility.set_location('IN p_assignment_id '||p_assignment_id,25);
1028: hr_utility.set_location('IN p_tax_unit_id '||p_tax_unit_id,30);
1029: hr_utility.set_location('IN p_assignment_action_id '||p_assignment_action_id,35);
1030: hr_utility.set_location('IN p_period_num '||p_period_num,40);
1023: if g_debug then
1024: l_procedure :='pay_au_paye_ff.paid_periods_since_hire_date';
1025: hr_utility.set_location('Entering '||l_procedure,10);
1026: hr_utility.set_location('IN p_payroll_id '||p_payroll_id,20);
1027: hr_utility.set_location('IN p_assignment_id '||p_assignment_id,25);
1028: hr_utility.set_location('IN p_tax_unit_id '||p_tax_unit_id,30);
1029: hr_utility.set_location('IN p_assignment_action_id '||p_assignment_action_id,35);
1030: hr_utility.set_location('IN p_period_num '||p_period_num,40);
1031: hr_utility.set_location('IN p_period_start '||to_char(p_period_start,'dd/mm/yyyy'),45);
1024: l_procedure :='pay_au_paye_ff.paid_periods_since_hire_date';
1025: hr_utility.set_location('Entering '||l_procedure,10);
1026: hr_utility.set_location('IN p_payroll_id '||p_payroll_id,20);
1027: hr_utility.set_location('IN p_assignment_id '||p_assignment_id,25);
1028: hr_utility.set_location('IN p_tax_unit_id '||p_tax_unit_id,30);
1029: hr_utility.set_location('IN p_assignment_action_id '||p_assignment_action_id,35);
1030: hr_utility.set_location('IN p_period_num '||p_period_num,40);
1031: hr_utility.set_location('IN p_period_start '||to_char(p_period_start,'dd/mm/yyyy'),45);
1032: hr_utility.set_location('IN p_emp_hire_date '||to_char(p_emp_hire_date,'dd/mm/yyyy'),50);
1025: hr_utility.set_location('Entering '||l_procedure,10);
1026: hr_utility.set_location('IN p_payroll_id '||p_payroll_id,20);
1027: hr_utility.set_location('IN p_assignment_id '||p_assignment_id,25);
1028: hr_utility.set_location('IN p_tax_unit_id '||p_tax_unit_id,30);
1029: hr_utility.set_location('IN p_assignment_action_id '||p_assignment_action_id,35);
1030: hr_utility.set_location('IN p_period_num '||p_period_num,40);
1031: hr_utility.set_location('IN p_period_start '||to_char(p_period_start,'dd/mm/yyyy'),45);
1032: hr_utility.set_location('IN p_emp_hire_date '||to_char(p_emp_hire_date,'dd/mm/yyyy'),50);
1033: hr_utility.set_location('IN p_use_tax_flag '||p_use_tax_flag,55);
1026: hr_utility.set_location('IN p_payroll_id '||p_payroll_id,20);
1027: hr_utility.set_location('IN p_assignment_id '||p_assignment_id,25);
1028: hr_utility.set_location('IN p_tax_unit_id '||p_tax_unit_id,30);
1029: hr_utility.set_location('IN p_assignment_action_id '||p_assignment_action_id,35);
1030: hr_utility.set_location('IN p_period_num '||p_period_num,40);
1031: hr_utility.set_location('IN p_period_start '||to_char(p_period_start,'dd/mm/yyyy'),45);
1032: hr_utility.set_location('IN p_emp_hire_date '||to_char(p_emp_hire_date,'dd/mm/yyyy'),50);
1033: hr_utility.set_location('IN p_use_tax_flag '||p_use_tax_flag,55);
1034:
1027: hr_utility.set_location('IN p_assignment_id '||p_assignment_id,25);
1028: hr_utility.set_location('IN p_tax_unit_id '||p_tax_unit_id,30);
1029: hr_utility.set_location('IN p_assignment_action_id '||p_assignment_action_id,35);
1030: hr_utility.set_location('IN p_period_num '||p_period_num,40);
1031: hr_utility.set_location('IN p_period_start '||to_char(p_period_start,'dd/mm/yyyy'),45);
1032: hr_utility.set_location('IN p_emp_hire_date '||to_char(p_emp_hire_date,'dd/mm/yyyy'),50);
1033: hr_utility.set_location('IN p_use_tax_flag '||p_use_tax_flag,55);
1034:
1035: end if;
1028: hr_utility.set_location('IN p_tax_unit_id '||p_tax_unit_id,30);
1029: hr_utility.set_location('IN p_assignment_action_id '||p_assignment_action_id,35);
1030: hr_utility.set_location('IN p_period_num '||p_period_num,40);
1031: hr_utility.set_location('IN p_period_start '||to_char(p_period_start,'dd/mm/yyyy'),45);
1032: hr_utility.set_location('IN p_emp_hire_date '||to_char(p_emp_hire_date,'dd/mm/yyyy'),50);
1033: hr_utility.set_location('IN p_use_tax_flag '||p_use_tax_flag,55);
1034:
1035: end if;
1036:
1029: hr_utility.set_location('IN p_assignment_action_id '||p_assignment_action_id,35);
1030: hr_utility.set_location('IN p_period_num '||p_period_num,40);
1031: hr_utility.set_location('IN p_period_start '||to_char(p_period_start,'dd/mm/yyyy'),45);
1032: hr_utility.set_location('IN p_emp_hire_date '||to_char(p_emp_hire_date,'dd/mm/yyyy'),50);
1033: hr_utility.set_location('IN p_use_tax_flag '||p_use_tax_flag,55);
1034:
1035: end if;
1036:
1037: OPEN c_get_payroll_effective_date; /*Bug 4438644*/
1086:
1087: l_count_period := l_count_period + 1; /*Bug 4438644 - Increment done for current payroll period*/
1088:
1089: if g_debug then
1090: hr_utility.set_location('Return l_count_period '||l_count_period,60);
1091: hr_utility.set_location('Exiting '||l_procedure,70);
1092: end if ;
1093:
1094: RETURN l_count_period;
1087: l_count_period := l_count_period + 1; /*Bug 4438644 - Increment done for current payroll period*/
1088:
1089: if g_debug then
1090: hr_utility.set_location('Return l_count_period '||l_count_period,60);
1091: hr_utility.set_location('Exiting '||l_procedure,70);
1092: end if ;
1093:
1094: RETURN l_count_period;
1095:
1115:
1116: l_amt_period number;
1117:
1118: begin
1119: g_debug := hr_utility.debug_enabled;
1120: If(p_tax_scale <> 4) then
1121: if p_ann_freq = 52 then
1122: l_amt_period := p_amt_week;
1123: elsif p_ann_freq = 26 then
1158: )
1159: return number is
1160:
1161: begin
1162: g_debug := hr_utility.debug_enabled;
1163: If(p_tax_scale <> 4) then
1164: return (round(p_actual_amt));
1165: else
1166: return (trunc(p_actual_amt));
1184: l_creator_type pay_element_entries_f.creator_type%TYPE;
1185: IS_retro_payment varchar2(10);
1186: l_procedure varchar2(80);
1187: begin
1188: g_debug := hr_utility.debug_enabled;
1189:
1190: if g_debug then
1191: l_procedure :='pay_au_paye_ff.check_if_retro';
1192: hr_utility.set_location('Entering '||l_procedure,10);
1188: g_debug := hr_utility.debug_enabled;
1189:
1190: if g_debug then
1191: l_procedure :='pay_au_paye_ff.check_if_retro';
1192: hr_utility.set_location('Entering '||l_procedure,10);
1193: hr_utility.set_location('IN p_element_entry_id '||p_element_entry_id,20);
1194: hr_utility.set_location('IN p_date_earned '||to_char(p_date_earned,'dd/mm/yyyy'),30);
1195: end if;
1196:
1189:
1190: if g_debug then
1191: l_procedure :='pay_au_paye_ff.check_if_retro';
1192: hr_utility.set_location('Entering '||l_procedure,10);
1193: hr_utility.set_location('IN p_element_entry_id '||p_element_entry_id,20);
1194: hr_utility.set_location('IN p_date_earned '||to_char(p_date_earned,'dd/mm/yyyy'),30);
1195: end if;
1196:
1197: OPEN c_get_creator_type(p_element_entry_id,p_date_earned);
1190: if g_debug then
1191: l_procedure :='pay_au_paye_ff.check_if_retro';
1192: hr_utility.set_location('Entering '||l_procedure,10);
1193: hr_utility.set_location('IN p_element_entry_id '||p_element_entry_id,20);
1194: hr_utility.set_location('IN p_date_earned '||to_char(p_date_earned,'dd/mm/yyyy'),30);
1195: end if;
1196:
1197: OPEN c_get_creator_type(p_element_entry_id,p_date_earned);
1198: FETCH c_get_creator_type INTO l_creator_type ;
1203: IS_retro_payment:='N';
1204: end if;
1205:
1206: if g_debug then
1207: hr_utility.set_location('Return IS_retro_payment '||IS_retro_payment,40);
1208: hr_utility.set_location('Exiting '||l_procedure,50);
1209: end if;
1210:
1211: return IS_retro_payment;
1204: end if;
1205:
1206: if g_debug then
1207: hr_utility.set_location('Return IS_retro_payment '||IS_retro_payment,40);
1208: hr_utility.set_location('Exiting '||l_procedure,50);
1209: end if;
1210:
1211: return IS_retro_payment;
1212:
1274: l_procedure varchar2(80);
1275:
1276:
1277: begin
1278: g_debug := hr_utility.debug_enabled;
1279:
1280: IF g_debug THEN
1281: l_procedure :='pay_au_paye_ff.get_retro_period';
1282: hr_utility.set_location('Entering '||l_procedure,10);
1278: g_debug := hr_utility.debug_enabled;
1279:
1280: IF g_debug THEN
1281: l_procedure :='pay_au_paye_ff.get_retro_period';
1282: hr_utility.set_location('Entering '||l_procedure,10);
1283: hr_utility.set_location('IN p_element_entry_id '||p_element_entry_id,20);
1284: hr_utility.set_location('IN p_date_earned '||to_char(p_date_earned,'dd/mm/yyyy'),30);
1285: hr_utility.set_location('IN p_tax_unit_id '||p_tax_unit_id ,40);
1286:
1279:
1280: IF g_debug THEN
1281: l_procedure :='pay_au_paye_ff.get_retro_period';
1282: hr_utility.set_location('Entering '||l_procedure,10);
1283: hr_utility.set_location('IN p_element_entry_id '||p_element_entry_id,20);
1284: hr_utility.set_location('IN p_date_earned '||to_char(p_date_earned,'dd/mm/yyyy'),30);
1285: hr_utility.set_location('IN p_tax_unit_id '||p_tax_unit_id ,40);
1286:
1287: END IF;
1280: IF g_debug THEN
1281: l_procedure :='pay_au_paye_ff.get_retro_period';
1282: hr_utility.set_location('Entering '||l_procedure,10);
1283: hr_utility.set_location('IN p_element_entry_id '||p_element_entry_id,20);
1284: hr_utility.set_location('IN p_date_earned '||to_char(p_date_earned,'dd/mm/yyyy'),30);
1285: hr_utility.set_location('IN p_tax_unit_id '||p_tax_unit_id ,40);
1286:
1287: END IF;
1288:
1281: l_procedure :='pay_au_paye_ff.get_retro_period';
1282: hr_utility.set_location('Entering '||l_procedure,10);
1283: hr_utility.set_location('IN p_element_entry_id '||p_element_entry_id,20);
1284: hr_utility.set_location('IN p_date_earned '||to_char(p_date_earned,'dd/mm/yyyy'),30);
1285: hr_utility.set_location('IN p_tax_unit_id '||p_tax_unit_id ,40);
1286:
1287: END IF;
1288:
1289:
1288:
1289:
1290: l_period_obtained_flag:=1;
1291: IF g_debug THEN
1292: hr_utility.set_location('l_period_obtained_flag '||l_period_obtained_flag,45);
1293: END IF;
1294:
1295: OPEN c_get_creator_type(p_element_entry_id,p_date_earned);
1296: FETCH c_get_creator_type INTO l_creator_type ;
1312: end if;
1313:
1314: IF g_debug THEN
1315:
1316: hr_utility.set_location('OUT p_retro_start_date '||to_char(p_retro_start_date,'dd/mm/yyyy'),50);
1317: hr_utility.set_location('OUT p_retro_end_date '||to_char(p_retro_end_date,'dd/mm/yyyy'),55);
1318: hr_utility.set_location('OUT l_period_obtained_flag '||l_period_obtained_flag,60);
1319: hr_utility.set_location('Exiting '||l_procedure,70);
1320:
1313:
1314: IF g_debug THEN
1315:
1316: hr_utility.set_location('OUT p_retro_start_date '||to_char(p_retro_start_date,'dd/mm/yyyy'),50);
1317: hr_utility.set_location('OUT p_retro_end_date '||to_char(p_retro_end_date,'dd/mm/yyyy'),55);
1318: hr_utility.set_location('OUT l_period_obtained_flag '||l_period_obtained_flag,60);
1319: hr_utility.set_location('Exiting '||l_procedure,70);
1320:
1321: END IF;
1314: IF g_debug THEN
1315:
1316: hr_utility.set_location('OUT p_retro_start_date '||to_char(p_retro_start_date,'dd/mm/yyyy'),50);
1317: hr_utility.set_location('OUT p_retro_end_date '||to_char(p_retro_end_date,'dd/mm/yyyy'),55);
1318: hr_utility.set_location('OUT l_period_obtained_flag '||l_period_obtained_flag,60);
1319: hr_utility.set_location('Exiting '||l_procedure,70);
1320:
1321: END IF;
1322:
1315:
1316: hr_utility.set_location('OUT p_retro_start_date '||to_char(p_retro_start_date,'dd/mm/yyyy'),50);
1317: hr_utility.set_location('OUT p_retro_end_date '||to_char(p_retro_end_date,'dd/mm/yyyy'),55);
1318: hr_utility.set_location('OUT l_period_obtained_flag '||l_period_obtained_flag,60);
1319: hr_utility.set_location('Exiting '||l_procedure,70);
1320:
1321: END IF;
1322:
1323: return l_period_obtained_flag;
1427:
1428:
1429: BEGIN
1430:
1431: g_debug := hr_utility.debug_enabled;
1432: l_period_obtained_flag := 1;
1433:
1434: IF g_debug THEN
1435: l_procedure := 'pay_au_payee_ff.get_enhanced_retro_period';
1432: l_period_obtained_flag := 1;
1433:
1434: IF g_debug THEN
1435: l_procedure := 'pay_au_payee_ff.get_enhanced_retro_period';
1436: hr_utility.set_location('Entering '||l_procedure,10);
1437: hr_utility.set_location('IN p_element_entry_id '||p_element_entry_id,20);
1438: hr_utility.set_location('IN p_date_earned '||p_date_earned,30);
1439: hr_utility.set_location('IN p_tax_unit_id '||p_tax_unit_id,30);
1440: END IF;
1433:
1434: IF g_debug THEN
1435: l_procedure := 'pay_au_payee_ff.get_enhanced_retro_period';
1436: hr_utility.set_location('Entering '||l_procedure,10);
1437: hr_utility.set_location('IN p_element_entry_id '||p_element_entry_id,20);
1438: hr_utility.set_location('IN p_date_earned '||p_date_earned,30);
1439: hr_utility.set_location('IN p_tax_unit_id '||p_tax_unit_id,30);
1440: END IF;
1441:
1434: IF g_debug THEN
1435: l_procedure := 'pay_au_payee_ff.get_enhanced_retro_period';
1436: hr_utility.set_location('Entering '||l_procedure,10);
1437: hr_utility.set_location('IN p_element_entry_id '||p_element_entry_id,20);
1438: hr_utility.set_location('IN p_date_earned '||p_date_earned,30);
1439: hr_utility.set_location('IN p_tax_unit_id '||p_tax_unit_id,30);
1440: END IF;
1441:
1442: OPEN get_retropay_run_details(p_element_entry_id);
1435: l_procedure := 'pay_au_payee_ff.get_enhanced_retro_period';
1436: hr_utility.set_location('Entering '||l_procedure,10);
1437: hr_utility.set_location('IN p_element_entry_id '||p_element_entry_id,20);
1438: hr_utility.set_location('IN p_date_earned '||p_date_earned,30);
1439: hr_utility.set_location('IN p_tax_unit_id '||p_tax_unit_id,30);
1440: END IF;
1441:
1442: OPEN get_retropay_run_details(p_element_entry_id);
1443: FETCH get_retropay_run_details INTO l_creator_type,p_retro_effective_date;
1488: p_time_span := l_time_span;
1489:
1490: IF g_debug
1491: THEN
1492: hr_utility.set_location('OUT p_retro_start_date '||p_retro_start_date,40);
1493: hr_utility.set_location('OUT p_retro_end_date '||p_retro_end_date,50);
1494: hr_utility.set_location('OUT p_orig_effective_date '||p_orig_effective_date,60);
1495: hr_utility.set_location('OUT p_retro_effective_date '||p_retro_effective_date,70);
1496: hr_utility.set_location('OUT p_time_span '||p_time_span,80);
1489:
1490: IF g_debug
1491: THEN
1492: hr_utility.set_location('OUT p_retro_start_date '||p_retro_start_date,40);
1493: hr_utility.set_location('OUT p_retro_end_date '||p_retro_end_date,50);
1494: hr_utility.set_location('OUT p_orig_effective_date '||p_orig_effective_date,60);
1495: hr_utility.set_location('OUT p_retro_effective_date '||p_retro_effective_date,70);
1496: hr_utility.set_location('OUT p_time_span '||p_time_span,80);
1497: hr_utility.set_location('Exiting '||l_procedure,90);
1490: IF g_debug
1491: THEN
1492: hr_utility.set_location('OUT p_retro_start_date '||p_retro_start_date,40);
1493: hr_utility.set_location('OUT p_retro_end_date '||p_retro_end_date,50);
1494: hr_utility.set_location('OUT p_orig_effective_date '||p_orig_effective_date,60);
1495: hr_utility.set_location('OUT p_retro_effective_date '||p_retro_effective_date,70);
1496: hr_utility.set_location('OUT p_time_span '||p_time_span,80);
1497: hr_utility.set_location('Exiting '||l_procedure,90);
1498: END IF;
1491: THEN
1492: hr_utility.set_location('OUT p_retro_start_date '||p_retro_start_date,40);
1493: hr_utility.set_location('OUT p_retro_end_date '||p_retro_end_date,50);
1494: hr_utility.set_location('OUT p_orig_effective_date '||p_orig_effective_date,60);
1495: hr_utility.set_location('OUT p_retro_effective_date '||p_retro_effective_date,70);
1496: hr_utility.set_location('OUT p_time_span '||p_time_span,80);
1497: hr_utility.set_location('Exiting '||l_procedure,90);
1498: END IF;
1499:
1492: hr_utility.set_location('OUT p_retro_start_date '||p_retro_start_date,40);
1493: hr_utility.set_location('OUT p_retro_end_date '||p_retro_end_date,50);
1494: hr_utility.set_location('OUT p_orig_effective_date '||p_orig_effective_date,60);
1495: hr_utility.set_location('OUT p_retro_effective_date '||p_retro_effective_date,70);
1496: hr_utility.set_location('OUT p_time_span '||p_time_span,80);
1497: hr_utility.set_location('Exiting '||l_procedure,90);
1498: END IF;
1499:
1500: RETURN l_period_obtained_flag;
1493: hr_utility.set_location('OUT p_retro_end_date '||p_retro_end_date,50);
1494: hr_utility.set_location('OUT p_orig_effective_date '||p_orig_effective_date,60);
1495: hr_utility.set_location('OUT p_retro_effective_date '||p_retro_effective_date,70);
1496: hr_utility.set_location('OUT p_time_span '||p_time_span,80);
1497: hr_utility.set_location('Exiting '||l_procedure,90);
1498: END IF;
1499:
1500: RETURN l_period_obtained_flag;
1501:
1530: l_proc_name VARCHAR2(80);
1531:
1532: BEGIN
1533:
1534: g_debug := hr_utility.debug_enabled;
1535:
1536: IF g_debug THEN
1537: l_proc_name := 'pay_au_paye_ff.check_if_enhanced_retro';
1538: hr_utility.set_location('Entering '||l_proc_name,10);
1534: g_debug := hr_utility.debug_enabled;
1535:
1536: IF g_debug THEN
1537: l_proc_name := 'pay_au_paye_ff.check_if_enhanced_retro';
1538: hr_utility.set_location('Entering '||l_proc_name,10);
1539: hr_utility.set_location('IN p_business_group_id => '||p_business_group_id,20);
1540: END IF;
1541:
1542: OPEN get_legislation_rule(p_business_group_id);
1535:
1536: IF g_debug THEN
1537: l_proc_name := 'pay_au_paye_ff.check_if_enhanced_retro';
1538: hr_utility.set_location('Entering '||l_proc_name,10);
1539: hr_utility.set_location('IN p_business_group_id => '||p_business_group_id,20);
1540: END IF;
1541:
1542: OPEN get_legislation_rule(p_business_group_id);
1543: FETCH get_legislation_rule INTO l_return;
1543: FETCH get_legislation_rule INTO l_return;
1544: CLOSE get_legislation_rule;
1545:
1546: IF g_debug THEN
1547: hr_utility.set_location('OUT Return Value =>'||l_return,30);
1548: hr_utility.set_location('Exiting '||l_proc_name,40);
1549: END IF;
1550:
1551: RETURN NVL(l_return,'N');
1544: CLOSE get_legislation_rule;
1545:
1546: IF g_debug THEN
1547: hr_utility.set_location('OUT Return Value =>'||l_return,30);
1548: hr_utility.set_location('Exiting '||l_proc_name,40);
1549: END IF;
1550:
1551: RETURN NVL(l_return,'N');
1552:
1614: l_temp NUMBER;
1615:
1616: BEGIN
1617:
1618: g_debug := hr_utility.debug_enabled;
1619:
1620: IF g_debug THEN
1621: l_proc_name := 'pay_au_paye_ff.get_retro_time_span';
1622: hr_utility.set_location('Entering '||l_proc_name,10);
1618: g_debug := hr_utility.debug_enabled;
1619:
1620: IF g_debug THEN
1621: l_proc_name := 'pay_au_paye_ff.get_retro_time_span';
1622: hr_utility.set_location('Entering '||l_proc_name,10);
1623: hr_utility.set_location('IN p_element_entry_id '||p_element_entry_id,30);
1624: hr_utility.set_location('IN p_date_earned '||p_date_earned,30);
1625: hr_utility.set_location('IN p_tax_unit_id '||p_tax_unit_id,30);
1626: END IF;
1619:
1620: IF g_debug THEN
1621: l_proc_name := 'pay_au_paye_ff.get_retro_time_span';
1622: hr_utility.set_location('Entering '||l_proc_name,10);
1623: hr_utility.set_location('IN p_element_entry_id '||p_element_entry_id,30);
1624: hr_utility.set_location('IN p_date_earned '||p_date_earned,30);
1625: hr_utility.set_location('IN p_tax_unit_id '||p_tax_unit_id,30);
1626: END IF;
1627:
1620: IF g_debug THEN
1621: l_proc_name := 'pay_au_paye_ff.get_retro_time_span';
1622: hr_utility.set_location('Entering '||l_proc_name,10);
1623: hr_utility.set_location('IN p_element_entry_id '||p_element_entry_id,30);
1624: hr_utility.set_location('IN p_date_earned '||p_date_earned,30);
1625: hr_utility.set_location('IN p_tax_unit_id '||p_tax_unit_id,30);
1626: END IF;
1627:
1628: l_retro_type := NULL;
1621: l_proc_name := 'pay_au_paye_ff.get_retro_time_span';
1622: hr_utility.set_location('Entering '||l_proc_name,10);
1623: hr_utility.set_location('IN p_element_entry_id '||p_element_entry_id,30);
1624: hr_utility.set_location('IN p_date_earned '||p_date_earned,30);
1625: hr_utility.set_location('IN p_tax_unit_id '||p_tax_unit_id,30);
1626: END IF;
1627:
1628: l_retro_type := NULL;
1629:
1635: AND l_entry_details.retro_component_id IS NOT NULL)
1636: THEN
1637: /* Entry Created using Enhanced Retropay */
1638: IF g_debug THEN
1639: hr_utility.set_location('Entry created by Enhanced Retropay ',40);
1640: hr_utility.set_location('Retro Component ID =>'||l_entry_details.retro_component_id,40);
1641: END IF;
1642: l_retro_type := 'ADVANCED_RETRO';
1643: l_temp := get_enhanced_retro_period
1636: THEN
1637: /* Entry Created using Enhanced Retropay */
1638: IF g_debug THEN
1639: hr_utility.set_location('Entry created by Enhanced Retropay ',40);
1640: hr_utility.set_location('Retro Component ID =>'||l_entry_details.retro_component_id,40);
1641: END IF;
1642: l_retro_type := 'ADVANCED_RETRO';
1643: l_temp := get_enhanced_retro_period
1644: (
1655: The Effective Dates are set to NULL as its irrelevent and not required
1656: for Retropay by element processing */
1657:
1658: IF g_debug THEN
1659: hr_utility.set_location('Entry created by Retropay by Element',50);
1660: END IF;
1661:
1662: l_retro_type := 'RETRO_ELE';
1663: p_orig_effective_date := NULL;
1690: p_retro_type := l_retro_type;
1691:
1692: IF g_debug
1693: THEN
1694: hr_utility.set_location('OUT p_retro_start_date '||p_retro_start_date,80);
1695: hr_utility.set_location('OUT p_retro_end_date '||p_retro_end_date,80);
1696: hr_utility.set_location('OUT p_orig_effective_date '||p_orig_effective_date,80);
1697: hr_utility.set_location('OUT p_retro_effective_date '||p_retro_effective_date,80);
1698: hr_utility.set_location('OUT p_time_span '||p_time_span,80);
1691:
1692: IF g_debug
1693: THEN
1694: hr_utility.set_location('OUT p_retro_start_date '||p_retro_start_date,80);
1695: hr_utility.set_location('OUT p_retro_end_date '||p_retro_end_date,80);
1696: hr_utility.set_location('OUT p_orig_effective_date '||p_orig_effective_date,80);
1697: hr_utility.set_location('OUT p_retro_effective_date '||p_retro_effective_date,80);
1698: hr_utility.set_location('OUT p_time_span '||p_time_span,80);
1699: hr_utility.set_location('OUT l_retro_type '||l_retro_type,80);
1692: IF g_debug
1693: THEN
1694: hr_utility.set_location('OUT p_retro_start_date '||p_retro_start_date,80);
1695: hr_utility.set_location('OUT p_retro_end_date '||p_retro_end_date,80);
1696: hr_utility.set_location('OUT p_orig_effective_date '||p_orig_effective_date,80);
1697: hr_utility.set_location('OUT p_retro_effective_date '||p_retro_effective_date,80);
1698: hr_utility.set_location('OUT p_time_span '||p_time_span,80);
1699: hr_utility.set_location('OUT l_retro_type '||l_retro_type,80);
1700: hr_utility.set_location('Exiting '||l_proc_name,90);
1693: THEN
1694: hr_utility.set_location('OUT p_retro_start_date '||p_retro_start_date,80);
1695: hr_utility.set_location('OUT p_retro_end_date '||p_retro_end_date,80);
1696: hr_utility.set_location('OUT p_orig_effective_date '||p_orig_effective_date,80);
1697: hr_utility.set_location('OUT p_retro_effective_date '||p_retro_effective_date,80);
1698: hr_utility.set_location('OUT p_time_span '||p_time_span,80);
1699: hr_utility.set_location('OUT l_retro_type '||l_retro_type,80);
1700: hr_utility.set_location('Exiting '||l_proc_name,90);
1701: END IF;
1694: hr_utility.set_location('OUT p_retro_start_date '||p_retro_start_date,80);
1695: hr_utility.set_location('OUT p_retro_end_date '||p_retro_end_date,80);
1696: hr_utility.set_location('OUT p_orig_effective_date '||p_orig_effective_date,80);
1697: hr_utility.set_location('OUT p_retro_effective_date '||p_retro_effective_date,80);
1698: hr_utility.set_location('OUT p_time_span '||p_time_span,80);
1699: hr_utility.set_location('OUT l_retro_type '||l_retro_type,80);
1700: hr_utility.set_location('Exiting '||l_proc_name,90);
1701: END IF;
1702:
1695: hr_utility.set_location('OUT p_retro_end_date '||p_retro_end_date,80);
1696: hr_utility.set_location('OUT p_orig_effective_date '||p_orig_effective_date,80);
1697: hr_utility.set_location('OUT p_retro_effective_date '||p_retro_effective_date,80);
1698: hr_utility.set_location('OUT p_time_span '||p_time_span,80);
1699: hr_utility.set_location('OUT l_retro_type '||l_retro_type,80);
1700: hr_utility.set_location('Exiting '||l_proc_name,90);
1701: END IF;
1702:
1703: return 1;
1696: hr_utility.set_location('OUT p_orig_effective_date '||p_orig_effective_date,80);
1697: hr_utility.set_location('OUT p_retro_effective_date '||p_retro_effective_date,80);
1698: hr_utility.set_location('OUT p_time_span '||p_time_span,80);
1699: hr_utility.set_location('OUT l_retro_type '||l_retro_type,80);
1700: hr_utility.set_location('Exiting '||l_proc_name,90);
1701: END IF;
1702:
1703: return 1;
1704: END get_retro_time_span;
1800:
1801: --
1802: begin
1803:
1804: g_debug := hr_utility.debug_enabled;
1805:
1806: if g_debug then
1807: l_procedure :='pay_au_paye_ff.count_retro_periods';
1808: hr_utility.set_location('Entering '||l_procedure,10);
1804: g_debug := hr_utility.debug_enabled;
1805:
1806: if g_debug then
1807: l_procedure :='pay_au_paye_ff.count_retro_periods';
1808: hr_utility.set_location('Entering '||l_procedure,10);
1809: hr_utility.set_location('IN p_assignment_action_id '||p_assignment_action_id,20);
1810: hr_utility.set_location('IN p_date_earned '||to_char(p_date_earned,'dd/mm/yyyy'),30);
1811: hr_utility.set_location('IN p_tax_unit_id '||p_tax_unit_id,40);
1812: hr_utility.set_location('IN p_use_tax_flag '||p_use_tax_flag,50);
1805:
1806: if g_debug then
1807: l_procedure :='pay_au_paye_ff.count_retro_periods';
1808: hr_utility.set_location('Entering '||l_procedure,10);
1809: hr_utility.set_location('IN p_assignment_action_id '||p_assignment_action_id,20);
1810: hr_utility.set_location('IN p_date_earned '||to_char(p_date_earned,'dd/mm/yyyy'),30);
1811: hr_utility.set_location('IN p_tax_unit_id '||p_tax_unit_id,40);
1812: hr_utility.set_location('IN p_use_tax_flag '||p_use_tax_flag,50);
1813: end if;
1806: if g_debug then
1807: l_procedure :='pay_au_paye_ff.count_retro_periods';
1808: hr_utility.set_location('Entering '||l_procedure,10);
1809: hr_utility.set_location('IN p_assignment_action_id '||p_assignment_action_id,20);
1810: hr_utility.set_location('IN p_date_earned '||to_char(p_date_earned,'dd/mm/yyyy'),30);
1811: hr_utility.set_location('IN p_tax_unit_id '||p_tax_unit_id,40);
1812: hr_utility.set_location('IN p_use_tax_flag '||p_use_tax_flag,50);
1813: end if;
1814:
1807: l_procedure :='pay_au_paye_ff.count_retro_periods';
1808: hr_utility.set_location('Entering '||l_procedure,10);
1809: hr_utility.set_location('IN p_assignment_action_id '||p_assignment_action_id,20);
1810: hr_utility.set_location('IN p_date_earned '||to_char(p_date_earned,'dd/mm/yyyy'),30);
1811: hr_utility.set_location('IN p_tax_unit_id '||p_tax_unit_id,40);
1812: hr_utility.set_location('IN p_use_tax_flag '||p_use_tax_flag,50);
1813: end if;
1814:
1815: /* Bug 5846272 - Read the Legislation Rule value for Enhanced Retropay. If
1808: hr_utility.set_location('Entering '||l_procedure,10);
1809: hr_utility.set_location('IN p_assignment_action_id '||p_assignment_action_id,20);
1810: hr_utility.set_location('IN p_date_earned '||to_char(p_date_earned,'dd/mm/yyyy'),30);
1811: hr_utility.set_location('IN p_tax_unit_id '||p_tax_unit_id,40);
1812: hr_utility.set_location('IN p_use_tax_flag '||p_use_tax_flag,50);
1813: end if;
1814:
1815: /* Bug 5846272 - Read the Legislation Rule value for Enhanced Retropay. If
1816: rule not found,set the flag to 'N' */
1821: END IF;
1822: CLOSE get_legislation_rule;
1823:
1824: IF g_debug THEN
1825: hr_utility.set_location('Enhanced Retropay Rule Value =>'||l_adv_retro_flag,50);
1826: END IF;
1827:
1828: l_retro_periods:=0;
1829: financial_year_span_start:=hr_au_routes.span_start(p_date_earned,1,'01-07');
1985: l_count := tot_period_amount.NEXT(l_count);
1986: end loop;
1987:
1988: if g_debug then
1989: hr_utility.set_location('Return l_retro_periods '||l_retro_periods,60);
1990: hr_utility.set_location('Exiting '||l_procedure,70);
1991: end if;
1992:
1993: return l_retro_periods;
1986: end loop;
1987:
1988: if g_debug then
1989: hr_utility.set_location('Return l_retro_periods '||l_retro_periods,60);
1990: hr_utility.set_location('Exiting '||l_procedure,70);
1991: end if;
1992:
1993: return l_retro_periods;
1994:
2009: tax_on_total_period number;
2010: l_procedure varchar2(80);
2011:
2012: begin
2013: g_debug := hr_utility.debug_enabled;
2014:
2015: if g_debug then
2016: l_procedure :='pay_au_paye_ff.calculate_tax';
2017: hr_utility.set_location('Entering '||l_procedure,10);
2013: g_debug := hr_utility.debug_enabled;
2014:
2015: if g_debug then
2016: l_procedure :='pay_au_paye_ff.calculate_tax';
2017: hr_utility.set_location('Entering '||l_procedure,10);
2018: hr_utility.set_location('IN p_date_earned '||to_char(p_date_earned,'dd/mm/yyyy'),20);
2019: hr_utility.set_location('IN p_period_amount '||p_period_amount,25);
2020: hr_utility.set_location('IN p_period_frequency '||p_period_frequency,30);
2021: hr_utility.set_location('IN p_tax_scale '||p_tax_scale,35);
2014:
2015: if g_debug then
2016: l_procedure :='pay_au_paye_ff.calculate_tax';
2017: hr_utility.set_location('Entering '||l_procedure,10);
2018: hr_utility.set_location('IN p_date_earned '||to_char(p_date_earned,'dd/mm/yyyy'),20);
2019: hr_utility.set_location('IN p_period_amount '||p_period_amount,25);
2020: hr_utility.set_location('IN p_period_frequency '||p_period_frequency,30);
2021: hr_utility.set_location('IN p_tax_scale '||p_tax_scale,35);
2022: hr_utility.set_location('IN p_al_variable '||p_a1_variable,40);
2015: if g_debug then
2016: l_procedure :='pay_au_paye_ff.calculate_tax';
2017: hr_utility.set_location('Entering '||l_procedure,10);
2018: hr_utility.set_location('IN p_date_earned '||to_char(p_date_earned,'dd/mm/yyyy'),20);
2019: hr_utility.set_location('IN p_period_amount '||p_period_amount,25);
2020: hr_utility.set_location('IN p_period_frequency '||p_period_frequency,30);
2021: hr_utility.set_location('IN p_tax_scale '||p_tax_scale,35);
2022: hr_utility.set_location('IN p_al_variable '||p_a1_variable,40);
2023: hr_utility.set_location('IN p_bl_variable '||p_a1_variable,45);
2016: l_procedure :='pay_au_paye_ff.calculate_tax';
2017: hr_utility.set_location('Entering '||l_procedure,10);
2018: hr_utility.set_location('IN p_date_earned '||to_char(p_date_earned,'dd/mm/yyyy'),20);
2019: hr_utility.set_location('IN p_period_amount '||p_period_amount,25);
2020: hr_utility.set_location('IN p_period_frequency '||p_period_frequency,30);
2021: hr_utility.set_location('IN p_tax_scale '||p_tax_scale,35);
2022: hr_utility.set_location('IN p_al_variable '||p_a1_variable,40);
2023: hr_utility.set_location('IN p_bl_variable '||p_a1_variable,45);
2024:
2017: hr_utility.set_location('Entering '||l_procedure,10);
2018: hr_utility.set_location('IN p_date_earned '||to_char(p_date_earned,'dd/mm/yyyy'),20);
2019: hr_utility.set_location('IN p_period_amount '||p_period_amount,25);
2020: hr_utility.set_location('IN p_period_frequency '||p_period_frequency,30);
2021: hr_utility.set_location('IN p_tax_scale '||p_tax_scale,35);
2022: hr_utility.set_location('IN p_al_variable '||p_a1_variable,40);
2023: hr_utility.set_location('IN p_bl_variable '||p_a1_variable,45);
2024:
2025: end if;
2018: hr_utility.set_location('IN p_date_earned '||to_char(p_date_earned,'dd/mm/yyyy'),20);
2019: hr_utility.set_location('IN p_period_amount '||p_period_amount,25);
2020: hr_utility.set_location('IN p_period_frequency '||p_period_frequency,30);
2021: hr_utility.set_location('IN p_tax_scale '||p_tax_scale,35);
2022: hr_utility.set_location('IN p_al_variable '||p_a1_variable,40);
2023: hr_utility.set_location('IN p_bl_variable '||p_a1_variable,45);
2024:
2025: end if;
2026:
2019: hr_utility.set_location('IN p_period_amount '||p_period_amount,25);
2020: hr_utility.set_location('IN p_period_frequency '||p_period_frequency,30);
2021: hr_utility.set_location('IN p_tax_scale '||p_tax_scale,35);
2022: hr_utility.set_location('IN p_al_variable '||p_a1_variable,40);
2023: hr_utility.set_location('IN p_bl_variable '||p_a1_variable,45);
2024:
2025: end if;
2026:
2027: pay_per_week:=convert_to_week(p_period_frequency,p_period_amount);
2039:
2040: tax_on_total_period:=convert_to_period_amt(p_period_frequency,tax_on_weekly,p_tax_scale);
2041:
2042: if g_debug then
2043: hr_utility.set_location('Return tax_on_total_period '||tax_on_total_period,50);
2044: hr_utility.set_location('Exiting '||l_procedure,60);
2045: end if ;
2046:
2047: return tax_on_total_period;
2040: tax_on_total_period:=convert_to_period_amt(p_period_frequency,tax_on_weekly,p_tax_scale);
2041:
2042: if g_debug then
2043: hr_utility.set_location('Return tax_on_total_period '||tax_on_total_period,50);
2044: hr_utility.set_location('Exiting '||l_procedure,60);
2045: end if ;
2046:
2047: return tax_on_total_period;
2048:
2133:
2134: l_procedure varchar2(80);
2135:
2136: begin
2137: g_debug := hr_utility.debug_enabled;
2138:
2139: if g_debug then
2140: l_procedure :='pay_au_paye_ff.check_fixed_deduction';
2141: hr_utility.set_location('Entering '||l_procedure,10);
2137: g_debug := hr_utility.debug_enabled;
2138:
2139: if g_debug then
2140: l_procedure :='pay_au_paye_ff.check_fixed_deduction';
2141: hr_utility.set_location('Entering '||l_procedure,10);
2142: hr_utility.set_location('IN p_assignment_id '||p_assignment_id,20);
2143: hr_utility.set_location('IN p_date_earned '||to_char(p_date_earned,'dd/mm/yyyy'),30);
2144: end if ;
2145:
2138:
2139: if g_debug then
2140: l_procedure :='pay_au_paye_ff.check_fixed_deduction';
2141: hr_utility.set_location('Entering '||l_procedure,10);
2142: hr_utility.set_location('IN p_assignment_id '||p_assignment_id,20);
2143: hr_utility.set_location('IN p_date_earned '||to_char(p_date_earned,'dd/mm/yyyy'),30);
2144: end if ;
2145:
2146: OPEN check_fixed_deduction(p_assignment_id , p_date_earned);
2139: if g_debug then
2140: l_procedure :='pay_au_paye_ff.check_fixed_deduction';
2141: hr_utility.set_location('Entering '||l_procedure,10);
2142: hr_utility.set_location('IN p_assignment_id '||p_assignment_id,20);
2143: hr_utility.set_location('IN p_date_earned '||to_char(p_date_earned,'dd/mm/yyyy'),30);
2144: end if ;
2145:
2146: OPEN check_fixed_deduction(p_assignment_id , p_date_earned);
2147: FETCH check_fixed_deduction into l_deduction_flag;
2151: l_deduction_flag:='N';
2152: end if;
2153:
2154: if g_debug then
2155: hr_utility.set_location('OUT l_deduction_flag '||l_deduction_flag,35);
2156: hr_utility.set_location('Exiting '||l_procedure,40);
2157: end if ;
2158:
2159: return l_deduction_flag;
2152: end if;
2153:
2154: if g_debug then
2155: hr_utility.set_location('OUT l_deduction_flag '||l_deduction_flag,35);
2156: hr_utility.set_location('Exiting '||l_procedure,40);
2157: end if ;
2158:
2159: return l_deduction_flag;
2160:
2172: l_length NUMBER := 0 ;
2173: l_blank_counter NUMBER := 0 ;
2174:
2175: BEGIN
2176: g_debug := hr_utility.debug_enabled;
2177: IF g_debug THEN
2178: hr_utility.trace('Entered function pay_au_paye_ff.validate_data_magtape');
2179: hr_utility.trace('IN p_data '||p_data);
2180: END IF;
2174:
2175: BEGIN
2176: g_debug := hr_utility.debug_enabled;
2177: IF g_debug THEN
2178: hr_utility.trace('Entered function pay_au_paye_ff.validate_data_magtape');
2179: hr_utility.trace('IN p_data '||p_data);
2180: END IF;
2181:
2182: IF (p_data IS NULL) THEN
2175: BEGIN
2176: g_debug := hr_utility.debug_enabled;
2177: IF g_debug THEN
2178: hr_utility.trace('Entered function pay_au_paye_ff.validate_data_magtape');
2179: hr_utility.trace('IN p_data '||p_data);
2180: END IF;
2181:
2182: IF (p_data IS NULL) THEN
2183: IF g_debug THEN
2180: END IF;
2181:
2182: IF (p_data IS NULL) THEN
2183: IF g_debug THEN
2184: hr_utility.trace('Exiting function pay_au_paye_ff.validate_data_magtape');
2185: END IF;
2186:
2187: RETURN ' ';
2188: END IF;
2187: RETURN ' ';
2188: END IF;
2189:
2190: IF g_debug THEN
2191: hr_utility.trace('Value of the in parameter p_data ==>' || p_data);
2192: END IF;
2193: l_data := replace(p_data,'_','-');
2194:
2195: l_length := length(p_data);
2193: l_data := replace(p_data,'_','-');
2194:
2195: l_length := length(p_data);
2196: IF g_debug THEN
2197: hr_utility.trace('Length of the input data passed ==>' || l_length);
2198: END IF;
2199: FOR l_counter IN 1..l_length
2200: LOOP
2201: IF g_debug THEN
2198: END IF;
2199: FOR l_counter IN 1..l_length
2200: LOOP
2201: IF g_debug THEN
2202: hr_utility.trace('Counter value ==>' || l_counter);
2203: END IF;
2204: l_pos_value := upper(substr(l_data,l_counter,1));
2205: IF g_debug THEN
2206: hr_utility.trace('Value at position ' || l_counter || '==>' || l_pos_value);
2202: hr_utility.trace('Counter value ==>' || l_counter);
2203: END IF;
2204: l_pos_value := upper(substr(l_data,l_counter,1));
2205: IF g_debug THEN
2206: hr_utility.trace('Value at position ' || l_counter || '==>' || l_pos_value);
2207: END IF;
2208: IF (l_pos_value = ' ' and l_counter > 1) THEN /* No need to check first character */
2209: IF (l_blank_counter = l_counter - 1) THEN
2210: IF g_debug THEN
2207: END IF;
2208: IF (l_pos_value = ' ' and l_counter > 1) THEN /* No need to check first character */
2209: IF (l_blank_counter = l_counter - 1) THEN
2210: IF g_debug THEN
2211: hr_utility.trace('Value ' || l_pos_value || 'is invalid. More than one space between words.');
2212: END IF;
2213: /* Remove all blank spaces after the first. */
2214: l_data_substr := substr(l_data, l_counter, l_length);
2215: l_data := substr(l_data, 1, l_blank_counter);
2227: l_ins_result := instr('ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 ()&/"''-',l_pos_value);
2228:
2229: IF l_ins_result = 0 THEN
2230: IF g_debug THEN
2231: hr_utility.trace('Value ' || l_pos_value || 'is invalid');
2232: END IF;
2233: l_data := replace(l_data,l_pos_value,' ');
2234: ELSE
2235: IF g_debug THEN
2232: END IF;
2233: l_data := replace(l_data,l_pos_value,' ');
2234: ELSE
2235: IF g_debug THEN
2236: hr_utility.trace('Value ' || l_pos_value || 'is valid');
2237: END IF;
2238: END IF;
2239: END LOOP;
2240:
2239: END LOOP;
2240:
2241: IF (ltrim(l_data) IS NULL) THEN
2242: IF g_debug THEN
2243: hr_utility.trace('Exiting function pay_au_paye_ff.validate_data_magtape');
2244: END IF;
2245: RETURN ' ';
2246: ELSE
2247: IF g_debug THEN
2244: END IF;
2245: RETURN ' ';
2246: ELSE
2247: IF g_debug THEN
2248: hr_utility.trace('Final validated value ==>' || ltrim(l_data));
2249: hr_utility.trace('Exiting function pay_au_paye_ff.validate_data_magtape');
2250: END IF;
2251: RETURN ltrim(l_data);
2252: END IF;
2245: RETURN ' ';
2246: ELSE
2247: IF g_debug THEN
2248: hr_utility.trace('Final validated value ==>' || ltrim(l_data));
2249: hr_utility.trace('Exiting function pay_au_paye_ff.validate_data_magtape');
2250: END IF;
2251: RETURN ltrim(l_data);
2252: END IF;
2253:
2258: RETURN VARCHAR2 IS
2259: msg varchar2(1000);
2260: l_procedure varchar2(80);
2261: BEGIN
2262: g_debug := hr_utility.debug_enabled;
2263:
2264: if g_debug then
2265: l_procedure :='pay_au_paye_ff.get_table_value';
2266: hr_utility.set_location('Entering '||l_procedure,10);
2262: g_debug := hr_utility.debug_enabled;
2263:
2264: if g_debug then
2265: l_procedure :='pay_au_paye_ff.get_table_value';
2266: hr_utility.set_location('Entering '||l_procedure,10);
2267: hr_utility.set_location('IN BUSINESS_GROUP_ID '||BUSINESS_GROUP_ID ,20);
2268: hr_utility.set_location('IN EARN_NAME '||EARN_NAME,25);
2269: hr_utility.set_location('IN scale '||scale,30);
2270: hr_utility.set_location('IN EARNING_VALUE '||EARNING_VALUE,35);
2263:
2264: if g_debug then
2265: l_procedure :='pay_au_paye_ff.get_table_value';
2266: hr_utility.set_location('Entering '||l_procedure,10);
2267: hr_utility.set_location('IN BUSINESS_GROUP_ID '||BUSINESS_GROUP_ID ,20);
2268: hr_utility.set_location('IN EARN_NAME '||EARN_NAME,25);
2269: hr_utility.set_location('IN scale '||scale,30);
2270: hr_utility.set_location('IN EARNING_VALUE '||EARNING_VALUE,35);
2271: hr_utility.set_location('IN PERIOD_DATE '||to_char(PERIOD_DATE,'dd/mm/yyyy'),40);
2264: if g_debug then
2265: l_procedure :='pay_au_paye_ff.get_table_value';
2266: hr_utility.set_location('Entering '||l_procedure,10);
2267: hr_utility.set_location('IN BUSINESS_GROUP_ID '||BUSINESS_GROUP_ID ,20);
2268: hr_utility.set_location('IN EARN_NAME '||EARN_NAME,25);
2269: hr_utility.set_location('IN scale '||scale,30);
2270: hr_utility.set_location('IN EARNING_VALUE '||EARNING_VALUE,35);
2271: hr_utility.set_location('IN PERIOD_DATE '||to_char(PERIOD_DATE,'dd/mm/yyyy'),40);
2272:
2265: l_procedure :='pay_au_paye_ff.get_table_value';
2266: hr_utility.set_location('Entering '||l_procedure,10);
2267: hr_utility.set_location('IN BUSINESS_GROUP_ID '||BUSINESS_GROUP_ID ,20);
2268: hr_utility.set_location('IN EARN_NAME '||EARN_NAME,25);
2269: hr_utility.set_location('IN scale '||scale,30);
2270: hr_utility.set_location('IN EARNING_VALUE '||EARNING_VALUE,35);
2271: hr_utility.set_location('IN PERIOD_DATE '||to_char(PERIOD_DATE,'dd/mm/yyyy'),40);
2272:
2273: end if;
2266: hr_utility.set_location('Entering '||l_procedure,10);
2267: hr_utility.set_location('IN BUSINESS_GROUP_ID '||BUSINESS_GROUP_ID ,20);
2268: hr_utility.set_location('IN EARN_NAME '||EARN_NAME,25);
2269: hr_utility.set_location('IN scale '||scale,30);
2270: hr_utility.set_location('IN EARNING_VALUE '||EARNING_VALUE,35);
2271: hr_utility.set_location('IN PERIOD_DATE '||to_char(PERIOD_DATE,'dd/mm/yyyy'),40);
2272:
2273: end if;
2274:
2267: hr_utility.set_location('IN BUSINESS_GROUP_ID '||BUSINESS_GROUP_ID ,20);
2268: hr_utility.set_location('IN EARN_NAME '||EARN_NAME,25);
2269: hr_utility.set_location('IN scale '||scale,30);
2270: hr_utility.set_location('IN EARNING_VALUE '||EARNING_VALUE,35);
2271: hr_utility.set_location('IN PERIOD_DATE '||to_char(PERIOD_DATE,'dd/mm/yyyy'),40);
2272:
2273: end if;
2274:
2275: IF EARNING_VALUE < 0 then
2274:
2275: IF EARNING_VALUE < 0 then
2276: msg := fffunc.gfm('PAY', 'HR_AU_NEGATIVE_EARNINGS','EARN_NAME',EARN_NAME, 'EARNING_VALUE',to_char(EARNING_VALUE));
2277: if g_debug then
2278: hr_utility.set_location('Return msg '||msg,50);
2279: hr_utility.set_location('Exiting '||l_procedure,60);
2280: end if;
2281:
2282: RETURN msg;
2275: IF EARNING_VALUE < 0 then
2276: msg := fffunc.gfm('PAY', 'HR_AU_NEGATIVE_EARNINGS','EARN_NAME',EARN_NAME, 'EARNING_VALUE',to_char(EARNING_VALUE));
2277: if g_debug then
2278: hr_utility.set_location('Return msg '||msg,50);
2279: hr_utility.set_location('Exiting '||l_procedure,60);
2280: end if;
2281:
2282: RETURN msg;
2283: ELSE
2284: a := hruserdt.get_table_value (BUSINESS_GROUP_ID, scale, scale||'a', TO_CHAR(EARNING_VALUE), PERIOD_DATE);
2285: b := hruserdt.get_table_value (BUSINESS_GROUP_ID, scale, scale||'b', TO_CHAR(EARNING_VALUE), PERIOD_DATE);
2286:
2287: if g_debug then
2288: hr_utility.set_location('OUT a '||a,45);
2289: hr_utility.set_location('OUT b '||b,50);
2290: hr_utility.set_location('Exiting '||l_procedure,60);
2291: end if;
2292:
2285: b := hruserdt.get_table_value (BUSINESS_GROUP_ID, scale, scale||'b', TO_CHAR(EARNING_VALUE), PERIOD_DATE);
2286:
2287: if g_debug then
2288: hr_utility.set_location('OUT a '||a,45);
2289: hr_utility.set_location('OUT b '||b,50);
2290: hr_utility.set_location('Exiting '||l_procedure,60);
2291: end if;
2292:
2293: RETURN 'ZZZ';
2286:
2287: if g_debug then
2288: hr_utility.set_location('OUT a '||a,45);
2289: hr_utility.set_location('OUT b '||b,50);
2290: hr_utility.set_location('Exiting '||l_procedure,60);
2291: end if;
2292:
2293: RETURN 'ZZZ';
2294: END IF;
2332: WHERE pivf.input_value_id = ppb.input_value_id
2333: AND ppb.pay_basis_id = p_pay_bases_id);
2334:
2335: BEGIN
2336: g_debug := hr_utility.debug_enabled;
2337:
2338: if g_debug then
2339: l_procedure :='pay_au_paye_ff.get_salary_basis_hours';
2340: hr_utility.set_location('Entering '||l_procedure,10);
2336: g_debug := hr_utility.debug_enabled;
2337:
2338: if g_debug then
2339: l_procedure :='pay_au_paye_ff.get_salary_basis_hours';
2340: hr_utility.set_location('Entering '||l_procedure,10);
2341: hr_utility.set_location('IN p_assignment_action_id '||p_assignment_action_id,20);
2342: hr_utility.set_location('IN p_element_type_id '||p_element_type_id,30);
2343: hr_utility.set_location('IN p_pay_bases_id '||p_pay_bases_id,40);
2344: end if ;
2337:
2338: if g_debug then
2339: l_procedure :='pay_au_paye_ff.get_salary_basis_hours';
2340: hr_utility.set_location('Entering '||l_procedure,10);
2341: hr_utility.set_location('IN p_assignment_action_id '||p_assignment_action_id,20);
2342: hr_utility.set_location('IN p_element_type_id '||p_element_type_id,30);
2343: hr_utility.set_location('IN p_pay_bases_id '||p_pay_bases_id,40);
2344: end if ;
2345:
2338: if g_debug then
2339: l_procedure :='pay_au_paye_ff.get_salary_basis_hours';
2340: hr_utility.set_location('Entering '||l_procedure,10);
2341: hr_utility.set_location('IN p_assignment_action_id '||p_assignment_action_id,20);
2342: hr_utility.set_location('IN p_element_type_id '||p_element_type_id,30);
2343: hr_utility.set_location('IN p_pay_bases_id '||p_pay_bases_id,40);
2344: end if ;
2345:
2346: OPEN Cr_element_type_id;
2339: l_procedure :='pay_au_paye_ff.get_salary_basis_hours';
2340: hr_utility.set_location('Entering '||l_procedure,10);
2341: hr_utility.set_location('IN p_assignment_action_id '||p_assignment_action_id,20);
2342: hr_utility.set_location('IN p_element_type_id '||p_element_type_id,30);
2343: hr_utility.set_location('IN p_pay_bases_id '||p_pay_bases_id,40);
2344: end if ;
2345:
2346: OPEN Cr_element_type_id;
2347: FETCH Cr_element_type_id INTO l_element_type_id;
2353: CLOSE Cr_value;
2354: END IF;
2355:
2356: if g_debug then
2357: hr_utility.set_location('OUT l_result '||l_result,50);
2358: hr_utility.set_location('Exiting '||l_procedure,60);
2359: end if ;
2360:
2361: RETURN l_result;
2354: END IF;
2355:
2356: if g_debug then
2357: hr_utility.set_location('OUT l_result '||l_result,50);
2358: hr_utility.set_location('Exiting '||l_procedure,60);
2359: end if ;
2360:
2361: RETURN l_result;
2362:
2384: l_action_id number;
2385: l_procedure varchar2(80);
2386:
2387: begin
2388: g_debug := hr_utility.debug_enabled;
2389: if g_debug then
2390: l_procedure:='pay_au_paye_ff.get_pp_action_id';
2391: hr_utility.set_location('Entering '||l_procedure,10);
2392: hr_utility.set_location('IN p_action_type '||p_action_type,20);
2387: begin
2388: g_debug := hr_utility.debug_enabled;
2389: if g_debug then
2390: l_procedure:='pay_au_paye_ff.get_pp_action_id';
2391: hr_utility.set_location('Entering '||l_procedure,10);
2392: hr_utility.set_location('IN p_action_type '||p_action_type,20);
2393: hr_utility.set_location('IN p_action_id '|| p_action_id,30);
2394: end if;
2395:
2388: g_debug := hr_utility.debug_enabled;
2389: if g_debug then
2390: l_procedure:='pay_au_paye_ff.get_pp_action_id';
2391: hr_utility.set_location('Entering '||l_procedure,10);
2392: hr_utility.set_location('IN p_action_type '||p_action_type,20);
2393: hr_utility.set_location('IN p_action_id '|| p_action_id,30);
2394: end if;
2395:
2396: --
2389: if g_debug then
2390: l_procedure:='pay_au_paye_ff.get_pp_action_id';
2391: hr_utility.set_location('Entering '||l_procedure,10);
2392: hr_utility.set_location('IN p_action_type '||p_action_type,20);
2393: hr_utility.set_location('IN p_action_id '|| p_action_id,30);
2394: end if;
2395:
2396: --
2397: if (p_action_type in ('P', 'U')) then
2407: l_action_id := null;
2408: end if;
2409:
2410: if g_debug then
2411: hr_utility.set_location('OUT l_action_id '||l_action_id,40);
2412: hr_utility.set_location('Exiting '||l_procedure,50);
2413: end if;
2414: --
2415: return l_action_id;
2408: end if;
2409:
2410: if g_debug then
2411: hr_utility.set_location('OUT l_action_id '||l_action_id,40);
2412: hr_utility.set_location('Exiting '||l_procedure,50);
2413: end if;
2414: --
2415: return l_action_id;
2416: --
2442: l_tax_unit_id pay_assignment_actions.tax_unit_id%TYPE;
2443: l_procedure varchar2(80);
2444:
2445: BEGIN
2446: g_debug := hr_utility.debug_enabled;
2447: if g_debug then
2448: l_procedure :='pay_au_paye_ff.check_tax_unit_id';
2449: hr_utility.set_location('Entering '||l_procedure,10);
2450: hr_utility.set_location('IN p_assignment_action_id '||p_assignment_action_id,20);
2445: BEGIN
2446: g_debug := hr_utility.debug_enabled;
2447: if g_debug then
2448: l_procedure :='pay_au_paye_ff.check_tax_unit_id';
2449: hr_utility.set_location('Entering '||l_procedure,10);
2450: hr_utility.set_location('IN p_assignment_action_id '||p_assignment_action_id,20);
2451: hr_utility.set_location('IN p_tax_unit_id '|| p_tax_unit_id,30);
2452: end if;
2453: OPEN c_get_master_tax_unit_id;
2446: g_debug := hr_utility.debug_enabled;
2447: if g_debug then
2448: l_procedure :='pay_au_paye_ff.check_tax_unit_id';
2449: hr_utility.set_location('Entering '||l_procedure,10);
2450: hr_utility.set_location('IN p_assignment_action_id '||p_assignment_action_id,20);
2451: hr_utility.set_location('IN p_tax_unit_id '|| p_tax_unit_id,30);
2452: end if;
2453: OPEN c_get_master_tax_unit_id;
2454: FETCH c_get_master_tax_unit_id INTO l_tax_unit_id;
2447: if g_debug then
2448: l_procedure :='pay_au_paye_ff.check_tax_unit_id';
2449: hr_utility.set_location('Entering '||l_procedure,10);
2450: hr_utility.set_location('IN p_assignment_action_id '||p_assignment_action_id,20);
2451: hr_utility.set_location('IN p_tax_unit_id '|| p_tax_unit_id,30);
2452: end if;
2453: OPEN c_get_master_tax_unit_id;
2454: FETCH c_get_master_tax_unit_id INTO l_tax_unit_id;
2455: IF c_get_master_tax_unit_id%NOTFOUND THEN
2455: IF c_get_master_tax_unit_id%NOTFOUND THEN
2456: l_flag := 'Y';
2457:
2458: if g_debug then
2459: hr_utility.set_location('Return l_flag '||l_flag,40);
2460: hr_utility.set_location('Exiting '||l_procedure,50);
2461: end if;
2462: RETURN l_flag;
2463: ELSE
2456: l_flag := 'Y';
2457:
2458: if g_debug then
2459: hr_utility.set_location('Return l_flag '||l_flag,40);
2460: hr_utility.set_location('Exiting '||l_procedure,50);
2461: end if;
2462: RETURN l_flag;
2463: ELSE
2464: IF l_tax_unit_id <> p_tax_unit_id THEN
2464: IF l_tax_unit_id <> p_tax_unit_id THEN
2465: l_flag := 'N';
2466:
2467: if g_debug then
2468: hr_utility.set_location('Return l_flag '||l_flag,40);
2469: hr_utility.set_location('Exiting '||l_procedure,50);
2470: end if;
2471:
2472: RETURN l_flag;
2465: l_flag := 'N';
2466:
2467: if g_debug then
2468: hr_utility.set_location('Return l_flag '||l_flag,40);
2469: hr_utility.set_location('Exiting '||l_procedure,50);
2470: end if;
2471:
2472: RETURN l_flag;
2473: ELSE
2473: ELSE
2474: l_flag := 'Y';
2475:
2476: if g_debug then
2477: hr_utility.set_location('Return l_flag '||l_flag,40);
2478: hr_utility.set_location('Exiting '||l_procedure,50);
2479: end if;
2480:
2481: RETURN l_flag;
2474: l_flag := 'Y';
2475:
2476: if g_debug then
2477: hr_utility.set_location('Return l_flag '||l_flag,40);
2478: hr_utility.set_location('Exiting '||l_procedure,50);
2479: end if;
2480:
2481: RETURN l_flag;
2482: END IF;
2562: l_procedure varchar2(80);
2563:
2564: begin
2565:
2566: g_debug := hr_utility.debug_enabled;
2567: if g_debug then
2568: l_procedure :='pay_au_paye_ff.get_spread_earning';
2569: hr_utility.set_location('Entering '||l_procedure,10);
2570: hr_utility.set_location('IN p_assignment_action_id '||p_assignment_action_id,20);
2565:
2566: g_debug := hr_utility.debug_enabled;
2567: if g_debug then
2568: l_procedure :='pay_au_paye_ff.get_spread_earning';
2569: hr_utility.set_location('Entering '||l_procedure,10);
2570: hr_utility.set_location('IN p_assignment_action_id '||p_assignment_action_id,20);
2571: hr_utility.set_location('IN p_date_paid '|| p_date_paid,30);
2572: hr_utility.set_location('IN p_pre_tax '|| p_pre_tax,30);
2573: hr_utility.set_location('IN p_spread_earning '|| p_spread_earning,30);
2566: g_debug := hr_utility.debug_enabled;
2567: if g_debug then
2568: l_procedure :='pay_au_paye_ff.get_spread_earning';
2569: hr_utility.set_location('Entering '||l_procedure,10);
2570: hr_utility.set_location('IN p_assignment_action_id '||p_assignment_action_id,20);
2571: hr_utility.set_location('IN p_date_paid '|| p_date_paid,30);
2572: hr_utility.set_location('IN p_pre_tax '|| p_pre_tax,30);
2573: hr_utility.set_location('IN p_spread_earning '|| p_spread_earning,30);
2574: end if;
2567: if g_debug then
2568: l_procedure :='pay_au_paye_ff.get_spread_earning';
2569: hr_utility.set_location('Entering '||l_procedure,10);
2570: hr_utility.set_location('IN p_assignment_action_id '||p_assignment_action_id,20);
2571: hr_utility.set_location('IN p_date_paid '|| p_date_paid,30);
2572: hr_utility.set_location('IN p_pre_tax '|| p_pre_tax,30);
2573: hr_utility.set_location('IN p_spread_earning '|| p_spread_earning,30);
2574: end if;
2575:
2568: l_procedure :='pay_au_paye_ff.get_spread_earning';
2569: hr_utility.set_location('Entering '||l_procedure,10);
2570: hr_utility.set_location('IN p_assignment_action_id '||p_assignment_action_id,20);
2571: hr_utility.set_location('IN p_date_paid '|| p_date_paid,30);
2572: hr_utility.set_location('IN p_pre_tax '|| p_pre_tax,30);
2573: hr_utility.set_location('IN p_spread_earning '|| p_spread_earning,30);
2574: end if;
2575:
2576: l_total_spread_earning := 0;
2569: hr_utility.set_location('Entering '||l_procedure,10);
2570: hr_utility.set_location('IN p_assignment_action_id '||p_assignment_action_id,20);
2571: hr_utility.set_location('IN p_date_paid '|| p_date_paid,30);
2572: hr_utility.set_location('IN p_pre_tax '|| p_pre_tax,30);
2573: hr_utility.set_location('IN p_spread_earning '|| p_spread_earning,30);
2574: end if;
2575:
2576: l_total_spread_earning := 0;
2577: l_spread_earning := 0;
2602: end loop;
2603: end if;
2604:
2605: if g_debug then
2606: hr_utility.set_location('OUT p_spread_earning '|| l_total_spread_earning,30);
2607: hr_utility.set_location('Leaving '||l_procedure,10);
2608: end if;
2609:
2610:
2603: end if;
2604:
2605: if g_debug then
2606: hr_utility.set_location('OUT p_spread_earning '|| l_total_spread_earning,30);
2607: hr_utility.set_location('Leaving '||l_procedure,10);
2608: end if;
2609:
2610:
2611: return l_total_spread_earning;
2645: l_procedure varchar2(80);
2646:
2647: begin
2648:
2649: g_debug := hr_utility.debug_enabled;
2650: if g_debug then
2651: l_procedure :='pay_au_paye_ff.get_spread_earning';
2652: hr_utility.set_location('Entering '||l_procedure,10);
2653: hr_utility.set_location('IN p_assignment_action_id '||p_assignment_action_id,20);
2648:
2649: g_debug := hr_utility.debug_enabled;
2650: if g_debug then
2651: l_procedure :='pay_au_paye_ff.get_spread_earning';
2652: hr_utility.set_location('Entering '||l_procedure,10);
2653: hr_utility.set_location('IN p_assignment_action_id '||p_assignment_action_id,20);
2654: hr_utility.set_location('IN p_date_paid '|| p_date_paid,30);
2655: hr_utility.set_location('IN p_pre_tax '|| p_pre_tax,30);
2656: hr_utility.set_location('IN p_spread_earning '|| p_spread_earning,30);
2649: g_debug := hr_utility.debug_enabled;
2650: if g_debug then
2651: l_procedure :='pay_au_paye_ff.get_spread_earning';
2652: hr_utility.set_location('Entering '||l_procedure,10);
2653: hr_utility.set_location('IN p_assignment_action_id '||p_assignment_action_id,20);
2654: hr_utility.set_location('IN p_date_paid '|| p_date_paid,30);
2655: hr_utility.set_location('IN p_pre_tax '|| p_pre_tax,30);
2656: hr_utility.set_location('IN p_spread_earning '|| p_spread_earning,30);
2657: end if;
2650: if g_debug then
2651: l_procedure :='pay_au_paye_ff.get_spread_earning';
2652: hr_utility.set_location('Entering '||l_procedure,10);
2653: hr_utility.set_location('IN p_assignment_action_id '||p_assignment_action_id,20);
2654: hr_utility.set_location('IN p_date_paid '|| p_date_paid,30);
2655: hr_utility.set_location('IN p_pre_tax '|| p_pre_tax,30);
2656: hr_utility.set_location('IN p_spread_earning '|| p_spread_earning,30);
2657: end if;
2658:
2651: l_procedure :='pay_au_paye_ff.get_spread_earning';
2652: hr_utility.set_location('Entering '||l_procedure,10);
2653: hr_utility.set_location('IN p_assignment_action_id '||p_assignment_action_id,20);
2654: hr_utility.set_location('IN p_date_paid '|| p_date_paid,30);
2655: hr_utility.set_location('IN p_pre_tax '|| p_pre_tax,30);
2656: hr_utility.set_location('IN p_spread_earning '|| p_spread_earning,30);
2657: end if;
2658:
2659: l_retro_spread_earning := 0;
2652: hr_utility.set_location('Entering '||l_procedure,10);
2653: hr_utility.set_location('IN p_assignment_action_id '||p_assignment_action_id,20);
2654: hr_utility.set_location('IN p_date_paid '|| p_date_paid,30);
2655: hr_utility.set_location('IN p_pre_tax '|| p_pre_tax,30);
2656: hr_utility.set_location('IN p_spread_earning '|| p_spread_earning,30);
2657: end if;
2658:
2659: l_retro_spread_earning := 0;
2660: