[Home] [Help]
PACKAGE BODY: APPS.PAY_KR_PAYKRYLG_PKG
Source
1 package body pay_kr_paykrylg_pkg as
2 /* $Header: paykrylg.pkb 120.15.12020000.2 2013/02/06 10:01:51 mdubasi ship $ */
3 --
4 -- Global Variables
5 --
6 type t_defined_balance_id is record(
7 taxable_mth number,
8 taxable_bon number,
9 sp_irreg_bonus_mth number,
10 sp_irreg_bonus_bon number,
11 stck_pur_opt_exec_earn_mth number, -- Bug 6470526
12 stck_pur_opt_exec_earn_bon number, -- Bug 6470526
13 itax_mth number,
14 itax_bon number,
15 rtax_mth number,
16 rtax_bon number,
17 stax_mth number,
18 stax_bon number,
19 non_taxable_ovs_mth number,
20 non_taxable_ovs_bon number,
21 non_taxable_ovt_mth number,
22 non_taxable_ovt_bon number,
23 research_payment_mth number, -- Bug 6470526
24 research_payment_bon number, -- Bug 6470526
25 non_taxable_mth number,
26 non_taxable_bon number,
27 non_taxable_ovs_frgn_mth number, -- Bug 7439803
28 non_taxable_ovs_frgn_bon number, -- Bug 7439803
29 birth_raise_allow_mth number, -- Bug 7439803
30 birth_raise_allow_bon number, -- Bug 7439803
31 ltci_prem_mth number, -- Bug 7439803
32 ltci_prem_bon number, -- Bug 7439803
33 fw_tax_break_mth number, --3546994
34 fw_tax_break_bon number,
35 -- Bug 4322981
36 np_prem_mth number,
37 hi_prem_mth number,
38 ei_prem_mth number,
39 donation_mth number,
40 np_prem_bon number,
41 hi_prem_bon number,
42 addl_non_tax_mth number, -- Bug 5999074
43 addl_non_tax_bon number,
44 ei_prem_bon number,
45 donation_bon number,
46 -- End of 4322981
47 -- Start of bug 8880364
48 esop_with_drawn_mth number,
49 esop_with_drawn_bon number,
50 rsrch_pay_ntax_H06_mth number,
51 rsrch_pay_ntax_H06_bon number,
52 rsrch_pay_ntax_H07_mth number,
53 rsrch_pay_ntax_H07_bon number,
54 rsrch_pay_ntax_H08_mth number,
55 rsrch_pay_ntax_H08_bon number,
56 rsrch_pay_ntax_H09_mth number,
57 rsrch_pay_ntax_H09_bon number,
58 rsrch_pay_ntax_H10_mth number,
59 rsrch_pay_ntax_H10_bon number,
60 non_tax_earn_H11_mth number,
61 non_tax_earn_H11_bon number,
62 non_tax_earn_G01_mth number,
63 non_tax_earn_G01_bon number,
64 non_tax_earn_H12_mth number,
65 non_tax_earn_H12_bon number,
66 non_tax_earn_H01_mth number,
67 non_tax_earn_H01_bon number,
68 non_tax_earn_H13_mth number,
69 non_tax_earn_H13_bon number,
70 non_tax_earn_K01_mth number,
71 non_tax_earn_K01_bon number,
72 non_tax_earn_S01_mth number,
73 non_tax_earn_S01_bon number,
74 non_tax_earn_Y01_bon number,
75 non_tax_earn_Y01_mth number,
76 non_tax_earn_Y02_bon number,
77 non_tax_earn_Y02_mth number,
78 non_tax_earn_Y03_bon number,
79 non_tax_earn_Y03_mth number,
80 non_tax_earn_Y20_bon number,
81 non_tax_earn_Y20_mth number,
82 non_tax_earn_Z01_bon number,
83 non_tax_earn_Z01_mth number,
84 non_tax_earn_T01_mth number,
85 non_tax_earn_T01_bon number,
86 non_tax_earn_H05_mth number,
87 non_tax_earn_H05_bon number,
88 non_tax_earn_I01_mth number,
89 non_tax_earn_I01_bon number,
90 non_tax_earn_M01_mth number,
91 non_tax_earn_M01_bon number,
92 non_tax_earn_M02_mth number,
93 non_tax_earn_M02_bon number,
94 non_tax_earn_M03_mth number,
95 non_tax_earn_M03_bon number,
96 non_tax_earn_frgn_M01_mth number,
97 non_tax_earn_frgn_M01_bon number,
98 non_tax_earn_frgn_M02_mth number,
99 non_tax_earn_frgn_M02_bon number,
100 non_tax_earn_frgn_M03_mth number,
101 non_tax_earn_frgn_M03_bon number,
102 nts_spec_non_taxable_mth number,
103 nts_spec_non_taxable_bon number,
104 non_tax_earn_H02_mth number,
105 non_tax_earn_H02_bon number,
106 non_tax_earn_H03_mth number,
107 non_tax_earn_H03_bon number,
108 fw_tax_break_earning_mth number,
109 fw_tax_break_earning_bon number,
110 non_tax_earn_H14_mth number,
111 non_tax_earn_H14_bon number,
112 non_tax_earn_H15_mth number,
113 non_tax_earn_H15_bon number,
114 non_tax_earn_R10_mth number,
115 non_tax_earn_R10_bon number,
116 non_tax_earn_Y21_mth number,
117 non_tax_earn_Y21_bon number
118
119 ); --3546994
120 g_defined_balance_id t_defined_balance_id;
121 ------------------------------------------------------------------------
122 procedure data(
123 p_assignment_action_id in number,
124 p_taxable out nocopy number,
125 p_nationality out nocopy varchar2, -- Bug 7595082
126 p_fw_fixed_tax_rate out nocopy varchar2, -- Bug 7595082
127 p_basic_income_exem out nocopy number,
128 p_taxable_income out nocopy number,
129 p_ee_tax_exem out nocopy number,
130 p_dpnt_spouse_flag out nocopy varchar2,
131 p_dpnt_spouse_tax_exem out nocopy number,
132 p_num_of_underaged_dpnts out nocopy number,
133 p_num_of_aged_dpnts out nocopy number,
134 p_dpnt_tax_exem out nocopy number,
135 p_num_of_ageds out nocopy number,
136 p_aged_tax_exem out nocopy number,
137 p_num_of_disableds out nocopy number,
138 p_disabled_tax_exem out nocopy number,
139 p_female_ee_flag out nocopy varchar2,
140 p_female_ee_tax_exem out nocopy number,
141 p_num_of_children out nocopy number,
142 p_child_tax_exem out nocopy number,
143 p_supp_tax_exem out nocopy number,
144 p_hi_prem out nocopy number,
145 p_ei_prem out nocopy number,
146 p_pers_ins_name out nocopy varchar2,
147 p_pers_ins_prem out nocopy number,
148 p_disabled_ins_prem out nocopy number,
149 p_ins_prem_tax_exem out nocopy number,
150 p_med_exp out nocopy number,
151 p_med_exp_aged out nocopy number,
152 p_med_exp_disabled out nocopy number,
153 p_max_med_exp_tax_exem out nocopy number,
154 p_med_exp_tax_exem out nocopy number,
155 p_ee_educ_exp out nocopy number,
156 p_spouse_educ_exp out nocopy number,
157 p_disabled_educ_exp out nocopy number,
158 p_dpnt_educ_exp out nocopy number,
159 p_educ_exp_tax_exem out nocopy number,
160 p_housing_saving_type_meaning out nocopy varchar2,
161 p_housing_saving out nocopy number,
162 p_housing_purchase_date out nocopy date,
163 p_housing_loan_date out nocopy date,
164 p_housing_loan_repay out nocopy number,
165 p_lt_housing_loan_date out nocopy date,
166 p_lt_housing_loan_int_repay out nocopy number,
167 p_max_housing_exp_tax_exem out nocopy number,
168 p_housing_exp_tax_exem out nocopy number,
169 p_donation1_tax_exem out nocopy number,
170 p_donation2 out nocopy number,
171 p_max_donation2_tax_exem out nocopy number,
172 p_donation2_tax_exem out nocopy number,
173 p_donation_tax_exem out nocopy number,
174 p_sp_tax_exem out nocopy number,
175 p_std_sp_tax_exem out nocopy number,
176 p_np_prem out nocopy number,
177 p_np_prem_tax_exem out nocopy number,
178 p_pers_pension_prem_tax out nocopy number,
179 p_pers_pension_saving_tax out nocopy number,
180 p_invest_partner_fin_tax out nocopy number,
181 p_credit_card_exp_tax out nocopy number,
182 p_emp_st_own_plan_cont out nocopy number,
183 p_pers_pension_prem_tax_exem out nocopy number,
184 p_pers_pension_saving_tax_exem out nocopy number,
185 p_invest_partner_fin_tax_exem out nocopy number,
186 p_credit_card_exp_tax_exem out nocopy number,
187 p_emp_st_own_plan_cont_exem out nocopy number,
188 p_taxation_base out nocopy number,
189 p_calc_tax out nocopy number,
190 p_basic_tax_break out nocopy number,
191 p_housing_exp_tax_break out nocopy number,
192 p_stock_saving_tax_break out nocopy number,
193 p_ovstb_territory_short_name out nocopy varchar2,
194 p_ovstb_tax_paid_date out nocopy date,
195 p_ovstb_tax_foreign_currency out nocopy number,
196 p_ovstb_tax out nocopy number,
197 p_ovstb_application_date out nocopy date,
198 p_ovstb_submission_date out nocopy date,
199 p_ovs_tax_break out nocopy number,
200 p_lt_stock_saving_tax_break out nocopy number,
201 p_total_tax_break out nocopy number,
202 p_fwtb_immigration_purpose out nocopy varchar2,
203 p_fwtb_contract_date out nocopy date,
204 p_fwtb_expiry_date out nocopy date,
205 p_fwtb_application_date out nocopy date,
206 p_fwtb_submission_date out nocopy date,
207 --
208 p_foreign_worker_tax_break1 out nocopy number,
209 p_foreign_worker_tax_break2 out nocopy number,
210 p_annual_itax out nocopy number,
211 p_annual_rtax out nocopy number,
212 p_annual_stax out nocopy number,
213 p_prev_itax out nocopy number,
214 p_prev_rtax out nocopy number,
215 p_prev_stax out nocopy number,
216 p_cur_annual_itax out nocopy number,
217 p_cur_annual_rtax out nocopy number,
218 p_cur_annual_stax out nocopy number,
219 p_cur_itax out nocopy number,
220 p_cur_rtax out nocopy number,
221 p_cur_stax out nocopy number,
222 p_itax_adj out nocopy number,
223 p_itax_refund out nocopy number,
224 p_rtax_adj out nocopy number,
225 p_rtax_refund out nocopy number,
226 p_stax_adj out nocopy number,
227 p_stax_refund out nocopy number,
228 p_effective_date1 out nocopy varchar2,
229 p_taxable_mth1 out nocopy number,
230 p_taxable_bon1 out nocopy number,
231 p_sp_irreg_bonus1 out nocopy number,
232 p_taxable1 out nocopy number,
233 p_itax1 out nocopy number,
234 p_rtax1 out nocopy number,
235 p_stax1 out nocopy number,
236 -- Bug 4322981
237 p_np_dedc1 out nocopy number,
238 p_hi_dedc1 out nocopy number,
239 p_ei_dedc1 out nocopy number,
240 p_donation_dedc1 out nocopy number,
241 -- End of 4322981
242 p_non_taxable_ovs1 out nocopy number,
243 p_non_taxable_ovt1 out nocopy number,
244 p_non_taxable_oth1 out nocopy number,
245 p_effective_date2 out nocopy varchar2,
246 p_taxable_mth2 out nocopy number,
247 p_taxable_bon2 out nocopy number,
248 p_sp_irreg_bonus2 out nocopy number,
249 p_taxable2 out nocopy number,
250 p_itax2 out nocopy number,
251 p_rtax2 out nocopy number,
252 p_stax2 out nocopy number,
253 -- Bug 4322981
254 p_np_dedc2 out nocopy number,
255 p_hi_dedc2 out nocopy number,
256 p_ei_dedc2 out nocopy number,
257 p_donation_dedc2 out nocopy number,
258 -- End of 4322981
259 p_non_taxable_ovs2 out nocopy number,
260 p_non_taxable_ovt2 out nocopy number,
261 p_non_taxable_oth2 out nocopy number,
262 p_effective_date3 out nocopy varchar2,
263 p_taxable_mth3 out nocopy number,
264 p_taxable_bon3 out nocopy number,
265 p_sp_irreg_bonus3 out nocopy number,
266 p_taxable3 out nocopy number,
267 p_itax3 out nocopy number,
268 p_rtax3 out nocopy number,
269 p_stax3 out nocopy number,
270 -- Bug 4322981
271 p_np_dedc3 out nocopy number,
272 p_hi_dedc3 out nocopy number,
273 p_ei_dedc3 out nocopy number,
274 p_donation_dedc3 out nocopy number,
275 -- End of 4322981
276 p_non_taxable_ovs3 out nocopy number,
277 p_non_taxable_ovt3 out nocopy number,
278 p_non_taxable_oth3 out nocopy number,
279 p_effective_date4 out nocopy varchar2,
280 p_taxable_mth4 out nocopy number,
281 p_taxable_bon4 out nocopy number,
282 p_sp_irreg_bonus4 out nocopy number,
283 p_taxable4 out nocopy number,
284 p_itax4 out nocopy number,
285 p_rtax4 out nocopy number,
286 p_stax4 out nocopy number,
287 -- Bug 4322981
288 p_np_dedc4 out nocopy number,
289 p_hi_dedc4 out nocopy number,
290 p_ei_dedc4 out nocopy number,
291 p_donation_dedc4 out nocopy number,
292 -- End of 4322981
293 p_non_taxable_ovs4 out nocopy number,
294 p_non_taxable_ovt4 out nocopy number,
295 p_non_taxable_oth4 out nocopy number,
296 p_effective_date5 out nocopy varchar2,
297 p_taxable_mth5 out nocopy number,
298 p_taxable_bon5 out nocopy number,
299 p_sp_irreg_bonus5 out nocopy number,
300 p_taxable5 out nocopy number,
301 p_itax5 out nocopy number,
302 p_rtax5 out nocopy number,
303 p_stax5 out nocopy number,
304 -- Bug 4322981
305 p_np_dedc5 out nocopy number,
306 p_hi_dedc5 out nocopy number,
307 p_ei_dedc5 out nocopy number,
308 p_donation_dedc5 out nocopy number,
309 -- End of 4322981
310 p_non_taxable_ovs5 out nocopy number,
311 p_non_taxable_ovt5 out nocopy number,
312 p_non_taxable_oth5 out nocopy number,
313 p_effective_date6 out nocopy varchar2,
314 p_taxable_mth6 out nocopy number,
315 p_taxable_bon6 out nocopy number,
316 p_sp_irreg_bonus6 out nocopy number,
317 p_taxable6 out nocopy number,
318 p_itax6 out nocopy number,
319 p_rtax6 out nocopy number,
320 p_stax6 out nocopy number,
321 -- Bug 4322981
322 p_np_dedc6 out nocopy number,
323 p_hi_dedc6 out nocopy number,
324 p_ei_dedc6 out nocopy number,
325 p_donation_dedc6 out nocopy number,
326 -- End of 4322981
327 p_non_taxable_ovs6 out nocopy number,
328 p_non_taxable_ovt6 out nocopy number,
329 p_non_taxable_oth6 out nocopy number,
330 p_effective_date7 out nocopy varchar2,
331 p_taxable_mth7 out nocopy number,
332 p_taxable_bon7 out nocopy number,
333 p_sp_irreg_bonus7 out nocopy number,
334 p_taxable7 out nocopy number,
335 p_itax7 out nocopy number,
336 p_rtax7 out nocopy number,
337 p_stax7 out nocopy number,
338 -- Bug 4322981
339 p_np_dedc7 out nocopy number,
340 p_hi_dedc7 out nocopy number,
341 p_ei_dedc7 out nocopy number,
342 p_donation_dedc7 out nocopy number,
343 -- End of 4322981
344 p_non_taxable_ovs7 out nocopy number,
345 p_non_taxable_ovt7 out nocopy number,
346 p_non_taxable_oth7 out nocopy number,
347 p_effective_date8 out nocopy varchar2,
348 p_taxable_mth8 out nocopy number,
349 p_taxable_bon8 out nocopy number,
350 p_sp_irreg_bonus8 out nocopy number,
351 p_taxable8 out nocopy number,
352 p_itax8 out nocopy number,
353 p_rtax8 out nocopy number,
354 p_stax8 out nocopy number,
355 -- Bug 4322981
356 p_np_dedc8 out nocopy number,
357 p_hi_dedc8 out nocopy number,
358 p_ei_dedc8 out nocopy number,
359 p_donation_dedc8 out nocopy number,
360 -- End of 4322981
361 p_non_taxable_ovs8 out nocopy number,
362 p_non_taxable_ovt8 out nocopy number,
363 p_non_taxable_oth8 out nocopy number,
364 p_effective_date9 out nocopy varchar2,
365 p_taxable_mth9 out nocopy number,
366 p_taxable_bon9 out nocopy number,
367 p_sp_irreg_bonus9 out nocopy number,
368 p_taxable9 out nocopy number,
369 p_itax9 out nocopy number,
370 p_rtax9 out nocopy number,
371 p_stax9 out nocopy number,
372 -- Bug 4322981
373 p_np_dedc9 out nocopy number,
374 p_hi_dedc9 out nocopy number,
375 p_ei_dedc9 out nocopy number,
376 p_donation_dedc9 out nocopy number,
377 -- End of 4322981
378 p_non_taxable_ovs9 out nocopy number,
379 p_non_taxable_ovt9 out nocopy number,
380 p_non_taxable_oth9 out nocopy number,
381 p_effective_date10 out nocopy varchar2,
382 p_taxable_mth10 out nocopy number,
383 p_taxable_bon10 out nocopy number,
384 p_sp_irreg_bonus10 out nocopy number,
385 p_taxable10 out nocopy number,
386 p_itax10 out nocopy number,
387 p_rtax10 out nocopy number,
388 p_stax10 out nocopy number,
389 -- Bug 4322981
390 p_np_dedc10 out nocopy number,
391 p_hi_dedc10 out nocopy number,
392 p_ei_dedc10 out nocopy number,
393 p_donation_dedc10 out nocopy number,
394 -- End of 4322981
395 p_non_taxable_ovs10 out nocopy number,
396 p_non_taxable_ovt10 out nocopy number,
397 p_non_taxable_oth10 out nocopy number,
398 p_effective_date11 out nocopy varchar2,
399 p_taxable_mth11 out nocopy number,
400 p_taxable_bon11 out nocopy number,
401 p_sp_irreg_bonus11 out nocopy number,
402 p_taxable11 out nocopy number,
403 p_itax11 out nocopy number,
404 p_rtax11 out nocopy number,
405 p_stax11 out nocopy number,
406 -- Bug 4322981
407 p_np_dedc11 out nocopy number,
408 p_hi_dedc11 out nocopy number,
409 p_ei_dedc11 out nocopy number,
410 p_donation_dedc11 out nocopy number,
411 -- End of 4322981
412 p_non_taxable_ovs11 out nocopy number,
413 p_non_taxable_ovt11 out nocopy number,
414 p_non_taxable_oth11 out nocopy number,
415 p_effective_date12 out nocopy varchar2,
416 p_taxable_mth12 out nocopy number,
417 p_taxable_bon12 out nocopy number,
418 p_sp_irreg_bonus12 out nocopy number,
419 p_taxable12 out nocopy number,
420 p_itax12 out nocopy number,
421 p_rtax12 out nocopy number,
422 p_stax12 out nocopy number,
423 -- Bug 4322981
424 p_np_dedc12 out nocopy number,
425 p_hi_dedc12 out nocopy number,
426 p_ei_dedc12 out nocopy number,
427 p_donation_dedc12 out nocopy number,
428 -- End of 4322981
429 p_non_taxable_ovs12 out nocopy number,
430 p_non_taxable_ovt12 out nocopy number,
431 p_non_taxable_oth12 out nocopy number,
432 p_taxable_mth13 out nocopy number,
433 p_taxable_bon13 out nocopy number,
434 p_sp_irreg_bonus13 out nocopy number,
435 p_taxable13 out nocopy number,
436 p_itax13 out nocopy number,
437 p_rtax13 out nocopy number,
438 p_stax13 out nocopy number,
439 -- Bug 4322981
440 p_np_dedc13 out nocopy number,
441 p_hi_dedc13 out nocopy number,
442 p_ei_dedc13 out nocopy number,
443 p_donation_dedc13 out nocopy number,
444 -- End of 4322981
445 p_non_taxable_ovs13 out nocopy number,
446 p_non_taxable_ovt13 out nocopy number,
447 p_non_taxable_oth13 out nocopy number,
448 -- 3546994
449 p_dependent_count out nocopy number,
450 p_fw_tax_break1 out nocopy number,
451 p_fw_tax_break2 out nocopy number,
452 p_fw_tax_break3 out nocopy number,
453 p_fw_tax_break4 out nocopy number,
454 p_fw_tax_break5 out nocopy number,
455 p_fw_tax_break6 out nocopy number,
456 p_fw_tax_break7 out nocopy number,
457 p_fw_tax_break8 out nocopy number,
458 p_fw_tax_break9 out nocopy number,
459 p_fw_tax_break10 out nocopy number,
460 p_fw_tax_break11 out nocopy number,
461 p_fw_tax_break12 out nocopy number,
462 p_fw_tax_break13 out nocopy number, -- Bug 7439803
463 -- Bug 6470526: 2007 YEA Ledger Statutory Updates
464 p_stck_pur_opt_exec_earn1 out nocopy number,
465 p_stck_pur_opt_exec_earn2 out nocopy number,
466 p_stck_pur_opt_exec_earn3 out nocopy number,
467 p_stck_pur_opt_exec_earn4 out nocopy number,
468 p_stck_pur_opt_exec_earn5 out nocopy number,
469 p_stck_pur_opt_exec_earn6 out nocopy number,
470 p_stck_pur_opt_exec_earn7 out nocopy number,
471 p_stck_pur_opt_exec_earn8 out nocopy number,
472 p_stck_pur_opt_exec_earn9 out nocopy number,
473 p_stck_pur_opt_exec_earn10 out nocopy number,
474 p_stck_pur_opt_exec_earn11 out nocopy number,
475 p_stck_pur_opt_exec_earn12 out nocopy number,
476 p_stck_pur_opt_exec_earn13 out nocopy number,
477 p_research_payment1 out nocopy number,
478 p_research_payment2 out nocopy number,
479 p_research_payment3 out nocopy number,
480 p_research_payment4 out nocopy number,
481 p_research_payment5 out nocopy number,
482 p_research_payment6 out nocopy number,
483 p_research_payment7 out nocopy number,
484 p_research_payment8 out nocopy number,
485 p_research_payment9 out nocopy number,
486 p_research_payment10 out nocopy number,
487 p_research_payment11 out nocopy number,
488 p_research_payment12 out nocopy number,
489 p_research_payment13 out nocopy number,
490 -- End of Bug 6470526
491 -- Bug 7439803: 2008 YEA Ledger Statutory Updates
492 p_non_taxable_ovs_frgn1 out nocopy number,
493 p_non_taxable_ovs_frgn2 out nocopy number,
494 p_non_taxable_ovs_frgn3 out nocopy number,
495 p_non_taxable_ovs_frgn4 out nocopy number,
496 p_non_taxable_ovs_frgn5 out nocopy number,
497 p_non_taxable_ovs_frgn6 out nocopy number,
498 p_non_taxable_ovs_frgn7 out nocopy number,
499 p_non_taxable_ovs_frgn8 out nocopy number,
500 p_non_taxable_ovs_frgn9 out nocopy number,
501 p_non_taxable_ovs_frgn10 out nocopy number,
502 p_non_taxable_ovs_frgn11 out nocopy number,
503 p_non_taxable_ovs_frgn12 out nocopy number,
504 p_non_taxable_ovs_frgn13 out nocopy number,
505 p_birth_raising_allow1 out nocopy number,
506 p_birth_raising_allow2 out nocopy number,
507 p_birth_raising_allow3 out nocopy number,
508 p_birth_raising_allow4 out nocopy number,
509 p_birth_raising_allow5 out nocopy number,
510 p_birth_raising_allow6 out nocopy number,
511 p_birth_raising_allow7 out nocopy number,
512 p_birth_raising_allow8 out nocopy number,
513 p_birth_raising_allow9 out nocopy number,
514 p_birth_raising_allow10 out nocopy number,
515 p_birth_raising_allow11 out nocopy number,
516 p_birth_raising_allow12 out nocopy number,
517 p_birth_raising_allow13 out nocopy number,
518 p_fw_income_exem1 out nocopy number,
519 p_fw_income_exem2 out nocopy number,
520 p_fw_income_exem3 out nocopy number,
521 p_fw_income_exem4 out nocopy number,
522 p_fw_income_exem5 out nocopy number,
523 p_fw_income_exem6 out nocopy number,
524 p_fw_income_exem7 out nocopy number,
525 p_fw_income_exem8 out nocopy number,
526 p_fw_income_exem9 out nocopy number,
527 p_fw_income_exem10 out nocopy number,
528 p_fw_income_exem11 out nocopy number,
529 p_fw_income_exem12 out nocopy number,
530 p_fw_income_exem13 out nocopy number,
531 -- End of Bug 7439803
532 -- Start of bug 8880364: 2009 YEA Ledger Updates
533 p_esop_with_drawn1 out nocopy number,
534 p_esop_with_drawn2 out nocopy number,
535 p_esop_with_drawn3 out nocopy number,
536 p_esop_with_drawn4 out nocopy number,
537 p_esop_with_drawn5 out nocopy number,
538 p_esop_with_drawn6 out nocopy number,
539 p_esop_with_drawn7 out nocopy number,
540 p_esop_with_drawn8 out nocopy number,
541 p_esop_with_drawn9 out nocopy number,
542 p_esop_with_drawn10 out nocopy number,
543 p_esop_with_drawn11 out nocopy number,
544 p_esop_with_drawn12 out nocopy number,
545 p_esop_with_drawn13 out nocopy number,
546 p_non_tax_18_earn1 out nocopy number,
547 p_non_tax_18_earn2 out nocopy number,
548 p_non_tax_18_earn3 out nocopy number,
549 p_non_tax_18_earn4 out nocopy number,
550 p_non_tax_18_earn5 out nocopy number,
551 p_non_tax_18_earn6 out nocopy number,
552 p_non_tax_18_earn7 out nocopy number,
553 p_non_tax_18_earn8 out nocopy number,
554 p_non_tax_18_earn9 out nocopy number,
555 p_non_tax_18_earn10 out nocopy number,
556 p_non_tax_18_earn11 out nocopy number,
557 p_non_tax_18_earn12 out nocopy number,
558 p_non_tax_18_earn13 out nocopy number,
559 p_non_tax_19_earn1 out nocopy number,
560 p_non_tax_19_earn2 out nocopy number,
561 p_non_tax_19_earn3 out nocopy number,
562 p_non_tax_19_earn4 out nocopy number,
563 p_non_tax_19_earn5 out nocopy number,
564 p_non_tax_19_earn6 out nocopy number,
565 p_non_tax_19_earn7 out nocopy number,
566 p_non_tax_19_earn8 out nocopy number,
567 p_non_tax_19_earn9 out nocopy number,
568 p_non_tax_19_earn10 out nocopy number,
569 p_non_tax_19_earn11 out nocopy number,
570 p_non_tax_19_earn12 out nocopy number,
571 p_non_tax_19_earn13 out nocopy number,
572 p_non_tax_20_earn1 out nocopy number,
573 p_non_tax_20_earn2 out nocopy number,
574 p_non_tax_20_earn3 out nocopy number,
575 p_non_tax_20_earn4 out nocopy number,
576 p_non_tax_20_earn5 out nocopy number,
577 p_non_tax_20_earn6 out nocopy number,
578 p_non_tax_20_earn7 out nocopy number,
579 p_non_tax_20_earn8 out nocopy number,
580 p_non_tax_20_earn9 out nocopy number,
581 p_non_tax_20_earn10 out nocopy number,
582 p_non_tax_20_earn11 out nocopy number,
583 p_non_tax_20_earn12 out nocopy number,
584 p_non_tax_20_earn13 out nocopy number,
585 p_non_taxable1 out nocopy number,
586 p_non_taxable2 out nocopy number,
587 p_non_taxable3 out nocopy number,
588 p_non_taxable4 out nocopy number,
589 p_non_taxable5 out nocopy number,
590 p_non_taxable6 out nocopy number,
591 p_non_taxable7 out nocopy number,
592 p_non_taxable8 out nocopy number,
593 p_non_taxable9 out nocopy number,
594 p_non_taxable10 out nocopy number,
595 p_non_taxable11 out nocopy number,
596 p_non_taxable12 out nocopy number,
597 p_non_taxable13 out nocopy number,
598 -- Bug 10082074
599 p_emp_hire_date out nocopy date,
600 p_emp_leaving_date out nocopy date,
601 p_rep_non_tax_oth1 out nocopy number,
602 p_rep_non_tax_oth2 out nocopy number,
603 p_rep_non_tax_oth3 out nocopy number,
604 p_rep_non_tax_oth4 out nocopy number,
605 p_rep_non_tax_oth5 out nocopy number,
606 p_rep_non_tax_oth6 out nocopy number,
607 p_rep_non_tax_oth7 out nocopy number,
608 p_rep_non_tax_oth8 out nocopy number,
609 p_rep_non_tax_oth9 out nocopy number,
610 p_rep_non_tax_oth10 out nocopy number,
611 p_rep_non_tax_oth11 out nocopy number,
612 p_rep_non_tax_oth12 out nocopy number,
613 p_rep_non_tax_oth13 out nocopy number,
614 p_spec_non_taxable1 out nocopy number,
615 p_spec_non_taxable2 out nocopy number,
616 p_spec_non_taxable3 out nocopy number,
617 p_spec_non_taxable4 out nocopy number,
618 p_spec_non_taxable5 out nocopy number,
619 p_spec_non_taxable6 out nocopy number,
620 p_spec_non_taxable7 out nocopy number,
621 p_spec_non_taxable8 out nocopy number,
622 p_spec_non_taxable9 out nocopy number,
623 p_spec_non_taxable10 out nocopy number,
624 p_spec_non_taxable11 out nocopy number,
625 p_spec_non_taxable12 out nocopy number,
626 p_spec_non_taxable13 out nocopy number,
627 p_rep_non_tax_total1 out nocopy number,
628 p_rep_non_tax_total2 out nocopy number,
629 p_rep_non_tax_total3 out nocopy number,
630 p_rep_non_tax_total4 out nocopy number,
631 p_rep_non_tax_total5 out nocopy number,
632 p_rep_non_tax_total6 out nocopy number,
633 p_rep_non_tax_total7 out nocopy number,
634 p_rep_non_tax_total8 out nocopy number,
635 p_rep_non_tax_total9 out nocopy number,
636 p_rep_non_tax_total10 out nocopy number,
637 p_rep_non_tax_total11 out nocopy number,
638 p_rep_non_tax_total12 out nocopy number,
639 p_rep_non_tax_total13 out nocopy number,
640 p_foreign_worker_tax_break out nocopy number,
641 p_non_taxable_ovs_M01 out nocopy number,
642 p_non_taxable_ovs_M02 out nocopy number,
643 p_non_taxable_ovs_M03 out nocopy number,
644 p_non_taxable_ovs_code out nocopy varchar2,
645 p_non_tax_H02_earn1 out nocopy number,
646 p_non_tax_H02_earn2 out nocopy number,
647 p_non_tax_H02_earn3 out nocopy number,
648 p_non_tax_H02_earn4 out nocopy number,
649 p_non_tax_H02_earn5 out nocopy number,
650 p_non_tax_H02_earn6 out nocopy number,
651 p_non_tax_H02_earn7 out nocopy number,
652 p_non_tax_H02_earn8 out nocopy number,
653 p_non_tax_H02_earn9 out nocopy number,
654 p_non_tax_H02_earn10 out nocopy number,
655 p_non_tax_H02_earn11 out nocopy number,
656 p_non_tax_H02_earn12 out nocopy number,
657 p_non_tax_H02_earn13 out nocopy number,
658 p_non_tax_H03_earn1 out nocopy number,
659 p_non_tax_H03_earn2 out nocopy number,
660 p_non_tax_H03_earn3 out nocopy number,
661 p_non_tax_H03_earn4 out nocopy number,
662 p_non_tax_H03_earn5 out nocopy number,
663 p_non_tax_H03_earn6 out nocopy number,
664 p_non_tax_H03_earn7 out nocopy number,
665 p_non_tax_H03_earn8 out nocopy number,
666 p_non_tax_H03_earn9 out nocopy number,
667 p_non_tax_H03_earn10 out nocopy number,
668 p_non_tax_H03_earn11 out nocopy number,
669 p_non_tax_H03_earn12 out nocopy number,
670 p_non_tax_H03_earn13 out nocopy number,
671 p_unrep_non_tax_tot1 out nocopy number,
672 p_unrep_non_tax_tot2 out nocopy number,
673 p_unrep_non_tax_tot3 out nocopy number,
674 p_unrep_non_tax_tot4 out nocopy number,
675 p_unrep_non_tax_tot5 out nocopy number,
676 p_unrep_non_tax_tot6 out nocopy number,
677 p_unrep_non_tax_tot7 out nocopy number,
678 p_unrep_non_tax_tot8 out nocopy number,
679 p_unrep_non_tax_tot9 out nocopy number,
680 p_unrep_non_tax_tot10 out nocopy number,
681 p_unrep_non_tax_tot11 out nocopy number,
682 p_unrep_non_tax_tot12 out nocopy number,
683 p_unrep_non_tax_tot13 out nocopy number,
684 p_exchange_rate1 out nocopy varchar2,
685 p_exchange_rate2 out nocopy varchar2,
686 p_exchange_rate3 out nocopy varchar2,
687 p_exchange_rate4 out nocopy varchar2,
688 p_exchange_rate5 out nocopy varchar2,
689 p_exchange_rate6 out nocopy varchar2,
690 p_exchange_rate7 out nocopy varchar2,
691 p_exchange_rate8 out nocopy varchar2,
692 p_exchange_rate9 out nocopy varchar2,
693 p_exchange_rate10 out nocopy varchar2,
694 p_exchange_rate11 out nocopy varchar2,
695 p_exchange_rate12 out nocopy varchar2,
696 p_fw_tax_break_earn1 out nocopy number,
697 p_fw_tax_break_earn2 out nocopy number,
698 p_fw_tax_break_earn3 out nocopy number,
699 p_fw_tax_break_earn4 out nocopy number,
700 p_fw_tax_break_earn5 out nocopy number,
701 p_fw_tax_break_earn6 out nocopy number,
702 p_fw_tax_break_earn7 out nocopy number,
703 p_fw_tax_break_earn8 out nocopy number,
704 p_fw_tax_break_earn9 out nocopy number,
705 p_fw_tax_break_earn10 out nocopy number,
706 p_fw_tax_break_earn11 out nocopy number,
707 p_fw_tax_break_earn12 out nocopy number,
708 p_fw_tax_break_earn13 out nocopy number
709
710 )
711 ------------------------------------------------------------------------
712 is
713 l_yea_info pay_kr_yea_pkg.t_yea_info;
714 l_month number;
715 l_dependent_spouse_count Number; -- 3546994
716 l_bal_adj_assact pay_assignment_actions.assignment_action_id%type ; -- Bug 4261844
717 l_dummy number; -- Bug 10082074
718 --
719 -- Bug 4261844: Get the balance adjustment action (sequenced) from the archival (unsequenced) assact
720 -- p_assignment_action_id...
721 cursor csr_bal_adj_assact is
722 select
723 pai.locked_action_id bal_adj_assact
724 from
725 pay_action_interlocks pai,
726 pay_assignment_actions paa,
727 pay_payroll_actions ppa
728 where
729 pai.locking_action_id = p_assignment_action_id
730 and paa.assignment_action_id = pai.locked_action_id
731 and paa.action_status = 'C'
732 and paa.payroll_action_id = ppa.payroll_action_id
733 and ppa.action_type = 'B'
734 and pay_kr_ff_functions_pkg.get_legislative_parameter(ppa.payroll_action_id, 'REPORT_TYPE', null)
735 = 'YEA' ;
736 --
737 -- Bug 4261844: ... and use it to get the monthly runs.
738 cursor csr_assact(p_bal_adj_assact pay_assignment_actions.assignment_action_id%type)
739 is
740 select
741 paa2.assignment_action_id,
742 ppa2.effective_date
743 from pay_payroll_actions ppa2,
744 pay_assignment_actions paa2,
745 pay_payroll_actions ppa,
746 pay_assignment_actions paa
747 where paa.assignment_action_id = p_bal_adj_assact
748 and ppa.payroll_action_id = paa.payroll_action_id
749 and paa2.assignment_id = paa.assignment_id
750 and paa2.action_sequence < paa.action_sequence
751 and paa2.source_action_id is null
752 and ppa2.payroll_action_id = paa2.payroll_action_id
753 and ( ppa2.action_type in ('I', 'R', 'Q', 'V') or ( ppa2.action_type ='B' and nvl(pay_core_utils.get_parameter('REPORT_TYPE',ppa2.legislative_parameters),'XYZ') <> 'YEA'))
754 and trunc(ppa2.effective_date, 'YYYY') = trunc(ppa.effective_date, 'YYYY')
755 order by paa2.action_sequence desc;
756 -- End of 4261844
757 --
758 -- Bug 1008274
759
760 cursor csr is
761 select hr_ni_chk_pkg.chk_nat_id_format(per.national_identifier, 'DDDDDD-DDDDDDD') NATIONAL_IDENTIFIER,
762 per.person_id, -- bug 6012258
763 pds.date_start,
764 pds.actual_termination_date,
765 ppa.effective_date
766 from per_people_f per,
767 per_periods_of_service pds,
768 per_assignments_f asg,
769 pay_payroll_actions ppa,
770 pay_assignment_actions paa
771 where paa.assignment_action_id = p_assignment_action_id
772 and ppa.payroll_action_id = paa.payroll_action_id
773 and asg.assignment_id = paa.assignment_id
774 and ppa.effective_date
775 between asg.effective_start_date and asg.effective_end_date
776 and pds.period_of_service_id = asg.period_of_service_id
777 and per.person_id = pds.person_id
778 and ppa.effective_date
779 between per.effective_start_date and per.effective_end_date;
780
781 l_rec csr%ROWTYPE;
782 -----------------------------------------------------------------------------------
783 -- Bug 7439803: 2008 YEA Ledger Statutory Updates
784 function get_globalvalue(p_glbvar in varchar2,p_process_date in date) return number
785 -----------------------------------------------------------------------------------
786 is
787 --
788 cursor csr_ff_global
789 is
790 select to_number(glb.global_value,'99999999999999999999.99999') -- Bug 5726158
791 from ff_globals_f glb
792 where glb.global_name = p_glbvar
793 and p_process_date between glb.effective_start_date and glb.effective_end_date;
794 --
795 l_glbvalue number default 0;
796 begin
797 Open csr_ff_global;
798 fetch csr_ff_global into l_glbvalue;
799 close csr_ff_global;
800 --
801 if l_glbvalue is null then
802 l_glbvalue := 0;
803 end if;
804 --
805 return l_glbvalue;
806 end get_globalvalue;
807 ------------------------------------------------------------------------
808 procedure payment_details(
809 p_assact in number,
810 p_date_paid in date,
811 p_effective_date in out nocopy varchar2,
812 p_taxable_mth in out nocopy number,
813 p_taxable_bon in out nocopy number,
814 p_sp_irreg_bonus in out nocopy number,
815 p_stck_pur_opt_exec_earn in out nocopy number, -- Bug 6470526
816 p_esop_with_drawn in out nocopy number, -- Bug 8880364
817 p_taxable in out nocopy number,
818 p_itax in out nocopy number,
819 p_rtax in out nocopy number,
820 p_stax in out nocopy number,
821 -- Bug 4322981
822 p_np_dedc in out nocopy number,
823 p_hi_dedc in out nocopy number,
824 p_ei_dedc in out nocopy number,
825 p_donation_dedc in out nocopy number,
826 -- End of 4322981
827 p_non_taxable_ovs in out nocopy number,
828 p_non_taxable_ovt in out nocopy number,
829 p_research_payment in out nocopy number, -- Bug 6470526
830 p_non_taxable_oth in out nocopy number,
831 p_fw_tax_break in out nocopy number, --3546994
832 p_non_taxable_ovs_frgn in out nocopy number, -- Bug 7439803
833 p_birth_raise_allow in out nocopy number, -- Bug 7439803
834 p_fw_income_exem in out nocopy number, -- Bug 7439803
835 -- start of bug 8880364
836 p_non_tax_18_earn in out nocopy number,
837 p_non_tax_19_earn in out nocopy number,
838 p_non_tax_20_earn in out nocopy number,
839 p_non_taxable in out nocopy number,
840 -- Bug 10082074
841 p_rep_non_tax_oth in out nocopy number,
842 p_spec_non_taxable in out nocopy number,
843 p_rep_non_tax_total in out nocopy number,
844 p_non_tax_H02_earn in out nocopy number,
845 p_non_tax_H03_earn in out nocopy number,
846 p_unrep_non_tax_tot in out nocopy number,
847 p_exchange_rate in out nocopy varchar2,
848 p_fw_tax_break_earn in out nocopy number)
849 is
850 -----------------------------------
851 -- Bug 3223825
852 -- Pl/sql table declaration
853 -----------------------------------
854 t_balance_batch pay_balance_pkg.t_balance_value_tab;
855
856 l_taxable_mth number;
857 l_taxable_bon number;
858 l_sp_irreg_bonus_mth number;
859 l_sp_irreg_bonus_bon number;
860 l_fw_income_exem_rate number default 0; -- Bug 7439803
861 l_other_non_earn number default 0;
862 begin
863 if p_effective_date is null then
864 p_effective_date := to_char(p_date_paid,'YYYY.MM');
865
866
867
868 ------------------------------------------
869 -- Bug 3223825
870 --populate values into plsql table
871 ------------------------------------------
872 t_balance_batch(1).defined_balance_id := g_defined_balance_id.taxable_mth;
873 t_balance_batch(2).defined_balance_id := g_defined_balance_id.taxable_bon;
874 t_balance_batch(3).defined_balance_id := g_defined_balance_id.sp_irreg_bonus_mth;
875 t_balance_batch(4).defined_balance_id := g_defined_balance_id.sp_irreg_bonus_bon;
876 t_balance_batch(5).defined_balance_id := g_defined_balance_id.itax_mth;
877 t_balance_batch(6).defined_balance_id := g_defined_balance_id.itax_bon;
878 t_balance_batch(7).defined_balance_id := g_defined_balance_id.rtax_mth;
879 t_balance_batch(8).defined_balance_id := g_defined_balance_id.rtax_bon;
880 t_balance_batch(9).defined_balance_id := g_defined_balance_id.stax_mth;
881 t_balance_batch(10).defined_balance_id := g_defined_balance_id.stax_bon;
882 t_balance_batch(11).defined_balance_id := g_defined_balance_id.non_taxable_ovs_mth;
883 t_balance_batch(12).defined_balance_id := g_defined_balance_id.non_taxable_ovs_bon;
884 t_balance_batch(13).defined_balance_id := g_defined_balance_id.non_taxable_ovt_mth;
885 t_balance_batch(14).defined_balance_id := g_defined_balance_id.non_taxable_ovt_bon;
886 t_balance_batch(15).defined_balance_id := g_defined_balance_id.non_taxable_mth;
887 t_balance_batch(16).defined_balance_id := g_defined_balance_id.non_taxable_bon;
888 t_balance_batch(17).defined_balance_id := g_defined_balance_id.fw_tax_break_mth; --3546994
889 t_balance_batch(18).defined_balance_id := g_defined_balance_id.fw_tax_break_bon; --3546994
890 -- Bug 4322981
891 t_balance_batch(19).defined_balance_id := g_defined_balance_id.np_prem_mth ;
892 t_balance_batch(20).defined_balance_id := g_defined_balance_id.np_prem_bon ;
893 t_balance_batch(21).defined_balance_id := g_defined_balance_id.hi_prem_mth ;
894 t_balance_batch(22).defined_balance_id := g_defined_balance_id.hi_prem_bon ;
895 t_balance_batch(23).defined_balance_id := g_defined_balance_id.ei_prem_mth ;
896 t_balance_batch(24).defined_balance_id := g_defined_balance_id.ei_prem_bon ;
897 t_balance_batch(25).defined_balance_id := g_defined_balance_id.donation_mth ;
898 t_balance_batch(26).defined_balance_id := g_defined_balance_id.donation_bon ;
899 -- End of 4322981
900 -- Bug 5684037
901 t_balance_batch(27).defined_balance_id := g_defined_balance_id.addl_non_tax_mth ;
902 t_balance_batch(28).defined_balance_id := g_defined_balance_id.addl_non_tax_bon ;
903 -- Bug 5999074 Rolled back changes for 5684037. Replaced with a single balance
904 -- Additional Other Non-Taxable Earnings
905 -- End of Bug 5684037
906 -- Bug 6470526: 2007 YEA Ledger Statutory Updates
907 t_balance_batch(29).defined_balance_id := g_defined_balance_id.stck_pur_opt_exec_earn_mth;
908 t_balance_batch(30).defined_balance_id := g_defined_balance_id.stck_pur_opt_exec_earn_bon;
909 t_balance_batch(31).defined_balance_id := g_defined_balance_id.research_payment_mth;
910 t_balance_batch(32).defined_balance_id := g_defined_balance_id.research_payment_bon;
911 -- End of Bug 6470526
912 -- Bug 7439803: 2008 YEA Ledger Statutory Updates
913 t_balance_batch(33).defined_balance_id := g_defined_balance_id.non_taxable_ovs_frgn_mth;
914 t_balance_batch(34).defined_balance_id := g_defined_balance_id.non_taxable_ovs_frgn_bon;
915 t_balance_batch(35).defined_balance_id := g_defined_balance_id.birth_raise_allow_mth;
916 t_balance_batch(36).defined_balance_id := g_defined_balance_id.birth_raise_allow_bon;
917 t_balance_batch(37).defined_balance_id := g_defined_balance_id.ltci_prem_mth;
918 t_balance_batch(38).defined_balance_id := g_defined_balance_id.ltci_prem_bon;
919 --End of Bug 7439803
920 -- Bug 8880364: 2009 YEA ledger Updates
921 t_balance_batch(39).defined_balance_id := g_defined_balance_id.esop_with_drawn_mth;
922 t_balance_batch(40).defined_balance_id := g_defined_balance_id.esop_with_drawn_bon;
923 t_balance_batch(41).defined_balance_id := g_defined_balance_id.rsrch_pay_ntax_H06_mth;
924 t_balance_batch(42).defined_balance_id := g_defined_balance_id.rsrch_pay_ntax_H06_bon;
925 t_balance_batch(43).defined_balance_id := g_defined_balance_id.rsrch_pay_ntax_H07_mth;
926 t_balance_batch(44).defined_balance_id := g_defined_balance_id.rsrch_pay_ntax_H07_bon;
927 t_balance_batch(45).defined_balance_id := g_defined_balance_id.rsrch_pay_ntax_H08_mth;
928 t_balance_batch(46).defined_balance_id := g_defined_balance_id.rsrch_pay_ntax_H08_bon;
929 t_balance_batch(47).defined_balance_id := g_defined_balance_id.rsrch_pay_ntax_H09_mth;
930 t_balance_batch(48).defined_balance_id := g_defined_balance_id.rsrch_pay_ntax_H09_bon;
931 t_balance_batch(49).defined_balance_id := g_defined_balance_id.rsrch_pay_ntax_H10_mth;
932 t_balance_batch(50).defined_balance_id := g_defined_balance_id.rsrch_pay_ntax_H10_bon;
933 t_balance_batch(51).defined_balance_id := g_defined_balance_id.non_tax_earn_G01_mth;
934 t_balance_batch(52).defined_balance_id := g_defined_balance_id.non_tax_earn_G01_bon;
935 t_balance_batch(53).defined_balance_id := g_defined_balance_id.non_tax_earn_H11_mth;
936 t_balance_batch(54).defined_balance_id := g_defined_balance_id.non_tax_earn_H11_bon;
937
938 t_balance_batch(55).defined_balance_id := g_defined_balance_id.non_tax_earn_H12_mth;
939 t_balance_batch(56).defined_balance_id := g_defined_balance_id.non_tax_earn_H12_bon;
940 t_balance_batch(57).defined_balance_id := g_defined_balance_id.non_tax_earn_H13_mth;
941 t_balance_batch(58).defined_balance_id := g_defined_balance_id.non_tax_earn_H13_bon;
942 t_balance_batch(59).defined_balance_id := g_defined_balance_id.non_tax_earn_H01_mth;
943 t_balance_batch(60).defined_balance_id := g_defined_balance_id.non_tax_earn_H01_bon;
944 t_balance_batch(61).defined_balance_id := g_defined_balance_id.non_tax_earn_K01_mth;
945 t_balance_batch(62).defined_balance_id := g_defined_balance_id.non_tax_earn_K01_bon;
946 t_balance_batch(63).defined_balance_id := g_defined_balance_id.non_tax_earn_S01_mth;
947 t_balance_batch(64).defined_balance_id := g_defined_balance_id.non_tax_earn_S01_bon;
948 t_balance_batch(65).defined_balance_id := g_defined_balance_id.non_tax_earn_Y01_mth;
949 t_balance_batch(66).defined_balance_id := g_defined_balance_id.non_tax_earn_Y01_bon;
950 t_balance_batch(67).defined_balance_id := g_defined_balance_id.non_tax_earn_Y02_mth;
951 t_balance_batch(68).defined_balance_id := g_defined_balance_id.non_tax_earn_Y02_bon;
952 t_balance_batch(69).defined_balance_id := g_defined_balance_id.non_tax_earn_Y03_mth;
953 t_balance_batch(70).defined_balance_id := g_defined_balance_id.non_tax_earn_Y03_bon;
954 t_balance_batch(71).defined_balance_id := g_defined_balance_id.non_tax_earn_Y20_mth;
955 t_balance_batch(72).defined_balance_id := g_defined_balance_id.non_tax_earn_Y20_bon;
956 t_balance_batch(73).defined_balance_id := g_defined_balance_id.non_tax_earn_Z01_mth;
957 t_balance_batch(74).defined_balance_id := g_defined_balance_id.non_tax_earn_Z01_bon;
958 t_balance_batch(75).defined_balance_id := g_defined_balance_id.non_tax_earn_T01_mth;
959 t_balance_batch(76).defined_balance_id := g_defined_balance_id.non_tax_earn_T01_bon;
960 t_balance_batch(77).defined_balance_id := g_defined_balance_id.non_tax_earn_H05_mth;
961 t_balance_batch(78).defined_balance_id := g_defined_balance_id.non_tax_earn_H05_bon;
962 t_balance_batch(79).defined_balance_id := g_defined_balance_id.non_tax_earn_I01_mth;
963 t_balance_batch(80).defined_balance_id := g_defined_balance_id.non_tax_earn_I01_bon;
964 t_balance_batch(81).defined_balance_id := g_defined_balance_id.non_tax_earn_M01_mth;
965 t_balance_batch(82).defined_balance_id := g_defined_balance_id.non_tax_earn_M01_bon;
966 t_balance_batch(83).defined_balance_id := g_defined_balance_id.non_tax_earn_M02_mth;
967 t_balance_batch(84).defined_balance_id := g_defined_balance_id.non_tax_earn_M02_bon;
968 t_balance_batch(85).defined_balance_id := g_defined_balance_id.non_tax_earn_M03_mth;
969 t_balance_batch(86).defined_balance_id := g_defined_balance_id.non_tax_earn_M03_bon;
970 t_balance_batch(87).defined_balance_id := g_defined_balance_id.non_tax_earn_frgn_M01_mth;
971 t_balance_batch(88).defined_balance_id := g_defined_balance_id.non_tax_earn_frgn_M01_bon;
972 t_balance_batch(89).defined_balance_id := g_defined_balance_id.non_tax_earn_frgn_M02_mth;
973 t_balance_batch(90).defined_balance_id := g_defined_balance_id.non_tax_earn_frgn_M02_bon;
974 t_balance_batch(91).defined_balance_id := g_defined_balance_id.non_tax_earn_frgn_M03_mth;
975 t_balance_batch(92).defined_balance_id := g_defined_balance_id.non_tax_earn_frgn_M03_bon;
976 -- Bug 10082074
977 t_balance_batch(93).defined_balance_id := g_defined_balance_id.nts_spec_non_taxable_mth;
978 t_balance_batch(94).defined_balance_id := g_defined_balance_id.nts_spec_non_taxable_bon;
979 t_balance_batch(95).defined_balance_id := g_defined_balance_id.non_tax_earn_H02_mth;
980 t_balance_batch(96).defined_balance_id := g_defined_balance_id.non_tax_earn_H02_bon;
981 t_balance_batch(97).defined_balance_id := g_defined_balance_id.non_tax_earn_H03_mth;
982 t_balance_batch(98).defined_balance_id := g_defined_balance_id.non_tax_earn_H03_bon;
983 t_balance_batch(99).defined_balance_id := g_defined_balance_id.fw_tax_break_earning_mth;
984 t_balance_batch(100).defined_balance_id := g_defined_balance_id.fw_tax_break_earning_bon;
985 t_balance_batch(101).defined_balance_id := g_defined_balance_id.non_tax_earn_H14_mth;
986 t_balance_batch(102).defined_balance_id := g_defined_balance_id.non_tax_earn_H14_mth;
987 t_balance_batch(103).defined_balance_id := g_defined_balance_id.non_tax_earn_H15_mth;
988 t_balance_batch(104).defined_balance_id := g_defined_balance_id.non_tax_earn_H15_mth;
989 t_balance_batch(105).defined_balance_id := g_defined_balance_id.non_tax_earn_R10_mth;
990 t_balance_batch(106).defined_balance_id := g_defined_balance_id.non_tax_earn_R10_mth;
991 t_balance_batch(107).defined_balance_id := g_defined_balance_id.non_tax_earn_Y21_mth;
992 t_balance_batch(108).defined_balance_id := g_defined_balance_id.non_tax_earn_Y21_mth;
993
994 ----------------------------------------------
995 --Bug 3223825
996 --batch get_value call
997 ----------------------------------------------
998 pay_balance_pkg.get_value(p_assact,t_balance_batch,FALSE,FALSE);
999 --
1000 l_fw_income_exem_rate := get_globalvalue('KR_FOREIGN_WORKER_INCOME_EXEM_RATE',p_date_paid); -- Bug 7439803
1001 --
1002 l_taxable_mth := t_balance_batch(1).balance_value;
1003 l_taxable_bon := t_balance_batch(2).balance_value;
1004 l_sp_irreg_bonus_mth := t_balance_batch(3).balance_value;
1005 l_sp_irreg_bonus_bon := t_balance_batch(4).balance_value;
1006 p_taxable_mth := l_taxable_mth - l_sp_irreg_bonus_mth;
1007 p_taxable_bon := l_taxable_bon - l_sp_irreg_bonus_bon;
1008 p_sp_irreg_bonus := l_sp_irreg_bonus_mth + l_sp_irreg_bonus_bon;
1009 --
1010 -- Bug 6470526: 2007 YEA Ledger Statutory Updates
1011 p_stck_pur_opt_exec_earn := t_balance_batch(29).balance_value
1012 + t_balance_batch(30).balance_value;
1013
1014 if to_number(to_char(p_date_paid,'YYYY')) < 2009 then
1015 p_research_payment := t_balance_batch(31).balance_value
1016 + t_balance_batch(32).balance_value;
1017 else
1018 p_research_payment := t_balance_batch(41).balance_value
1019 + t_balance_batch(42).balance_value
1020 + t_balance_batch(43).balance_value
1021 + t_balance_batch(44).balance_value
1022 + t_balance_batch(45).balance_value
1023 + t_balance_batch(46).balance_value
1024 + t_balance_batch(47).balance_value
1025 + t_balance_batch(48).balance_value
1026 + t_balance_batch(49).balance_value
1027 + t_balance_batch(50).balance_value;
1028 end if;
1029 p_esop_with_drawn := t_balance_batch(39).balance_value
1030 + t_balance_batch(40).balance_value;
1031 p_taxable := p_taxable_mth
1032 + p_taxable_bon
1033 + p_sp_irreg_bonus
1034 + p_stck_pur_opt_exec_earn
1035 + p_esop_with_drawn; -- Bug 9280894
1036 -- End of Bug 6470526
1037 --
1038 p_itax := t_balance_batch(5).balance_value
1039 + t_balance_batch(6).balance_value;
1040 p_rtax := t_balance_batch(7).balance_value
1041 + t_balance_batch(8).balance_value;
1042 p_stax := t_balance_batch(9).balance_value
1043 + t_balance_batch(10).balance_value;
1044 p_non_taxable_ovt := t_balance_batch(13).balance_value
1045 + t_balance_batch(14).balance_value;
1046
1047 p_non_taxable_ovs := t_balance_batch(81).balance_value
1048 + t_balance_batch(82).balance_value
1049 + t_balance_batch(83).balance_value
1050 + t_balance_batch(84).balance_value
1051 + t_balance_batch(85).balance_value
1052 + t_balance_batch(86).balance_value;
1053 p_non_taxable_ovs_frgn := t_balance_batch(87).balance_value
1054 + t_balance_batch(88).balance_value
1055 + t_balance_batch(89).balance_value
1056 + t_balance_batch(90).balance_value
1057 + t_balance_batch(91).balance_value
1058 + t_balance_batch(92).balance_value;
1059 -- Bug 10082074
1060
1061 if p_non_taxable_ovs_frgn > 0 then
1062
1063 p_exchange_rate := to_char(trunc(p_non_taxable_ovs/p_non_taxable_ovs_frgn,2),'999999.99');
1064 else
1065 p_exchange_rate := 0;
1066 end if;
1067 --
1068 p_birth_raise_allow := t_balance_batch(35).balance_value
1069 + t_balance_batch(36).balance_value; -- Bug 7439803
1070 -- Bug 7595082
1071 -- Bug 8880364
1072 p_non_tax_18_earn := t_balance_batch(51).balance_value
1073 + t_balance_batch(52).balance_value;
1074 p_non_tax_19_earn := t_balance_batch(53).balance_value
1075 + t_balance_batch(54).balance_value;
1076 p_non_tax_20_earn := t_balance_batch(55).balance_value
1077 + t_balance_batch(56).balance_value
1078 + t_balance_batch(57).balance_value
1079 + t_balance_batch(58).balance_value
1080 + t_balance_batch(59).balance_value
1081 + t_balance_batch(60).balance_value
1082 + t_balance_batch(61).balance_value
1083 + t_balance_batch(62).balance_value
1084 + t_balance_batch(63).balance_value
1085 + t_balance_batch(64).balance_value
1086 + t_balance_batch(65).balance_value
1087 + t_balance_batch(66).balance_value
1088 + t_balance_batch(67).balance_value
1089 + t_balance_batch(68).balance_value
1090 + t_balance_batch(69).balance_value
1091 + t_balance_batch(70).balance_value
1092 + t_balance_batch(71).balance_value
1093 + t_balance_batch(72).balance_value
1094 + t_balance_batch(73).balance_value
1095 + t_balance_batch(74).balance_value
1096 + t_balance_batch(75).balance_value
1097 + t_balance_batch(76).balance_value
1098 + t_balance_batch(77).balance_value
1099 + t_balance_batch(78).balance_value
1100 + t_balance_batch(79).balance_value
1101 + t_balance_batch(80).balance_value;
1102
1103 l_other_non_earn := t_balance_batch(101).balance_value
1104 + t_balance_batch(102).balance_value
1105 + t_balance_batch(103).balance_value
1106 + t_balance_batch(104).balance_value
1107 + t_balance_batch(105).balance_value
1108 + t_balance_batch(106).balance_value
1109 + t_balance_batch(107).balance_value
1110 + t_balance_batch(108).balance_value ;
1111
1112
1113 -- End of bug 8880364
1114 -- Bug 10082074
1115 p_spec_non_taxable := t_balance_batch(93).balance_value +
1116 t_balance_batch(94).balance_value;
1117
1118 if p_nationality ='F' and p_fw_fixed_tax_rate <> 'Y' then
1119 p_fw_income_exem := greatest(trunc
1120 (p_taxable * l_fw_income_exem_rate),0); -- Bug 7439803
1121 else
1122 p_fw_income_exem := 0;
1123 end if;
1124 --
1125 -- Bug 10082074
1126 p_non_tax_H02_earn := t_balance_batch(95).balance_value +
1127 t_balance_batch(96).balance_value;
1128 p_non_tax_H03_earn := t_balance_batch(97).balance_value +
1129 t_balance_batch(98).balance_value;
1130
1131 p_non_taxable_oth := t_balance_batch(27).balance_value -- Bug 9079478
1132 + t_balance_batch(28).balance_value
1133 - p_non_tax_H02_earn
1134 - p_non_tax_H03_earn;
1135
1136 p_non_taxable := p_non_taxable_ovs
1137 + p_non_taxable_ovt
1138 + p_birth_raise_allow
1139 + p_non_tax_18_earn
1140 + p_non_tax_19_earn
1141 + p_non_tax_20_earn
1142 + p_research_payment
1143 + p_fw_income_exem
1144 + l_other_non_earn ; /* Bug#16247429*/
1145
1146 p_rep_non_tax_oth := p_non_taxable
1147 - p_non_taxable_ovs
1148 - p_non_taxable_ovt
1149 - p_birth_raise_allow;
1150
1151 p_unrep_non_tax_tot := t_balance_batch(27).balance_value
1152 + t_balance_batch(28).balance_value;
1153
1154 p_rep_non_tax_total := p_non_taxable + p_spec_non_taxable;
1155
1156 p_fw_tax_break := t_balance_batch(17).balance_value --3546994
1157 + t_balance_batch(18).balance_value; --3546994
1158 if p_fw_tax_break >0 then
1159
1160 p_fw_tax_break_earn := t_balance_batch(99).balance_value --3546994
1161 + t_balance_batch(100).balance_value;
1162 else
1163 p_fw_tax_break_earn := 0;
1164
1165 end if;
1166 -- Bug 4322981
1167 p_np_dedc := t_balance_batch(19).balance_value
1168 + t_balance_batch(20).balance_value ;
1169 p_hi_dedc := t_balance_batch(21).balance_value
1170 + t_balance_batch(22).balance_value
1171 + t_balance_batch(37).balance_value
1172 + t_balance_batch(38).balance_value ; -- Bug 7439803
1173 p_ei_dedc := t_balance_batch(23).balance_value
1174 + t_balance_batch(24).balance_value ;
1175 p_donation_dedc := t_balance_batch(25).balance_value
1176 + t_balance_batch(26).balance_value ;
1177 -- End of 4322981
1178 --
1179 -- Index 13th indicates total amount
1180 -- If no assacts are detected, total is also "NULL" value.
1181 --
1182 p_taxable_mth13 := nvl(p_taxable_mth13, 0) + p_taxable_mth;
1183 p_taxable_bon13 := nvl(p_taxable_bon13, 0) + p_taxable_bon;
1184 p_sp_irreg_bonus13 := nvl(p_sp_irreg_bonus13, 0) + p_sp_irreg_bonus;
1185 p_taxable13 := nvl(p_taxable13, 0) + p_taxable;
1186 p_itax13 := nvl(p_itax13, 0) + p_itax;
1187 p_rtax13 := nvl(p_rtax13, 0) + p_rtax;
1188 p_stax13 := nvl(p_stax13, 0) + p_stax;
1189 p_non_taxable_ovs13 := nvl(p_non_taxable_ovs13, 0) + p_non_taxable_ovs;
1190 p_non_taxable_ovt13 := nvl(p_non_taxable_ovt13, 0) + p_non_taxable_ovt;
1191 p_non_taxable_ovs_frgn13 := nvl(p_non_taxable_ovs_frgn13, 0) + p_non_taxable_ovs_frgn; -- Bug 7439803
1192 p_birth_raising_allow13 := nvl(p_birth_raising_allow13, 0) + p_birth_raise_allow; -- Bug 7439803
1193 p_fw_income_exem13 := nvl(p_fw_income_exem13, 0) + p_fw_income_exem; -- Bug 7439803
1194 p_fw_tax_break13 := nvl(p_fw_tax_break13, 0) + p_fw_tax_break; -- Bug 7439803
1195 p_non_taxable_oth13 := nvl(p_non_taxable_oth13, 0) + p_non_taxable_oth;
1196 -- Bug 4322981
1197 p_np_dedc13 := nvl(p_np_dedc13, 0) + p_np_dedc ;
1198 p_hi_dedc13 := nvl(p_hi_dedc13, 0) + p_hi_dedc ;
1199 p_ei_dedc13 := nvl(p_ei_dedc13, 0) + p_ei_dedc ;
1200 p_donation_dedc13 := nvl(p_donation_dedc13, 0) + p_donation_dedc ;
1201 -- End of 4322981
1202 --
1203 -- Bug 6470526: 2007 YEA Ledger Statutory Updates
1204 p_stck_pur_opt_exec_earn13 := nvl(p_stck_pur_opt_exec_earn13, 0) + p_stck_pur_opt_exec_earn ;
1205 p_research_payment13 := nvl(p_research_payment13, 0) + p_research_payment ;
1206 -- End of Bug 6470526
1207 -- Bug 8880364
1208 p_esop_with_drawn13 := nvl(p_esop_with_drawn13,0) + p_esop_with_drawn ;
1209 p_non_tax_18_earn13 := nvl(p_non_tax_18_earn13,0) + p_non_tax_18_earn;
1210 p_non_tax_19_earn13 := nvl(p_non_tax_19_earn13,0) + p_non_tax_19_earn;
1211 p_non_tax_20_earn13 := nvl(p_non_tax_20_earn13,0) + p_non_tax_20_earn;
1212 p_non_taxable13 := nvl(p_non_taxable13, 0) + p_non_taxable;
1213 -- Bug 10082074
1214 p_rep_non_tax_oth13 := nvl(p_rep_non_tax_oth13,0) + p_rep_non_tax_oth;
1215 p_spec_non_taxable13 := nvl(p_spec_non_taxable13,0) + p_spec_non_taxable;
1216 p_rep_non_tax_total13 := nvl(p_rep_non_tax_total13,0) + p_rep_non_tax_total;
1217 p_non_tax_H02_earn13 := nvl(p_non_tax_H02_earn13,0) + p_non_tax_H02_earn;
1218 p_non_tax_H03_earn13 := nvl(p_non_tax_H03_earn13,0) + p_non_tax_H03_earn;
1219 p_unrep_non_tax_tot13 := nvl(p_unrep_non_tax_tot13,0) + p_unrep_non_tax_tot;
1220 p_fw_tax_break_earn13 := nvl(p_fw_tax_break_earn13,0) + nvl(p_fw_tax_break_earn,0);
1221
1222 end if;
1223 end payment_details;
1224
1225
1226 begin
1227 --
1228 -- Derive YEA result
1229 --
1230 l_yea_info := pay_kr_yea_pkg.yea_info(p_assignment_action_id);
1231 --
1232 -- Taxable Earnings
1233 --
1234 p_taxable := l_yea_info.taxable;
1235 --Bug 7595082
1236 p_nationality := l_yea_info.nationality;
1237 p_fw_fixed_tax_rate := l_yea_info.fixed_tax_rate;
1238 --
1239 --
1240 -- Basic Income Exemption
1241 --
1242 p_basic_income_exem := l_yea_info.basic_income_exem;
1243 p_taxable_income := l_yea_info.taxable_income;
1244 --
1245 -- Basic Tax Exemption
1246 --
1247 p_ee_tax_exem := l_yea_info.ee_tax_exem;
1248 p_dpnt_spouse_flag := l_yea_info.dpnt_spouse_flag;
1249 p_dpnt_spouse_tax_exem := l_yea_info.dpnt_spouse_tax_exem;
1250 p_num_of_underaged_dpnts := l_yea_info.num_of_underaged_dpnts;
1251 p_num_of_aged_dpnts := l_yea_info.num_of_adult_dpnts + l_yea_info.num_of_aged_dpnts;
1252 p_dpnt_tax_exem := l_yea_info.dpnt_tax_exem;
1253 --
1254 -- Additional Tax Exemption
1255 --
1256 p_num_of_ageds := l_yea_info.num_of_ageds;
1257 p_aged_tax_exem := l_yea_info.aged_tax_exem;
1258 p_num_of_disableds := l_yea_info.num_of_disableds;
1259 p_disabled_tax_exem := l_yea_info.disabled_tax_exem;
1260 p_female_ee_flag := l_yea_info.female_ee_flag;
1261 p_female_ee_tax_exem := l_yea_info.female_ee_tax_exem;
1262 p_num_of_children := l_yea_info.num_of_children;
1263 p_child_tax_exem := l_yea_info.child_tax_exem;
1264 p_supp_tax_exem := l_yea_info.supp_tax_exem;
1265 --
1266 -- Special Tax Exemption
1267 --
1268 p_hi_prem := l_yea_info.hi_prem;
1269 p_ei_prem := l_yea_info.ei_prem;
1270 p_pers_ins_name := l_yea_info.pers_ins_name;
1271 p_pers_ins_prem := l_yea_info.pers_ins_prem;
1272 p_disabled_ins_prem := l_yea_info.disabled_ins_prem;
1273 p_ins_prem_tax_exem := l_yea_info.ins_prem_tax_exem;
1274 --
1275 p_med_exp := l_yea_info.med_exp;
1276 p_med_exp_aged := l_yea_info.med_exp_aged;
1277 p_med_exp_disabled := l_yea_info.med_exp_disabled;
1278 p_max_med_exp_tax_exem := l_yea_info.max_med_exp_tax_exem;
1279 p_med_exp_tax_exem := l_yea_info.med_exp_tax_exem;
1280 --
1281 p_ee_educ_exp := l_yea_info.ee_educ_exp;
1282 p_spouse_educ_exp := l_yea_info.spouse_educ_exp;
1283 p_disabled_educ_exp := l_yea_info.disabled_educ_exp;
1284 p_dpnt_educ_exp := l_yea_info.dpnt_educ_exp;
1285 p_educ_exp_tax_exem := l_yea_info.educ_exp_tax_exem;
1286 --
1287 p_housing_saving_type_meaning := hr_general.decode_lookup('KR_HOUSING_SAVING_TYPE', l_yea_info.housing_saving_type);
1288 p_housing_saving := l_yea_info.housing_saving;
1289 p_housing_purchase_date := l_yea_info.housing_purchase_date;
1290 p_housing_loan_date := l_yea_info.housing_loan_date;
1291 p_housing_loan_repay := l_yea_info.housing_loan_repay;
1292 p_lt_housing_loan_date := l_yea_info.lt_housing_loan_date;
1293 p_lt_housing_loan_int_repay := l_yea_info.lt_housing_loan_interest_repay;
1294 p_max_housing_exp_tax_exem := l_yea_info.max_housing_exp_tax_exem;
1295 p_housing_exp_tax_exem := l_yea_info.housing_exp_tax_exem;
1296 --
1297 -- source modified for Bug2821759
1298 p_donation1_tax_exem := l_yea_info.donation1 + l_yea_info.political_donation1 + l_yea_info.political_donation2 + l_yea_info.political_donation3;
1299 p_donation2 := l_yea_info.donation2 + l_yea_info.donation3;
1300 p_max_donation2_tax_exem := l_yea_info.max_donation2_tax_exem + l_yea_info.max_donation3_tax_exem;
1301 p_donation2_tax_exem := l_yea_info.donation2_tax_exem + l_yea_info.donation3_tax_exem;
1302 p_donation_tax_exem := l_yea_info.donation_tax_exem;
1303 --
1304 p_sp_tax_exem := l_yea_info.sp_tax_exem;
1305 p_std_sp_tax_exem := l_yea_info.std_sp_tax_exem;
1306 --
1307 -- National Pension Premium Tax Exemption
1308 --
1309 p_np_prem := l_yea_info.np_prem;
1310 p_np_prem_tax_exem := l_yea_info.np_prem_tax_exem;
1311 --
1312 -- Other Tax Exemptions
1313 -- source modified for Bug2821759
1314 p_pers_pension_prem_tax := l_yea_info.pers_pension_prem;
1315 p_pers_pension_saving_tax := l_yea_info.pers_pension_saving;
1316 p_invest_partner_fin_tax := l_yea_info.invest_partner_fin1 + l_yea_info.invest_partner_fin2;
1317 p_credit_card_exp_tax := l_yea_info.credit_card_exp;
1318 p_emp_st_own_plan_cont := l_yea_info.emp_stk_own_contri;
1319
1320 p_pers_pension_prem_tax_exem := l_yea_info.pers_pension_prem_tax_exem;
1321 p_pers_pension_saving_tax_exem := l_yea_info.pers_pension_saving_tax_exem;
1322 p_invest_partner_fin_tax_exem := l_yea_info.invest_partner_fin_tax_exem;
1323 p_credit_card_exp_tax_exem := l_yea_info.credit_card_exp_tax_exem;
1324 p_emp_st_own_plan_cont_exem := l_yea_info.emp_stk_own_contri_tax_exem;
1325 --
1326 -- Calculated Tax
1327 --
1328 p_taxation_base := l_yea_info.taxation_base;
1329 p_calc_tax := l_yea_info.calc_tax;
1330 --
1331 -- Tax Breaks
1332 --
1333 p_basic_tax_break := l_yea_info.basic_tax_break;
1334 p_housing_exp_tax_break := l_yea_info.housing_exp_tax_break;
1335 p_stock_saving_tax_break := l_yea_info.stock_saving_tax_break;
1336 --
1337 if l_yea_info.ovstb_tax_paid_date is not null then
1338 p_ovstb_territory_short_name := hr_general.decode_territory(l_yea_info.ovstb_territory_code);
1339 p_ovstb_tax_paid_date := l_yea_info.ovstb_tax_paid_date;
1340 p_ovstb_tax_foreign_currency := l_yea_info.ovstb_tax_foreign_currency;
1341 p_ovstb_tax := l_yea_info.ovstb_tax;
1342 p_ovstb_application_date := l_yea_info.ovstb_application_date;
1343 p_ovstb_submission_date := l_yea_info.ovstb_submission_date;
1344 end if;
1345 p_ovs_tax_break := l_yea_info.ovs_tax_break;
1346 --
1347 p_lt_stock_saving_tax_break := l_yea_info.lt_stock_saving_tax_break;
1348 p_total_tax_break := l_yea_info.total_tax_break;
1349 --
1350 -- Foreign Worker Tax Break
1351 --
1352 if l_yea_info.fwtb_immigration_purpose is not null then
1353 p_fwtb_immigration_purpose := l_yea_info.fwtb_immigration_purpose;
1354 p_fwtb_contract_date := l_yea_info.fwtb_contract_date;
1355 p_fwtb_expiry_date := l_yea_info.fwtb_expiry_date;
1356 p_fwtb_application_date := l_yea_info.fwtb_application_date;
1357 p_fwtb_submission_date := l_yea_info.fwtb_submission_date;
1358 end if;
1359 p_foreign_worker_tax_break1 := l_yea_info.foreign_worker_tax_break1;
1360 p_foreign_worker_tax_break2 := l_yea_info.foreign_worker_tax_break2;
1361 -- Bug 10082074
1362 p_foreign_worker_tax_break := l_yea_info.foreign_worker_tax_break;
1363 p_non_taxable_ovs_M01 := l_yea_info.cur_ntax_frgn_M01;
1364 p_non_taxable_ovs_M02 := l_yea_info.cur_ntax_frgn_M02;
1365 p_non_taxable_ovs_M03 := l_yea_info.cur_ntax_frgn_M03;
1366 l_dummy := 0;
1367
1368 p_non_taxable_ovs_code := null;
1369 if p_non_taxable_ovs_M01 >0 then
1370 p_non_taxable_ovs_code := 'M01';
1371 l_dummy := l_dummy +1;
1372 end if;
1373 if p_non_taxable_ovs_M02 > 0 then
1374 if l_dummy > 0 then
1375 p_non_taxable_ovs_code := p_non_taxable_ovs_code||',M02';
1376 l_dummy := l_dummy +1;
1377 else
1378 p_non_taxable_ovs_code := 'M02';
1379 l_dummy := l_dummy +1;
1380 end if;
1381 end if;
1382 if p_non_taxable_ovs_M03 > 0 then
1383 if l_dummy > 0 then
1384 p_non_taxable_ovs_code := p_non_taxable_ovs_code||',M03';
1385 else
1386 p_non_taxable_ovs_code := 'M03';
1387 end if;
1388 end if;
1389
1390 --
1391 -- Tax
1392 -- Rtax calculation included for bug 2577751
1393 --
1394 p_annual_itax := l_yea_info.annual_itax;
1395 p_annual_rtax := l_yea_info.annual_rtax;
1396 p_annual_stax := l_yea_info.annual_stax;
1397 p_prev_itax := l_yea_info.prev_itax;
1398 p_prev_rtax := l_yea_info.prev_rtax;
1399 p_prev_stax := l_yea_info.prev_stax;
1400 p_cur_annual_itax := p_annual_itax - p_prev_itax;
1401 p_cur_annual_rtax := p_annual_rtax - p_prev_rtax;
1402 p_cur_annual_stax := p_annual_stax - p_prev_stax;
1403 p_cur_itax := l_yea_info.cur_itax;
1404 p_cur_rtax := l_yea_info.cur_rtax;
1405 p_cur_stax := l_yea_info.cur_stax;
1406 if l_yea_info.itax_adj >= 0 then
1407 p_itax_adj := l_yea_info.itax_adj;
1408 p_itax_refund := 0;
1409 else
1410 p_itax_adj := 0;
1411 p_itax_refund := abs(l_yea_info.itax_adj);
1412 end if;
1413 --
1414 -- rtax calculation included for bug 2577751
1415 --
1416 if l_yea_info.rtax_adj >= 0 then
1417 p_rtax_adj := l_yea_info.rtax_adj;
1418 p_rtax_refund := 0;
1419 else
1420 p_rtax_adj := 0;
1421 p_rtax_refund := abs(l_yea_info.rtax_adj);
1422 end if;
1423 if l_yea_info.stax_adj >= 0 then
1424 p_stax_adj := l_yea_info.stax_adj;
1425 p_stax_refund := 0;
1426 else
1427 p_stax_adj := 0;
1428 p_stax_refund := abs(l_yea_info.stax_adj);
1429 end if;
1430 --
1431 -- Derive annual payment details
1432 --
1433 /* Calculate total no of dependents including spouse
1434 and the employee himself - Bug No: 3546994 */
1435 if nvl(l_yea_info.dpnt_spouse_flag,'N') = 'Y' then
1436 l_dependent_spouse_count := 1;
1437 else
1438 l_dependent_spouse_count := 0;
1439 end if;
1440 p_dependent_count := l_yea_info.num_of_underaged_dpnts
1441 + l_yea_info.num_of_adult_dpnts
1442 + l_yea_info.num_of_aged_dpnts
1443 + l_dependent_spouse_count -- include spouse
1444 + 1; -- include employee
1445 -- 3546994
1446 -- Bug 4261844: Get the balance adjustment action
1447 open csr_bal_adj_assact ;
1448 fetch csr_bal_adj_assact into l_bal_adj_assact ;
1449 close csr_bal_adj_assact ;
1450
1451 -- Bug 10082074
1452 open csr;
1453 fetch csr into l_rec;
1454 close csr;
1455 p_emp_hire_date := l_rec.date_start;
1456 p_emp_leaving_date := l_rec.actual_termination_date;
1457 --
1458 hr_utility.trace('p_emp_hire_date'||to_char(p_emp_hire_date));
1459 hr_utility.trace('p_emp_leaving_date'||to_char(p_emp_leaving_date));
1460 if l_bal_adj_assact is null then
1461 l_bal_adj_assact := p_assignment_action_id ;
1462 end if ;
1463
1464 for l_rec in csr_assact(l_bal_adj_assact) loop
1465 l_month := to_number(to_char(l_rec.effective_date, 'MM'));
1466 if l_month = 1 then
1467 payment_details(
1468 p_assact => l_rec.assignment_action_id,
1469 p_date_paid => l_rec.effective_date,
1470 p_effective_date => p_effective_date1,
1471 p_taxable_mth => p_taxable_mth1,
1472 p_taxable_bon => p_taxable_bon1,
1473 p_sp_irreg_bonus => p_sp_irreg_bonus1,
1474 p_stck_pur_opt_exec_earn => p_stck_pur_opt_exec_earn1, -- Bug 6470526
1475 p_esop_with_drawn => p_esop_with_drawn1, -- Bug 8880364
1476 p_taxable => p_taxable1,
1477 p_itax => p_itax1,
1478 p_rtax => p_rtax1,
1479 p_stax => p_stax1,
1480 -- Bug 4322981
1481 p_np_dedc => p_np_dedc1,
1482 p_hi_dedc => p_hi_dedc1,
1483 p_ei_dedc => p_ei_dedc1,
1484 p_donation_dedc => p_donation_dedc1,
1485 -- End of 4322981
1486 p_non_taxable_ovs => p_non_taxable_ovs1,
1487 p_non_taxable_ovt => p_non_taxable_ovt1,
1488 p_research_payment => p_research_payment1, -- Bug 6470526
1489 p_non_taxable_oth => p_non_taxable_oth1,
1490 p_fw_tax_break => p_fw_tax_break1, -- 3546994
1491 p_non_taxable_ovs_frgn => p_non_taxable_ovs_frgn1, -- Bug 7439803
1492 p_birth_raise_allow => p_birth_raising_allow1, -- Bug 7439803
1493 p_fw_income_exem => p_fw_income_exem1, -- Bug 7439803
1494 p_non_tax_18_earn => p_non_tax_18_earn1,
1495 p_non_tax_19_earn => p_non_tax_19_earn1,
1496 p_non_tax_20_earn => p_non_tax_20_earn1,
1497 p_non_taxable => p_non_taxable1,
1498 p_rep_non_tax_oth => p_rep_non_tax_oth1,
1499 p_spec_non_taxable => p_spec_non_taxable1,
1500 p_rep_non_tax_total => p_rep_non_tax_total1,
1501 p_non_tax_H02_earn => p_non_tax_H02_earn1,
1502 p_non_tax_H03_earn => p_non_tax_H03_earn1,
1503 p_unrep_non_tax_tot => p_unrep_non_tax_tot1,
1504 p_exchange_rate => p_exchange_rate1,
1505 p_fw_tax_break_earn => p_fw_tax_break_earn1);
1506 elsif l_month = 2 then
1507 payment_details(
1508 p_assact => l_rec.assignment_action_id,
1509 p_date_paid => l_rec.effective_date,
1510 p_effective_date => p_effective_date2,
1511 p_taxable_mth => p_taxable_mth2,
1512 p_taxable_bon => p_taxable_bon2,
1513 p_sp_irreg_bonus => p_sp_irreg_bonus2,
1514 p_esop_with_drawn => p_esop_with_drawn2, -- Bug 8880364
1515 p_stck_pur_opt_exec_earn => p_stck_pur_opt_exec_earn2, -- Bug 6470526
1516 p_taxable => p_taxable2,
1517 p_itax => p_itax2,
1518 p_rtax => p_rtax2,
1519 p_stax => p_stax2,
1520 -- Bug 4322981
1521 p_np_dedc => p_np_dedc2,
1522 p_hi_dedc => p_hi_dedc2,
1523 p_ei_dedc => p_ei_dedc2,
1524 p_donation_dedc => p_donation_dedc2,
1525 -- End of 4322981
1526 p_non_taxable_ovs => p_non_taxable_ovs2,
1527 p_non_taxable_ovt => p_non_taxable_ovt2,
1528 p_research_payment => p_research_payment2, -- Bug 6470526
1529 p_non_taxable_oth => p_non_taxable_oth2,
1530 p_fw_tax_break => p_fw_tax_break2, -- 3546994
1531 p_non_taxable_ovs_frgn => p_non_taxable_ovs_frgn2, -- Bug 7439803
1532 p_birth_raise_allow => p_birth_raising_allow2, -- Bug 7439803
1533 p_fw_income_exem => p_fw_income_exem2, -- Bug 7439803
1534 p_non_tax_18_earn => p_non_tax_18_earn2,
1535 p_non_tax_19_earn => p_non_tax_19_earn2,
1536 p_non_tax_20_earn => p_non_tax_20_earn2,
1537 p_non_taxable => p_non_taxable2,
1538 p_rep_non_tax_oth => p_rep_non_tax_oth2,
1539 p_spec_non_taxable => p_spec_non_taxable2,
1540 p_rep_non_tax_total => p_rep_non_tax_total2,
1541 p_non_tax_H02_earn => p_non_tax_H02_earn2,
1542 p_non_tax_H03_earn => p_non_tax_H03_earn2,
1543 p_unrep_non_tax_tot => p_unrep_non_tax_tot2,
1544 p_exchange_rate => p_exchange_rate2,
1545 p_fw_tax_break_earn => p_fw_tax_break_earn2);
1546 elsif l_month = 3 then
1547 payment_details(
1548 p_assact => l_rec.assignment_action_id,
1549 p_date_paid => l_rec.effective_date,
1550 p_effective_date => p_effective_date3,
1551 p_taxable_mth => p_taxable_mth3,
1552 p_taxable_bon => p_taxable_bon3,
1553 p_sp_irreg_bonus => p_sp_irreg_bonus3,
1554 p_stck_pur_opt_exec_earn => p_stck_pur_opt_exec_earn3, -- Bug 6470526
1555 p_esop_with_drawn => p_esop_with_drawn3, -- Bug 8880364
1556 p_taxable => p_taxable3,
1557 p_itax => p_itax3,
1558 p_rtax => p_rtax3,
1559 p_stax => p_stax3,
1560 -- Bug 4322981
1561 p_np_dedc => p_np_dedc3,
1562 p_hi_dedc => p_hi_dedc3,
1563 p_ei_dedc => p_ei_dedc3,
1564 p_donation_dedc => p_donation_dedc3,
1565 -- End of 4322981
1566 p_non_taxable_ovs => p_non_taxable_ovs3,
1567 p_non_taxable_ovt => p_non_taxable_ovt3,
1568 p_research_payment => p_research_payment3, -- Bug 6470526
1569 p_non_taxable_oth => p_non_taxable_oth3,
1570 p_fw_tax_break => p_fw_tax_break3, -- 3546994
1571 p_non_taxable_ovs_frgn => p_non_taxable_ovs_frgn3, -- Bug 7439803
1572 p_birth_raise_allow => p_birth_raising_allow3, -- Bug 7439803
1573 p_fw_income_exem => p_fw_income_exem3, -- Bug 7439803
1574 p_non_tax_18_earn => p_non_tax_18_earn3,
1575 p_non_tax_19_earn => p_non_tax_19_earn3,
1576 p_non_tax_20_earn => p_non_tax_20_earn3,
1577 p_non_taxable => p_non_taxable3,
1578 p_rep_non_tax_oth => p_rep_non_tax_oth3,
1579 p_spec_non_taxable => p_spec_non_taxable3,
1580 p_rep_non_tax_total => p_rep_non_tax_total3,
1581 p_non_tax_H02_earn => p_non_tax_H02_earn3,
1582 p_non_tax_H03_earn => p_non_tax_H03_earn3,
1583 p_unrep_non_tax_tot => p_unrep_non_tax_tot3,
1584 p_exchange_rate => p_exchange_rate3,
1585 p_fw_tax_break_earn => p_fw_tax_break_earn3);
1586 elsif l_month = 4 then
1587 payment_details(
1588 p_assact => l_rec.assignment_action_id,
1589 p_date_paid => l_rec.effective_date,
1590 p_effective_date => p_effective_date4,
1591 p_taxable_mth => p_taxable_mth4,
1592 p_taxable_bon => p_taxable_bon4,
1593 p_sp_irreg_bonus => p_sp_irreg_bonus4,
1594 p_stck_pur_opt_exec_earn => p_stck_pur_opt_exec_earn4, -- Bug 6470526
1595 p_esop_with_drawn => p_esop_with_drawn4, -- Bug 8880364
1596 p_taxable => p_taxable4,
1597 p_itax => p_itax4,
1598 p_rtax => p_rtax4,
1599 p_stax => p_stax4,
1600 -- Bug 4322981
1601 p_np_dedc => p_np_dedc4,
1602 p_hi_dedc => p_hi_dedc4,
1603 p_ei_dedc => p_ei_dedc4,
1604 p_donation_dedc => p_donation_dedc4,
1605 -- End of 4322981
1606 p_non_taxable_ovs => p_non_taxable_ovs4,
1607 p_non_taxable_ovt => p_non_taxable_ovt4,
1608 p_research_payment => p_research_payment4, -- Bug 6470526
1609 p_non_taxable_oth => p_non_taxable_oth4,
1610 p_fw_tax_break => p_fw_tax_break4, -- 3546994
1611 p_non_taxable_ovs_frgn => p_non_taxable_ovs_frgn4, -- Bug 7439803
1612 p_birth_raise_allow => p_birth_raising_allow4, -- Bug 7439803
1613 p_fw_income_exem => p_fw_income_exem4, -- Bug 7439803
1614 p_non_tax_18_earn => p_non_tax_18_earn4,
1615 p_non_tax_19_earn => p_non_tax_19_earn4,
1616 p_non_tax_20_earn => p_non_tax_20_earn4,
1617 p_non_taxable => p_non_taxable4,
1618 p_rep_non_tax_oth => p_rep_non_tax_oth4,
1619 p_spec_non_taxable => p_spec_non_taxable4,
1620 p_rep_non_tax_total => p_rep_non_tax_total4,
1621 p_non_tax_H02_earn => p_non_tax_H02_earn4,
1622 p_non_tax_H03_earn => p_non_tax_H03_earn4,
1623 p_unrep_non_tax_tot => p_unrep_non_tax_tot4,
1624 p_exchange_rate => p_exchange_rate4,
1625 p_fw_tax_break_earn => p_fw_tax_break_earn4);
1626 elsif l_month = 5 then
1627 payment_details(
1628 p_assact => l_rec.assignment_action_id,
1629 p_date_paid => l_rec.effective_date,
1630 p_effective_date => p_effective_date5,
1631 p_taxable_mth => p_taxable_mth5,
1632 p_taxable_bon => p_taxable_bon5,
1633 p_sp_irreg_bonus => p_sp_irreg_bonus5,
1634 p_stck_pur_opt_exec_earn => p_stck_pur_opt_exec_earn5, -- Bug 6470526
1635 p_esop_with_drawn => p_esop_with_drawn5, -- Bug 8880364
1636 p_taxable => p_taxable5,
1637 p_itax => p_itax5,
1638 p_rtax => p_rtax5,
1639 p_stax => p_stax5,
1640 -- Bug 4322981
1641 p_np_dedc => p_np_dedc5,
1642 p_hi_dedc => p_hi_dedc5,
1643 p_ei_dedc => p_ei_dedc5,
1644 p_donation_dedc => p_donation_dedc5,
1645 -- End of 4322981
1646 p_non_taxable_ovs => p_non_taxable_ovs5,
1647 p_non_taxable_ovt => p_non_taxable_ovt5,
1648 p_research_payment => p_research_payment5, -- Bug 6470526
1649 p_non_taxable_oth => p_non_taxable_oth5,
1650 p_fw_tax_break => p_fw_tax_break5, -- 3546994
1651 p_non_taxable_ovs_frgn => p_non_taxable_ovs_frgn5, -- Bug 7439803
1652 p_birth_raise_allow => p_birth_raising_allow5, -- Bug 7439803
1653 p_fw_income_exem => p_fw_income_exem5, -- Bug 7439803
1654 p_non_tax_18_earn => p_non_tax_18_earn5,
1655 p_non_tax_19_earn => p_non_tax_19_earn5,
1656 p_non_tax_20_earn => p_non_tax_20_earn5,
1657 p_non_taxable => p_non_taxable5,
1658 p_rep_non_tax_oth => p_rep_non_tax_oth5,
1659 p_spec_non_taxable => p_spec_non_taxable5,
1660 p_rep_non_tax_total => p_rep_non_tax_total5,
1661 p_non_tax_H02_earn => p_non_tax_H02_earn5,
1662 p_non_tax_H03_earn => p_non_tax_H03_earn5,
1663 p_unrep_non_tax_tot => p_unrep_non_tax_tot5,
1664 p_exchange_rate => p_exchange_rate5,
1665 p_fw_tax_break_earn => p_fw_tax_break_earn5);
1666 elsif l_month = 6 then
1667 payment_details(
1668 p_assact => l_rec.assignment_action_id,
1669 p_date_paid => l_rec.effective_date,
1670 p_effective_date => p_effective_date6,
1671 p_taxable_mth => p_taxable_mth6,
1672 p_taxable_bon => p_taxable_bon6,
1673 p_sp_irreg_bonus => p_sp_irreg_bonus6,
1674 p_stck_pur_opt_exec_earn => p_stck_pur_opt_exec_earn6, -- Bug 6470526
1675 p_esop_with_drawn => p_esop_with_drawn6, -- Bug 8880364
1676 p_taxable => p_taxable6,
1677 p_itax => p_itax6,
1678 p_rtax => p_rtax6,
1679 p_stax => p_stax6,
1680 -- Bug 4322981
1681 p_np_dedc => p_np_dedc6,
1682 p_hi_dedc => p_hi_dedc6,
1683 p_ei_dedc => p_ei_dedc6,
1684 p_donation_dedc => p_donation_dedc6,
1685 -- End of 4322981
1686 p_non_taxable_ovs => p_non_taxable_ovs6,
1687 p_non_taxable_ovt => p_non_taxable_ovt6,
1688 p_research_payment => p_research_payment6, -- Bug 6470526
1689 p_non_taxable_oth => p_non_taxable_oth6,
1690 p_fw_tax_break => p_fw_tax_break6, -- 3546994
1691 p_non_taxable_ovs_frgn => p_non_taxable_ovs_frgn6, -- Bug 7439803
1692 p_birth_raise_allow => p_birth_raising_allow6, -- Bug 7439803
1693 p_fw_income_exem => p_fw_income_exem6, -- Bug 7439803
1694 p_non_tax_18_earn => p_non_tax_18_earn6,
1695 p_non_tax_19_earn => p_non_tax_19_earn6,
1696 p_non_tax_20_earn => p_non_tax_20_earn6,
1697 p_non_taxable => p_non_taxable6,
1698 p_rep_non_tax_oth => p_rep_non_tax_oth6,
1699 p_spec_non_taxable => p_spec_non_taxable6,
1700 p_rep_non_tax_total => p_rep_non_tax_total6,
1701 p_non_tax_H02_earn => p_non_tax_H02_earn6,
1702 p_non_tax_H03_earn => p_non_tax_H03_earn6,
1703 p_unrep_non_tax_tot => p_unrep_non_tax_tot6,
1704 p_exchange_rate => p_exchange_rate6,
1705 p_fw_tax_break_earn => p_fw_tax_break_earn6);
1706 elsif l_month = 7 then
1707 payment_details(
1708 p_assact => l_rec.assignment_action_id,
1709 p_date_paid => l_rec.effective_date,
1710 p_effective_date => p_effective_date7,
1711 p_taxable_mth => p_taxable_mth7,
1712 p_taxable_bon => p_taxable_bon7,
1713 p_sp_irreg_bonus => p_sp_irreg_bonus7,
1714 p_stck_pur_opt_exec_earn => p_stck_pur_opt_exec_earn7, -- Bug 6470526
1715 p_esop_with_drawn => p_esop_with_drawn7, -- Bug 8880364
1716 p_taxable => p_taxable7,
1717 p_itax => p_itax7,
1718 p_rtax => p_rtax7,
1719 p_stax => p_stax7,
1720 -- Bug 4322981
1721 p_np_dedc => p_np_dedc7,
1722 p_hi_dedc => p_hi_dedc7,
1723 p_ei_dedc => p_ei_dedc7,
1724 p_donation_dedc => p_donation_dedc7,
1725 -- End of 4322981
1726 p_non_taxable_ovs => p_non_taxable_ovs7,
1727 p_non_taxable_ovt => p_non_taxable_ovt7,
1728 p_research_payment => p_research_payment7, -- Bug 6470526
1729 p_non_taxable_oth => p_non_taxable_oth7,
1730 p_fw_tax_break => p_fw_tax_break7, -- 3546994
1731 p_non_taxable_ovs_frgn => p_non_taxable_ovs_frgn7, -- Bug 7439803
1732 p_birth_raise_allow => p_birth_raising_allow7, -- Bug 7439803
1733 p_fw_income_exem => p_fw_income_exem7, -- Bug 7439803
1734 p_non_tax_18_earn => p_non_tax_18_earn7,
1735 p_non_tax_19_earn => p_non_tax_19_earn7,
1736 p_non_tax_20_earn => p_non_tax_20_earn7,
1737 p_non_taxable => p_non_taxable7,
1738 p_rep_non_tax_oth => p_rep_non_tax_oth7,
1739 p_spec_non_taxable => p_spec_non_taxable7,
1740 p_rep_non_tax_total => p_rep_non_tax_total7,
1741 p_non_tax_H02_earn => p_non_tax_H02_earn7,
1742 p_non_tax_H03_earn => p_non_tax_H03_earn7,
1743 p_unrep_non_tax_tot => p_unrep_non_tax_tot7,
1744 p_exchange_rate => p_exchange_rate7,
1745 p_fw_tax_break_earn => p_fw_tax_break_earn7);
1746 elsif l_month = 8 then
1747 payment_details(
1748 p_assact => l_rec.assignment_action_id,
1749 p_date_paid => l_rec.effective_date,
1750 p_effective_date => p_effective_date8,
1751 p_taxable_mth => p_taxable_mth8,
1752 p_taxable_bon => p_taxable_bon8,
1753 p_sp_irreg_bonus => p_sp_irreg_bonus8,
1754 p_stck_pur_opt_exec_earn => p_stck_pur_opt_exec_earn8, -- Bug 6470526
1755 p_esop_with_drawn => p_esop_with_drawn8, -- Bug 8880364
1756 p_taxable => p_taxable8,
1757 p_itax => p_itax8,
1758 p_rtax => p_rtax8,
1759 p_stax => p_stax8,
1760 -- Bug 4322981
1761 p_np_dedc => p_np_dedc8,
1762 p_hi_dedc => p_hi_dedc8,
1763 p_ei_dedc => p_ei_dedc8,
1764 p_donation_dedc => p_donation_dedc8,
1765 -- End of 4322981
1766 p_non_taxable_ovs => p_non_taxable_ovs8,
1767 p_non_taxable_ovt => p_non_taxable_ovt8,
1768 p_research_payment => p_research_payment8, -- Bug 6470526
1769 p_non_taxable_oth => p_non_taxable_oth8,
1770 p_fw_tax_break => p_fw_tax_break8, -- 3546994
1771 p_non_taxable_ovs_frgn => p_non_taxable_ovs_frgn8, -- Bug 7439803
1772 p_birth_raise_allow => p_birth_raising_allow8, -- Bug 7439803
1773 p_fw_income_exem => p_fw_income_exem8, -- Bug 7439803
1774 p_non_tax_18_earn => p_non_tax_18_earn8,
1775 p_non_tax_19_earn => p_non_tax_19_earn8,
1776 p_non_tax_20_earn => p_non_tax_20_earn8,
1777 p_non_taxable => p_non_taxable8,
1778 p_rep_non_tax_oth => p_rep_non_tax_oth8,
1779 p_spec_non_taxable => p_spec_non_taxable8,
1780 p_rep_non_tax_total => p_rep_non_tax_total8,
1781 p_non_tax_H02_earn => p_non_tax_H02_earn8,
1782 p_non_tax_H03_earn => p_non_tax_H03_earn8,
1783 p_unrep_non_tax_tot => p_unrep_non_tax_tot8,
1784 p_exchange_rate => p_exchange_rate8,
1785 p_fw_tax_break_earn => p_fw_tax_break_earn8);
1786 elsif l_month = 9 then
1787 payment_details(
1788 p_assact => l_rec.assignment_action_id,
1789 p_date_paid => l_rec.effective_date,
1790 p_effective_date => p_effective_date9,
1791 p_taxable_mth => p_taxable_mth9,
1792 p_taxable_bon => p_taxable_bon9,
1793 p_sp_irreg_bonus => p_sp_irreg_bonus9,
1794 p_stck_pur_opt_exec_earn => p_stck_pur_opt_exec_earn9, -- Bug 6470526
1795 p_esop_with_drawn => p_esop_with_drawn9, -- Bug 8880364
1796 p_taxable => p_taxable9,
1797 p_itax => p_itax9,
1798 p_rtax => p_rtax9,
1799 p_stax => p_stax9,
1800 -- Bug 4322981
1801 p_np_dedc => p_np_dedc9,
1802 p_hi_dedc => p_hi_dedc9,
1803 p_ei_dedc => p_ei_dedc9,
1804 p_donation_dedc => p_donation_dedc9,
1805 -- End of 4322981
1806 p_non_taxable_ovs => p_non_taxable_ovs9,
1807 p_non_taxable_ovt => p_non_taxable_ovt9,
1808 p_research_payment => p_research_payment9, -- Bug 6470526
1809 p_non_taxable_oth => p_non_taxable_oth9,
1810 p_fw_tax_break => p_fw_tax_break9, -- 3546994
1811 p_non_taxable_ovs_frgn => p_non_taxable_ovs_frgn9, -- Bug 7439803
1812 p_birth_raise_allow => p_birth_raising_allow9, -- Bug 7439803
1813 p_fw_income_exem => p_fw_income_exem9, -- Bug 7439803
1814 p_non_tax_18_earn => p_non_tax_18_earn9,
1815 p_non_tax_19_earn => p_non_tax_19_earn9,
1816 p_non_tax_20_earn => p_non_tax_20_earn9,
1817 p_non_taxable => p_non_taxable9,
1818 p_rep_non_tax_oth => p_rep_non_tax_oth9,
1819 p_spec_non_taxable => p_spec_non_taxable9,
1820 p_rep_non_tax_total => p_rep_non_tax_total9,
1821 p_non_tax_H02_earn => p_non_tax_H02_earn9,
1822 p_non_tax_H03_earn => p_non_tax_H03_earn9,
1823 p_unrep_non_tax_tot => p_unrep_non_tax_tot9,
1824 p_exchange_rate => p_exchange_rate9,
1825 p_fw_tax_break_earn => p_fw_tax_break_earn9);
1826 elsif l_month = 10 then
1827 payment_details(
1828 p_assact => l_rec.assignment_action_id,
1829 p_date_paid => l_rec.effective_date,
1830 p_effective_date => p_effective_date10,
1831 p_taxable_mth => p_taxable_mth10,
1832 p_taxable_bon => p_taxable_bon10,
1833 p_sp_irreg_bonus => p_sp_irreg_bonus10,
1834 p_stck_pur_opt_exec_earn => p_stck_pur_opt_exec_earn10, -- Bug 6470526
1835 p_esop_with_drawn => p_esop_with_drawn10, -- Bug 8880364
1836 p_taxable => p_taxable10,
1837 p_itax => p_itax10,
1838 p_rtax => p_rtax10,
1839 p_stax => p_stax10,
1840 -- Bug 4322981
1841 p_np_dedc => p_np_dedc10,
1842 p_hi_dedc => p_hi_dedc10,
1843 p_ei_dedc => p_ei_dedc10,
1844 p_donation_dedc => p_donation_dedc10,
1845 -- End of 4322981
1846 p_non_taxable_ovs => p_non_taxable_ovs10,
1847 p_non_taxable_ovt => p_non_taxable_ovt10,
1848 p_research_payment => p_research_payment10, -- Bug 6470526
1849 p_non_taxable_oth => p_non_taxable_oth10,
1850 p_fw_tax_break => p_fw_tax_break10, -- 3546994
1851 p_non_taxable_ovs_frgn => p_non_taxable_ovs_frgn10, -- Bug 7439803
1852 p_birth_raise_allow => p_birth_raising_allow10, -- Bug 7439803
1853 p_fw_income_exem => p_fw_income_exem10, -- Bug 7439803
1854 p_non_tax_18_earn => p_non_tax_18_earn10,
1855 p_non_tax_19_earn => p_non_tax_19_earn10,
1856 p_non_tax_20_earn => p_non_tax_20_earn10,
1857 p_non_taxable => p_non_taxable10,
1858 p_rep_non_tax_oth => p_rep_non_tax_oth10,
1859 p_spec_non_taxable => p_spec_non_taxable10,
1860 p_rep_non_tax_total => p_rep_non_tax_total10,
1861 p_non_tax_H02_earn => p_non_tax_H02_earn10,
1862 p_non_tax_H03_earn => p_non_tax_H03_earn10,
1863 p_unrep_non_tax_tot => p_unrep_non_tax_tot10,
1864 p_exchange_rate => p_exchange_rate10,
1865 p_fw_tax_break_earn => p_fw_tax_break_earn10);
1866 elsif l_month = 11 then
1867 payment_details(
1868 p_assact => l_rec.assignment_action_id,
1869 p_date_paid => l_rec.effective_date,
1870 p_effective_date => p_effective_date11,
1871 p_taxable_mth => p_taxable_mth11,
1872 p_taxable_bon => p_taxable_bon11,
1873 p_sp_irreg_bonus => p_sp_irreg_bonus11,
1874 p_stck_pur_opt_exec_earn => p_stck_pur_opt_exec_earn11, -- Bug 6470526
1875 p_esop_with_drawn => p_esop_with_drawn11, -- Bug 8880364
1876 p_taxable => p_taxable11,
1877 p_itax => p_itax11,
1878 p_rtax => p_rtax11,
1879 p_stax => p_stax11,
1880 -- Bug 4322981
1881 p_np_dedc => p_np_dedc11,
1882 p_hi_dedc => p_hi_dedc11,
1883 p_ei_dedc => p_ei_dedc11,
1884 p_donation_dedc => p_donation_dedc11,
1885 -- End of 4322981
1886 p_non_taxable_ovs => p_non_taxable_ovs11,
1887 p_non_taxable_ovt => p_non_taxable_ovt11,
1888 p_research_payment => p_research_payment11, -- Bug 6470526
1889 p_non_taxable_oth => p_non_taxable_oth11,
1890 p_fw_tax_break => p_fw_tax_break11, -- 3546994
1891 p_non_taxable_ovs_frgn => p_non_taxable_ovs_frgn11, -- Bug 7439803
1892 p_birth_raise_allow => p_birth_raising_allow11, -- Bug 7439803
1893 p_fw_income_exem => p_fw_income_exem11, -- Bug 7439803
1894 p_non_tax_18_earn => p_non_tax_18_earn11,
1895 p_non_tax_19_earn => p_non_tax_19_earn11,
1896 p_non_tax_20_earn => p_non_tax_20_earn11,
1897 p_non_taxable => p_non_taxable11,
1898 p_rep_non_tax_oth => p_rep_non_tax_oth11,
1899 p_spec_non_taxable => p_spec_non_taxable11,
1900 p_rep_non_tax_total => p_rep_non_tax_total11,
1901 p_non_tax_H02_earn => p_non_tax_H02_earn11,
1902 p_non_tax_H03_earn => p_non_tax_H03_earn11,
1903 p_unrep_non_tax_tot => p_unrep_non_tax_tot11,
1904 p_exchange_rate => p_exchange_rate11,
1905 p_fw_tax_break_earn => p_fw_tax_break_earn11);
1906 elsif l_month = 12 then
1907 payment_details(
1908 p_assact => l_rec.assignment_action_id,
1909 p_date_paid => l_rec.effective_date,
1910 p_effective_date => p_effective_date12,
1911 p_taxable_mth => p_taxable_mth12,
1912 p_taxable_bon => p_taxable_bon12,
1913 p_sp_irreg_bonus => p_sp_irreg_bonus12,
1914 p_stck_pur_opt_exec_earn => p_stck_pur_opt_exec_earn12, -- Bug 6470526
1915 p_esop_with_drawn => p_esop_with_drawn12, -- Bug 8880364
1916 p_taxable => p_taxable12,
1917 p_itax => p_itax12,
1918 p_rtax => p_rtax12,
1919 p_stax => p_stax12,
1920 -- Bug 4322981
1921 p_np_dedc => p_np_dedc12,
1922 p_hi_dedc => p_hi_dedc12,
1923 p_ei_dedc => p_ei_dedc12,
1924 p_donation_dedc => p_donation_dedc12,
1925 -- End of 4322981
1926 p_non_taxable_ovs => p_non_taxable_ovs12,
1927 p_non_taxable_ovt => p_non_taxable_ovt12,
1928 p_research_payment => p_research_payment12, -- Bug 6470526
1929 p_non_taxable_oth => p_non_taxable_oth12,
1930 p_fw_tax_break => p_fw_tax_break12, -- 3546994
1931 p_non_taxable_ovs_frgn => p_non_taxable_ovs_frgn12, -- Bug 7439803
1932 p_birth_raise_allow => p_birth_raising_allow12, -- Bug 7439803
1933 p_fw_income_exem => p_fw_income_exem12, -- Bug 7439803
1934 p_non_tax_18_earn => p_non_tax_18_earn12,
1935 p_non_tax_19_earn => p_non_tax_19_earn12,
1936 p_non_tax_20_earn => p_non_tax_20_earn12,
1937 p_non_taxable => p_non_taxable12,
1938 p_rep_non_tax_oth => p_rep_non_tax_oth12,
1939 p_spec_non_taxable => p_spec_non_taxable12,
1940 p_rep_non_tax_total => p_rep_non_tax_total12,
1941 p_non_tax_H02_earn => p_non_tax_H02_earn12,
1942 p_non_tax_H03_earn => p_non_tax_H03_earn12,
1943 p_unrep_non_tax_tot => p_unrep_non_tax_tot12,
1944 p_exchange_rate => p_exchange_rate12,
1945 p_fw_tax_break_earn => p_fw_tax_break_earn12);
1946 end if;
1947 end loop;
1948 end data;
1949 --------------------------------------------------------
1950 function defined_balance_id(p_user_name in varchar2) return number
1951 --------------------------------------------------------
1952 is
1953 l_defined_balance_id number;
1954 begin
1955 select
1956 u.creator_id
1957 into l_defined_balance_id
1958 from ff_user_entities u,
1959 ff_database_items d
1960 where d.user_name = p_user_name
1961 and u.user_entity_id = d.user_entity_id
1962 and u.legislation_code = 'KR'
1963 and u.business_group_id is null
1964 and u.creator_type = 'B';
1965 --
1966 return l_defined_balance_id;
1967 end defined_balance_id;
1968 -----------------------------------------------------------------------------------
1969 -- Bug 7439803: 2008 YEA Ledger Statutory Updates
1970 function get_globalvalue(p_glbvar in varchar2,p_process_date in date) return number
1971 -----------------------------------------------------------------------------------
1972 is
1973 --
1974 cursor csr_ff_global
1975 is
1976 select to_number(glb.global_value,'99999999999999999999.99999') -- Bug 5726158
1977 from ff_globals_f glb
1978 where glb.global_name = p_glbvar
1979 and p_process_date between glb.effective_start_date and glb.effective_end_date;
1980 --
1981 l_glbvalue number default 0;
1982 begin
1983 Open csr_ff_global;
1984 fetch csr_ff_global into l_glbvalue;
1985 close csr_ff_global;
1986 --
1987 if l_glbvalue is null then
1988 l_glbvalue := 0;
1989 end if;
1990 --
1991 return l_glbvalue;
1992 end;
1993 ------------------------------------------------------------------------
1994 begin
1995 g_defined_balance_id.taxable_mth := defined_balance_id('TOTAL_TAXABLE_EARNINGS_ASG_MTD_MTH');
1996 g_defined_balance_id.taxable_bon := defined_balance_id('TOTAL_TAXABLE_EARNINGS_ASG_MTD_BON');
1997 g_defined_balance_id.sp_irreg_bonus_mth := defined_balance_id('SP_IRREG_BONUS_ASG_MTD_MTH');
1998 g_defined_balance_id.sp_irreg_bonus_bon := defined_balance_id('SP_IRREG_BONUS_ASG_MTD_BON');
1999 g_defined_balance_id.itax_mth := defined_balance_id('ITAX_ASG_MTD_MTH');
2000 g_defined_balance_id.itax_bon := defined_balance_id('ITAX_ASG_MTD_BON');
2001 g_defined_balance_id.rtax_mth := defined_balance_id('RTAX_ASG_MTD_MTH');
2002 g_defined_balance_id.rtax_bon := defined_balance_id('RTAX_ASG_MTD_BON');
2003 g_defined_balance_id.stax_mth := defined_balance_id('STAX_ASG_MTD_MTH');
2004 g_defined_balance_id.stax_bon := defined_balance_id('STAX_ASG_MTD_BON');
2005 g_defined_balance_id.non_taxable_ovs_mth:= defined_balance_id('NON_TAXABLE_OVS_EARNINGS_ASG_MTD_MTH');
2006 g_defined_balance_id.non_taxable_ovs_bon:= defined_balance_id('NON_TAXABLE_OVS_EARNINGS_ASG_MTD_BON');
2007 g_defined_balance_id.non_taxable_ovt_mth:= defined_balance_id('NON_TAXABLE_OVT_EARNINGS_ASG_MTD_MTH');
2008 g_defined_balance_id.non_taxable_ovt_bon:= defined_balance_id('NON_TAXABLE_OVT_EARNINGS_ASG_MTD_BON');
2009 g_defined_balance_id.non_taxable_mth := defined_balance_id('TOTAL_NON_TAXABLE_EARNINGS_ASG_MTD_MTH');
2010 g_defined_balance_id.non_taxable_bon := defined_balance_id('TOTAL_NON_TAXABLE_EARNINGS_ASG_MTD_BON');
2011 -- 3546994
2012 g_defined_balance_id.fw_tax_break_mth := defined_balance_id('FOREIGN_WORKER_TAX_BREAK_ASG_MTD_MTH');
2013 g_defined_balance_id.fw_tax_break_bon := defined_balance_id('FOREIGN_WORKER_TAX_BREAK_ASG_MTD_BON');
2014 -- Bug 4322981
2015 g_defined_balance_id.np_prem_mth := defined_balance_id('NP_PREM_EE_ASG_MTD_MTH') ;
2016 g_defined_balance_id.np_prem_bon := defined_balance_id('NP_PREM_EE_ASG_MTD_BON') ;
2017 g_defined_balance_id.hi_prem_mth := defined_balance_id('HI_PREM_EE_ASG_MTD_MTH') ;
2018 g_defined_balance_id.hi_prem_bon := defined_balance_id('HI_PREM_EE_ASG_MTD_BON') ;
2019 g_defined_balance_id.ei_prem_mth := defined_balance_id('EI_PREM_ASG_MTD_MTH') ;
2020 g_defined_balance_id.ei_prem_bon := defined_balance_id('EI_PREM_ASG_MTD_BON') ;
2021 g_defined_balance_id.donation_mth := defined_balance_id('VOLUNTARY_DONATIONS_ASG_MTD_MTH') ;
2022 g_defined_balance_id.donation_bon := defined_balance_id('VOLUNTARY_DONATIONS_ASG_MTD_BON') ;
2023 -- End of 4322981
2024 -- Bug 5684037
2025 g_defined_balance_id.addl_non_tax_mth := defined_balance_id('ADDITIONAL_OTHER_NON_TAXABLE_EARNINGS_ASG_MTD_MTH') ;
2026 g_defined_balance_id.addl_non_tax_bon := defined_balance_id('ADDITIONAL_OTHER_NON_TAXABLE_EARNINGS_ASG_MTD_BON') ;
2027 -- End of Bug 5684037
2028 -- Bug 6470526: 2007 YEA Ledger Statutory Updates
2029 g_defined_balance_id.stck_pur_opt_exec_earn_mth := defined_balance_id('STOCK_PURCHASE_OPTION_EXECUTION_EARNING_ASG_MTD_MTH');
2030 g_defined_balance_id.stck_pur_opt_exec_earn_bon := defined_balance_id('STOCK_PURCHASE_OPTION_EXECUTION_EARNING_ASG_MTD_BON');
2031 g_defined_balance_id.research_payment_mth := defined_balance_id('RESEARCH_PAYMENT_ASG_MTD_MTH');
2032 g_defined_balance_id.research_payment_bon := defined_balance_id('RESEARCH_PAYMENT_ASG_MTD_BON');
2033 -- End of Bug 6470526
2034 --
2035 -- Bug 7439803: 2008 YEA Ledger Statutory Updates
2036 g_defined_balance_id.non_taxable_ovs_frgn_mth := defined_balance_id('NON_TAXABLE_OVS_FRGN_EARNINGS_ASG_MTD_MTH');
2037 g_defined_balance_id.non_taxable_ovs_frgn_bon := defined_balance_id('NON_TAXABLE_OVS_FRGN_EARNINGS_ASG_MTD_BON');
2038 g_defined_balance_id.birth_raise_allow_mth := defined_balance_id('BIRTH_RAISING_ALLOWANCE_ASG_MTD_MTH');
2039 g_defined_balance_id.birth_raise_allow_bon := defined_balance_id('BIRTH_RAISING_ALLOWANCE_ASG_MTD_BON');
2040 g_defined_balance_id.ltci_prem_mth := defined_balance_id('LTCI_PREM_EE_ASG_MTD_MTH') ;
2041 g_defined_balance_id.ltci_prem_bon := defined_balance_id('LTCI_PREM_EE_ASG_MTD_BON') ;
2042 -- End of Bug 7439803
2043 --
2044 -- Bug 8880364:2009 YEA Ledger Statutory Updates
2045 g_defined_balance_id.esop_with_drawn_mth := defined_balance_id('ESOP_WITHDRAWAL_EARNINGS_ASG_MTD_MTH') ;
2046 g_defined_balance_id.esop_with_drawn_bon := defined_balance_id('ESOP_WITHDRAWAL_EARNINGS_ASG_MTD_BON') ;
2047 g_defined_balance_id.rsrch_pay_ntax_H06_mth := defined_balance_id('NON_TAXABLE_EARN_H06_ASG_MTD_MTH') ;
2048 g_defined_balance_id.rsrch_pay_ntax_H06_bon := defined_balance_id('NON_TAXABLE_EARN_H06_ASG_MTD_BON') ;
2049 g_defined_balance_id.rsrch_pay_ntax_H07_mth := defined_balance_id('NON_TAXABLE_EARN_H07_ASG_MTD_MTH') ;
2050 g_defined_balance_id.rsrch_pay_ntax_H07_bon := defined_balance_id('NON_TAXABLE_EARN_H07_ASG_MTD_BON') ;
2051 g_defined_balance_id.rsrch_pay_ntax_H08_mth := defined_balance_id('NON_TAXABLE_EARN_H08_ASG_MTD_MTH') ;
2052 g_defined_balance_id.rsrch_pay_ntax_H08_bon := defined_balance_id('NON_TAXABLE_EARN_H08_ASG_MTD_BON') ;
2053 g_defined_balance_id.rsrch_pay_ntax_H09_mth := defined_balance_id('NON_TAXABLE_EARN_H09_ASG_MTD_MTH') ;
2054 g_defined_balance_id.rsrch_pay_ntax_H09_bon := defined_balance_id('NON_TAXABLE_EARN_H09_ASG_MTD_BON') ;
2055 g_defined_balance_id.rsrch_pay_ntax_H10_mth := defined_balance_id('NON_TAXABLE_EARN_H10_ASG_MTD_MTH') ;
2056 g_defined_balance_id.rsrch_pay_ntax_H10_bon := defined_balance_id('NON_TAXABLE_EARN_H10_ASG_MTD_BON') ;
2057 g_defined_balance_id.non_tax_earn_G01_mth := defined_balance_id('NON_TAXABLE_EARN_G01_ASG_MTD_MTH') ;
2058 g_defined_balance_id.non_tax_earn_G01_bon := defined_balance_id('NON_TAXABLE_EARN_G01_ASG_MTD_BON') ;
2059 g_defined_balance_id.non_tax_earn_H11_mth := defined_balance_id('NON_TAXABLE_EARN_H11_ASG_MTD_MTH') ;
2060 g_defined_balance_id.non_tax_earn_H11_bon := defined_balance_id('NON_TAXABLE_EARN_H11_ASG_MTD_BON') ;
2061 g_defined_balance_id.non_tax_earn_H12_mth := defined_balance_id('NON_TAXABLE_EARN_H12_ASG_MTD_MTH') ;
2062 g_defined_balance_id.non_tax_earn_H12_bon := defined_balance_id('NON_TAXABLE_EARN_H12_ASG_MTD_BON') ;
2063 g_defined_balance_id.non_tax_earn_H13_mth := defined_balance_id('NON_TAXABLE_EARN_H13_ASG_MTD_MTH') ;
2064 g_defined_balance_id.non_tax_earn_H13_bon := defined_balance_id('NON_TAXABLE_EARN_H13_ASG_MTD_BON') ;
2065 /*Bug#16247429 */
2066 g_defined_balance_id.non_tax_earn_H14_mth := defined_balance_id('NON_TAXABLE_EARN_H14_ASG_MTD_MTH') ;
2067 g_defined_balance_id.non_tax_earn_H14_bon := defined_balance_id('NON_TAXABLE_EARN_H14_ASG_MTD_BON') ;
2068 g_defined_balance_id.non_tax_earn_H15_mth := defined_balance_id('NON_TAXABLE_EARN_H15_ASG_MTD_MTH') ;
2069 g_defined_balance_id.non_tax_earn_H15_bon := defined_balance_id('NON_TAXABLE_EARN_H15_ASG_MTD_BON') ;
2070 g_defined_balance_id.non_tax_earn_R10_mth := defined_balance_id('NON_TAXABLE_EARN_R10_ASG_MTD_MTH') ;
2071 g_defined_balance_id.non_tax_earn_R10_bon := defined_balance_id('NON_TAXABLE_EARN_R10_ASG_MTD_BON') ;
2072 g_defined_balance_id.non_tax_earn_Y21_mth := defined_balance_id('NON_TAXABLE_EARN_Y21_ASG_MTD_MTH') ;
2073 g_defined_balance_id.non_tax_earn_Y21_bon := defined_balance_id('NON_TAXABLE_EARN_Y21_ASG_MTD_BON') ;
2074
2075
2076 g_defined_balance_id.non_tax_earn_H01_mth := defined_balance_id('NON_TAXABLE_EARN_H01_ASG_MTD_MTH') ;
2077 g_defined_balance_id.non_tax_earn_H01_bon := defined_balance_id('NON_TAXABLE_EARN_H01_ASG_MTD_BON') ;
2078 g_defined_balance_id.non_tax_earn_K01_mth := defined_balance_id('NON_TAXABLE_EARN_K01_ASG_MTD_MTH') ;
2079 g_defined_balance_id.non_tax_earn_K01_bon := defined_balance_id('NON_TAXABLE_EARN_K01_ASG_MTD_BON') ;
2080 g_defined_balance_id.non_tax_earn_S01_mth := defined_balance_id('NON_TAXABLE_EARN_S01_ASG_MTD_MTH') ;
2081 g_defined_balance_id.non_tax_earn_S01_bon := defined_balance_id('NON_TAXABLE_EARN_S01_ASG_MTD_BON') ;
2082 g_defined_balance_id.non_tax_earn_Y01_bon := defined_balance_id('NON_TAXABLE_EARN_Y01_ASG_MTD_BON') ;
2083 g_defined_balance_id.non_tax_earn_Y01_mth := defined_balance_id('NON_TAXABLE_EARN_Y01_ASG_MTD_MTH') ;
2084 g_defined_balance_id.non_tax_earn_Y02_bon := defined_balance_id('NON_TAXABLE_EARN_Y02_ASG_MTD_BON') ;
2085 g_defined_balance_id.non_tax_earn_Y02_mth := defined_balance_id('NON_TAXABLE_EARN_Y02_ASG_MTD_MTH') ;
2086 g_defined_balance_id.non_tax_earn_Y03_bon := defined_balance_id('NON_TAXABLE_EARN_Y03_ASG_MTD_BON') ;
2087 g_defined_balance_id.non_tax_earn_Y03_mth := defined_balance_id('NON_TAXABLE_EARN_Y03_ASG_MTD_MTH') ;
2088 g_defined_balance_id.non_tax_earn_Y20_bon := defined_balance_id('NON_TAXABLE_EARN_Y20_ASG_MTD_BON') ;
2089 g_defined_balance_id.non_tax_earn_Y20_mth := defined_balance_id('NON_TAXABLE_EARN_Y20_ASG_MTD_MTH') ;
2090 g_defined_balance_id.non_tax_earn_Z01_bon := defined_balance_id('NON_TAXABLE_EARN_Z01_ASG_MTD_BON') ;
2091 g_defined_balance_id.non_tax_earn_Z01_mth := defined_balance_id('NON_TAXABLE_EARN_Z01_ASG_MTD_MTH') ;
2092 g_defined_balance_id.non_tax_earn_T01_mth := defined_balance_id('NON_TAXABLE_EARN_T01_ASG_MTD_MTH') ;
2093 g_defined_balance_id.non_tax_earn_T01_bon := defined_balance_id('NON_TAXABLE_EARN_T01_ASG_MTD_BON') ;
2094 g_defined_balance_id.non_tax_earn_H05_mth := defined_balance_id('NON_TAXABLE_EARN_H05_ASG_MTD_MTH') ;
2095 g_defined_balance_id.non_tax_earn_H05_bon := defined_balance_id('NON_TAXABLE_EARN_H05_ASG_MTD_BON') ;
2096 g_defined_balance_id.non_tax_earn_I01_mth := defined_balance_id('NON_TAXABLE_EARN_I01_ASG_MTD_MTH') ;
2097 g_defined_balance_id.non_tax_earn_I01_bon := defined_balance_id('NON_TAXABLE_EARN_I01_ASG_MTD_BON') ;
2098 g_defined_balance_id.non_tax_earn_M01_mth := defined_balance_id('NON_TAXABLE_EARN_M01_ASG_MTD_MTH') ;
2099 g_defined_balance_id.non_tax_earn_M01_bon := defined_balance_id('NON_TAXABLE_EARN_M01_ASG_MTD_BON') ;
2100 g_defined_balance_id.non_tax_earn_M02_mth := defined_balance_id('NON_TAXABLE_EARN_M02_ASG_MTD_MTH') ;
2101 g_defined_balance_id.non_tax_earn_M02_bon := defined_balance_id('NON_TAXABLE_EARN_M02_ASG_MTD_BON') ;
2102 g_defined_balance_id.non_tax_earn_M03_mth := defined_balance_id('NON_TAXABLE_EARN_M03_ASG_MTD_MTH') ;
2103 g_defined_balance_id.non_tax_earn_M03_bon := defined_balance_id('NON_TAXABLE_EARN_M03_ASG_MTD_BON') ;
2104 g_defined_balance_id.non_tax_earn_frgn_M01_mth := defined_balance_id('NON_TAXABLE_EARN_FRGN_M01_ASG_MTD_MTH') ;
2105 g_defined_balance_id.non_tax_earn_frgn_M01_bon := defined_balance_id('NON_TAXABLE_EARN_FRGN_M01_ASG_MTD_BON') ;
2106 g_defined_balance_id.non_tax_earn_frgn_M02_mth := defined_balance_id('NON_TAXABLE_EARN_FRGN_M02_ASG_MTD_MTH') ;
2107 g_defined_balance_id.non_tax_earn_frgn_M02_bon := defined_balance_id('NON_TAXABLE_EARN_FRGN_M02_ASG_MTD_BON') ;
2108 g_defined_balance_id.non_tax_earn_frgn_M03_mth := defined_balance_id('NON_TAXABLE_EARN_FRGN_M03_ASG_MTD_MTH') ;
2109 g_defined_balance_id.non_tax_earn_frgn_M03_bon := defined_balance_id('NON_TAXABLE_EARN_FRGN_M03_ASG_MTD_BON') ;
2110 -- Bug 10082074
2111 g_defined_balance_id.nts_spec_non_taxable_mth := defined_balance_id('NTS_SPEC_NON_TAXABLE_EARN_ASG_MTD_MTH') ;
2112 g_defined_balance_id.nts_spec_non_taxable_bon := defined_balance_id('NTS_SPEC_NON_TAXABLE_EARN_ASG_MTD_BON') ;
2113 g_defined_balance_id.non_tax_earn_H02_mth := defined_balance_id('NON_TAXABLE_EARN_H02_ASG_MTD_MTH') ;
2114 g_defined_balance_id.non_tax_earn_H02_bon := defined_balance_id('NON_TAXABLE_EARN_H02_ASG_MTD_BON') ;
2115 g_defined_balance_id.non_tax_earn_H03_mth := defined_balance_id('NON_TAXABLE_EARN_H03_ASG_MTD_MTH') ;
2116 g_defined_balance_id.non_tax_earn_H03_bon := defined_balance_id('NON_TAXABLE_EARN_H03_ASG_MTD_BON') ;
2117 g_defined_balance_id.fw_tax_break_earning_mth := defined_balance_id('CALC_TAX_EXEM_ASG_MTD_MTH');
2118 g_defined_balance_id.fw_tax_break_earning_bon := defined_balance_id('CALC_TAX_EXEM_ASG_MTD_BON');
2119
2120
2121 end pay_kr_paykrylg_pkg;