DBA Data[Home] [Help]

PACKAGE: APPS.PAY_NO_EOY_ARCHIVE

Source


1 PACKAGE pay_no_eoy_archive AS
2  /* $Header: pynoeoya.pkh 120.0.12010000.4 2008/08/06 08:06:24 ubhat ship $ */
3  --
4  --
5  -- -----------------------------------------------------------------------------
6  -- Data types.
7  -- -----------------------------------------------------------------------------
8  --
9  TYPE t_rep_code_rec IS RECORD
10   (reporting_code VARCHAR2(10)
11   ,amount         VARCHAR2(10)
12   ,info1          VARCHAR2(30)
13   ,info2          VARCHAR2(30)
14   ,info3          VARCHAR2(30)
15   ,info4          VARCHAR2(30)
16   ,info5          VARCHAR2(30)
17   ,info6          VARCHAR2(30)
18   ,info7          VARCHAR2(100)
19   ,info8          VARCHAR2(100)
20   ,info9          VARCHAR2(100)
21   ,info10         VARCHAR2(100)
22   ,info11         VARCHAR2(100)
23   ,info12         VARCHAR2(100));
24  --
25  TYPE t_rep_code_table IS TABLE OF t_rep_code_rec INDEX BY BINARY_INTEGER;
26  --
27  --
28  -- -----------------------------------------------------------------------------
29  -- Localisation delivered support for extracting specific reporting codes.
30  --
31  -- Needs to populate the archive as follows:-
32  --
33  --  pay_action_information_api.create_action_information
34  --  (p_action_context_type         => 'AAP'
35  --  ,p_action_context_id           => p_assignment_action_id
36  --  ,p_action_information_id       => l_act_inf_id
37  --  ,p_object_version_number       => l_ovn
38  --  ,p_effective_date              => p_report_date
39  --  ,p_action_information_category => 'EMEA REPORT INFORMATION'
40  --  ,p_action_information1         => 'ASG_REP_CODE_INFO'
41  --  ,p_action_information2         => p_reporting_code
42  --  ,p_action_information3         => <amount>
43  --  ,p_action_information4         => <info1>
44  --  ,p_action_information5         => <info2>
45  --  ,p_action_information6         => <info3>
46  --  ,p_action_information7         => <info4>
47  --  ,p_action_information8         => <info5>
48  --  ,p_action_information9         => <info6>);
49  -- -----------------------------------------------------------------------------
50  --
51  PROCEDURE extract_reporting_code
52  (p_assignment_action_id IN NUMBER
53  ,p_reporting_code       IN VARCHAR2
54  ,p_report_date          IN DATE);
55  --
56  --
57  -- -----------------------------------------------------------------------------
58  -- Localisation delivered support for collating specific reporting codes.
59  --
60  -- Cursor to retrieve reporting code informastion to be collated:-
61  --
62  --  CURSOR csr_REPORTING_CODES
63  --          (p_payroll_action_id IN NUMBER
64  --          ,p_legal_employer_id IN VARCHAR2
65  --         ,p_reporting_code    IN VARCHAR2) IS
66  --   SELECT asg_act.action_information5  person_id
67  --         ,asg_act.action_information6  tax_municipality
68  --         ,TO_NUMBER(rep_cde.action_information3)  amount
69  --   FROM   pay_assignment_actions paa
70  --         ,pay_action_information asg_act
71  --         ,pay_action_information rep_cde
72  --   WHERE  paa.payroll_action_id               = p_payroll_action_id
73  --     AND  asg_act.action_context_type         = 'AAP'
74  --     AND  asg_act.action_context_id           = paa.assignment_action_id
75  --     AND  asg_act.action_information_category = 'EMEA REPORT INFORMATION'
76  --     AND  asg_act.action_information1         = 'ASG_ACT_INFO'
77  --     AND  asg_act.action_information2         = p_legal_employer_id
78  --     AND  rep_cde.action_context_type         = 'AAP'
79  --     AND  rep_cde.action_context_id           = asg_act.action_context_id
80  --     AND  rep_cde.action_information_category = 'EMEA REPORT INFORMATION'
81  --     AND  rep_cde.action_information1         = 'ASG_REP_CODE_INFO'
82  --     AND  rep_cde.action_information2         = p_reporting_code;
83  --
84  -- Needs to populate the archive as follows:-
85  --
86  --  pay_action_information_api.create_action_information
87  --  (p_action_context_type         => 'PA'
88  --  ,p_action_context_id           => p_payroll_action_id
89  --  ,p_action_information_id       => l_act_inf_id
90  --  ,p_object_version_number       => l_ovn
91  --  ,p_effective_date              => p_report_date
92  --  ,p_action_information_category => 'EMEA REPORT INFORMATION'
93  --  ,p_action_information1         => 'AUDIT_REP_SUMMARY'
94  --  ,p_action_information2         => p_legal_employer_id
95  --  ,p_action_information3         => <person ID>
96  --  ,p_action_information4         => p_reporting_code
97  --  ,p_action_information5         => <amount>
98  --  ,p_action_information6         => <info1>
99  --  ,p_action_information7         => <info2>
100  --  ,p_action_information8         => <info3>
101  --  ,p_action_information9         => <info4>
102  --  ,p_action_information10        => <info5>
103  --  ,p_action_information11        => <info6>
104  --  ,p_action_information11        => <tax_municipality>);
105  -- -----------------------------------------------------------------------------
106  --
107  PROCEDURE collate_reporting_code
108  (p_payroll_action_id IN NUMBER
109  ,p_legal_employer_id IN VARCHAR2
110  ,p_reporting_code    IN VARCHAR2);
111  --
112  --
113  -- -----------------------------------------------------------------------------
114  -- Parse out parameters from string.
115  -- -----------------------------------------------------------------------------
116  --
117  FUNCTION get_parameter
118  (p_parameter_string IN VARCHAR2
119  ,p_token            IN VARCHAR) RETURN VARCHAR2;
120  --
121  --
122  -- -----------------------------------------------------------------------------
123  -- Returns the prompt for a given information item.
124  -- -----------------------------------------------------------------------------
125  --
126  FUNCTION get_info_prompt
127  (p_payroll_action_id IN NUMBER
128  ,p_legal_employer_id IN VARCHAR2
129  ,p_reporting_code    IN VARCHAR2
130  ,p_info_id           IN VARCHAR2) RETURN VARCHAR2;
131  --
132  --
133  -- -----------------------------------------------------------------------------
134  -- Returns the Data Type for a given information item.
135  -- -----------------------------------------------------------------------------
136  --
137  FUNCTION get_info_dtype
138  (p_payroll_action_id IN NUMBER
139  ,p_legal_employer_id IN VARCHAR2
140  ,p_reporting_code    IN VARCHAR
141  ,p_info_id           IN VARCHAR2) RETURN VARCHAR2;
142  --
143  --
144  -- -----------------------------------------------------------------------------
145  -- Returns the description for a given reporting code.
146  -- -----------------------------------------------------------------------------
147  --
148  FUNCTION get_code_desc
149  (p_payroll_action_id IN NUMBER
150  ,p_legal_employer_id IN VARCHAR2
151  ,p_reporting_code    IN VARCHAR) RETURN VARCHAR2;
152  --
153  --
154  -- -----------------------------------------------------------------------------
155  -- Returns the ORID for a given reporting code.
156  -- -----------------------------------------------------------------------------
157  FUNCTION get_xml_orid
158  (p_payroll_action_id IN NUMBER
159  ,p_legal_employer_id IN VARCHAR2
160  ,p_reporting_code    IN VARCHAR
161  ,p_info_id           IN VARCHAR2) RETURN VARCHAR2;
162  --
163  --
164  -- -----------------------------------------------------------------------------
165  -- Part of archive logic.
166  -- -----------------------------------------------------------------------------
167  --
168  PROCEDURE range_code
169  (p_payroll_action_id IN NUMBER
170  ,p_sql               OUT NOCOPY VARCHAR2);
171  --
172  --
173  -- -----------------------------------------------------------------------------
174  -- Part of archive logic.
175  -- -----------------------------------------------------------------------------
176  --
177  PROCEDURE assignment_action_code
178  (p_payroll_action_id IN NUMBER
179  ,p_start_person      IN NUMBER
180  ,p_end_person        IN NUMBER
181  ,p_chunk             IN NUMBER);
182  --
183  --
184  -- -----------------------------------------------------------------------------
185  -- Part of archive logic.
186  -- -----------------------------------------------------------------------------
187  --
188  PROCEDURE initialization_code
189  (p_payroll_action_id IN NUMBER);
190  --
191  --
192  -- -----------------------------------------------------------------------------
193  -- Part of archive logic.
194  -- -----------------------------------------------------------------------------
195  --
196  PROCEDURE archive_code
197  (p_assignment_action_id IN NUMBER
198  ,p_effective_date       IN DATE);
199  --
200  --
201  -- -----------------------------------------------------------------------------
202  -- Part of archive logic.
203  -- -----------------------------------------------------------------------------
204  --
205  PROCEDURE deinitialization_code
206  (p_payroll_action_id IN NUMBER);
207  --
208  --
209  -- -----------------------------------------------------------------------------
210  -- Generates XML for the Norwegian End of Year Audit report.
211  -- -----------------------------------------------------------------------------
212  --
213  PROCEDURE get_audit_data
214  (p_payroll_action_id IN VARCHAR2
215  ,p_template_name     IN VARCHAR2
216  ,p_xml               OUT NOCOPY CLOB);
217  --
218  --
219   -- -----------------------------------------------------------------------------
220  -- Generates PDF Report for the Norwegian End of Year Employer Contribution Summary
221  -- report.
222  -- -----------------------------------------------------------------------------
223  --
224  PROCEDURE get_employer_contribution_data
225  (p_payroll_action_id IN VARCHAR2
226  ,p_template_name     IN VARCHAR2
227  ,p_xml               OUT NOCOPY CLOB);
228   --
229  --
230  -- -----------------------------------------------------------------------------
231  -- Generates XML for the Norwegian End of Year Employer Contribution Summary
232  -- report.
233  -- -----------------------------------------------------------------------------
234  --
235  PROCEDURE get_employer_contribution_xml
236  (p_business_group_id IN NUMBER
237  ,p_payroll_action_id IN VARCHAR2
238  ,p_template_name     IN VARCHAR2
239  ,p_xml               OUT NOCOPY CLOB);
240   --
241  --
242  -- -----------------------------------------------------------------------------
243  -- Generates Report for the Norwegian End of Year Report called Certificate of Pay
244  -- and Tax Deducted for each employee.
245  -- -----------------------------------------------------------------------------
246  --
247  PROCEDURE get_employee_cerificate_data
248  (p_payroll_action_id IN VARCHAR2
249  ,p_template_name     IN VARCHAR2
250  ,p_xml               OUT NOCOPY CLOB);
251  --
252  --
253  -- -----------------------------------------------------------------------------
254  -- Generates XML for the Norwegian End of Year Report called Certificate of Pay
255  -- and Tax Deducted for each employee.
256  -- -----------------------------------------------------------------------------
257  --
258  PROCEDURE get_employee_certificate_xml
259  (p_business_group_id IN NUMBER
260  ,p_payroll_action_id IN VARCHAR2
261  ,p_template_name     IN VARCHAR2
262  ,p_xml               OUT NOCOPY CLOB);
263  --
264  --
265  -- -----------------------------------------------------------------------------
266  -- Returns Y if Person is employed throughout the year in same Tax Unit
267  -- -----------------------------------------------------------------------------
268  --
269  --
270   FUNCTION employed_throughout_year ( p_person_id        IN NUMBER
271                                      ,p_legal_empoyer_id IN NUMBER
272                                      ,p_effective_date   IN DATE )
273   RETURN VARCHAR2 ;
274  --
275 END pay_no_eoy_archive;