DBA Data[Home] [Help]

PACKAGE BODY: APPS.PAY_SE_TAX_DECL

Source


1 PACKAGE BODY PAY_SE_TAX_DECL AS
2 /* $Header: pysetada.pkb 120.8 2008/01/25 11:58:23 rsengupt noship $ */
3 
4 	g_debug   boolean   :=  hr_utility.debug_enabled;
5 	l_business_id		NUMBER;
6 	/* variables to store the input values*/
7 	l_archive		VARCHAR2(3);
8 	l_from_date		DATE;
9 	l_to_date		DATE;
10 	l_effective_date	DATE;
11 	l_payroll_id		NUMBER;
12 
13 	l_legal_employer_id NUMBER ;
14 	l_legal_employer_name VARCHAR2(240);
15 	l_element_set_id     NUMBER;
16 	g_err_num	     NUMBER;
17 
18 --------------------------------------------------------------------------------------
19 ----------
20 /* GET PARAMETER */
21 FUNCTION GET_PARAMETER(
22 	 p_parameter_string IN VARCHAR2
23 	,p_token            IN VARCHAR2
24 	,p_segment_number   IN NUMBER default NULL ) RETURN VARCHAR2
25  IS
26 	   l_parameter  pay_payroll_actions.legislative_parameters%TYPE:=NULL;
27 	   l_start_pos  NUMBER;
28 	   l_delimiter  VARCHAR2(1):=' ';
29 
30 BEGIN
31 /*IF g_debug THEN
32 	  hr_utility.set_location(' Entering Function GET_PARAMETER',10);
33 END IF;
34 
35 	 l_start_pos := instr(' '||p_parameter_string,l_delimiter||p_token||'=');
36 
37 	 IF l_start_pos = 0 THEN
38 		l_delimiter := '|';
39 		l_start_pos := instr(' '||p_parameter_string,l_delimiter||p_token||'=');
40 	 END IF;
41 
42  IF l_start_pos <> 0 THEN
43 	l_start_pos := l_start_pos + length(p_token||'=');
44 	l_parameter := substr(p_parameter_string, l_start_pos,
45 			  instr(p_parameter_string||' ', l_delimiter,l_start_pos) -
46 l_start_pos);
47 
48 	 IF p_segment_number IS NOT NULL THEN
49 		l_parameter := ':'||l_parameter||':';
50 		l_parameter := substr(l_parameter,
51 		instr(l_parameter,':',1,p_segment_number)+1,
52 		instr(l_parameter,':',1,p_segment_number+1) -1
53 		- instr(l_parameter,':',1,p_segment_number));
54 	END IF;
55 END IF;
56 
57    RETURN l_parameter;*/
58 l_start_pos := INSTR(' ' || p_parameter_string, l_delimiter || p_token || '=');
59   --
60   IF l_start_pos = 0 THEN
61    l_delimiter := '|';
62    l_start_pos := INSTR(' ' || p_parameter_string, l_delimiter || p_token || '=');
63   END IF;
64   --
65   IF l_start_pos <> 0 THEN
66   l_delimiter := '|';
67    l_start_pos := l_start_pos + LENGTH(p_token || '=');
68    l_parameter := SUBSTR(p_parameter_string, l_start_pos, INSTR(p_parameter_string || ' ', l_delimiter, l_start_pos) - l_start_pos);
69   END IF;
70   RETURN l_parameter;
71 
72 IF g_debug THEN
73 	      hr_utility.set_location(' Leaving Function GET_PARAMETER',20);
74 END IF;
75  END GET_PARAMETER;
76 
77 --------------------------------------------------------------------------------------
78 ----------
79 /* GET ALL PARAMETERS */
80 PROCEDURE GET_ALL_PARAMETERS(
81  		 p_payroll_action_id	IN           NUMBER
82 		,p_business_group_id    OUT  NOCOPY  NUMBER
83 		,p_effective_date	OUT  NOCOPY  DATE
84 		,p_archive		OUT  NOCOPY  VARCHAR2
85 		,p_legal_employer_id   OUT  NOCOPY  NUMBER
86 		,p_month OUT NOCOPY VARCHAR2
87 		,p_year		OUT  NOCOPY  NUMBER
88 		,p_administrative_code		OUT NOCOPY VARCHAR2
89 		,p_information		OUT NOCOPY VARCHAR2
90 		,p_declaration_due_date OUT NOCOPY DATE
91 		)IS
92 
93 
94 	CURSOR csr_parameter_info(p_payroll_action_id NUMBER) IS
95 	SELECT
96     	 PAY_SE_TAX_DECL.GET_PARAMETER(legislative_parameters,'LEGAL_EMPLOYER')
97         ,PAY_SE_TAX_DECL.GET_PARAMETER(legislative_parameters,'MONTH')
98         ,PAY_SE_TAX_DECL.GET_PARAMETER(legislative_parameters,'YEAR')
99 
100 ,FND_DATE.canonical_to_date(PAY_SE_TAX_DECL.GET_PARAMETER(legislative_parameters,
101 'DECLARATION_DUE_DATE'))
102         ,PAY_SE_TAX_DECL.GET_PARAMETER(legislative_parameters,'ADMINISTRATIVE_CODE')
103 	  	,PAY_SE_TAX_DECL.GET_PARAMETER(legislative_parameters,'INFORMATION')
104 	  	,PAY_SE_TAX_DECL.GET_PARAMETER(legislative_parameters,'ARCHIVE')
105 		,effective_date
106 		,business_group_id
107 	FROM  pay_payroll_actions
108 	WHERE payroll_action_id = p_payroll_action_id;
109 
110 BEGIN
111 
112 	 OPEN csr_parameter_info (p_payroll_action_id);
113 	 FETCH csr_parameter_info  INTO
114      p_legal_employer_id,
115      p_month,
116      p_year,
117      p_declaration_due_date,
118      p_administrative_code,
119      p_information,
120      p_archive,
121 	 p_effective_date,
122      p_business_group_id;
123 	 CLOSE csr_parameter_info;
124 IF g_debug THEN
125       hr_utility.set_location(' Leaving Procedure GET_ALL_PARAMETERS',30);
126 END IF;
127 
128  END GET_ALL_PARAMETERS;
129 
130 --------------------------------------------------------------------------------------
131 -----------------------------------
132 /*FUNCTION TO GET DEFINED BALANCE ID*/
133 FUNCTION GET_DEFINED_BALANCE_ID
134   (p_balance_name   		IN  VARCHAR2
135   ,p_dbi_suffix     		IN  VARCHAR2 )
136    RETURN NUMBER IS
137   l_defined_balance_id 		NUMBER;
138 
139 BEGIN
140 
141 SELECT
142 	pdb.defined_balance_id
143 INTO
144 	l_defined_balance_id
145 FROM
146 	pay_defined_balances      pdb
147 	,pay_balance_types         pbt
148 	,pay_balance_dimensions    pbd
149 WHERE
150 	pbd.database_item_suffix = p_dbi_suffix
151 	AND    (pbd.legislation_code = 'SE' OR pbt.business_group_id = l_business_id)
152 	AND    pbt.balance_name = p_balance_name
153 	AND    (pbt.legislation_code = 'SE' OR pbt.business_group_id = l_business_id)
154 	AND    pdb.balance_type_id = pbt.balance_type_id
155 	AND    pdb.balance_dimension_id = pbd.balance_dimension_id
156 	AND    (pdb.legislation_code = 'SE' OR pbt.business_group_id = l_business_id);
157 
158 l_defined_balance_id := NVL(l_defined_balance_id,0);
159 
160 RETURN l_defined_balance_id ;
161 
162 END get_defined_balance_id;
163 --------------------------------------------------------------------------------------
164 -----------------------------------
165 /*GET BALANCE NAME*/
166 FUNCTION GET_BALANCE_NAME
167   (p_input_value_id	IN  VARCHAR2)
168 RETURN VARCHAR2
169 IS
170 p_balance_name VARCHAR2(240);
171 BEGIN
172 SELECT
173     DISTINCT pbt.balance_name
174 INTO p_balance_name
175 FROM
176     pay_balance_types pbt
177 WHERE
178     pbt.input_value_id = p_input_value_id
179      AND   ROWNUM < 2;
180 RETURN
181 p_balance_name;
182 EXCEPTION WHEN OTHERS THEN
183 RETURN NULL ;
184 
185 END GET_BALANCE_NAME;
186 
187 --------------------------------------------------------------------------------------
188 -----------------------------------
189 
190  /* RANGE CODE */
191  PROCEDURE RANGE_CODE (pactid    IN    NUMBER
192 		      ,sqlstr    OUT   NOCOPY VARCHAR2)
193  IS
194 
195 -- Variable declarations
196 
197 	l_count			NUMBER := 0;
198 	l_action_info_id	NUMBER;
199 	l_ovn			NUMBER;
200 	l_element_set_name VARCHAR2(240);
201 	l_payroll_name VARCHAR2(240);
202 	l_business_group_name VARCHAR2(240);
203 	l_regular_tax number;
204 	l_month varchar2(10);
205 	l_year number;
206 	l_administrative_code varchar2(50);
207 	l_information varchar2(50);
208     l_Total_Basis_Employer_Tax number(15,2);
209     l_Total_Employer_Tax number(15,2);
210     l_Tax_Deduction number(15,2);
211     l_Deducted_Tax_Pay number(15,2);
212     l_declaration_due_date date;
213 --cursor to check current archive exists
214 
215 cursor csr_count is
216 select count(*)
217 from   pay_action_information
218 where  action_information_category = 'EMEA REPORT DETAILS'
219 and    action_information1         = 'PYSETADA'
220 and    action_context_id           = pactid;
221 
222 --------------------------------------------------------------------------------
223 cursor csr_Tax_Decl is
224 select
225 ou.Name Organization_Name,
226 hoi2.org_information2 Organization_Number,
227 TO_CHAR(TO_DATE(hoi4.org_information1,'MM'),'MONTH') Month,
228 hoi4.org_information2 Year,
229 nvl(pay_balance_pkg.get_value(get_defined_balance_id
230         ('Gross Pay','_LE_MONTH'),NULL,l_legal_employer_id,
231 	NULL,NULL,NULL,l_effective_date),0) Gross_Pay,
232 nvl(pay_balance_pkg.get_value(get_defined_balance_id
233         ('Employer Taxable Benefits in Kind','_LE_MONTH'),NULL,l_legal_employer_id,
234 	NULL,NULL,NULL,l_effective_date),0) Benefit,
235 --hoi4.org_information3 Reduction,
236 nvl(pay_balance_pkg.get_value(get_defined_balance_id
237         ('Cost Reduction','_LE_MONTH'),NULL,l_legal_employer_id,
238 	NULL,NULL,NULL,l_effective_date),0) Reduction,
239 nvl(pay_balance_pkg.get_value(get_defined_balance_id
240         ('Regular Employer Taxable Base','_LE_MONTH'),NULL,l_legal_employer_id,
241 	NULL,NULL,NULL,l_effective_date),0) Regular_Taxable_Base,
242 nvl(pay_balance_pkg.get_value(get_defined_balance_id
243         ('Regular Employer Tax','_LE_MONTH'),NULL,l_legal_employer_id,
244 	NULL,NULL,NULL,l_effective_date),0) Regular_Tax,
245 nvl(pay_balance_pkg.get_value(get_defined_balance_id
246         ('Special Taxation Age 65 Taxable Base','_LE_MONTH'),NULL,l_legal_employer_id,
247 	NULL,NULL,NULL,l_effective_date),0) Special_65_Taxable_Base,
248 nvl(pay_balance_pkg.get_value(get_defined_balance_id
249         ('Special Taxation Age 65 Tax','_LE_MONTH'),NULL,l_legal_employer_id,
250 	NULL,NULL,NULL,l_effective_date),0) Special_65_Tax,
251 nvl(pay_balance_pkg.get_value(get_defined_balance_id
252         ('Special Taxation Year 1937 Taxable Base','_LE_MONTH'),NULL,l_legal_employer_id,
253 	NULL,NULL,NULL,l_effective_date),0) Special_1937_Taxable_Base,
254 nvl(pay_balance_pkg.get_value(pay_se_tax_decl.get_defined_balance_id
255         ('Special Taxation Year 1937 Tax','_LE_MONTH'),NULL,l_legal_employer_id,
256 	NULL,NULL,NULL,l_effective_date),0) Special_1937_Tax,
257 nvl(pay_balance_pkg.get_value(pay_se_tax_decl.get_defined_balance_id
258         ('Foreigners Below 65 Employer Taxable Base','_LE_MONTH'),NULL,l_legal_employer_id,
259 	NULL,NULL,NULL,l_effective_date),0) Comp_Without_Lu,
260 nvl(pay_balance_pkg.get_value(pay_se_tax_decl.get_defined_balance_id
261         ('Foreigners Below 65 Employer Tax','_LE_MONTH'),NULL,l_legal_employer_id,
262 	NULL,NULL,NULL,l_effective_date),0) Comp_Without_Lu_29,
263 nvl(pay_balance_pkg.get_value(pay_se_tax_decl.get_defined_balance_id
264         ('Foreigners Below 25 Employer Taxable Base','_LE_MONTH'),NULL,l_legal_employer_id,
265 	NULL,NULL,NULL,l_effective_date),0) Comp_Without_Lu_25_Below,
266 nvl(pay_balance_pkg.get_value(pay_se_tax_decl.get_defined_balance_id
267         ('Foreigners Below 25 Employer Tax','_LE_MONTH'),NULL,l_legal_employer_id,
268 	NULL,NULL,NULL,l_effective_date),0) Comp_Without_Lu_29_25_below,
269 	nvl(pay_balance_pkg.get_value(pay_se_tax_decl.get_defined_balance_id
270         ('Foreigners Above 65 Employer Taxable Base','_LE_MONTH'),NULL,l_legal_employer_id,
271 	NULL,NULL,NULL,l_effective_date),0) Comp_Without_Lu_65_above,
272 nvl(pay_balance_pkg.get_value(pay_se_tax_decl.get_defined_balance_id
273         ('Foreigners Above 65 Employer Tax','_LE_MONTH'),NULL,l_legal_employer_id,
274 	NULL,NULL,NULL,l_effective_date),0) Comp_Without_Lu_29_65_above,
275 nvl(pay_balance_pkg.get_value(pay_se_tax_decl.get_defined_balance_id
276         ('Special Taxation Age 25 below Taxable Base','_LE_MONTH'),NULL,l_legal_employer_id,
277 	NULL,NULL,NULL,l_effective_date),0) Special_25_below_Taxable_Base,
278 nvl(pay_balance_pkg.get_value(pay_se_tax_decl.get_defined_balance_id
279         ('Special Taxation Age 25 below Tax','_LE_MONTH'),NULL,l_legal_employer_id,
280 	NULL,NULL,NULL,l_effective_date),0) Special_25_below_Tax,
281 nvl(hoi4.org_information4,0) Certain_Insurances,
282 nvl(hoi4.org_information5,0) Certain_Insurances_29,
283 nvl(hoi4.org_information6,0) Code,
284 nvl(hoi4.org_information7,0) Canada,
285 --
286 nvl(hoi4.org_information8,0) Special_Canada,
287 -- nvl(hoi4.org_information9,0) Comp_Support,      --EOY 2008
288 -- nvl(hoi4.org_information10,0) Comp_Support_5,   --EOY 2008
289 nvl(hoi4.org_information11,0) Ext_Comp_Support,
290 nvl(hoi4.org_information12,0) Ext_Comp_Support_10,
291 --
292 nvl(pay_balance_pkg.get_value(get_defined_balance_id
293         ('Taxable Base','_LE_MONTH'),NULL,l_legal_employer_id,
294 	NULL,NULL,NULL,l_effective_date),0)
295 Taxable_Base,
296 nvl(pay_balance_pkg.get_value(get_defined_balance_id
297         ('Employee Tax','_LE_MONTH'),NULL,l_legal_employer_id,
298 	NULL,NULL,NULL,l_effective_date),0) Employee_Tax,
299 nvl(hoi4.org_information13,0) Pension,
300 nvl(hoi4.org_information14,0) Ded_Pension,
301 nvl(hoi4.org_information15,0) Interest,
302 nvl(hoi4.org_information16,0) Ded_Interest,
303 hoi3.org_information3 Contact,
304 hoi5.org_information3 Phone
305 from
306 hr_organization_units ou,
307 hr_organization_information hoi1,
308 hr_organization_information hoi2,
309 hr_organization_information hoi3,
310 hr_organization_information hoi4,
311 hr_organization_information hoi5,
312 pay_assignment_actions paa,
313 pay_payroll_actions ppa
314 where
315 ou.organization_id=hoi1.organization_id
316 and hoi1.org_information_context='CLASS'
317 and hoi1.org_information1='HR_LEGAL_EMPLOYER'
318 and hoi1.organization_id=hoi2.organization_id
319 and hoi2.org_information_context='SE_LEGAL_EMPLOYER_DETAILS'
320 and hoi2.organization_id=hoi3.organization_id
321 and hoi3.org_information_context='SE_ORG_CONTACT_DETAILS'
322 and hoi3.org_information1 ='PERSON'
323 and hoi3.organization_id=hoi4.organization_id
324 and hoi4.org_information_context='SE_TAX_DECLARATION_DETAILS'
325 and hoi4.org_information1=l_month
326 and hoi4.org_information2 =l_year
327 and hoi4.organization_id=hoi5.organization_id
328 and hoi5.org_information_context='SE_ORG_CONTACT_DETAILS'
329 and hoi5.org_information1 ='PHONE'
330 and hoi5.organization_id=ou.organization_id
331 and ou.organization_id=l_legal_employer_id;
332 
333 rg_Tax_Decl csr_Tax_Decl%rowtype;
334 
335 l_actid			NUMBER;
336 l_asgid			NUMBER := -999;
337 --------------------------------------------------------------------------------
338 
339 BEGIN
340  IF g_debug THEN
341       hr_utility.set_location(' Entering Procedure RANGE_CODE',40);
342 END IF;
343 
344 
345  -- the sql string to return
346  sqlstr := 'SELECT DISTINCT person_id
347 	FROM  per_people_f ppf
348 	     ,pay_payroll_actions ppa
349 	WHERE ppa.payroll_action_id = :payroll_action_id
350 	AND   ppa.business_group_id = ppf.business_group_id
351 	ORDER BY ppf.person_id';
352 
353 
354   -- fetch the input parameter values
355  PAY_SE_TAX_DECL.GET_ALL_PARAMETERS(
356 		 pactid
357 		,l_business_id
358 		,l_effective_date
359 		,l_archive
360  		,l_legal_employer_id
361  		,l_month
362 		,l_year
363 		,l_administrative_code
364 		,l_information
365         ,l_declaration_due_date
366             ) ;
367 
368  -- check if we have to archive again
369  IF  (l_archive = 'Y')   THEN
370 
371    -- check if record for current archive exists
372    OPEN csr_count;
373    FETCH csr_count INTO l_count;
374    CLOSE csr_count;
375 
376 
377    -- archive Report Details only if no record exists
378   IF (l_count < 1) THEN
379   BEGIN
380 
381 		pay_balance_pkg.set_context('TAX_UNIT_ID',l_legal_employer_id);
382 
383 pay_balance_pkg.set_context('DATE_EARNED',fnd_date.date_to_canonical(l_effective_date)
384 );
385 		pay_balance_pkg.set_context('JURISDICTION_CODE',NULL);
386 		pay_balance_pkg.set_context('SOURCE_ID',NULL);
387 		pay_balance_pkg.set_context('TAX_GROUP',NULL);
388   END;
389 
390 
391 
392 
393 OPEN csr_Tax_Decl;
394     FETCH csr_Tax_Decl INTO rg_Tax_Decl;
395 close csr_Tax_Decl;
396     l_Total_Basis_Employer_Tax:=rg_Tax_Decl.Gross_Pay +
397 rg_Tax_Decl.Benefit-rg_Tax_Decl.Reduction;
398     l_Total_Employer_Tax:=rg_Tax_Decl.Regular_Tax + rg_Tax_Decl.Special_65_Tax +
399 rg_Tax_Decl.Special_1937_Tax + rg_Tax_Decl.Comp_Without_Lu_29 +
400 rg_Tax_Decl.Comp_Without_Lu_29_65_above + rg_Tax_Decl.Comp_Without_Lu_29_25_below +
401   rg_Tax_Decl.Special_25_below_Tax +rg_Tax_Decl.Certain_Insurances_29 - rg_Tax_Decl.Ext_Comp_Support_10;
402     l_Tax_Deduction:=rg_Tax_Decl.Taxable_Base + rg_Tax_Decl.Pension +
403 rg_Tax_Decl.Interest;
404     l_Deducted_Tax_Pay:=rg_Tax_Decl.Employee_Tax + rg_Tax_Decl.Ded_Pension +
405 rg_Tax_Decl.Ded_Interest;
406 -- Archive the REPORT DETAILS
407 
408 
409 IF ((rg_Tax_Decl.month is not null) and (rg_Tax_Decl.Year is not null) and (rg_Tax_Decl.Gross_Pay>0)) then
410 
411 	pay_action_information_api.create_action_information (
412 	 p_action_information_id        => l_action_info_id	-- out parameter
413 	,p_object_version_number        => l_ovn		-- out parameter
414 	,p_action_context_id            => pactid		-- context id = payroll action id (of Archive)
415 	,p_action_context_type          => 'PA'			-- context type
416 	,p_effective_date               => l_effective_date	-- Date of running the archive
417 	,p_action_information_category  => 'EMEA REPORT DETAILS' -- Information Category
418 	,p_tax_unit_id                  => NULL			-- Legal Employer ID
419 	,p_jurisdiction_code            => NULL			-- Tax Municipality ID
420 	,p_action_information1          => 'PYSETADA'	-- Conc Prg Short Name
421 	,p_action_information2          => l_legal_employer_id
422 	,p_action_information3          => rg_Tax_Decl.organization_name
423 	,p_action_information4          => rg_Tax_Decl.month
424 	,p_action_information5          => rg_Tax_Decl.year
425 	,p_action_information6          => l_administrative_code
426 	,p_action_information7          => l_information
427     ,p_action_information8          => l_declaration_due_date);
428 
429 
430 	  pay_action_information_api.create_action_information (
431 
432 	 p_action_information_id        => l_action_info_id		-- out parameter
433 	,p_object_version_number        => l_ovn			-- out parameter
434 	,p_action_context_id            => pactid      			-- context id = assignment action id (of Archive)
435 	,p_action_context_type          => 'PA'				-- context type
436 	,p_effective_date               => l_effective_date		-- Date of running the archive
437 	,p_assignment_id		=> NULL			-- Assignment ID
438 	,p_action_information_category  => 'EMEA REPORT INFORMATION'	-- Information Category
439 	,p_tax_unit_id                  => l_legal_employer_id    -- Legal Employer ID
440 	,p_jurisdiction_code            => NULL			-- Tax Municipality ID
441 	,p_action_information1          => 'PYSETADA'		 --Con Program Short Name
442 	,p_action_information2          => 'INF'
443 	,p_action_information3          => rg_Tax_Decl.Organization_Number
444 	,p_action_information4          => rg_Tax_Decl.Reduction
445 	,p_action_information7         =>  rg_Tax_Decl.Code
446 	,p_action_information8         =>  rg_Tax_Decl.Canada
447 	,p_action_information9         =>  rg_Tax_Decl.Special_Canada
448 	--  ,p_action_information10        =>  rg_Tax_Decl.Comp_Support         --EOY 2008
449 	--  ,p_action_information11        =>  rg_Tax_Decl.Comp_Support_5	--EOY 2008
450 	,p_action_information12        =>  rg_Tax_Decl.Ext_Comp_Support
451 	,p_action_information13        =>  rg_Tax_Decl.Ext_Comp_Support_10
452 	,p_action_information14        =>  rg_Tax_Decl.Pension
453 	,p_action_information15        =>  rg_Tax_Decl.Ded_Pension
454 	,p_action_information16        =>  rg_Tax_Decl.Interest
455 	,p_action_information17        =>  rg_Tax_Decl.ded_Interest
456 	,p_action_information18        =>  rg_Tax_Decl.Contact
457 	,p_action_information19        =>  rg_Tax_Decl.Phone
458 	,p_action_information20        =>  rg_Tax_Decl.Certain_Insurances     --EOY 2008
459 	,p_action_information21        =>  rg_Tax_Decl.Certain_Insurances_29     --EOY 2008
460 
461 
462 
463 	);
464 
465 
466 	  pay_action_information_api.create_action_information (
467 
468 	 p_action_information_id        => l_action_info_id
469 	,p_object_version_number        => l_ovn
470 	,p_action_context_id            => pactid
471 	,p_action_context_type          => 'PA'
472 	,p_effective_date               => l_effective_date
473 	,p_assignment_id		=> NULL
474 	,p_action_information_category  => 'EMEA REPORT INFORMATION'
475 	,p_tax_unit_id                  => l_legal_employer_id
476 	,p_jurisdiction_code            => NULL
477 	,p_action_information1          => 'PYSETADA'
478 	,p_action_information2          => 'BAL'
479 	,p_action_information3          => rg_Tax_Decl.Gross_Pay
480 	,p_action_information4          => rg_Tax_Decl.Benefit
481 	,p_action_information5          => l_Total_Basis_Employer_Tax
482 	,p_action_information6          => rg_Tax_Decl.Regular_Taxable_Base
483 	,p_action_information7          => rg_Tax_Decl.Regular_Tax
484 	,p_action_information8          => rg_Tax_Decl.Special_65_Taxable_Base
485 	,p_action_information9          => rg_Tax_Decl.Special_65_Tax
486 	,p_action_information10         => rg_Tax_Decl.Special_1937_Taxable_Base
487 	,p_action_information11         => rg_Tax_Decl.Special_1937_Tax
488 	,p_action_information12         => l_Total_Employer_Tax
489 	,p_action_information13         => rg_Tax_Decl.Taxable_Base
490 	,p_action_information14         => rg_Tax_Decl.Employee_Tax
491 	,p_action_information15         => l_Tax_Deduction
492 	,p_action_information16         => l_Deducted_Tax_Pay
493 	,p_action_information17		=> rg_Tax_Decl.Comp_Without_Lu
494 	,p_action_information18		=> rg_Tax_Decl.Comp_Without_Lu_29
495 	,p_action_information19		=> rg_Tax_Decl.Comp_Without_Lu_65_above
496 	,p_action_information20		=> rg_Tax_Decl.Comp_Without_Lu_29_65_above
497 	,p_action_information21		=> rg_Tax_Decl.Special_25_below_Taxable_Base
498 	,p_action_information22		=> rg_Tax_Decl.Special_25_below_Tax
499 	,p_action_information23		=> rg_Tax_Decl.Comp_Without_Lu_25_below
500 	,p_action_information24		=> rg_Tax_Decl.Comp_Without_Lu_29_25_below
501 
502 );
503 
504 
505 END IF;
506 
507    END IF;
508 ----------------------------------------------------------
509 
510 
511 
512 END IF;
513 ---------------------------------------------------------------------------
514 
515 IF g_debug THEN
516       hr_utility.set_location(' Leaving Procedure RANGE_CODE',50);
517  END IF;
518 
519  END RANGE_CODE;
520 
521 --------------------------------------------------------------------------------------
522 -----------------------------------
523  /* INITIALIZATION CODE */
524  PROCEDURE INITIALIZATION_CODE(p_payroll_action_id IN NUMBER)
525  IS
526 
527  BEGIN
528 
529  IF g_debug THEN
530       hr_utility.set_location(' Entering Procedure INITIALIZATION_CODE',80);
531  END IF;
532 	NULL;
533 IF g_debug THEN
534       hr_utility.set_location(' Leaving Procedure INITIALIZATION_CODE',90);
535 END IF;
536 exception when others then
537  g_err_num := SQLCODE;
538   IF g_debug THEN
539       hr_utility.set_location('ORA_ERR: ' || g_err_num || 'In
540 INITIALIZATION_CODE',180);
541 END IF;
542 
543  END INITIALIZATION_CODE;
544 
545 --------------------------------------------------------------------------------------
546 ----------
547  /* ASSIGNMENT ACTION CODE */
548 PROCEDURE ASSIGNMENT_ACTION_CODE
549  (p_payroll_action_id     IN NUMBER
550  ,p_start_person          IN NUMBER
551  ,p_end_person            IN NUMBER
552  ,p_chunk                 IN NUMBER)
553  IS
554 
555 BEGIN
556 
557 IF g_debug THEN
558       hr_utility.set_location(' Leaving Procedure ASSIGNMENT_ACTION_CODE',70);
559 END IF;
560 
561  END ASSIGNMENT_ACTION_CODE;
562 
563 --------------------------------------------------------------------------------------
564 ----------
565  /* ARCHIVE CODE */
566 PROCEDURE ARCHIVE_CODE(p_assignment_action_id IN NUMBER
567 		      ,p_effective_date    IN DATE)
568  IS
569 BEGIN
570 
571 	 IF g_debug THEN
572 		hr_utility.set_location(' Entering Procedure ARCHIVE_CODE',80);
573 	 END IF;
574 	 IF g_debug THEN
575 		hr_utility.set_location(' Leaving Procedure ARCHIVE_CODE',90);
576 	 END IF;
577 
578 END ARCHIVE_CODE;
579 
580 END PAY_SE_TAX_DECL;