225: l_prev_tax_income:= NVL(l_prev_tax_income,0);
226: -- Fetch Balances
227: --
228: l_defbal_id := PAY_NL_GENERAL.GET_DEFINED_BALANCE_ID('TAX_TRAVEL_ALLOWANCE_ASG_PTD');
229: l_Travel_Allowance := NVL(pay_balance_pkg.get_value(l_defbal_id, p_assignment_action_id),0);
230:
231: l_defbal_id := PAY_NL_GENERAL.GET_DEFINED_BALANCE_ID('TAX_SEA_DAYS_DISCOUNT_ASG_PTD');
232: l_Sea_Days_Discount := NVL(pay_balance_pkg.get_value(l_defbal_id, p_assignment_action_id),0);
233:
228: l_defbal_id := PAY_NL_GENERAL.GET_DEFINED_BALANCE_ID('TAX_TRAVEL_ALLOWANCE_ASG_PTD');
229: l_Travel_Allowance := NVL(pay_balance_pkg.get_value(l_defbal_id, p_assignment_action_id),0);
230:
231: l_defbal_id := PAY_NL_GENERAL.GET_DEFINED_BALANCE_ID('TAX_SEA_DAYS_DISCOUNT_ASG_PTD');
232: l_Sea_Days_Discount := NVL(pay_balance_pkg.get_value(l_defbal_id, p_assignment_action_id),0);
233:
234: l_defbal_id := PAY_NL_GENERAL.GET_DEFINED_BALANCE_ID('TAX_ABW_ALLOWANCE_ASG_PTD');
235: l_ABW_Allowance := NVL(pay_balance_pkg.get_value(l_defbal_id, p_assignment_action_id),0);
236:
231: l_defbal_id := PAY_NL_GENERAL.GET_DEFINED_BALANCE_ID('TAX_SEA_DAYS_DISCOUNT_ASG_PTD');
232: l_Sea_Days_Discount := NVL(pay_balance_pkg.get_value(l_defbal_id, p_assignment_action_id),0);
233:
234: l_defbal_id := PAY_NL_GENERAL.GET_DEFINED_BALANCE_ID('TAX_ABW_ALLOWANCE_ASG_PTD');
235: l_ABW_Allowance := NVL(pay_balance_pkg.get_value(l_defbal_id, p_assignment_action_id),0);
236:
237: l_defbal_id := PAY_NL_GENERAL.GET_DEFINED_BALANCE_ID('TAX_ABW_ALLOWANCE_STOPPAGE_ASG_PTD');
238: l_ABW_Allowance_Stoppage := NVL(pay_balance_pkg.get_value(l_defbal_id, p_assignment_action_id),0);
239:
234: l_defbal_id := PAY_NL_GENERAL.GET_DEFINED_BALANCE_ID('TAX_ABW_ALLOWANCE_ASG_PTD');
235: l_ABW_Allowance := NVL(pay_balance_pkg.get_value(l_defbal_id, p_assignment_action_id),0);
236:
237: l_defbal_id := PAY_NL_GENERAL.GET_DEFINED_BALANCE_ID('TAX_ABW_ALLOWANCE_STOPPAGE_ASG_PTD');
238: l_ABW_Allowance_Stoppage := NVL(pay_balance_pkg.get_value(l_defbal_id, p_assignment_action_id),0);
239:
240: l_defbal_id := PAY_NL_GENERAL.GET_DEFINED_BALANCE_ID('TAX_WAO_ALLOWANCE_ASG_PTD');
241: l_WAO_Allowance := NVL(pay_balance_pkg.get_value(l_defbal_id, p_assignment_action_id),0);
242:
237: l_defbal_id := PAY_NL_GENERAL.GET_DEFINED_BALANCE_ID('TAX_ABW_ALLOWANCE_STOPPAGE_ASG_PTD');
238: l_ABW_Allowance_Stoppage := NVL(pay_balance_pkg.get_value(l_defbal_id, p_assignment_action_id),0);
239:
240: l_defbal_id := PAY_NL_GENERAL.GET_DEFINED_BALANCE_ID('TAX_WAO_ALLOWANCE_ASG_PTD');
241: l_WAO_Allowance := NVL(pay_balance_pkg.get_value(l_defbal_id, p_assignment_action_id),0);
242:
243: l_defbal_id := PAY_NL_GENERAL.GET_DEFINED_BALANCE_ID('EMPLOYEE_SI_CONTRIBUTION_STANDARD_TAX_ASG_SIT_PTD');
244:
245: open get_context_id;
244:
245: open get_context_id;
246: fetch get_context_id into l_context_id;
247: close get_context_id;
248: l_ZVW_Contribution := NVL(pay_balance_pkg.get_value(l_defbal_id, p_assignment_action_id, null, null, l_context_id, 'ZVW', null, null ),0);
249: l_defbal_id := PAY_NL_GENERAL.GET_DEFINED_BALANCE_ID('EMPLOYEE_SI_CONTRIBUTION_SPECIAL_TAX_ASG_SIT_PTD');
250: l_ZVW_Contribution := l_ZVW_Contribution + NVL(pay_balance_pkg.get_value(l_defbal_id, p_assignment_action_id, null, null, l_context_id, 'ZVW', null, null ),0);
251: l_defbal_id := PAY_NL_GENERAL.GET_DEFINED_BALANCE_ID('NET_EMPLOYEE_SI_CONTRIBUTION_ASG_SIT_PTD');
252: l_ZVW_Contribution := l_ZVW_Contribution + NVL(pay_balance_pkg.get_value(l_defbal_id, p_assignment_action_id, null, null, l_context_id, 'ZVW', null, null ),0);
246: fetch get_context_id into l_context_id;
247: close get_context_id;
248: l_ZVW_Contribution := NVL(pay_balance_pkg.get_value(l_defbal_id, p_assignment_action_id, null, null, l_context_id, 'ZVW', null, null ),0);
249: l_defbal_id := PAY_NL_GENERAL.GET_DEFINED_BALANCE_ID('EMPLOYEE_SI_CONTRIBUTION_SPECIAL_TAX_ASG_SIT_PTD');
250: l_ZVW_Contribution := l_ZVW_Contribution + NVL(pay_balance_pkg.get_value(l_defbal_id, p_assignment_action_id, null, null, l_context_id, 'ZVW', null, null ),0);
251: l_defbal_id := PAY_NL_GENERAL.GET_DEFINED_BALANCE_ID('NET_EMPLOYEE_SI_CONTRIBUTION_ASG_SIT_PTD');
252: l_ZVW_Contribution := l_ZVW_Contribution + NVL(pay_balance_pkg.get_value(l_defbal_id, p_assignment_action_id, null, null, l_context_id, 'ZVW', null, null ),0);
253:
254: l_sql :=
248: l_ZVW_Contribution := NVL(pay_balance_pkg.get_value(l_defbal_id, p_assignment_action_id, null, null, l_context_id, 'ZVW', null, null ),0);
249: l_defbal_id := PAY_NL_GENERAL.GET_DEFINED_BALANCE_ID('EMPLOYEE_SI_CONTRIBUTION_SPECIAL_TAX_ASG_SIT_PTD');
250: l_ZVW_Contribution := l_ZVW_Contribution + NVL(pay_balance_pkg.get_value(l_defbal_id, p_assignment_action_id, null, null, l_context_id, 'ZVW', null, null ),0);
251: l_defbal_id := PAY_NL_GENERAL.GET_DEFINED_BALANCE_ID('NET_EMPLOYEE_SI_CONTRIBUTION_ASG_SIT_PTD');
252: l_ZVW_Contribution := l_ZVW_Contribution + NVL(pay_balance_pkg.get_value(l_defbal_id, p_assignment_action_id, null, null, l_context_id, 'ZVW', null, null ),0);
253:
254: l_sql :=
255: 'SELECT TO_CHAR('||l_sp_percentage_rate|| ',fnd_currency.get_format_mask(:G_CURRENCY_CODE,40)) COL16 '||
256: ',TO_CHAR('||l_prev_tax_income||',fnd_currency.get_format_mask(:G_CURRENCY_CODE,40)) COL17 '||
395: l_found boolean;
396: balCount number;
397: locked_assignment_action_id pay_action_interlocks.locked_action_id%TYPE;
398: --
399: l_defined_balance_lst pay_balance_pkg.t_balance_value_tab;
400: l_context_lst pay_balance_pkg.t_context_tab;
401: l_output_table pay_balance_pkg.t_detailed_bal_out_tab;
402: --
403: i number;
396: balCount number;
397: locked_assignment_action_id pay_action_interlocks.locked_action_id%TYPE;
398: --
399: l_defined_balance_lst pay_balance_pkg.t_balance_value_tab;
400: l_context_lst pay_balance_pkg.t_context_tab;
401: l_output_table pay_balance_pkg.t_detailed_bal_out_tab;
402: --
403: i number;
404: --
397: locked_assignment_action_id pay_action_interlocks.locked_action_id%TYPE;
398: --
399: l_defined_balance_lst pay_balance_pkg.t_balance_value_tab;
400: l_context_lst pay_balance_pkg.t_context_tab;
401: l_output_table pay_balance_pkg.t_detailed_bal_out_tab;
402: --
403: i number;
404: --
405: --
487: select distinct
488: aa.tax_unit_id tax_unit_id
489: , rr.jurisdiction_code jurisdiction_code
490: , decode(l_si_needed_chr,
491: 'Y', pay_balance_pkg.find_context('SOURCE_ID'
492: ,rr.run_result_id)
493: ,null) source_id
494: , decode(l_st_needed_chr,
495: 'Y', pay_balance_pkg.find_context('SOURCE_TEXT'
491: 'Y', pay_balance_pkg.find_context('SOURCE_ID'
492: ,rr.run_result_id)
493: ,null) source_id
494: , decode(l_st_needed_chr,
495: 'Y', pay_balance_pkg.find_context('SOURCE_TEXT'
496: ,rr.run_result_id)
497: ,null) source_text
498: , decode(l_sn_needed_chr,
499: 'Y', pay_balance_pkg.find_context('SOURCE_NUMBER'
495: 'Y', pay_balance_pkg.find_context('SOURCE_TEXT'
496: ,rr.run_result_id)
497: ,null) source_text
498: , decode(l_sn_needed_chr,
499: 'Y', pay_balance_pkg.find_context('SOURCE_NUMBER'
500: ,rr.run_result_id)
501: ,null) source_number
502: , decode(l_st2_needed_chr,
503: 'Y', pay_balance_pkg.find_context('SOURCE_TEXT2'
499: 'Y', pay_balance_pkg.find_context('SOURCE_NUMBER'
500: ,rr.run_result_id)
501: ,null) source_number
502: , decode(l_st2_needed_chr,
503: 'Y', pay_balance_pkg.find_context('SOURCE_TEXT2'
504: ,rr.run_result_id)
505: ,null) source_text2
506: from pay_assignment_actions aa,
507: pay_payroll_actions pa,
564: db.dimension_name;
565: l_balance_type_lst(db.defined_balance_id).defined_balance_id :=
566: db.defined_balance_id;
567: --
568: pay_balance_pkg.get_period_type_start
569: (p_period_type => db.period_type
570: ,p_effective_date => l_effective_date
571: ,p_payroll_id => l_payroll_id
572: ,p_start_date => l_temp_date);
648: if g_debug then
649: hr_utility.set_location('pay_soe_glb.getBalances', 50);
650: end if;
651: --
652: pay_balance_pkg.get_value (p_assignment_action_id => p_assignment_action_id
653: ,p_defined_balance_lst => l_defined_balance_lst
654: ,p_context_lst => l_context_lst
655: ,p_output_table => l_output_table);
656: --