DBA Data[Home] [Help]

PACKAGE BODY: APPS.PAY_IE_RULES

Source


1 Package Body PAY_IE_RULES as
2 /*   $Header: pyierule.pkb 120.0 2005/05/29 05:46:40 appldev noship $ */
3 /*
4    Copyright (c) Oracle Corporation 1991,1992,1993,1994. All rights reserved
5 --
6    Name        : pay_ie_rules
7 --
8    Change List
9    -----------
10    Date         Name        Vers   Description
11    -----------  ----------  -----  -------------------------------------------
12    07-MAR-2003  vmkhande    115.0  Created(template pyfrrule).
13 */
14 --
15 --
16    procedure get_source_text_context(p_asg_act_id number,
17                                      p_ee_id number,
18                                      p_source_text in out NOCOPY varchar2)
19    is
20    begin
21            hr_utility.set_location('PAY_ie_RULES.get_source_text_context',1);
22           /* removed the defaulting as due to a core bug defulating was being
23 called even for ASG_YTD dim. this resulted in bugs! */
24            --p_source_text := 'IE_A1';
25            p_source_text := null;
26            hr_utility.set_location('PAY_IE_RULES.get_source_text_context',3);
27            hr_utility.set_location('PAY_IE_RULES.get_source_text_context='||
28                                p_source_text,4);
29    end get_source_text_context;
30 
31 
32    PROCEDURE get_main_tax_unit_id
33      (p_assignment_id                 IN     NUMBER
34      ,p_effective_date                IN     DATE
35      ,p_tax_unit_id                   OUT NOCOPY NUMBER ) IS
36 
37 		CURSOR c_get_tex_unit_id(l_assignment_id number,l_effective_date date) IS
38 		SELECT to_number(scl.segment4)
39 		from    per_all_assignments_f asg,
40 			pay_all_payrolls_f papf,
41 			hr_soft_coding_keyflex scl
42 		where	asg.business_group_id = papf.business_group_id
43 		and	papf.payroll_id = asg.payroll_id
44 		and	asg.assignment_id = l_assignment_id
45 		and	l_effective_date between asg.effective_start_date and asg.effective_end_date
46 		and	l_effective_date between papf.effective_start_date and papf.effective_end_date
47 		and	papf.soft_coding_keyflex_id = scl.soft_coding_keyflex_id;
48     BEGIN
49        -- hr_utility.trace_on('Y','IETUINT');
50         hr_utility.set_location('asg_id = ' || p_assignment_id,20);
51         hr_utility.set_location('effective_date = ' || p_effective_date,30);
52 
53    	  OPEN c_get_tex_unit_id(p_assignment_id,p_effective_date);
54    	  FETCH c_get_tex_unit_id INTO p_tax_unit_id ;
55    	  CLOSE c_get_tex_unit_id;
56 
57    	  hr_utility.set_location('p_tax_unit_id = ' || p_tax_unit_id,30);
58     EXCEPTION
59    	WHEN others THEN
60    	p_tax_unit_id := NULL;
61  END get_main_tax_unit_id;
62 
63 end pay_ie_rules;