DBA Data[Home] [Help]

PACKAGE BODY: APPS.PAY_KR_PAYKRYTR_PKG

Source


1 package body pay_kr_paykrytr_pkg as
2 /* $Header: paykrytr.pkb 120.22.12010000.6 2008/08/12 10:24:21 vaisriva ship $ */
3 ------------------------------------------------------------------------
4 procedure data(
5 	p_assignment_action_id		in number,
6 	p_person_id			out nocopy number,		-- bug 6012258
7 	p_resident_type			out nocopy varchar2,
8 	p_nationality_type		out nocopy varchar2,
9 	p_fw_fixed_tax_rate		out nocopy varchar2, -- 3546993
10 	p_period_start_date		out nocopy date,
11 	p_period_end_date		out nocopy date,
12 	p_fwtb_contract_date		out nocopy date,
13 	p_fwtb_expiry_date		out nocopy date,
14 	p_cur_taxable_mth		out nocopy number,
15 	p_cur_taxable_bon		out nocopy number,
16 	p_cur_sp_irreg_bonus		out nocopy number,
17 	p_cur_stck_pur_opt_exec_earn    out nocopy number,  -- bug 6012258
18 	p_cur_taxable			out nocopy number,
19 	p_prev_corp_name1		out nocopy varchar2,
20 	p_prev_bp_number1		out nocopy varchar2,
21 	p_prev_taxable_mth1		out nocopy number,
22 	p_prev_taxable_bon1		out nocopy number,
23 	p_prev_sp_irreg_bonus1		out nocopy number,
24 	p_prev_stck_pur_opt_exec_earn1  out nocopy number,   -- Bug 6024342
25 	p_prev_taxable1			out nocopy number,
26 	p_prev_corp_name2		out nocopy varchar2,
27 	p_prev_bp_number2		out nocopy varchar2,
28 	p_prev_taxable_mth2		out nocopy number,
29 	p_prev_taxable_bon2		out nocopy number,
30 	p_prev_sp_irreg_bonus2		out nocopy number,
31 	p_prev_stck_pur_opt_exec_earn2  out nocopy number,   -- Bug 6024342
32 	p_prev_taxable2			out nocopy number,
33 	p_taxable_mth			out nocopy number,
34 	p_taxable_bon			out nocopy number,
35 	p_sp_irreg_bonus		out nocopy number,
36 	p_stck_pur_opt_exec_earn        out nocopy number,  -- bug 6024342
37 	p_research_payment		out nocopy number,  -- bug 6012258
38 	p_taxable			out nocopy number,
39 	p_non_taxable_ovs		out nocopy number,
40 	p_non_taxable_ovt		out nocopy number,
41 	p_non_taxable_oth		out nocopy number,
42 	p_non_taxable			out nocopy number,
43 	p_foreign_worker_tax_exem	out nocopy number,  -- 3546993
44 	p_basic_income_exem		out nocopy number,
45 	p_taxable_income		out nocopy number,
46 	p_ee_tax_exem			out nocopy number,
47 	p_dpnt_spouse_tax_exem		out nocopy number,
48 	p_num_of_dpnts			out nocopy number,
49 	p_dpnt_tax_exem			out nocopy number,
50 	p_num_of_ageds			out nocopy number,
51 	p_aged_tax_exem			out nocopy number,
52 	p_num_of_disableds		out nocopy number,
53 	p_disabled_tax_exem		out nocopy number,
54 	p_female_ee_tax_exem		out nocopy number,
55 	p_num_of_children		out nocopy number,
56 	p_num_of_underaged_dpnts	out nocopy number,  -- Bug 6024342
57 	p_child_tax_exem		out nocopy number,
58 	p_num_of_addtl_child		out nocopy number,  -- Bug 6784288
59 	p_addl_child_tax_exem		out nocopy number,  -- bug 6012258
60 	p_supp_tax_exem			out nocopy number,
61 	p_ins_prem_tax_exem		out nocopy number,
62 	p_med_exp_tax_exem		out nocopy number,
63 	p_educ_exp_tax_exem		out nocopy number,
64 	p_housing_exp_tax_exem		out nocopy number,
65 	p_donation_tax_exem		out nocopy number,
66 	p_marr_fun_relo_exem		out nocopy number,       -- bug 3402025
67 	p_sp_tax_exem			out nocopy number,
68 	p_std_sp_tax_exem		out nocopy number,
69 	p_np_prem_tax_exem		out nocopy number,
70 	p_pension_premium		out nocopy number,	-- Bug 6024342
71 	p_taxable_income2		out nocopy number,
72 	p_pers_pension_prem_tax_exem	out nocopy number,
73 	p_corp_pension_prem_tax_exem	out nocopy number,	 -- Bug 4750653
74 	p_pers_pension_saving_tax_exem	out nocopy number,
75 	p_invest_partner_fin_tax_exem	out nocopy number,
76 	p_credit_card_exp_tax_exem	out nocopy number,
77 	p_emp_st_own_plan_cont_exem     out nocopy number,
78 	p_small_bus_install_exem	out nocopy number, 	 -- Bug 6895093
79 	p_hi_prem			out nocopy number,   	 -- Bug 6895093
80         p_ltci_prem                     out nocopy number,       -- Bug 7260606
81 	p_ei_prem			out nocopy number,   	 -- Bug 6895093
82 	p_np_prem			out nocopy number,   	 -- Bug 6895093
83 	p_taxation_base			out nocopy number,
84 	p_calc_tax			out nocopy number,
85 	p_basic_tax_break		out nocopy number,
86 	p_housing_exp_tax_break		out nocopy number,
87 	p_stock_saving_tax_break	out nocopy number,
88 	p_ovs_tax_break			out nocopy number,
89 	p_don_tax_break			out nocopy number, -- Bug 3966549
90 	p_lt_stock_saving_tax_break	out nocopy number,
91 	p_total_tax_break		out nocopy number,
92 	p_foreign_worker_tax_break1	out nocopy number,
93 	p_foreign_worker_tax_break2	out nocopy number,
94 	p_foreign_worker_tax_break	out nocopy number,
95 	p_annual_itax			out nocopy number,
96 	p_annual_stax			out nocopy number,
97 	p_annual_rtax			out nocopy number,
98 	p_annual_tax			out nocopy number,
99 	p_prev_itax			out nocopy number,
100 	p_prev_stax			out nocopy number,
101 	p_prev_rtax			out nocopy number,
102 	p_prev_tax			out nocopy number,
103 	p_cur_itax			out nocopy number,
104 	p_cur_stax			out nocopy number,
105 	p_cur_rtax			out nocopy number,
106 	p_cur_tax			out nocopy number,
107 	p_itax_adj			out nocopy number,
108 	p_stax_adj			out nocopy number,
109 	p_rtax_adj			out nocopy number,
110 	p_tax_adj			out nocopy number,
111 	p_cash_receipt_expense          out nocopy number,   -- 4289780
112 	p_emp_ins_exp_nts		out nocopy number,   -- 5190884
113 	p_emp_tot_ins_exp		out nocopy number,
114 	p_emp_med_exp_nts		out nocopy number,
115 	p_emp_med_exp_oth		out nocopy number,
116 	p_emp_educ_exp_nts		out nocopy number,
117 	p_emp_educ_exp_oth		out nocopy number,
118 	p_emp_card_exp_nts		out nocopy number,
119 	p_emp_card_exp_oth		out nocopy number,
120 	p_emp_cash_exp_nts		out nocopy number,
121 	p_emp_don_exp_nts		out nocopy number,
122 	p_emp_don_exp_oth		out nocopy number,
123 	p_double_exem_amt               out nocopy number)   -- Bug 6716401
124 ------------------------------------------------------------------------
125 is
126 	l_yea_info	pay_kr_yea_pkg.t_yea_info;
127 	cursor csr is
128 		select	hr_ni_chk_pkg.chk_nat_id_format(per.national_identifier, 'DDDDDD-DDDDDDD') NATIONAL_IDENTIFIER,
129 			per.person_id,                  -- bug 6012258
130 			pds.date_start,
131 			pds.actual_termination_date,
132 			ppa.effective_date
133 		from	per_people_f	        per,
134 			per_periods_of_service	pds,
135 			per_assignments_f	asg,
136 			pay_payroll_actions	ppa,
137 			pay_assignment_actions	paa
138 		where	paa.assignment_action_id = p_assignment_action_id
139 		and	ppa.payroll_action_id = paa.payroll_action_id
140 		and	asg.assignment_id = paa.assignment_id
141 		and	ppa.effective_date
142 			between asg.effective_start_date and asg.effective_end_date
143 		and	pds.period_of_service_id = asg.period_of_service_id
144 		and	per.person_id = pds.person_id
145 		and	ppa.effective_date
146 			between per.effective_start_date and per.effective_end_date;
147 	l_rec	csr%ROWTYPE;
148 
149         -- 4289780
150         cursor csr_cash_receipt is
151         select to_number(pi.aei_information13) "Cash Receipt"
152         from per_assignment_extra_info  pi,
153              pay_assignment_actions     paa,
154              pay_payroll_actions        ppa
155         where paa.assignment_action_id    = p_assignment_action_id
156         and ppa.payroll_action_id         = paa.payroll_action_id
157         and pi.assignment_id              = paa.assignment_id
158         and pi.information_type           = 'KR_YEA_TAX_EXEM_INFO'
159         and trunc(fnd_date.canonical_to_date(pi.aei_information1), 'YYYY')
160                                           = trunc(ppa.effective_date, 'YYYY');
161 
162 	--5190884
163 	cursor csr_emp_exp_details is
164 	select aei_information2 emp_med_exp_nts,
165                aei_information3 emp_educ_exp_nts,
166                aei_information4 emp_card_exp_nts,
167                aei_information5 emp_don_exp_nts,
168                aei_information6 emp_ins_exp_nts -- Bug 5667762
169 	from per_assignment_extra_info pei,
170 	     pay_assignment_actions    paa,
171 	     pay_payroll_actions       ppa
172 	where paa.assignment_action_id   = p_assignment_action_id
173 	and ppa.payroll_action_id         = paa.payroll_action_id
174 	and pei.assignment_id             = paa.assignment_id
175         and pei.information_type	  = 'KR_YEA_EMP_EXPENSE_DETAILS'
176         and trunc(fnd_date.canonical_to_date(pei.aei_information1), 'YYYY')
177                                           = trunc(ppa.effective_date, 'YYYY');
178 
179 	cursor csr_get_emp_exp_amount is
180         select nvl(to_number(aei_information18), 0) + nvl(to_number(aei_information19), 0) +
181                nvl(to_number(aei_information20), 0) + nvl(to_number(aei_information22), 0) +
182 	       nvl(to_number(aei_information23), 0) + nvl(to_number(aei_information30), 0)
183         from per_assignment_extra_info  pi,
184              pay_assignment_actions     paa,
185              pay_payroll_actions        ppa
186         where paa.assignment_action_id    = p_assignment_action_id
187         and ppa.payroll_action_id         = paa.payroll_action_id
188         and pi.assignment_id              = paa.assignment_id
189         and pi.information_type           = 'KR_YEA_SP_TAX_EXEM_INFO'
190         and trunc(fnd_date.canonical_to_date(pi.aei_information1), 'YYYY')
191                                           = trunc(ppa.effective_date, 'YYYY');
192 
193 	cursor csr_get_emp_card_expense is
194         select nvl(to_number(aei_information7), 0) + nvl(to_number(aei_information10), 0)
195                + nvl(to_number(aei_information12), 0)
196         from per_assignment_extra_info  pi,
197              pay_assignment_actions     paa,
198              pay_payroll_actions        ppa
199         where paa.assignment_action_id    = p_assignment_action_id
200         and ppa.payroll_action_id         = paa.payroll_action_id
201         and pi.assignment_id              = paa.assignment_id
202         and pi.information_type           = 'KR_YEA_TAX_EXEM_INFO'
203         and trunc(fnd_date.canonical_to_date(pi.aei_information1), 'YYYY')
204                                           = trunc(ppa.effective_date, 'YYYY');
205 
206 	cursor csr_get_emp_don_educ_details is
207         select nvl(to_number(aei_information4), 0) +
208                nvl(to_number(aei_information5), 0) +
209                nvl(to_number(aei_information6), 0),
210 	       nvl(to_number(aei_information2),0)
211         from per_assignment_extra_info  pi,
212              pay_assignment_actions     paa,
213              pay_payroll_actions        ppa
214         where paa.assignment_action_id    = p_assignment_action_id
215         and ppa.payroll_action_id         = paa.payroll_action_id
216         and pi.assignment_id              = paa.assignment_id
217         and pi.information_type           = 'KR_YEA_SP_TAX_EXEM_INFO2'
218         and trunc(fnd_date.canonical_to_date(pi.aei_information1), 'YYYY')
219                                           = trunc(ppa.effective_date, 'YYYY');
220 
221         -- Bug 5726158
222 	cursor csr_asg_details is
223 	 select paa.assignment_id, ppa.effective_date
224 	   from pay_payroll_actions ppa,
225 	        pay_assignment_actions paa
226 	  where paa.assignment_action_id = p_assignment_action_id
227 	    and ppa.payroll_action_id = paa.payroll_action_id;
228 	--
229 	l_asg_details csr_asg_details%rowtype;
230 	--
231 	cursor csr_get_dpnt_cash_exp(p_assignment_id number, p_effective_date date) is
232 	select sum(nvl(to_number(cei.cei_information9),0))
233 	 from pay_kr_cont_details_v      pkc,
234               per_contact_extra_info_f   cei    -- Bug 5879106
235 	where pkc.assignment_id        = p_assignment_id
236           and p_effective_date between emp_start_date and emp_end_date
237           and p_effective_date between cont_start_date and cont_end_date
238 	  and cei.information_type(+) = 'KR_DPNT_EXPENSE_INFO'
239 	  and cei.contact_relationship_id(+) = pkc.contact_relationship_id
240 	  and to_char(cei.effective_start_date(+), 'YYYY') = to_char(p_effective_date, 'YYYY')
241 	  and  p_effective_date between nvl(ADDRESS_START_DATE, p_effective_date) and nvl(ADDRESS_END_DATE, p_effective_date)
242 	  and  p_effective_date between nvl(pkc.date_start, p_effective_date)
243 			     and decode(pkc.cont_information9, 'D', trunc(add_months(nvl(pkc.date_end, p_effective_date),12),'YYYY')-1, nvl(pkc.date_end, p_effective_date) )
244 	  and  pay_kr_ff_functions_pkg.is_exempted_dependent(   pkc.contact_type,
245 								pkc.national_identifier,
246 								pkc.cont_information2,
247 								pkc.cont_information3,
248 								pkc.cont_information4,
249 								pkc.cont_information7,
250 								pkc.cont_information8,
251 								p_effective_date,
252 								pkc.cont_information10,
253 								pkc.cont_information12,
254 								pkc.cont_information13,
255 								pkc.cont_information14,
256 								cei.contact_extra_info_id(+)
257 	    					             ) = 'Y';
258 l_emp_ins_exp_nts	NUMBER := 0;
259 l_emp_med_exp_nts	NUMBER := 0;
260 l_emp_educ_exp_nts	NUMBER := 0;
261 l_emp_card_exp_nts	NUMBER := 0;
262 l_emp_don_exp_nts	NUMBER := 0;
263 l_card_expense_total	NUMBER := 0;
264 --Bug 5308995
265 l_don_amount1		NUMBER := 0;
266 l_don_amount2		NUMBER := 0;
267 l_don_tax_break2004	NUMBER := 0;
268 l_emp_occu_trng		NUMBER := 0;
269 l_dpnt_cash_exp		NUMBER := 0;
270 l_emp_cash_exp          NUMBER := 0; -- Bug 5726158
271 
272 begin
273 	open csr;
274 	fetch csr into l_rec;
275 	close csr;
276 
277 	-- 4289780
278 	open csr_cash_receipt;
279 	fetch csr_cash_receipt into l_emp_cash_exp;
280 	close csr_cash_receipt;
281 
282 	-- 5190884
283 	--
284 	-- Retrieve all the Employee Expense Details
285 	--
286 	open csr_emp_exp_details;
287 	fetch csr_emp_exp_details into  l_emp_med_exp_nts,
288 					l_emp_educ_exp_nts,
289 					l_emp_card_exp_nts,
290 					l_emp_don_exp_nts,
291 					l_emp_ins_exp_nts;
292 	open csr_get_emp_exp_amount;
293 	fetch csr_get_emp_exp_amount into l_don_amount1;
294 	close csr_get_emp_exp_amount;
295 	--
296 	open csr_get_emp_card_expense;
297 	fetch csr_get_emp_card_expense into l_card_expense_total;
298 	close csr_get_emp_card_expense;
299 	--
300 	open csr_get_emp_don_educ_details;
301 	fetch csr_get_emp_don_educ_details into l_don_amount2,l_emp_occu_trng;
302 	close csr_get_emp_don_educ_details;
303 
304 	-- Bug 5726158
305 	open csr_asg_details;
306 	fetch csr_asg_details into l_asg_details;
307 	close csr_asg_details;
308 
309 	open csr_get_dpnt_cash_exp(l_asg_details.assignment_id, l_asg_details.effective_date);
310 	fetch csr_get_dpnt_cash_exp into l_dpnt_cash_exp;
311 	close csr_get_dpnt_cash_exp;
312 
313 	p_cash_receipt_expense := nvl(l_emp_cash_exp,0) + nvl(l_dpnt_cash_exp,0);
314 
315 	--
316 	-- Derive YEA results
317 	--
318 	l_yea_info := pay_kr_yea_pkg.yea_info(p_assignment_action_id);
319 	--
320 	-- Employee Basic Information
321 	--
322 	if l_yea_info.non_resident_flag = 'Y' then
323 		p_resident_type := 'N';
324 	else
325 		p_resident_type := 'R';
326 	end if;
327 	/* Bug 6779649: New logic for Korean/Foreigner Identification */
328 	if ((substr(l_rec.national_identifier, 8, 1) between 5 and 8) or (l_yea_info.foreign_residency_flag = 'Y')) then
329 		p_nationality_type := 'F';
330 	else
331 		p_nationality_type := 'K';
332 	end if;
333 	p_period_start_date	:= trunc(l_rec.effective_date, 'YYYY');
334 	p_period_end_date	:= add_months(p_period_start_date, 12) - 1;
335 	p_period_start_date	:= greatest(p_period_start_date, l_rec.date_start);
336 	if l_rec.actual_termination_date < p_period_end_date then
337 		p_period_end_date := l_rec.actual_termination_date;
338 	end if;
339 	p_fwtb_contract_date	:= l_yea_info.fwtb_contract_date;
340 	p_fwtb_expiry_date	:= l_yea_info.fwtb_expiry_date;
341 
342         -- Foreign worket fixed tax rate
343         --
344 	if l_yea_info.fixed_tax_rate = 'Y' then
345 		p_fw_fixed_tax_rate := 'Y';
346 	else
347 		p_fw_fixed_tax_rate := 'N';
348 	end if;
349 
350 	--
351 	-- Taxable Earnings
352 	--
353 	p_cur_taxable_mth	:= l_yea_info.cur_taxable_mth;
354 	p_cur_taxable_bon	:= l_yea_info.cur_taxable_bon;
355 	p_cur_sp_irreg_bonus	:= l_yea_info.cur_sp_irreg_bonus;
356 	p_cur_stck_pur_opt_exec_earn := l_yea_info.cur_stck_pur_opt_exec_earn;	-- Bug 6012258
357 	p_cur_taxable		:= l_yea_info.cur_taxable;
358 	--
359 	-- Previous Employers' Information
360 	--
361 	for i in 1..l_yea_info.prev_termination_date_tbl.count loop
362 		if l_yea_info.prev_bp_number_tbl(i) = '0' then
363 			fnd_message.set_encoded('Invalid Business Registration Number for Previous Employer');
364 			fnd_message.raise_error;
365 		end if;
366 		--
367 		if i = 1 then
368 			p_prev_corp_name1	:= l_yea_info.prev_corp_name_tbl(i);
369 			p_prev_bp_number1	:= l_yea_info.prev_bp_number_tbl(i);
370 			p_prev_taxable_mth1	:= l_yea_info.prev_taxable_mth_tbl(i);
371 			p_prev_taxable_bon1	:= l_yea_info.prev_taxable_bon_tbl(i);
372 			p_prev_sp_irreg_bonus1	:= l_yea_info.prev_sp_irreg_bonus_tbl(i);
373 			p_prev_stck_pur_opt_exec_earn1 := l_yea_info.prev_stck_pur_opt_exe_earn_tbl(i);  -- Bug 6024342
374 			p_prev_taxable1		:= l_yea_info.prev_taxable_mth_tbl(i)
375 						+  l_yea_info.prev_taxable_bon_tbl(i)
376 						+  l_yea_info.prev_sp_irreg_bonus_tbl(i)
377 						+  l_yea_info.prev_stck_pur_opt_exe_earn_tbl(i);
378 		else
379 			if i = 2 then
380 				p_prev_corp_name2	:= l_yea_info.prev_corp_name_tbl(i);
381 				p_prev_bp_number2	:= l_yea_info.prev_bp_number_tbl(i);
382 			end if;
383 			p_prev_taxable_mth2	:= nvl(p_prev_taxable_mth2, 0) + l_yea_info.prev_taxable_mth_tbl(i);
384 			p_prev_taxable_bon2	:= nvl(p_prev_taxable_bon2, 0) + l_yea_info.prev_taxable_bon_tbl(i);
385 			p_prev_sp_irreg_bonus2	:= nvl(p_prev_sp_irreg_bonus2, 0) + l_yea_info.prev_sp_irreg_bonus_tbl(i);
386 			p_prev_stck_pur_opt_exec_earn2 :=nvl(p_prev_stck_pur_opt_exec_earn2, 0)
387     							 + l_yea_info.prev_stck_pur_opt_exe_earn_tbl(i);  -- Bug 6024342
388 			p_prev_taxable2		:= nvl(p_prev_taxable2, 0) + l_yea_info.prev_taxable_mth_tbl(i)
389 									   + l_yea_info.prev_taxable_bon_tbl(i)
390 									   + l_yea_info.prev_sp_irreg_bonus_tbl(i)
391 									   + l_yea_info.prev_stck_pur_opt_exe_earn_tbl(i);
392 		end if;
393 	end loop;
394 	--
395 	-- Bug 6012258
396 	p_research_payment	  := l_yea_info.research_payment;
397 	p_person_id 		  := l_rec.person_id;
398 	--
399 	p_taxable_mth		:= l_yea_info.taxable_mth;
400 	p_taxable_bon		:= l_yea_info.taxable_bon;
401 	p_sp_irreg_bonus	:= l_yea_info.sp_irreg_bonus;
402 	p_stck_pur_opt_exec_earn := l_yea_info.stck_pur_opt_exec_earn;
403 	p_taxable		:= l_yea_info.taxable;
404 	--
405 	--
406 	-- Non-taxable Earnings
407 	--
408 	p_non_taxable_ovs	:= l_yea_info.non_taxable_ovs;
409 	p_non_taxable_ovt	:= l_yea_info.non_taxable_ovt;
410 	p_non_taxable_oth	:= l_yea_info.non_taxable_oth;
411 	p_non_taxable		:= l_yea_info.non_taxable;
412 	--
413         -- Foreign worker income exem
414         --
415         p_foreign_worker_tax_exem := l_yea_info.foreign_worker_income_exem;
416         --
417 	/*
418 	Bug No: 3546993
419 	Modified Non-Taxable Earnings depending on Nationality
420 	and Fixed Tax Rate Flag. Archived values are not changed.
421 	*/
422 
423 	/* Bug No: 3546993 */
424 
425 	-- Basic Income Exemption
426 	--
427 	p_basic_income_exem	:= l_yea_info.basic_income_exem;
428 	p_taxable_income	:= l_yea_info.taxable_income;
429 	--
430 	-- Basic Tax Exemption
431 	--
432 	p_ee_tax_exem		:= l_yea_info.ee_tax_exem;
433 	p_dpnt_spouse_tax_exem	:= l_yea_info.dpnt_spouse_tax_exem;
434 	p_num_of_dpnts		:= l_yea_info.num_of_dpnts;
435 	p_dpnt_tax_exem		:= l_yea_info.dpnt_tax_exem;
436 	--
437 	-- Additional Tax Exemption
438 	--
439 	p_num_of_ageds		:= l_yea_info.num_of_ageds;
440 	p_aged_tax_exem		:= l_yea_info.aged_tax_exem;
441 	p_num_of_disableds	:= l_yea_info.num_of_disableds;
442 	p_disabled_tax_exem	:= l_yea_info.disabled_tax_exem;
443 	p_female_ee_tax_exem	:= l_yea_info.female_ee_tax_exem;
444 	p_num_of_children	:= l_yea_info.num_of_children;
445 	p_child_tax_exem	:= l_yea_info.child_tax_exem;
446 	p_num_of_addtl_child    := l_yea_info.num_of_addtl_child;      -- Bug 6784288
447 	p_addl_child_tax_exem	:= l_yea_info.addl_child_tax_exem;     -- Bug 6012258
448 	p_supp_tax_exem		:= l_yea_info.supp_tax_exem;
449 	p_num_of_underaged_dpnts := l_yea_info.num_of_underaged_dpnts; -- Bug 6024342
450 	--
451 	-- Special Tax Exemption
452 	--
453 	p_ins_prem_tax_exem	:= l_yea_info.ins_prem_tax_exem;
454 	p_med_exp_tax_exem	:= l_yea_info.med_exp_tax_exem;
455 	p_educ_exp_tax_exem	:= l_yea_info.educ_exp_tax_exem;
456 	p_housing_exp_tax_exem	:= l_yea_info.housing_exp_tax_exem;
457 	p_donation_tax_exem	:= l_yea_info.donation_tax_exem;
458         p_marr_fun_relo_exem    := l_yea_info.marr_fun_relo_exemption;
459 	p_sp_tax_exem		:= l_yea_info.sp_tax_exem;
460 	p_std_sp_tax_exem	:= l_yea_info.std_sp_tax_exem;
461 	--
462 	-- National Pension Premium Tax Exemption
463 	--
464 	p_np_prem_tax_exem	:= l_yea_info.np_prem_tax_exem;
465 	p_taxable_income2	:= l_yea_info.taxable_income2;
466 	--
467 	-- Pension Premium
468 	--
469 	p_pension_premium	:= l_yea_info.pen_prem;	-- Bug 6024342
470 	--
471 	-- Other Tax Exemptions
472 	--
473 	p_pers_pension_prem_tax_exem	:= l_yea_info.pers_pension_prem_tax_exem;
474 	p_corp_pension_prem_tax_exem	:= l_yea_info.corp_pension_prem_tax_exem;
475 	p_pers_pension_saving_tax_exem	:= l_yea_info.pers_pension_saving_tax_exem;
476 	p_invest_partner_fin_tax_exem	:= l_yea_info.invest_partner_fin_tax_exem;
477 	p_credit_card_exp_tax_exem	:= l_yea_info.credit_card_exp_tax_exem;
478 	p_emp_st_own_plan_cont_exem  	:= l_yea_info.emp_stk_own_contri_tax_exem;
479 	p_small_bus_install_exem	:= l_yea_info.small_bus_install_exem;		-- Bug 6895093
480 	--
481 	-- Bug 6895093
482 	-- Premium Details
483 	--
484 	p_hi_prem			:= l_yea_info.hi_prem_tax_exem;
485 	p_ei_prem			:= l_yea_info.ei_prem_tax_exem;
486 	p_np_prem			:= l_yea_info.np_prem_tax_exem;
487 	--
488         p_ltci_prem                     := l_yea_info.long_term_ins_prem_tax_exem; -- Bug 7260606
489         --
490 	-- Bug : 5190884
491 	-- Employee Expense Details
492 	--
493 	p_emp_med_exp_nts		:= nvl(l_emp_med_exp_nts,0);
494 	p_emp_educ_exp_nts		:= nvl(l_emp_educ_exp_nts,0);
495 	p_emp_card_exp_nts		:= nvl(l_emp_card_exp_nts,0);
496 	p_emp_don_exp_nts		:= nvl(l_emp_don_exp_nts,0);
497 	p_emp_ins_exp_nts		:= nvl(l_emp_ins_exp_nts,0); -- Bug 5667762
498 	--
499 	p_emp_tot_ins_exp		:= ( l_yea_info.hi_prem + l_yea_info.long_term_ins_prem
500                                             +l_yea_info.ei_prem + l_yea_info.pers_ins_prem
501                                             + l_yea_info.disabled_ins_prem);        -- Bug 7260606
502 	p_emp_med_exp_oth		:=   l_yea_info.med_exp_emp - p_emp_med_exp_nts;
503         -- Bug : 5745179
504         --
505 	l_don_tax_break2004		:= pay_kr_yea_form_pkg.get_donation_tax_break(fnd_date.date_to_canonical(l_rec.effective_date), l_yea_info.political_donation1);
506 	--
507         p_emp_don_exp_oth		:= ( l_don_amount1 + l_don_amount2 - nvl(l_don_tax_break2004,0)) - p_emp_don_exp_nts;
508 	p_emp_educ_exp_oth		:= ( l_yea_info.ee_educ_exp + l_emp_occu_trng ) - p_emp_educ_exp_nts;
509 	p_emp_card_exp_oth		:= l_card_expense_total - p_emp_card_exp_nts;
510 	p_emp_cash_exp_nts		:= nvl(l_emp_cash_exp,0);
511 
512         -- Double Exemption Amount Bug 6716401
513 	p_double_exem_amt               :=  l_yea_info.double_exem_amt;
514 
515 	--
516 	-- Calculated Tax
517 	--
518 	p_taxation_base			:= l_yea_info.taxation_base;
519 	p_calc_tax			:= l_yea_info.calc_tax;
520 	p_basic_tax_break		:= l_yea_info.basic_tax_break;
521 	p_housing_exp_tax_break		:= l_yea_info.housing_exp_tax_break;
522 	p_stock_saving_tax_break	:= l_yea_info.stock_saving_tax_break;
523 	p_ovs_tax_break			:= l_yea_info.ovs_tax_break;
524 	p_lt_stock_saving_tax_break	:= l_yea_info.lt_stock_saving_tax_break;
525 	p_total_tax_break		:= l_yea_info.total_tax_break;
526 	-- Bug 3966549
527 	p_don_tax_break			:= l_yea_info.don_tax_break2004 ;
528 	-- End of 3966549
529 	--
530 	-- Foreign Worker Tax Break
531 	--
532 	p_foreign_worker_tax_break1	:= l_yea_info.foreign_worker_tax_break1;
533 	p_foreign_worker_tax_break2	:= l_yea_info.foreign_worker_tax_break2;
534 	p_foreign_worker_tax_break	:= l_yea_info.foreign_worker_tax_break;
535 
536 	-- Tax
537 	--
538 	p_annual_itax	:= l_yea_info.annual_itax;
539 	p_annual_stax	:= l_yea_info.annual_stax;
540 	p_annual_rtax	:= l_yea_info.annual_rtax;
541 	p_annual_tax	:= p_annual_itax + p_annual_stax + p_annual_rtax;
542 	p_prev_itax	:= l_yea_info.prev_itax;
543 	p_prev_stax	:= l_yea_info.prev_stax;
544 	p_prev_rtax	:= l_yea_info.prev_rtax;
545 	p_prev_tax	:= p_prev_itax + p_prev_stax + p_prev_rtax;
546 	p_cur_itax	:= l_yea_info.cur_itax;
547 	p_cur_stax	:= l_yea_info.cur_stax;
548 	p_cur_rtax	:= l_yea_info.cur_rtax;
549 	p_cur_tax	:= p_cur_itax + p_cur_stax + p_cur_rtax;
550 	p_itax_adj	:= l_yea_info.itax_adj;
551 	p_stax_adj	:= l_yea_info.stax_adj;
552 	p_rtax_adj	:= l_yea_info.rtax_adj;
553 	p_tax_adj	:= p_itax_adj + p_stax_adj + p_rtax_adj;
554 
555 end data;
556 end pay_kr_paykrytr_pkg;