[Home] [Help]
38: *** 22-Nov-03 punmehta 115.27 Bug#3263659 - Modified c_asg_ids cursor to check for terminated date in last year.
39: *** 06-Feb-04 punmehta 115.28 Bug#3245909 - Modified c_get_pay_effective_date cursor to fetch Dates for only master assignment action.
40: *** 10-Feb-04 punmehta 115.29 Bug#3098367 - Added check to set a flag as 'NO' if all balances are zero.
41: *** 11-Feb-04 punmehta 115.30 Bug#3098367 - Added default value for flag.
42: *** 23-Mar-04 Ragovind 115.31 Bug#3525563 - Added IF condition to call pay_balance_pkg.get_value when l_max_asg_action_id is not null
43: *** 28-Mar-04 srrajago 115.32 Bug#3186840 - Introduced a parameter 'l_le_level' in 'populate_bal_ids' so that it can populate
44: *** defined_bal_ids of '_ASG_LE_YTD' or '_ASG_YTD' depending on the parameter value passed.
45: *** Introduced procedures 'populate_group_def_bal_ids','get_group_values_bbr',
46: *** 'get_assgt_curr_term_values_bbr' and 'get_group_assgt_values_bbr'.New procedures will be used by the
474: End adjust_retro_group_allowances;
475:
476: /***************
477: bug 7571001 - get_total_allowances function is entirely changed to enable group level reporting
478: pay_balance_pkg.get_value is called with different input values based on g_bal_dim_level
479: then pay_au_payment_summary.adjust_retro_allowances is called for 'N' dimension level or
480: adjust_retro_group_allowances is called for 'G'.
481: ***************/
482: Function get_total_allowances ( p_year_start DATE,
513:
514: g_result_alw_table.delete;
515: t_allowance_balance.delete;
516:
517: pay_balance_pkg.get_value(p_assignment_action_id => p_assignment_action_id,
518: p_defined_balance_lst=>g_input_alw_table,
519: p_context_lst =>g_context_table,
520: p_output_table=>g_result_alw_table);
521:
578:
579: g_result_group_alw_table.delete;
580: t_allowance_balance.delete;
581:
582: pay_balance_pkg.get_value(p_assignment_action_id => p_assignment_action_id,
583: p_defined_balance_lst => g_input_group_alw_table,
584: p_context_lst => g_context_table,
585: p_output_table => g_result_group_alw_table);
586:
664: l_fw_f_type varchar2(1);
665: l_fw_j_type varchar2(1);
666: f_fw_date_tab pay_au_foreign_workers.tab_fw_dates;
667: j_fw_date_tab pay_au_foreign_workers.tab_fw_dates;
668: l_fw_fbt_output_tab pay_balance_pkg.t_detailed_bal_out_tab;
669: /* Changes for 9147438 end */
670:
671: /* Bug: 3603495 - Performance Fix - Introduced per_assignments_f and its joins in the following cursor */
672: /* Bug: 4015571 - Modified cursor c_max_asg_action_id - Modified action_type join in sub query
737: fetch c_max_asg_action_id into l_max_asg_action_id;
738: close c_max_asg_action_id;
739: END IF;
740:
741: /* Bug#3525563 - Added IF condition to call pay_balance_pkg.get_value when l_max_asg_action_id is not null. */
742: IF l_max_asg_action_id is not null then
743: l_total_fbt := pay_balance_pkg.get_value(g_fbt_defined_balance_id,
744: l_max_asg_action_id,p_tax_unit_id, null,null,null,null);
745: ELSE
739: END IF;
740:
741: /* Bug#3525563 - Added IF condition to call pay_balance_pkg.get_value when l_max_asg_action_id is not null. */
742: IF l_max_asg_action_id is not null then
743: l_total_fbt := pay_balance_pkg.get_value(g_fbt_defined_balance_id,
744: l_max_asg_action_id,p_tax_unit_id, null,null,null,null);
745: ELSE
746: l_total_fbt := 0;
747: END IF;
1033: v_effective_date date; /* Bug#3095923 */
1034: c_year_start date;
1035: l_assignment_action_id number; --2610141
1036: v_adj_lump_sum_E_ptd number; --bug8711855
1037: p_lump_sum_E_ptd_tab pay_balance_pkg.t_balance_value_tab; --bug8711855
1038: v_adj_lump_sum_pre_tax number; /* Bug 9190980 */
1039:
1040: begin
1041: c_year_start := to_date('01-07-'||to_char(to_number(to_char(c_year_end,'YYYY'))-1),'DD-MM-YYYY');
1781: l_alw_total number;
1782: g_fw_check varchar2(1);
1783: l_fbt_total number;
1784: p_fw_allowance_tab pay_au_payment_summary.t_allowance_balance%type;
1785: l_fw_union_output_tab pay_balance_pkg.t_detailed_bal_out_tab;
1786: counter number;
1787: l_fw_cdep_asg_le_ytd number;
1788: cnt number;
1789: x number;
1875:
1876: p_display_flag := 'YES';
1877: g_context_table(1).tax_unit_id := p_tax_unit_id;
1878:
1879: pay_balance_pkg.get_value(p_assignment_action_id => p_assignment_action_id,
1880: p_defined_balance_lst=>g_input_table,
1881: p_context_lst =>g_context_table,
1882: p_output_table=>g_result_table);
1883:
2611:
2612: g_context_table(1).tax_unit_id := p_tax_unit_id;
2613:
2614: IF (g_dimension_name = '_LE_YTD') THEN
2615: pay_balance_pkg.set_context('DATE_EARNED',fnd_date.date_to_canonical(p_date_earned));
2616: END IF;
2617:
2618: pay_balance_pkg.get_value(p_assignment_action_id => p_assignment_action_id,
2619: p_defined_balance_lst => g_input_group_details_table,
2614: IF (g_dimension_name = '_LE_YTD') THEN
2615: pay_balance_pkg.set_context('DATE_EARNED',fnd_date.date_to_canonical(p_date_earned));
2616: END IF;
2617:
2618: pay_balance_pkg.get_value(p_assignment_action_id => p_assignment_action_id,
2619: p_defined_balance_lst => g_input_group_details_table,
2620: p_context_lst => g_context_table,
2621: p_output_table => g_result_group_details_table);
2622:
2735: END IF;
2736: END IF;
2737: END LOOP;
2738:
2739: pay_balance_pkg.get_value
2740: ( p_assignment_action_id => p_assignment_action_id
2741: , p_defined_balance_lst => g_input_term_details_table
2742: , p_context_lst => g_context_table
2743: , p_output_table => g_result_term_details_table);
3027: ,pay_assignment_actions rpac
3028: ,pay_payroll_actions rppa
3029: where pps.actual_termination_date between p_lst_fbt_yr_start and p_fbt_year_end /*Bug3263659 */
3030: and rppa.effective_date between p_fbt_year_start and p_fbt_year_end
3031: and pay_balance_pkg.get_value(g_fbt_defined_balance_id, rpac.assignment_action_id
3032: + decode(rppa.payroll_id, 0, 0, 0),p_legal_employer,null,null,null,null) > to_number(g_fbt_threshold)
3033: and rppa.action_type in ('R','Q','B','I')
3034: and rpac.tax_unit_id = p_legal_employer
3035: and rppa.payroll_action_id = rpac.payroll_action_id
3116: ,pay_assignment_actions rpac
3117: ,pay_payroll_actions rppa
3118: where pps.actual_termination_date between p_lst_fbt_yr_start and p_fbt_year_end /*Bug3263659 */
3119: and rppa.effective_date between p_fbt_year_start and p_fbt_year_end
3120: and pay_balance_pkg.get_value(g_fbt_defined_balance_id, rpac.assignment_action_id
3121: + decode(rppa.payroll_id, 0, 0, 0),p_legal_employer,null,null,null,null) > to_number(g_fbt_threshold)
3122: and rppa.action_type in ('R','Q','B','I')
3123: and rpac.tax_unit_id = p_legal_employer
3124: and rppa.payroll_action_id = rpac.payroll_action_id
3192: ,pay_assignment_actions rpac
3193: ,pay_payroll_actions rppa
3194: where pps.actual_termination_date between p_lst_fbt_yr_start and p_fbt_year_end /*Bug3263659 */
3195: and rppa.effective_date between p_fbt_year_start and p_fbt_year_end
3196: and pay_balance_pkg.get_value(g_fbt_defined_balance_id, rpac.assignment_action_id
3197: + decode(rppa.payroll_id, 0, 0, 0),p_legal_employer,null,null,null,null) > to_number(g_fbt_threshold)
3198: and rppa.action_type in ('R','Q','B','I')
3199: and rpac.tax_unit_id = p_legal_employer
3200: and rppa.payroll_action_id = rpac.payroll_action_id