25: l_message VARCHAR2(250);
26: BEGIN
27: l_procedure := g_package||'get_financial_year_start';
28: g_debug := hr_utility.debug_enabled;
29: pay_in_utils.set_location(g_debug,'Entering: '||l_procedure,10);
30:
31: if to_number(to_char(p_date,'MM')) >=4 then
32: l_year := to_char(p_date,'YYYY');
33: pay_in_utils.set_location(g_debug,l_procedure,20);
29: pay_in_utils.set_location(g_debug,'Entering: '||l_procedure,10);
30:
31: if to_number(to_char(p_date,'MM')) >=4 then
32: l_year := to_char(p_date,'YYYY');
33: pay_in_utils.set_location(g_debug,l_procedure,20);
34: else
35: l_year := to_number(to_char(p_date,'YYYY')) -1 ;
36: pay_in_utils.set_location(g_debug,l_procedure,30);
37: end if ;
32: l_year := to_char(p_date,'YYYY');
33: pay_in_utils.set_location(g_debug,l_procedure,20);
34: else
35: l_year := to_number(to_char(p_date,'YYYY')) -1 ;
36: pay_in_utils.set_location(g_debug,l_procedure,30);
37: end if ;
38:
39: pay_in_utils.set_location(g_debug,'Leaving: '||l_procedure,40);
40: return (to_date('01-04-'||l_year,'DD-MM-YYYY'));
35: l_year := to_number(to_char(p_date,'YYYY')) -1 ;
36: pay_in_utils.set_location(g_debug,l_procedure,30);
37: end if ;
38:
39: pay_in_utils.set_location(g_debug,'Leaving: '||l_procedure,40);
40: return (to_date('01-04-'||l_year,'DD-MM-YYYY'));
41: END get_financial_year_start;
42:
43: --------------------------------------------------------------------------
55: l_message VARCHAR2(250);
56: BEGIN
57: l_procedure := g_package||'get_financial_year_end';
58: g_debug := hr_utility.debug_enabled;
59: pay_in_utils.set_location(g_debug,'Entering: '||l_procedure,10);
60:
61: if to_number(to_char(p_date,'MM')) <=3 then
62: l_year := to_char(p_date,'YYYY');
63: pay_in_utils.set_location(g_debug,l_procedure,20);
59: pay_in_utils.set_location(g_debug,'Entering: '||l_procedure,10);
60:
61: if to_number(to_char(p_date,'MM')) <=3 then
62: l_year := to_char(p_date,'YYYY');
63: pay_in_utils.set_location(g_debug,l_procedure,20);
64: else
65: l_year := to_number(to_char(p_date,'YYYY')) +1 ;
66: pay_in_utils.set_location(g_debug,l_procedure,30);
67: end if ;
62: l_year := to_char(p_date,'YYYY');
63: pay_in_utils.set_location(g_debug,l_procedure,20);
64: else
65: l_year := to_number(to_char(p_date,'YYYY')) +1 ;
66: pay_in_utils.set_location(g_debug,l_procedure,30);
67: end if ;
68:
69: pay_in_utils.set_location(g_debug,'Leaving: '||l_procedure,40);
70: return (to_date('31-03-'||l_year,'DD-MM-YYYY')) ;
65: l_year := to_number(to_char(p_date,'YYYY')) +1 ;
66: pay_in_utils.set_location(g_debug,l_procedure,30);
67: end if ;
68:
69: pay_in_utils.set_location(g_debug,'Leaving: '||l_procedure,40);
70: return (to_date('31-03-'||l_year,'DD-MM-YYYY')) ;
71:
72: END get_financial_year_end;
73:
102: l_message VARCHAR2(250);
103: BEGIN
104: g_debug := hr_utility.debug_enabled;
105: l_procedure := g_package ||'get_metro_status';
106: pay_in_utils.set_location(g_debug,'Entering: '||l_procedure,10);
107:
108: IF (g_debug)
109: THEN
110: pay_in_utils.trace('**************************************************','********************');
106: pay_in_utils.set_location(g_debug,'Entering: '||l_procedure,10);
107:
108: IF (g_debug)
109: THEN
110: pay_in_utils.trace('**************************************************','********************');
111: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
112: pay_in_utils.trace('p_assignment_id ',p_assignment_id);
113: pay_in_utils.trace('p_effective_date',p_effective_date);
114: pay_in_utils.trace('**************************************************','********************');
107:
108: IF (g_debug)
109: THEN
110: pay_in_utils.trace('**************************************************','********************');
111: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
112: pay_in_utils.trace('p_assignment_id ',p_assignment_id);
113: pay_in_utils.trace('p_effective_date',p_effective_date);
114: pay_in_utils.trace('**************************************************','********************');
115: END IF;
108: IF (g_debug)
109: THEN
110: pay_in_utils.trace('**************************************************','********************');
111: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
112: pay_in_utils.trace('p_assignment_id ',p_assignment_id);
113: pay_in_utils.trace('p_effective_date',p_effective_date);
114: pay_in_utils.trace('**************************************************','********************');
115: END IF;
116:
109: THEN
110: pay_in_utils.trace('**************************************************','********************');
111: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
112: pay_in_utils.trace('p_assignment_id ',p_assignment_id);
113: pay_in_utils.trace('p_effective_date',p_effective_date);
114: pay_in_utils.trace('**************************************************','********************');
115: END IF;
116:
117: l_status :='N';
110: pay_in_utils.trace('**************************************************','********************');
111: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
112: pay_in_utils.trace('p_assignment_id ',p_assignment_id);
113: pay_in_utils.trace('p_effective_date',p_effective_date);
114: pay_in_utils.trace('**************************************************','********************');
115: END IF;
116:
117: l_status :='N';
118:
120: fetch c_metro_status into l_status;
121: /* Bug 3899924 Added the following IF condition */
122: if c_metro_status%notfound then
123: l_status := 'X';
124: pay_in_utils.set_location(g_debug,l_procedure,20);
125: end if;
126: close c_metro_status;
127:
128: pay_in_utils.set_location(g_debug,'Leaving : '||l_procedure, 30);
124: pay_in_utils.set_location(g_debug,l_procedure,20);
125: end if;
126: close c_metro_status;
127:
128: pay_in_utils.set_location(g_debug,'Leaving : '||l_procedure, 30);
129: return l_status ;
130:
131: END get_metro_status;
132:
163: l_message VARCHAR2(250);
164: BEGIN
165: g_debug := hr_utility.debug_enabled;
166: l_procedure := g_package ||'get_period_number';
167: pay_in_utils.set_location(g_debug,'Entering: '||l_procedure,10);
168:
169: l_period_num :=-99;
170: open csr_get_payroll_period;
171: fetch csr_get_payroll_period into l_start_date, l_end_date , l_period_num;
172: close csr_get_payroll_period;
173:
174: IF (g_debug)
175: THEN
176: pay_in_utils.trace('**************************************************','********************');
177: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
178: pay_in_utils.trace('l_start_date',l_start_date);
179: pay_in_utils.trace('l_end_date',l_end_date);
180: pay_in_utils.trace('l_period_num',l_period_num);
173:
174: IF (g_debug)
175: THEN
176: pay_in_utils.trace('**************************************************','********************');
177: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
178: pay_in_utils.trace('l_start_date',l_start_date);
179: pay_in_utils.trace('l_end_date',l_end_date);
180: pay_in_utils.trace('l_period_num',l_period_num);
181: END IF;
174: IF (g_debug)
175: THEN
176: pay_in_utils.trace('**************************************************','********************');
177: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
178: pay_in_utils.trace('l_start_date',l_start_date);
179: pay_in_utils.trace('l_end_date',l_end_date);
180: pay_in_utils.trace('l_period_num',l_period_num);
181: END IF;
182: pay_in_utils.trace('**************************************************','********************');
175: THEN
176: pay_in_utils.trace('**************************************************','********************');
177: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
178: pay_in_utils.trace('l_start_date',l_start_date);
179: pay_in_utils.trace('l_end_date',l_end_date);
180: pay_in_utils.trace('l_period_num',l_period_num);
181: END IF;
182: pay_in_utils.trace('**************************************************','********************');
183: pay_in_utils.set_location(g_debug,'Leaving: '||l_procedure,20);
176: pay_in_utils.trace('**************************************************','********************');
177: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
178: pay_in_utils.trace('l_start_date',l_start_date);
179: pay_in_utils.trace('l_end_date',l_end_date);
180: pay_in_utils.trace('l_period_num',l_period_num);
181: END IF;
182: pay_in_utils.trace('**************************************************','********************');
183: pay_in_utils.set_location(g_debug,'Leaving: '||l_procedure,20);
184: return l_period_num ;
178: pay_in_utils.trace('l_start_date',l_start_date);
179: pay_in_utils.trace('l_end_date',l_end_date);
180: pay_in_utils.trace('l_period_num',l_period_num);
181: END IF;
182: pay_in_utils.trace('**************************************************','********************');
183: pay_in_utils.set_location(g_debug,'Leaving: '||l_procedure,20);
184: return l_period_num ;
185:
186: END get_period_number;
179: pay_in_utils.trace('l_end_date',l_end_date);
180: pay_in_utils.trace('l_period_num',l_period_num);
181: END IF;
182: pay_in_utils.trace('**************************************************','********************');
183: pay_in_utils.set_location(g_debug,'Leaving: '||l_procedure,20);
184: return l_period_num ;
185:
186: END get_period_number;
187:
258: l_procedure VARCHAR2(100);
259: l_message VARCHAR2(250);
260: BEGIN
261: l_procedure := g_package||'get_house_rent_info_entry_id';
262: pay_in_utils.set_location(g_debug,'Entering: '||l_procedure,10);
263:
264: l_entry_id_type_flag :='E';
265: open c_ele_id ;
266: fetch c_ele_id into l_houserentinfo_entry_id,p_entry_end_date ;
265: open c_ele_id ;
266: fetch c_ele_id into l_houserentinfo_entry_id,p_entry_end_date ;
267: close c_ele_id ;
268:
269: pay_in_utils.set_location(g_debug,l_procedure,20);
270:
271: if l_houserentinfo_entry_id = -999 then
272: --
273: -- element entry does not exist in the current pay period
275: --
276: open c_ele_id_latest ;
277: fetch c_ele_id_latest into l_houserentinfo_entry_id,p_entry_end_date ;
278: close c_ele_id_latest ;
279: pay_in_utils.set_location(g_debug,l_procedure,30);
280:
281: if l_houserentinfo_entry_id = -999 then
282: --
283: -- ok. entry id still not found in this financial year.
283: -- ok. entry id still not found in this financial year.
284: -- Set the rent paid value to 0 for all months in this tax year
285: --
286: p_entry_id_type_flag := 'DT';
287: pay_in_utils.set_location(g_debug,l_procedure,40);
288: else
289: p_entry_id_type_flag := 'DP';
290: pay_in_utils.set_location(g_debug,l_procedure,50);
291: end if;
286: p_entry_id_type_flag := 'DT';
287: pay_in_utils.set_location(g_debug,l_procedure,40);
288: else
289: p_entry_id_type_flag := 'DP';
290: pay_in_utils.set_location(g_debug,l_procedure,50);
291: end if;
292: else
293: p_entry_id_type_flag := 'E';
294: pay_in_utils.set_location(g_debug,l_procedure,60);
290: pay_in_utils.set_location(g_debug,l_procedure,50);
291: end if;
292: else
293: p_entry_id_type_flag := 'E';
294: pay_in_utils.set_location(g_debug,l_procedure,60);
295: end if ;
296:
297: pay_in_utils.set_location(g_debug,'Leaving: '||l_procedure,70);
298: return l_houserentinfo_entry_id ;
293: p_entry_id_type_flag := 'E';
294: pay_in_utils.set_location(g_debug,l_procedure,60);
295: end if ;
296:
297: pay_in_utils.set_location(g_debug,'Leaving: '||l_procedure,70);
298: return l_houserentinfo_entry_id ;
299:
300: END get_house_rent_info_entry_id;
301:
333:
334: BEGIN
335: g_debug := hr_utility.debug_enabled;
336: l_procedure := g_package ||'get_defined_balance';
337: pay_in_utils.set_location(g_debug,'Entering: '||l_procedure, 10);
338: l_message := 'SUCCESS';
339:
340: OPEN csr_def_bal_id;
341: FETCH csr_def_bal_id
341: FETCH csr_def_bal_id
342: INTO l_def_bal_id;
343: CLOSE csr_def_bal_id;
344:
345: pay_in_utils.set_location(g_debug,l_procedure, 20);
346:
347: IF g_debug THEN
348: hr_utility.trace ('. '||RPAD(TRIM(p_balance_type||p_dimension_name),35,' ')||' : '||l_def_bal_id);
349: END IF;
347: IF g_debug THEN
348: hr_utility.trace ('. '||RPAD(TRIM(p_balance_type||p_dimension_name),35,' ')||' : '||l_def_bal_id);
349: END IF;
350:
351: pay_in_utils.set_location(g_debug,'Leaving : '||l_procedure, 30);
352:
353: RETURN l_def_bal_id;
354:
355: EXCEPTION
353: RETURN l_def_bal_id;
354:
355: EXCEPTION
356: WHEN OTHERS THEN
357: l_message := pay_in_utils.get_pay_message('PER_IN_ORACLE_GENERIC_ERROR', 'FUNCTION:'||l_procedure, 'SQLERRMC:'||sqlerrm);
358: hr_utility.trace(l_message);
359: pay_in_utils.set_location(g_debug,'Leaving : '||l_procedure, 40);
360: RETURN -1;
361:
355: EXCEPTION
356: WHEN OTHERS THEN
357: l_message := pay_in_utils.get_pay_message('PER_IN_ORACLE_GENERIC_ERROR', 'FUNCTION:'||l_procedure, 'SQLERRMC:'||sqlerrm);
358: hr_utility.trace(l_message);
359: pay_in_utils.set_location(g_debug,'Leaving : '||l_procedure, 40);
360: RETURN -1;
361:
362: END get_defined_balance ;
363:
384: l_message VARCHAR2(250);
385:
386: BEGIN
387: l_procedure := g_package ||'get_monthly_rent';
388: pay_in_utils.set_location(g_debug,'Entering: '||l_procedure, 10);
389:
390: if p_entry_end_date < p_effective_date then
391: l_effective_date := p_entry_end_date ;
392: else
391: l_effective_date := p_entry_end_date ;
392: else
393: l_effective_date := p_effective_date ;
394: end if ;
395: pay_in_utils.set_location(g_debug,l_procedure, 20);
396:
397: /* Bug:3902174 Added nvl in the below select statement */
398: select nvl(pev.screen_entry_value,0)
399: ,piv.name
423: , 'FEB',11
424: , 'MAR',12
425: );
426: if p_entry_type_flag = 'DT' then
427: pay_in_utils.set_location(g_debug,l_procedure, 30);
428: p_month(1) :='APR';
429: p_month(2) :='MAY';
430: p_month(3) :='JUN';
431: p_month(4) :='JUL';
440: for i in 1..12 loop
441: p_rent_paid(i) :=0;
442: end loop;
443: elsif p_entry_type_flag = 'DP' then
444: pay_in_utils.set_location(g_debug,l_procedure, 40);
445: --
446: -- set rent paid for months after the end date as 0
447: --
448: for i in get_period_number(p_payroll_id,p_entry_end_date)+1..12 loop
458:
459: hr_utility.trace('-------------------------------------------');
460: end if ;
461:
462: pay_in_utils.set_location(g_debug,'Leaving: '||l_procedure, 50);
463:
464: END get_monthly_rent ;
465:
466: --------------------------------------------------------------------------
490: l_procedure VARCHAR2(100);
491: l_message VARCHAR2(250);
492: BEGIN
493: l_procedure := g_package ||'get_monthly_max_assact';
494: pay_in_utils.set_location(g_debug,'Entering: '||l_procedure, 10);
495:
496: /*Bug:3907894 Added ppa.effective_date in the select statement and fetched it in the table l_eff_date_tbl */
497: select paa.assignment_action_id,pay_in_tax_utils.get_period_number(ppa.payroll_id,ppa.date_earned),ppa.date_earned
498: bulk collect into l_assact_tbl,l_month_number_tbl,l_eff_date_tbl
566: end loop ;
567: hr_utility.trace('-------------------------------------------');
568: end if ;
569:
570: pay_in_utils.set_location(g_debug,'Leaving: '||l_procedure, 10);
571: END get_monthly_max_assact;
572:
573: --------------------------------------------------------------------------
574: -- Name : hra_tax_rule --
591: l_message VARCHAR2(250);
592:
593: BEGIN
594: l_procedure := g_package ||'hra_tax_rule';
595: pay_in_utils.set_location(g_debug,'Entering: '||l_procedure, 10);
596:
597: if g_debug then
598: hr_utility.trace('---------------------------------------');
599: hr_utility.trace('hra received -'||hra_received);
614: hr_utility.trace('exempt_hra - '||exempt_hra);
615: hr_utility.trace('taxable hra -'||taxable_hra);
616: hr_utility.trace('---------------------------------------');
617: END IF;
618: pay_in_utils.set_location(g_debug,'Leaving: '||l_procedure, 20);
619:
620: END hra_tax_rule;
621:
622: --------------------------------------------------------------------------
662: l_message VARCHAR2(250);
663:
664: BEGIN
665: l_procedure := g_package ||'historical_update_exists';
666: pay_in_utils.set_location(g_debug,'Entering: '||l_procedure, 10);
667:
668: l_exists :='N' ;
669:
670: open c_exists ;
671: fetch c_exists into l_exists ;
672: close c_exists;
673:
674: if l_exists ='Y' then
675: pay_in_utils.set_location(g_debug,'Leaving: '||l_procedure, 20);
676: return true ;
677: else
678: pay_in_utils.set_location(g_debug,'Leaving: '||l_procedure, 30);
679: return false ;
674: if l_exists ='Y' then
675: pay_in_utils.set_location(g_debug,'Leaving: '||l_procedure, 20);
676: return true ;
677: else
678: pay_in_utils.set_location(g_debug,'Leaving: '||l_procedure, 30);
679: return false ;
680: end if;
681: end historical_update_exists;
682:
709: l_message VARCHAR2(250);
710:
711: BEGIN
712: l_procedure := g_package ||'get_defined_balance';
713: pay_in_utils.set_location(g_debug,'Entering: '||l_procedure, 10);
714:
715: --
716: -- get defined_balance_id
717: --
745:
746: if g_debug then
747: hr_utility.trace('-----------------------------------------');
748: end if ;
749: pay_in_utils.set_location(g_debug,'Leaving: '||l_procedure, 10);
750:
751: end get_hra_bal_information ;
752:
753: --------------------------------------------------------------------------
855: BEGIN
856:
857: g_debug := hr_utility.debug_enabled;
858: l_procedure := g_package ||'taxable_hra';
859: pay_in_utils.set_location(g_debug,'Entering: '||l_procedure, 10);
860:
861: IF (g_debug)
862: THEN
863: pay_in_utils.trace('**************************************************','********************');
859: pay_in_utils.set_location(g_debug,'Entering: '||l_procedure, 10);
860:
861: IF (g_debug)
862: THEN
863: pay_in_utils.trace('**************************************************','********************');
864: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
865: pay_in_utils.trace('p_element_entry_id ',p_element_entry_id );
866: pay_in_utils.trace('p_effective_date ',p_effective_date );
867: pay_in_utils.trace('p_pay_period_num ',p_pay_period_num );
860:
861: IF (g_debug)
862: THEN
863: pay_in_utils.trace('**************************************************','********************');
864: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
865: pay_in_utils.trace('p_element_entry_id ',p_element_entry_id );
866: pay_in_utils.trace('p_effective_date ',p_effective_date );
867: pay_in_utils.trace('p_pay_period_num ',p_pay_period_num );
868: pay_in_utils.trace('p_hra_salary ',p_hra_salary );
861: IF (g_debug)
862: THEN
863: pay_in_utils.trace('**************************************************','********************');
864: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
865: pay_in_utils.trace('p_element_entry_id ',p_element_entry_id );
866: pay_in_utils.trace('p_effective_date ',p_effective_date );
867: pay_in_utils.trace('p_pay_period_num ',p_pay_period_num );
868: pay_in_utils.trace('p_hra_salary ',p_hra_salary );
869: pay_in_utils.trace('p_std_hra_salary ',p_std_hra_salary );
862: THEN
863: pay_in_utils.trace('**************************************************','********************');
864: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
865: pay_in_utils.trace('p_element_entry_id ',p_element_entry_id );
866: pay_in_utils.trace('p_effective_date ',p_effective_date );
867: pay_in_utils.trace('p_pay_period_num ',p_pay_period_num );
868: pay_in_utils.trace('p_hra_salary ',p_hra_salary );
869: pay_in_utils.trace('p_std_hra_salary ',p_std_hra_salary );
870: pay_in_utils.trace('p_hra_allowance_asg_run',p_hra_allowance_asg_run);
863: pay_in_utils.trace('**************************************************','********************');
864: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
865: pay_in_utils.trace('p_element_entry_id ',p_element_entry_id );
866: pay_in_utils.trace('p_effective_date ',p_effective_date );
867: pay_in_utils.trace('p_pay_period_num ',p_pay_period_num );
868: pay_in_utils.trace('p_hra_salary ',p_hra_salary );
869: pay_in_utils.trace('p_std_hra_salary ',p_std_hra_salary );
870: pay_in_utils.trace('p_hra_allowance_asg_run',p_hra_allowance_asg_run);
871: pay_in_utils.trace('p_hra_allowance_asg_ytd',p_hra_allowance_asg_ytd);
864: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
865: pay_in_utils.trace('p_element_entry_id ',p_element_entry_id );
866: pay_in_utils.trace('p_effective_date ',p_effective_date );
867: pay_in_utils.trace('p_pay_period_num ',p_pay_period_num );
868: pay_in_utils.trace('p_hra_salary ',p_hra_salary );
869: pay_in_utils.trace('p_std_hra_salary ',p_std_hra_salary );
870: pay_in_utils.trace('p_hra_allowance_asg_run',p_hra_allowance_asg_run);
871: pay_in_utils.trace('p_hra_allowance_asg_ytd',p_hra_allowance_asg_ytd);
872: pay_in_utils.trace('p_std_hra_allow_asg_run',p_std_hra_allow_asg_run);
865: pay_in_utils.trace('p_element_entry_id ',p_element_entry_id );
866: pay_in_utils.trace('p_effective_date ',p_effective_date );
867: pay_in_utils.trace('p_pay_period_num ',p_pay_period_num );
868: pay_in_utils.trace('p_hra_salary ',p_hra_salary );
869: pay_in_utils.trace('p_std_hra_salary ',p_std_hra_salary );
870: pay_in_utils.trace('p_hra_allowance_asg_run',p_hra_allowance_asg_run);
871: pay_in_utils.trace('p_hra_allowance_asg_ytd',p_hra_allowance_asg_ytd);
872: pay_in_utils.trace('p_std_hra_allow_asg_run',p_std_hra_allow_asg_run);
873: pay_in_utils.trace('p_std_hra_allow_asg_ytd',p_std_hra_allow_asg_ytd);
866: pay_in_utils.trace('p_effective_date ',p_effective_date );
867: pay_in_utils.trace('p_pay_period_num ',p_pay_period_num );
868: pay_in_utils.trace('p_hra_salary ',p_hra_salary );
869: pay_in_utils.trace('p_std_hra_salary ',p_std_hra_salary );
870: pay_in_utils.trace('p_hra_allowance_asg_run',p_hra_allowance_asg_run);
871: pay_in_utils.trace('p_hra_allowance_asg_ytd',p_hra_allowance_asg_ytd);
872: pay_in_utils.trace('p_std_hra_allow_asg_run',p_std_hra_allow_asg_run);
873: pay_in_utils.trace('p_std_hra_allow_asg_ytd',p_std_hra_allow_asg_ytd);
874: pay_in_utils.trace('**************************************************','********************');
867: pay_in_utils.trace('p_pay_period_num ',p_pay_period_num );
868: pay_in_utils.trace('p_hra_salary ',p_hra_salary );
869: pay_in_utils.trace('p_std_hra_salary ',p_std_hra_salary );
870: pay_in_utils.trace('p_hra_allowance_asg_run',p_hra_allowance_asg_run);
871: pay_in_utils.trace('p_hra_allowance_asg_ytd',p_hra_allowance_asg_ytd);
872: pay_in_utils.trace('p_std_hra_allow_asg_run',p_std_hra_allow_asg_run);
873: pay_in_utils.trace('p_std_hra_allow_asg_ytd',p_std_hra_allow_asg_ytd);
874: pay_in_utils.trace('**************************************************','********************');
875: END IF;
868: pay_in_utils.trace('p_hra_salary ',p_hra_salary );
869: pay_in_utils.trace('p_std_hra_salary ',p_std_hra_salary );
870: pay_in_utils.trace('p_hra_allowance_asg_run',p_hra_allowance_asg_run);
871: pay_in_utils.trace('p_hra_allowance_asg_ytd',p_hra_allowance_asg_ytd);
872: pay_in_utils.trace('p_std_hra_allow_asg_run',p_std_hra_allow_asg_run);
873: pay_in_utils.trace('p_std_hra_allow_asg_ytd',p_std_hra_allow_asg_ytd);
874: pay_in_utils.trace('**************************************************','********************');
875: END IF;
876:
869: pay_in_utils.trace('p_std_hra_salary ',p_std_hra_salary );
870: pay_in_utils.trace('p_hra_allowance_asg_run',p_hra_allowance_asg_run);
871: pay_in_utils.trace('p_hra_allowance_asg_ytd',p_hra_allowance_asg_ytd);
872: pay_in_utils.trace('p_std_hra_allow_asg_run',p_std_hra_allow_asg_run);
873: pay_in_utils.trace('p_std_hra_allow_asg_ytd',p_std_hra_allow_asg_ytd);
874: pay_in_utils.trace('**************************************************','********************');
875: END IF;
876:
877:
870: pay_in_utils.trace('p_hra_allowance_asg_run',p_hra_allowance_asg_run);
871: pay_in_utils.trace('p_hra_allowance_asg_ytd',p_hra_allowance_asg_ytd);
872: pay_in_utils.trace('p_std_hra_allow_asg_run',p_std_hra_allow_asg_run);
873: pay_in_utils.trace('p_std_hra_allow_asg_ytd',p_std_hra_allow_asg_ytd);
874: pay_in_utils.trace('**************************************************','********************');
875: END IF;
876:
877:
878: l_current_month_rent :=0;
933: CLOSE csr_get_date;
934:
935: hr_utility.trace('INHRA:l_current_gre_end_date : '||l_current_gre_end_date);
936:
937: pay_in_utils.set_location(g_debug,l_procedure, 20);
938:
939: --------------------------------
940: /*IF employee gets terminated*/
941: --------------------------------
958: l_last_period_num := 12;
959: END IF;
960: END IF ;
961:
962: pay_in_utils.set_location(g_debug,l_procedure, 30);
963:
964: IF g_debug THEN
965: hr_utility.trace('INHRA: Last Period Number : '||l_last_period_num);
966: hr_utility.trace('INHRA: current no : '||p_pay_period_num);
982: --
983:
984: l_taxable_hra_def_bal_id := get_defined_balance('Taxable House Rent Allowance', '_ASG_YTD') ;
985:
986: pay_in_utils.set_location(g_debug,l_procedure, 40);
987:
988: --
989: -- get element entry id for House Rent information element
990: --
998: --
999: -- get monthly rent paid for each month in the current tax year
1000: -- April = 1 , May =2 ...March = 12
1001: --
1002: pay_in_utils.set_location(g_debug,l_procedure, 50);
1003:
1004: get_monthly_rent( l_hri_entry_id,
1005: p_effective_date ,
1006: l_entry_type_flag ,
1008: l_payroll_id,
1009: l_rent_paid_tbl ,
1010: l_month_tbl ) ;
1011:
1012: pay_in_utils.set_location(g_debug,l_procedure, 60);
1013: --
1014: -- Calculate annual value of taxable hra before this run
1015: --
1016:
1019: l_year_end,
1020: p_effective_date)
1021: THEN
1022: p_hra_taxable_annual := 0;
1023: pay_in_utils.set_location(g_debug,l_procedure, 70);
1024:
1025: --
1026: -- get monthly balance values for 'House Rent Allowance' and 'HRA Salary'
1027: -- for all the pay periods prior to this run
1055: l_exemption_on_hra ) ;
1056: l_taxable_hra_asg_ytd := l_taxable_hra_asg_ytd + l_taxable_hra ;
1057: END LOOP;
1058: ELSE
1059: pay_in_utils.set_location(g_debug,l_procedure, 80);
1060:
1061: --
1062: -- There is no update on the rent paid information this year
1063: hr_utility.trace('INHRA: --tax_unit_id =>'||l_current_gre);
1099: IF g_debug THEN
1100: hr_utility.trace ('INHRA: Taxable HRA_ASG_PTD : '||l_taxable_hra_curr);
1101: END IF;
1102:
1103: pay_in_utils.set_location(g_debug,l_procedure, 90);
1104: --
1105: -- use only std value for projection
1106: --
1107:
1108: l_hra_salary := p_std_hra_salary;
1109: l_hra_allowance := p_std_hra_allow_asg_run;
1110:
1111:
1112: pay_in_utils.set_location(g_debug,l_procedure, 100);
1113:
1114: FOR i in p_pay_period_num+1..l_last_period_num LOOP
1115: hra_tax_rule( l_hra_allowance ,
1116: l_rent_paid_tbl(i),
1146: null,
1147: null,
1148: 'TRUE');
1149:
1150: pay_in_utils.set_location(g_debug,l_procedure, 110);
1151:
1152: p_hra_taxable_annual := (l_taxable_hra_curr - l_taxable_hra_asg_ptd ) +
1153: (l_taxable_hra_proj - (l_taxable_hra_proj_ptd- l_taxable_hra_asg_ytd));
1154:
1160: END IF;
1161:
1162: RETURN 0 ;
1163:
1164: pay_in_utils.set_location(g_debug,'Leaving: '||l_procedure, 120);
1165: END taxable_hra;
1166:
1167: --------------------------------------------------------------------------
1168: -- Name : prev_emplr_details --
1265: BEGIN
1266:
1267: g_debug := hr_utility.debug_enabled;
1268: l_procedure := g_package ||'prev_emplr_details';
1269: pay_in_utils.set_location(g_debug,'Entering: '||l_procedure,10);
1270: IF (g_debug)
1271: THEN
1272: pay_in_utils.trace('**************************************************','********************');
1273: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
1268: l_procedure := g_package ||'prev_emplr_details';
1269: pay_in_utils.set_location(g_debug,'Entering: '||l_procedure,10);
1270: IF (g_debug)
1271: THEN
1272: pay_in_utils.trace('**************************************************','********************');
1273: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
1274: pay_in_utils.trace('p_assignment_id',p_assignment_id);
1275: pay_in_utils.trace('p_date_earned',p_date_earned);
1276: END IF;
1269: pay_in_utils.set_location(g_debug,'Entering: '||l_procedure,10);
1270: IF (g_debug)
1271: THEN
1272: pay_in_utils.trace('**************************************************','********************');
1273: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
1274: pay_in_utils.trace('p_assignment_id',p_assignment_id);
1275: pay_in_utils.trace('p_date_earned',p_date_earned);
1276: END IF;
1277:
1270: IF (g_debug)
1271: THEN
1272: pay_in_utils.trace('**************************************************','********************');
1273: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
1274: pay_in_utils.trace('p_assignment_id',p_assignment_id);
1275: pay_in_utils.trace('p_date_earned',p_date_earned);
1276: END IF;
1277:
1278: p_prev_sal := 0;
1271: THEN
1272: pay_in_utils.trace('**************************************************','********************');
1273: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
1274: pay_in_utils.trace('p_assignment_id',p_assignment_id);
1275: pay_in_utils.trace('p_date_earned',p_date_earned);
1276: END IF;
1277:
1278: p_prev_sal := 0;
1279: p_prev_ent_alw := 0;
1350: Close c_prev_emp_details;
1351:
1352: IF (g_debug)
1353: THEN
1354: pay_in_utils.trace('p_assignment_id ',p_assignment_id );
1355: pay_in_utils.trace('p_date_earned ',p_date_earned );
1356: pay_in_utils.trace('p_prev_sal ',p_prev_sal );
1357: pay_in_utils.trace('p_prev_tds ',p_prev_tds );
1358: pay_in_utils.trace('p_prev_pt ',p_prev_pt );
1351:
1352: IF (g_debug)
1353: THEN
1354: pay_in_utils.trace('p_assignment_id ',p_assignment_id );
1355: pay_in_utils.trace('p_date_earned ',p_date_earned );
1356: pay_in_utils.trace('p_prev_sal ',p_prev_sal );
1357: pay_in_utils.trace('p_prev_tds ',p_prev_tds );
1358: pay_in_utils.trace('p_prev_pt ',p_prev_pt );
1359: pay_in_utils.trace('p_prev_ent_alw ',p_prev_ent_alw );
1352: IF (g_debug)
1353: THEN
1354: pay_in_utils.trace('p_assignment_id ',p_assignment_id );
1355: pay_in_utils.trace('p_date_earned ',p_date_earned );
1356: pay_in_utils.trace('p_prev_sal ',p_prev_sal );
1357: pay_in_utils.trace('p_prev_tds ',p_prev_tds );
1358: pay_in_utils.trace('p_prev_pt ',p_prev_pt );
1359: pay_in_utils.trace('p_prev_ent_alw ',p_prev_ent_alw );
1360: pay_in_utils.trace('p_prev_pf ',p_prev_pf );
1353: THEN
1354: pay_in_utils.trace('p_assignment_id ',p_assignment_id );
1355: pay_in_utils.trace('p_date_earned ',p_date_earned );
1356: pay_in_utils.trace('p_prev_sal ',p_prev_sal );
1357: pay_in_utils.trace('p_prev_tds ',p_prev_tds );
1358: pay_in_utils.trace('p_prev_pt ',p_prev_pt );
1359: pay_in_utils.trace('p_prev_ent_alw ',p_prev_ent_alw );
1360: pay_in_utils.trace('p_prev_pf ',p_prev_pf );
1361: pay_in_utils.trace('p_prev_super ',p_prev_super );
1354: pay_in_utils.trace('p_assignment_id ',p_assignment_id );
1355: pay_in_utils.trace('p_date_earned ',p_date_earned );
1356: pay_in_utils.trace('p_prev_sal ',p_prev_sal );
1357: pay_in_utils.trace('p_prev_tds ',p_prev_tds );
1358: pay_in_utils.trace('p_prev_pt ',p_prev_pt );
1359: pay_in_utils.trace('p_prev_ent_alw ',p_prev_ent_alw );
1360: pay_in_utils.trace('p_prev_pf ',p_prev_pf );
1361: pay_in_utils.trace('p_prev_super ',p_prev_super );
1362: pay_in_utils.trace('p_prev_govt_ent_alw',p_prev_govt_ent_alw);
1355: pay_in_utils.trace('p_date_earned ',p_date_earned );
1356: pay_in_utils.trace('p_prev_sal ',p_prev_sal );
1357: pay_in_utils.trace('p_prev_tds ',p_prev_tds );
1358: pay_in_utils.trace('p_prev_pt ',p_prev_pt );
1359: pay_in_utils.trace('p_prev_ent_alw ',p_prev_ent_alw );
1360: pay_in_utils.trace('p_prev_pf ',p_prev_pf );
1361: pay_in_utils.trace('p_prev_super ',p_prev_super );
1362: pay_in_utils.trace('p_prev_govt_ent_alw',p_prev_govt_ent_alw);
1363: pay_in_utils.trace('p_prev_grat ',p_prev_grat );
1356: pay_in_utils.trace('p_prev_sal ',p_prev_sal );
1357: pay_in_utils.trace('p_prev_tds ',p_prev_tds );
1358: pay_in_utils.trace('p_prev_pt ',p_prev_pt );
1359: pay_in_utils.trace('p_prev_ent_alw ',p_prev_ent_alw );
1360: pay_in_utils.trace('p_prev_pf ',p_prev_pf );
1361: pay_in_utils.trace('p_prev_super ',p_prev_super );
1362: pay_in_utils.trace('p_prev_govt_ent_alw',p_prev_govt_ent_alw);
1363: pay_in_utils.trace('p_prev_grat ',p_prev_grat );
1364: pay_in_utils.trace('p_prev_leave_encash',p_prev_leave_encash);
1357: pay_in_utils.trace('p_prev_tds ',p_prev_tds );
1358: pay_in_utils.trace('p_prev_pt ',p_prev_pt );
1359: pay_in_utils.trace('p_prev_ent_alw ',p_prev_ent_alw );
1360: pay_in_utils.trace('p_prev_pf ',p_prev_pf );
1361: pay_in_utils.trace('p_prev_super ',p_prev_super );
1362: pay_in_utils.trace('p_prev_govt_ent_alw',p_prev_govt_ent_alw);
1363: pay_in_utils.trace('p_prev_grat ',p_prev_grat );
1364: pay_in_utils.trace('p_prev_leave_encash',p_prev_leave_encash);
1365: pay_in_utils.trace('p_prev_retr_amt ',p_prev_retr_amt );
1358: pay_in_utils.trace('p_prev_pt ',p_prev_pt );
1359: pay_in_utils.trace('p_prev_ent_alw ',p_prev_ent_alw );
1360: pay_in_utils.trace('p_prev_pf ',p_prev_pf );
1361: pay_in_utils.trace('p_prev_super ',p_prev_super );
1362: pay_in_utils.trace('p_prev_govt_ent_alw',p_prev_govt_ent_alw);
1363: pay_in_utils.trace('p_prev_grat ',p_prev_grat );
1364: pay_in_utils.trace('p_prev_leave_encash',p_prev_leave_encash);
1365: pay_in_utils.trace('p_prev_retr_amt ',p_prev_retr_amt );
1366: pay_in_utils.trace('p_designation ',p_designation );
1359: pay_in_utils.trace('p_prev_ent_alw ',p_prev_ent_alw );
1360: pay_in_utils.trace('p_prev_pf ',p_prev_pf );
1361: pay_in_utils.trace('p_prev_super ',p_prev_super );
1362: pay_in_utils.trace('p_prev_govt_ent_alw',p_prev_govt_ent_alw);
1363: pay_in_utils.trace('p_prev_grat ',p_prev_grat );
1364: pay_in_utils.trace('p_prev_leave_encash',p_prev_leave_encash);
1365: pay_in_utils.trace('p_prev_retr_amt ',p_prev_retr_amt );
1366: pay_in_utils.trace('p_designation ',p_designation );
1367: pay_in_utils.trace('p_annual_sal ',p_annual_sal );
1360: pay_in_utils.trace('p_prev_pf ',p_prev_pf );
1361: pay_in_utils.trace('p_prev_super ',p_prev_super );
1362: pay_in_utils.trace('p_prev_govt_ent_alw',p_prev_govt_ent_alw);
1363: pay_in_utils.trace('p_prev_grat ',p_prev_grat );
1364: pay_in_utils.trace('p_prev_leave_encash',p_prev_leave_encash);
1365: pay_in_utils.trace('p_prev_retr_amt ',p_prev_retr_amt );
1366: pay_in_utils.trace('p_designation ',p_designation );
1367: pay_in_utils.trace('p_annual_sal ',p_annual_sal );
1368: pay_in_utils.trace('p_pf_number ',p_pf_number );
1361: pay_in_utils.trace('p_prev_super ',p_prev_super );
1362: pay_in_utils.trace('p_prev_govt_ent_alw',p_prev_govt_ent_alw);
1363: pay_in_utils.trace('p_prev_grat ',p_prev_grat );
1364: pay_in_utils.trace('p_prev_leave_encash',p_prev_leave_encash);
1365: pay_in_utils.trace('p_prev_retr_amt ',p_prev_retr_amt );
1366: pay_in_utils.trace('p_designation ',p_designation );
1367: pay_in_utils.trace('p_annual_sal ',p_annual_sal );
1368: pay_in_utils.trace('p_pf_number ',p_pf_number );
1369: pay_in_utils.trace('p_pf_estab_code ',p_pf_estab_code );
1362: pay_in_utils.trace('p_prev_govt_ent_alw',p_prev_govt_ent_alw);
1363: pay_in_utils.trace('p_prev_grat ',p_prev_grat );
1364: pay_in_utils.trace('p_prev_leave_encash',p_prev_leave_encash);
1365: pay_in_utils.trace('p_prev_retr_amt ',p_prev_retr_amt );
1366: pay_in_utils.trace('p_designation ',p_designation );
1367: pay_in_utils.trace('p_annual_sal ',p_annual_sal );
1368: pay_in_utils.trace('p_pf_number ',p_pf_number );
1369: pay_in_utils.trace('p_pf_estab_code ',p_pf_estab_code );
1370: pay_in_utils.trace('p_epf_number ',p_epf_number );
1363: pay_in_utils.trace('p_prev_grat ',p_prev_grat );
1364: pay_in_utils.trace('p_prev_leave_encash',p_prev_leave_encash);
1365: pay_in_utils.trace('p_prev_retr_amt ',p_prev_retr_amt );
1366: pay_in_utils.trace('p_designation ',p_designation );
1367: pay_in_utils.trace('p_annual_sal ',p_annual_sal );
1368: pay_in_utils.trace('p_pf_number ',p_pf_number );
1369: pay_in_utils.trace('p_pf_estab_code ',p_pf_estab_code );
1370: pay_in_utils.trace('p_epf_number ',p_epf_number );
1371: pay_in_utils.trace('p_emplr_class ',p_emplr_class );
1364: pay_in_utils.trace('p_prev_leave_encash',p_prev_leave_encash);
1365: pay_in_utils.trace('p_prev_retr_amt ',p_prev_retr_amt );
1366: pay_in_utils.trace('p_designation ',p_designation );
1367: pay_in_utils.trace('p_annual_sal ',p_annual_sal );
1368: pay_in_utils.trace('p_pf_number ',p_pf_number );
1369: pay_in_utils.trace('p_pf_estab_code ',p_pf_estab_code );
1370: pay_in_utils.trace('p_epf_number ',p_epf_number );
1371: pay_in_utils.trace('p_emplr_class ',p_emplr_class );
1372: pay_in_utils.trace('p_ltc_curr_block ',p_ltc_curr_block );
1365: pay_in_utils.trace('p_prev_retr_amt ',p_prev_retr_amt );
1366: pay_in_utils.trace('p_designation ',p_designation );
1367: pay_in_utils.trace('p_annual_sal ',p_annual_sal );
1368: pay_in_utils.trace('p_pf_number ',p_pf_number );
1369: pay_in_utils.trace('p_pf_estab_code ',p_pf_estab_code );
1370: pay_in_utils.trace('p_epf_number ',p_epf_number );
1371: pay_in_utils.trace('p_emplr_class ',p_emplr_class );
1372: pay_in_utils.trace('p_ltc_curr_block ',p_ltc_curr_block );
1373: pay_in_utils.trace('p_vrs_amount ',p_vrs_amount );
1366: pay_in_utils.trace('p_designation ',p_designation );
1367: pay_in_utils.trace('p_annual_sal ',p_annual_sal );
1368: pay_in_utils.trace('p_pf_number ',p_pf_number );
1369: pay_in_utils.trace('p_pf_estab_code ',p_pf_estab_code );
1370: pay_in_utils.trace('p_epf_number ',p_epf_number );
1371: pay_in_utils.trace('p_emplr_class ',p_emplr_class );
1372: pay_in_utils.trace('p_ltc_curr_block ',p_ltc_curr_block );
1373: pay_in_utils.trace('p_vrs_amount ',p_vrs_amount );
1374: pay_in_utils.trace('p_prev_sc ',p_prev_sc );
1367: pay_in_utils.trace('p_annual_sal ',p_annual_sal );
1368: pay_in_utils.trace('p_pf_number ',p_pf_number );
1369: pay_in_utils.trace('p_pf_estab_code ',p_pf_estab_code );
1370: pay_in_utils.trace('p_epf_number ',p_epf_number );
1371: pay_in_utils.trace('p_emplr_class ',p_emplr_class );
1372: pay_in_utils.trace('p_ltc_curr_block ',p_ltc_curr_block );
1373: pay_in_utils.trace('p_vrs_amount ',p_vrs_amount );
1374: pay_in_utils.trace('p_prev_sc ',p_prev_sc );
1375: pay_in_utils.trace('p_prev_cess ',p_prev_cess );
1368: pay_in_utils.trace('p_pf_number ',p_pf_number );
1369: pay_in_utils.trace('p_pf_estab_code ',p_pf_estab_code );
1370: pay_in_utils.trace('p_epf_number ',p_epf_number );
1371: pay_in_utils.trace('p_emplr_class ',p_emplr_class );
1372: pay_in_utils.trace('p_ltc_curr_block ',p_ltc_curr_block );
1373: pay_in_utils.trace('p_vrs_amount ',p_vrs_amount );
1374: pay_in_utils.trace('p_prev_sc ',p_prev_sc );
1375: pay_in_utils.trace('p_prev_cess ',p_prev_cess );
1376: pay_in_utils.trace('p_prev_exemp_80gg ',p_prev_exemp_80gg );
1369: pay_in_utils.trace('p_pf_estab_code ',p_pf_estab_code );
1370: pay_in_utils.trace('p_epf_number ',p_epf_number );
1371: pay_in_utils.trace('p_emplr_class ',p_emplr_class );
1372: pay_in_utils.trace('p_ltc_curr_block ',p_ltc_curr_block );
1373: pay_in_utils.trace('p_vrs_amount ',p_vrs_amount );
1374: pay_in_utils.trace('p_prev_sc ',p_prev_sc );
1375: pay_in_utils.trace('p_prev_cess ',p_prev_cess );
1376: pay_in_utils.trace('p_prev_exemp_80gg ',p_prev_exemp_80gg );
1377: pay_in_utils.trace('p_prev_med_reimburse_amt',p_prev_med_reimburse_amt);
1370: pay_in_utils.trace('p_epf_number ',p_epf_number );
1371: pay_in_utils.trace('p_emplr_class ',p_emplr_class );
1372: pay_in_utils.trace('p_ltc_curr_block ',p_ltc_curr_block );
1373: pay_in_utils.trace('p_vrs_amount ',p_vrs_amount );
1374: pay_in_utils.trace('p_prev_sc ',p_prev_sc );
1375: pay_in_utils.trace('p_prev_cess ',p_prev_cess );
1376: pay_in_utils.trace('p_prev_exemp_80gg ',p_prev_exemp_80gg );
1377: pay_in_utils.trace('p_prev_med_reimburse_amt',p_prev_med_reimburse_amt);
1378: pay_in_utils.trace('p_prev_exemp_80ccd' ,p_prev_exemp_80ccd);
1371: pay_in_utils.trace('p_emplr_class ',p_emplr_class );
1372: pay_in_utils.trace('p_ltc_curr_block ',p_ltc_curr_block );
1373: pay_in_utils.trace('p_vrs_amount ',p_vrs_amount );
1374: pay_in_utils.trace('p_prev_sc ',p_prev_sc );
1375: pay_in_utils.trace('p_prev_cess ',p_prev_cess );
1376: pay_in_utils.trace('p_prev_exemp_80gg ',p_prev_exemp_80gg );
1377: pay_in_utils.trace('p_prev_med_reimburse_amt',p_prev_med_reimburse_amt);
1378: pay_in_utils.trace('p_prev_exemp_80ccd' ,p_prev_exemp_80ccd);
1379: END IF;
1372: pay_in_utils.trace('p_ltc_curr_block ',p_ltc_curr_block );
1373: pay_in_utils.trace('p_vrs_amount ',p_vrs_amount );
1374: pay_in_utils.trace('p_prev_sc ',p_prev_sc );
1375: pay_in_utils.trace('p_prev_cess ',p_prev_cess );
1376: pay_in_utils.trace('p_prev_exemp_80gg ',p_prev_exemp_80gg );
1377: pay_in_utils.trace('p_prev_med_reimburse_amt',p_prev_med_reimburse_amt);
1378: pay_in_utils.trace('p_prev_exemp_80ccd' ,p_prev_exemp_80ccd);
1379: END IF;
1380: pay_in_utils.trace('**************************************************','********************');
1373: pay_in_utils.trace('p_vrs_amount ',p_vrs_amount );
1374: pay_in_utils.trace('p_prev_sc ',p_prev_sc );
1375: pay_in_utils.trace('p_prev_cess ',p_prev_cess );
1376: pay_in_utils.trace('p_prev_exemp_80gg ',p_prev_exemp_80gg );
1377: pay_in_utils.trace('p_prev_med_reimburse_amt',p_prev_med_reimburse_amt);
1378: pay_in_utils.trace('p_prev_exemp_80ccd' ,p_prev_exemp_80ccd);
1379: END IF;
1380: pay_in_utils.trace('**************************************************','********************');
1381: pay_in_utils.set_location(g_debug,'Leaving: '||l_procedure,20);
1374: pay_in_utils.trace('p_prev_sc ',p_prev_sc );
1375: pay_in_utils.trace('p_prev_cess ',p_prev_cess );
1376: pay_in_utils.trace('p_prev_exemp_80gg ',p_prev_exemp_80gg );
1377: pay_in_utils.trace('p_prev_med_reimburse_amt',p_prev_med_reimburse_amt);
1378: pay_in_utils.trace('p_prev_exemp_80ccd' ,p_prev_exemp_80ccd);
1379: END IF;
1380: pay_in_utils.trace('**************************************************','********************');
1381: pay_in_utils.set_location(g_debug,'Leaving: '||l_procedure,20);
1382: Return 0;
1376: pay_in_utils.trace('p_prev_exemp_80gg ',p_prev_exemp_80gg );
1377: pay_in_utils.trace('p_prev_med_reimburse_amt',p_prev_med_reimburse_amt);
1378: pay_in_utils.trace('p_prev_exemp_80ccd' ,p_prev_exemp_80ccd);
1379: END IF;
1380: pay_in_utils.trace('**************************************************','********************');
1381: pay_in_utils.set_location(g_debug,'Leaving: '||l_procedure,20);
1382: Return 0;
1383:
1384: End prev_emplr_details;
1377: pay_in_utils.trace('p_prev_med_reimburse_amt',p_prev_med_reimburse_amt);
1378: pay_in_utils.trace('p_prev_exemp_80ccd' ,p_prev_exemp_80ccd);
1379: END IF;
1380: pay_in_utils.trace('**************************************************','********************');
1381: pay_in_utils.set_location(g_debug,'Leaving: '||l_procedure,20);
1382: Return 0;
1383:
1384: End prev_emplr_details;
1385:
1414: l_message VARCHAR2(250);
1415: BEGIN
1416: g_debug := hr_utility.debug_enabled;
1417: l_procedure := g_package ||'other_allowance_details';
1418: pay_in_utils.set_location(g_debug,'Entering: '||l_procedure,10);
1419: IF (g_debug)
1420: THEN
1421: pay_in_utils.trace('**************************************************','********************');
1422: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
1417: l_procedure := g_package ||'other_allowance_details';
1418: pay_in_utils.set_location(g_debug,'Entering: '||l_procedure,10);
1419: IF (g_debug)
1420: THEN
1421: pay_in_utils.trace('**************************************************','********************');
1422: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
1423: pay_in_utils.trace('p_element_type_id',p_element_type_id);
1424: pay_in_utils.trace('p_date_earned',p_date_earned);
1425: END IF;
1418: pay_in_utils.set_location(g_debug,'Entering: '||l_procedure,10);
1419: IF (g_debug)
1420: THEN
1421: pay_in_utils.trace('**************************************************','********************');
1422: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
1423: pay_in_utils.trace('p_element_type_id',p_element_type_id);
1424: pay_in_utils.trace('p_date_earned',p_date_earned);
1425: END IF;
1426:
1419: IF (g_debug)
1420: THEN
1421: pay_in_utils.trace('**************************************************','********************');
1422: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
1423: pay_in_utils.trace('p_element_type_id',p_element_type_id);
1424: pay_in_utils.trace('p_date_earned',p_date_earned);
1425: END IF;
1426:
1427:
1420: THEN
1421: pay_in_utils.trace('**************************************************','********************');
1422: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
1423: pay_in_utils.trace('p_element_type_id',p_element_type_id);
1424: pay_in_utils.trace('p_date_earned',p_date_earned);
1425: END IF;
1426:
1427:
1428: OPEN c_alw_details;
1434: CLOSE c_alw_details;
1435:
1436: IF (g_debug)
1437: THEN
1438: pay_in_utils.set_location(g_debug,'Out Paramters value is',20);
1439: pay_in_utils.trace('p_allowance_name ',p_allowance_name);
1440: pay_in_utils.trace('p_allowance_category ',p_allowance_category);
1441: pay_in_utils.trace('p_max_exemption_amount',p_max_exemption_amount);
1442: pay_in_utils.trace('p_nature_of_expense ',p_nature_of_expense);
1435:
1436: IF (g_debug)
1437: THEN
1438: pay_in_utils.set_location(g_debug,'Out Paramters value is',20);
1439: pay_in_utils.trace('p_allowance_name ',p_allowance_name);
1440: pay_in_utils.trace('p_allowance_category ',p_allowance_category);
1441: pay_in_utils.trace('p_max_exemption_amount',p_max_exemption_amount);
1442: pay_in_utils.trace('p_nature_of_expense ',p_nature_of_expense);
1443: END IF;
1436: IF (g_debug)
1437: THEN
1438: pay_in_utils.set_location(g_debug,'Out Paramters value is',20);
1439: pay_in_utils.trace('p_allowance_name ',p_allowance_name);
1440: pay_in_utils.trace('p_allowance_category ',p_allowance_category);
1441: pay_in_utils.trace('p_max_exemption_amount',p_max_exemption_amount);
1442: pay_in_utils.trace('p_nature_of_expense ',p_nature_of_expense);
1443: END IF;
1444:
1437: THEN
1438: pay_in_utils.set_location(g_debug,'Out Paramters value is',20);
1439: pay_in_utils.trace('p_allowance_name ',p_allowance_name);
1440: pay_in_utils.trace('p_allowance_category ',p_allowance_category);
1441: pay_in_utils.trace('p_max_exemption_amount',p_max_exemption_amount);
1442: pay_in_utils.trace('p_nature_of_expense ',p_nature_of_expense);
1443: END IF;
1444:
1445: pay_in_utils.trace('**************************************************','********************');
1438: pay_in_utils.set_location(g_debug,'Out Paramters value is',20);
1439: pay_in_utils.trace('p_allowance_name ',p_allowance_name);
1440: pay_in_utils.trace('p_allowance_category ',p_allowance_category);
1441: pay_in_utils.trace('p_max_exemption_amount',p_max_exemption_amount);
1442: pay_in_utils.trace('p_nature_of_expense ',p_nature_of_expense);
1443: END IF;
1444:
1445: pay_in_utils.trace('**************************************************','********************');
1446: pay_in_utils.set_location(g_debug,'Leaving: '||l_procedure,20);
1441: pay_in_utils.trace('p_max_exemption_amount',p_max_exemption_amount);
1442: pay_in_utils.trace('p_nature_of_expense ',p_nature_of_expense);
1443: END IF;
1444:
1445: pay_in_utils.trace('**************************************************','********************');
1446: pay_in_utils.set_location(g_debug,'Leaving: '||l_procedure,20);
1447: Return 0;
1448: END other_allowance_details;
1449:
1442: pay_in_utils.trace('p_nature_of_expense ',p_nature_of_expense);
1443: END IF;
1444:
1445: pay_in_utils.trace('**************************************************','********************');
1446: pay_in_utils.set_location(g_debug,'Leaving: '||l_procedure,20);
1447: Return 0;
1448: END other_allowance_details;
1449:
1450: --------------------------------------------------------------------------
1480: l_message VARCHAR2(250);
1481: BEGIN
1482: g_debug := hr_utility.debug_enabled;
1483: l_procedure := g_package ||'get_disability_details';
1484: pay_in_utils.set_location(g_debug,'Entering: '||l_procedure,10);
1485:
1486: IF (g_debug)
1487: THEN
1488: pay_in_utils.trace('**************************************************','********************');
1484: pay_in_utils.set_location(g_debug,'Entering: '||l_procedure,10);
1485:
1486: IF (g_debug)
1487: THEN
1488: pay_in_utils.trace('**************************************************','********************');
1489: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
1490: pay_in_utils.trace('p_assignment_id',p_assignment_id);
1491: pay_in_utils.trace('p_date_earned',p_date_earned);
1492: END IF;
1485:
1486: IF (g_debug)
1487: THEN
1488: pay_in_utils.trace('**************************************************','********************');
1489: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
1490: pay_in_utils.trace('p_assignment_id',p_assignment_id);
1491: pay_in_utils.trace('p_date_earned',p_date_earned);
1492: END IF;
1493:
1486: IF (g_debug)
1487: THEN
1488: pay_in_utils.trace('**************************************************','********************');
1489: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
1490: pay_in_utils.trace('p_assignment_id',p_assignment_id);
1491: pay_in_utils.trace('p_date_earned',p_date_earned);
1492: END IF;
1493:
1494: l_catg := 'XX';
1487: THEN
1488: pay_in_utils.trace('**************************************************','********************');
1489: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
1490: pay_in_utils.trace('p_assignment_id',p_assignment_id);
1491: pay_in_utils.trace('p_date_earned',p_date_earned);
1492: END IF;
1493:
1494: l_catg := 'XX';
1495: l_degree := 0;
1504: p_disable_proof := l_proof;
1505:
1506: IF (g_debug)
1507: THEN
1508: pay_in_utils.set_location(g_debug,'Out Paramters value is',20);
1509: pay_in_utils.trace('p_disable_catg ',p_disable_catg);
1510: pay_in_utils.trace('p_disable_degree ',p_disable_degree);
1511: pay_in_utils.trace('p_disable_proof',p_disable_proof);
1512: END IF;
1505:
1506: IF (g_debug)
1507: THEN
1508: pay_in_utils.set_location(g_debug,'Out Paramters value is',20);
1509: pay_in_utils.trace('p_disable_catg ',p_disable_catg);
1510: pay_in_utils.trace('p_disable_degree ',p_disable_degree);
1511: pay_in_utils.trace('p_disable_proof',p_disable_proof);
1512: END IF;
1513:
1506: IF (g_debug)
1507: THEN
1508: pay_in_utils.set_location(g_debug,'Out Paramters value is',20);
1509: pay_in_utils.trace('p_disable_catg ',p_disable_catg);
1510: pay_in_utils.trace('p_disable_degree ',p_disable_degree);
1511: pay_in_utils.trace('p_disable_proof',p_disable_proof);
1512: END IF;
1513:
1514: pay_in_utils.trace('**************************************************','********************');
1507: THEN
1508: pay_in_utils.set_location(g_debug,'Out Paramters value is',20);
1509: pay_in_utils.trace('p_disable_catg ',p_disable_catg);
1510: pay_in_utils.trace('p_disable_degree ',p_disable_degree);
1511: pay_in_utils.trace('p_disable_proof',p_disable_proof);
1512: END IF;
1513:
1514: pay_in_utils.trace('**************************************************','********************');
1515: pay_in_utils.set_location(g_debug,'Leaving: '||l_procedure,20);
1510: pay_in_utils.trace('p_disable_degree ',p_disable_degree);
1511: pay_in_utils.trace('p_disable_proof',p_disable_proof);
1512: END IF;
1513:
1514: pay_in_utils.trace('**************************************************','********************');
1515: pay_in_utils.set_location(g_debug,'Leaving: '||l_procedure,20);
1516: Return 0;
1517:
1518: END get_disability_details;
1511: pay_in_utils.trace('p_disable_proof',p_disable_proof);
1512: END IF;
1513:
1514: pay_in_utils.trace('**************************************************','********************');
1515: pay_in_utils.set_location(g_debug,'Leaving: '||l_procedure,20);
1516: Return 0;
1517:
1518: END get_disability_details;
1519:
1546: l_message VARCHAR2(250);
1547: BEGIN
1548: g_debug := hr_utility.debug_enabled;
1549: l_procedure := g_package ||'get_age';
1550: pay_in_utils.set_location(g_debug,'Entering: '||l_procedure,10);
1551: IF (g_debug)
1552: THEN
1553: pay_in_utils.trace('**************************************************','********************');
1554: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
1549: l_procedure := g_package ||'get_age';
1550: pay_in_utils.set_location(g_debug,'Entering: '||l_procedure,10);
1551: IF (g_debug)
1552: THEN
1553: pay_in_utils.trace('**************************************************','********************');
1554: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
1555: pay_in_utils.trace('p_assignment_id',p_assignment_id);
1556: pay_in_utils.trace('p_date_earned',p_date_earned);
1557: END IF;
1550: pay_in_utils.set_location(g_debug,'Entering: '||l_procedure,10);
1551: IF (g_debug)
1552: THEN
1553: pay_in_utils.trace('**************************************************','********************');
1554: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
1555: pay_in_utils.trace('p_assignment_id',p_assignment_id);
1556: pay_in_utils.trace('p_date_earned',p_date_earned);
1557: END IF;
1558:
1551: IF (g_debug)
1552: THEN
1553: pay_in_utils.trace('**************************************************','********************');
1554: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
1555: pay_in_utils.trace('p_assignment_id',p_assignment_id);
1556: pay_in_utils.trace('p_date_earned',p_date_earned);
1557: END IF;
1558:
1559:
1552: THEN
1553: pay_in_utils.trace('**************************************************','********************');
1554: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
1555: pay_in_utils.trace('p_assignment_id',p_assignment_id);
1556: pay_in_utils.trace('p_date_earned',p_date_earned);
1557: END IF;
1558:
1559:
1560: Open c_dob;
1566: l_age := trunc((l_cur_fin_year_end - l_dob)/365);
1567:
1568: IF (g_debug)
1569: THEN
1570: pay_in_utils.trace('l_cur_fin_year_end',l_cur_fin_year_end);
1571: pay_in_utils.trace('l_age',l_age);
1572: END IF;
1573:
1574: pay_in_utils.trace('**************************************************','********************');
1567:
1568: IF (g_debug)
1569: THEN
1570: pay_in_utils.trace('l_cur_fin_year_end',l_cur_fin_year_end);
1571: pay_in_utils.trace('l_age',l_age);
1572: END IF;
1573:
1574: pay_in_utils.trace('**************************************************','********************');
1575: pay_in_utils.set_location(g_debug,'Leaving: '||l_procedure,20);
1570: pay_in_utils.trace('l_cur_fin_year_end',l_cur_fin_year_end);
1571: pay_in_utils.trace('l_age',l_age);
1572: END IF;
1573:
1574: pay_in_utils.trace('**************************************************','********************');
1575: pay_in_utils.set_location(g_debug,'Leaving: '||l_procedure,20);
1576:
1577: Return l_age;
1578:
1571: pay_in_utils.trace('l_age',l_age);
1572: END IF;
1573:
1574: pay_in_utils.trace('**************************************************','********************');
1575: pay_in_utils.set_location(g_debug,'Leaving: '||l_procedure,20);
1576:
1577: Return l_age;
1578:
1579: END get_age;
1618:
1619: BEGIN
1620: g_debug := hr_utility.debug_enabled;
1621: l_procedure := g_package ||'act_rent_paid';
1622: pay_in_utils.set_location(g_debug,'Entering: '||l_procedure,10);
1623: IF (g_debug)
1624: THEN
1625: pay_in_utils.trace('**************************************************','********************');
1626: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
1621: l_procedure := g_package ||'act_rent_paid';
1622: pay_in_utils.set_location(g_debug,'Entering: '||l_procedure,10);
1623: IF (g_debug)
1624: THEN
1625: pay_in_utils.trace('**************************************************','********************');
1626: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
1627: pay_in_utils.trace('p_assignment_action_id',p_assignment_action_id);
1628: pay_in_utils.trace('p_date_earned',p_date_earned);
1629: END IF;
1622: pay_in_utils.set_location(g_debug,'Entering: '||l_procedure,10);
1623: IF (g_debug)
1624: THEN
1625: pay_in_utils.trace('**************************************************','********************');
1626: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
1627: pay_in_utils.trace('p_assignment_action_id',p_assignment_action_id);
1628: pay_in_utils.trace('p_date_earned',p_date_earned);
1629: END IF;
1630:
1623: IF (g_debug)
1624: THEN
1625: pay_in_utils.trace('**************************************************','********************');
1626: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
1627: pay_in_utils.trace('p_assignment_action_id',p_assignment_action_id);
1628: pay_in_utils.trace('p_date_earned',p_date_earned);
1629: END IF;
1630:
1631: l_year_start := pay_in_tax_utils.get_financial_year_start(p_date_earned);
1624: THEN
1625: pay_in_utils.trace('**************************************************','********************');
1626: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
1627: pay_in_utils.trace('p_assignment_action_id',p_assignment_action_id);
1628: pay_in_utils.trace('p_date_earned',p_date_earned);
1629: END IF;
1630:
1631: l_year_start := pay_in_tax_utils.get_financial_year_start(p_date_earned);
1632: l_year_end := pay_in_tax_utils.get_financial_year_end(p_date_earned);
1641: l_entry_end_date );
1642:
1643: IF (g_debug)
1644: THEN
1645: pay_in_utils.trace('l_year_start',l_year_start);
1646: pay_in_utils.trace('l_year_end',l_year_end);
1647: pay_in_utils.trace('l_curr_mon',l_curr_mon);
1648: pay_in_utils.trace('l_hri_entry_id',l_hri_entry_id);
1649: END IF;
1642:
1643: IF (g_debug)
1644: THEN
1645: pay_in_utils.trace('l_year_start',l_year_start);
1646: pay_in_utils.trace('l_year_end',l_year_end);
1647: pay_in_utils.trace('l_curr_mon',l_curr_mon);
1648: pay_in_utils.trace('l_hri_entry_id',l_hri_entry_id);
1649: END IF;
1650:
1643: IF (g_debug)
1644: THEN
1645: pay_in_utils.trace('l_year_start',l_year_start);
1646: pay_in_utils.trace('l_year_end',l_year_end);
1647: pay_in_utils.trace('l_curr_mon',l_curr_mon);
1648: pay_in_utils.trace('l_hri_entry_id',l_hri_entry_id);
1649: END IF;
1650:
1651: If l_entry_type_flag = 'E' Then
1644: THEN
1645: pay_in_utils.trace('l_year_start',l_year_start);
1646: pay_in_utils.trace('l_year_end',l_year_end);
1647: pay_in_utils.trace('l_curr_mon',l_curr_mon);
1648: pay_in_utils.trace('l_hri_entry_id',l_hri_entry_id);
1649: END IF;
1650:
1651: If l_entry_type_flag = 'E' Then
1652: Open c_act_rent_paid(l_hri_entry_id,l_curr_mon);
1652: Open c_act_rent_paid(l_hri_entry_id,l_curr_mon);
1653: Fetch c_act_rent_paid INTO l_rent_paid;
1654: Close c_act_rent_paid;
1655:
1656: pay_in_utils.set_location(g_debug,'Rent paid is' || l_rent_paid,20);
1657: pay_in_utils.trace('**************************************************','********************');
1658: Return fnd_number.canonical_to_number(l_rent_paid);
1659: Else
1660: pay_in_utils.trace('**************************************************','********************');
1653: Fetch c_act_rent_paid INTO l_rent_paid;
1654: Close c_act_rent_paid;
1655:
1656: pay_in_utils.set_location(g_debug,'Rent paid is' || l_rent_paid,20);
1657: pay_in_utils.trace('**************************************************','********************');
1658: Return fnd_number.canonical_to_number(l_rent_paid);
1659: Else
1660: pay_in_utils.trace('**************************************************','********************');
1661: pay_in_utils.set_location(g_debug,'Leaving: '||l_procedure,30);
1656: pay_in_utils.set_location(g_debug,'Rent paid is' || l_rent_paid,20);
1657: pay_in_utils.trace('**************************************************','********************');
1658: Return fnd_number.canonical_to_number(l_rent_paid);
1659: Else
1660: pay_in_utils.trace('**************************************************','********************');
1661: pay_in_utils.set_location(g_debug,'Leaving: '||l_procedure,30);
1662: Return 0;
1663: End If;
1664:
1657: pay_in_utils.trace('**************************************************','********************');
1658: Return fnd_number.canonical_to_number(l_rent_paid);
1659: Else
1660: pay_in_utils.trace('**************************************************','********************');
1661: pay_in_utils.set_location(g_debug,'Leaving: '||l_procedure,30);
1662: Return 0;
1663: End If;
1664:
1665: END act_rent_paid;
1727: l_message VARCHAR2(250);
1728: BEGIN
1729: g_debug := hr_utility.debug_enabled;
1730: l_procedure := g_package ||'check_ee_exists';
1731: pay_in_utils.set_location(g_debug,'Entering: '||l_procedure,10);
1732: IF (g_debug)
1733: THEN
1734: pay_in_utils.trace('**************************************************','********************');
1735: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
1730: l_procedure := g_package ||'check_ee_exists';
1731: pay_in_utils.set_location(g_debug,'Entering: '||l_procedure,10);
1732: IF (g_debug)
1733: THEN
1734: pay_in_utils.trace('**************************************************','********************');
1735: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
1736: pay_in_utils.trace('p_element_name ',p_element_name );
1737: pay_in_utils.trace('p_assignment_id ',p_assignment_id );
1738: pay_in_utils.trace('p_effective_date',p_effective_date);
1731: pay_in_utils.set_location(g_debug,'Entering: '||l_procedure,10);
1732: IF (g_debug)
1733: THEN
1734: pay_in_utils.trace('**************************************************','********************');
1735: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
1736: pay_in_utils.trace('p_element_name ',p_element_name );
1737: pay_in_utils.trace('p_assignment_id ',p_assignment_id );
1738: pay_in_utils.trace('p_effective_date',p_effective_date);
1739: END IF;
1732: IF (g_debug)
1733: THEN
1734: pay_in_utils.trace('**************************************************','********************');
1735: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
1736: pay_in_utils.trace('p_element_name ',p_element_name );
1737: pay_in_utils.trace('p_assignment_id ',p_assignment_id );
1738: pay_in_utils.trace('p_effective_date',p_effective_date);
1739: END IF;
1740: p_element_entry_id := NULL;
1733: THEN
1734: pay_in_utils.trace('**************************************************','********************');
1735: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
1736: pay_in_utils.trace('p_element_name ',p_element_name );
1737: pay_in_utils.trace('p_assignment_id ',p_assignment_id );
1738: pay_in_utils.trace('p_effective_date',p_effective_date);
1739: END IF;
1740: p_element_entry_id := NULL;
1741: p_ee_ovn := NULL;
1734: pay_in_utils.trace('**************************************************','********************');
1735: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
1736: pay_in_utils.trace('p_element_name ',p_element_name );
1737: pay_in_utils.trace('p_assignment_id ',p_assignment_id );
1738: pay_in_utils.trace('p_effective_date',p_effective_date);
1739: END IF;
1740: p_element_entry_id := NULL;
1741: p_ee_ovn := NULL;
1742:
1754: FETCH csr_element_link INTO l_element_link_id;
1755:
1756: IF csr_element_link%NOTFOUND OR l_element_link_id IS NULL THEN
1757: CLOSE csr_element_link;
1758: pay_in_utils.set_location(g_debug,'Leaving: '||l_procedure,20);
1759: RETURN FALSE;
1760: ELSE
1761: IF g_debug THEN
1762: hr_utility.trace('Element Link ID : '||l_element_link_id);
1772:
1773: IF p_element_entry_id IS NULL OR csr_element_entry%NOTFOUND
1774: THEN
1775: CLOSE csr_element_entry;
1776: pay_in_utils.set_location(g_debug,'Leaving: '||l_procedure,30);
1777: RETURN FALSE;
1778: END IF;
1779: END IF;
1780: pay_in_utils.trace('**************************************************','********************');
1776: pay_in_utils.set_location(g_debug,'Leaving: '||l_procedure,30);
1777: RETURN FALSE;
1778: END IF;
1779: END IF;
1780: pay_in_utils.trace('**************************************************','********************');
1781: pay_in_utils.set_location(g_debug,'Leaving: '||l_procedure,40);
1782: RETURN TRUE;
1783: --
1784: END check_ee_exists;
1777: RETURN FALSE;
1778: END IF;
1779: END IF;
1780: pay_in_utils.trace('**************************************************','********************');
1781: pay_in_utils.set_location(g_debug,'Leaving: '||l_procedure,40);
1782: RETURN TRUE;
1783: --
1784: END check_ee_exists;
1785: --------------------------------------------------------------------------
1811: l_message VARCHAR2(250);
1812: BEGIN
1813: g_debug := hr_utility.debug_enabled;
1814: l_procedure := g_package ||'get_date_earned';
1815: pay_in_utils.set_location(g_debug,'Entering: '||l_procedure,10);
1816: IF (g_debug)
1817: THEN
1818: pay_in_utils.trace('**************************************************','********************');
1819: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
1814: l_procedure := g_package ||'get_date_earned';
1815: pay_in_utils.set_location(g_debug,'Entering: '||l_procedure,10);
1816: IF (g_debug)
1817: THEN
1818: pay_in_utils.trace('**************************************************','********************');
1819: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
1820: pay_in_utils.trace('p_element_entry_id',p_element_entry_id);
1821: pay_in_utils.trace('p_element_type_id ',p_element_type_id);
1822: pay_in_utils.trace('p_assignment_id ',p_assignment_id);
1815: pay_in_utils.set_location(g_debug,'Entering: '||l_procedure,10);
1816: IF (g_debug)
1817: THEN
1818: pay_in_utils.trace('**************************************************','********************');
1819: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
1820: pay_in_utils.trace('p_element_entry_id',p_element_entry_id);
1821: pay_in_utils.trace('p_element_type_id ',p_element_type_id);
1822: pay_in_utils.trace('p_assignment_id ',p_assignment_id);
1823: END IF;
1816: IF (g_debug)
1817: THEN
1818: pay_in_utils.trace('**************************************************','********************');
1819: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
1820: pay_in_utils.trace('p_element_entry_id',p_element_entry_id);
1821: pay_in_utils.trace('p_element_type_id ',p_element_type_id);
1822: pay_in_utils.trace('p_assignment_id ',p_assignment_id);
1823: END IF;
1824:
1817: THEN
1818: pay_in_utils.trace('**************************************************','********************');
1819: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
1820: pay_in_utils.trace('p_element_entry_id',p_element_entry_id);
1821: pay_in_utils.trace('p_element_type_id ',p_element_type_id);
1822: pay_in_utils.trace('p_assignment_id ',p_assignment_id);
1823: END IF;
1824:
1825:
1818: pay_in_utils.trace('**************************************************','********************');
1819: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
1820: pay_in_utils.trace('p_element_entry_id',p_element_entry_id);
1821: pay_in_utils.trace('p_element_type_id ',p_element_type_id);
1822: pay_in_utils.trace('p_assignment_id ',p_assignment_id);
1823: END IF;
1824:
1825:
1826: OPEN c_get_earliest_start_Date;
1826: OPEN c_get_earliest_start_Date;
1827: FETCH c_get_earliest_start_Date INTO l_date;
1828: CLOSE c_get_earliest_start_Date;
1829:
1830: pay_in_utils.trace('**************************************************','********************');
1831: pay_in_utils.set_location(g_debug,'Leaving: '||l_procedure,20);
1832:
1833: IF (g_debug)
1834: THEN
1827: FETCH c_get_earliest_start_Date INTO l_date;
1828: CLOSE c_get_earliest_start_Date;
1829:
1830: pay_in_utils.trace('**************************************************','********************');
1831: pay_in_utils.set_location(g_debug,'Leaving: '||l_procedure,20);
1832:
1833: IF (g_debug)
1834: THEN
1835: pay_in_utils.trace('l_date',l_date);
1831: pay_in_utils.set_location(g_debug,'Leaving: '||l_procedure,20);
1832:
1833: IF (g_debug)
1834: THEN
1835: pay_in_utils.trace('l_date',l_date);
1836: END IF;
1837:
1838: RETURN l_date;
1839: END get_entry_earliest_start_date;
1860: l_message VARCHAR2(250);
1861: BEGIN
1862: g_debug := hr_utility.debug_enabled;
1863: l_procedure := g_package ||'get_projected_loan_perquisite';
1864: pay_in_utils.set_location(g_debug,'Entering: '||l_procedure,10);
1865: IF (g_debug)
1866: THEN
1867: pay_in_utils.trace('**************************************************','********************');
1868: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
1863: l_procedure := g_package ||'get_projected_loan_perquisite';
1864: pay_in_utils.set_location(g_debug,'Entering: '||l_procedure,10);
1865: IF (g_debug)
1866: THEN
1867: pay_in_utils.trace('**************************************************','********************');
1868: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
1869: pay_in_utils.trace('p_outstanding_balance ',p_outstanding_balance );
1870: pay_in_utils.trace('p_remaining_period ',p_remaining_period );
1871: pay_in_utils.trace('p_employee_contribution',p_employee_contribution);
1864: pay_in_utils.set_location(g_debug,'Entering: '||l_procedure,10);
1865: IF (g_debug)
1866: THEN
1867: pay_in_utils.trace('**************************************************','********************');
1868: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
1869: pay_in_utils.trace('p_outstanding_balance ',p_outstanding_balance );
1870: pay_in_utils.trace('p_remaining_period ',p_remaining_period );
1871: pay_in_utils.trace('p_employee_contribution',p_employee_contribution);
1872: pay_in_utils.trace('p_interest ',p_interest );
1865: IF (g_debug)
1866: THEN
1867: pay_in_utils.trace('**************************************************','********************');
1868: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
1869: pay_in_utils.trace('p_outstanding_balance ',p_outstanding_balance );
1870: pay_in_utils.trace('p_remaining_period ',p_remaining_period );
1871: pay_in_utils.trace('p_employee_contribution',p_employee_contribution);
1872: pay_in_utils.trace('p_interest ',p_interest );
1873: pay_in_utils.trace('p_concessional_interest',p_concessional_interest);
1866: THEN
1867: pay_in_utils.trace('**************************************************','********************');
1868: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
1869: pay_in_utils.trace('p_outstanding_balance ',p_outstanding_balance );
1870: pay_in_utils.trace('p_remaining_period ',p_remaining_period );
1871: pay_in_utils.trace('p_employee_contribution',p_employee_contribution);
1872: pay_in_utils.trace('p_interest ',p_interest );
1873: pay_in_utils.trace('p_concessional_interest',p_concessional_interest);
1874: END IF;
1867: pay_in_utils.trace('**************************************************','********************');
1868: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
1869: pay_in_utils.trace('p_outstanding_balance ',p_outstanding_balance );
1870: pay_in_utils.trace('p_remaining_period ',p_remaining_period );
1871: pay_in_utils.trace('p_employee_contribution',p_employee_contribution);
1872: pay_in_utils.trace('p_interest ',p_interest );
1873: pay_in_utils.trace('p_concessional_interest',p_concessional_interest);
1874: END IF;
1875:
1868: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
1869: pay_in_utils.trace('p_outstanding_balance ',p_outstanding_balance );
1870: pay_in_utils.trace('p_remaining_period ',p_remaining_period );
1871: pay_in_utils.trace('p_employee_contribution',p_employee_contribution);
1872: pay_in_utils.trace('p_interest ',p_interest );
1873: pay_in_utils.trace('p_concessional_interest',p_concessional_interest);
1874: END IF;
1875:
1876:
1869: pay_in_utils.trace('p_outstanding_balance ',p_outstanding_balance );
1870: pay_in_utils.trace('p_remaining_period ',p_remaining_period );
1871: pay_in_utils.trace('p_employee_contribution',p_employee_contribution);
1872: pay_in_utils.trace('p_interest ',p_interest );
1873: pay_in_utils.trace('p_concessional_interest',p_concessional_interest);
1874: END IF;
1875:
1876:
1877:
1886: END LOOP;
1887:
1888: IF (g_debug)
1889: THEN
1890: pay_in_utils.trace('p_value',p_value);
1891: END IF;
1892:
1893: pay_in_utils.trace('**************************************************','********************');
1894: pay_in_utils.set_location(g_debug,'Leaving: '||l_procedure,20);
1889: THEN
1890: pay_in_utils.trace('p_value',p_value);
1891: END IF;
1892:
1893: pay_in_utils.trace('**************************************************','********************');
1894: pay_in_utils.set_location(g_debug,'Leaving: '||l_procedure,20);
1895:
1896: RETURN p_value;
1897:
1890: pay_in_utils.trace('p_value',p_value);
1891: END IF;
1892:
1893: pay_in_utils.trace('**************************************************','********************');
1894: pay_in_utils.set_location(g_debug,'Leaving: '||l_procedure,20);
1895:
1896: RETURN p_value;
1897:
1898: END get_projected_loan_perquisite;
1935:
1936: BEGIN
1937: g_debug := hr_utility.debug_enabled ;
1938: l_procedure := 'pay_in_tax_utils.get_perquisite_details' ;
1939: pay_in_utils.set_location(g_debug,'Entering: '||l_procedure,10);
1940: p_taxable_flag := 'Y';
1941:
1942: OPEN c_get_perk_details;
1943: FETCH c_get_perk_details INTO l_perk_name ,p_taxable_flag;
1942: OPEN c_get_perk_details;
1943: FETCH c_get_perk_details INTO l_perk_name ,p_taxable_flag;
1944: CLOSE c_get_perk_details;
1945:
1946: pay_in_utils.set_location(g_debug,l_procedure,20);
1947:
1948: OPEN c_exemption (l_perk_name);
1949: FETCH c_exemption INTO p_exemption_amount;
1950: CLOSE c_exemption;
1958: EXCEPTION
1959: WHEN NO_DATA_FOUND THEN
1960: RETURN -1;
1961: WHEN OTHERS THEN
1962: l_message := pay_in_utils.get_pay_message('PER_IN_ORACLE_GENERIC_ERROR', 'FUNCTION:'||l_procedure, 'SQLERRMC:'||sqlerrm);
1963: pay_in_utils.set_location(g_debug,' Leaving : '||l_procedure, 40);
1964: hr_utility.trace(l_message);
1965: RETURN -1;
1966:
1959: WHEN NO_DATA_FOUND THEN
1960: RETURN -1;
1961: WHEN OTHERS THEN
1962: l_message := pay_in_utils.get_pay_message('PER_IN_ORACLE_GENERIC_ERROR', 'FUNCTION:'||l_procedure, 'SQLERRMC:'||sqlerrm);
1963: pay_in_utils.set_location(g_debug,' Leaving : '||l_procedure, 40);
1964: hr_utility.trace(l_message);
1965: RETURN -1;
1966:
1967: END get_perquisite_details;
2034:
2035: BEGIN
2036: g_debug := hr_utility.debug_enabled;
2037: l_procedure := g_package ||'calculate_80gg_exemption';
2038: pay_in_utils.set_location(g_debug,'Entering: '||l_procedure,10);
2039: IF (g_debug)
2040: THEN
2041: pay_in_utils.trace('**************************************************','********************');
2042: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
2037: l_procedure := g_package ||'calculate_80gg_exemption';
2038: pay_in_utils.set_location(g_debug,'Entering: '||l_procedure,10);
2039: IF (g_debug)
2040: THEN
2041: pay_in_utils.trace('**************************************************','********************');
2042: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
2043: pay_in_utils.trace('p_assact_id ',p_assact_id );
2044: pay_in_utils.trace('p_assignment_id ',p_assignment_id );
2045: pay_in_utils.trace('p_payroll_id ',p_payroll_id );
2038: pay_in_utils.set_location(g_debug,'Entering: '||l_procedure,10);
2039: IF (g_debug)
2040: THEN
2041: pay_in_utils.trace('**************************************************','********************');
2042: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
2043: pay_in_utils.trace('p_assact_id ',p_assact_id );
2044: pay_in_utils.trace('p_assignment_id ',p_assignment_id );
2045: pay_in_utils.trace('p_payroll_id ',p_payroll_id );
2046: pay_in_utils.trace('p_effective_date ',p_effective_date );
2039: IF (g_debug)
2040: THEN
2041: pay_in_utils.trace('**************************************************','********************');
2042: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
2043: pay_in_utils.trace('p_assact_id ',p_assact_id );
2044: pay_in_utils.trace('p_assignment_id ',p_assignment_id );
2045: pay_in_utils.trace('p_payroll_id ',p_payroll_id );
2046: pay_in_utils.trace('p_effective_date ',p_effective_date );
2047: pay_in_utils.trace('p_std_exemption ',p_std_exemption );
2040: THEN
2041: pay_in_utils.trace('**************************************************','********************');
2042: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
2043: pay_in_utils.trace('p_assact_id ',p_assact_id );
2044: pay_in_utils.trace('p_assignment_id ',p_assignment_id );
2045: pay_in_utils.trace('p_payroll_id ',p_payroll_id );
2046: pay_in_utils.trace('p_effective_date ',p_effective_date );
2047: pay_in_utils.trace('p_std_exemption ',p_std_exemption );
2048: pay_in_utils.trace('p_adj_tot_income ',p_adj_tot_income );
2041: pay_in_utils.trace('**************************************************','********************');
2042: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
2043: pay_in_utils.trace('p_assact_id ',p_assact_id );
2044: pay_in_utils.trace('p_assignment_id ',p_assignment_id );
2045: pay_in_utils.trace('p_payroll_id ',p_payroll_id );
2046: pay_in_utils.trace('p_effective_date ',p_effective_date );
2047: pay_in_utils.trace('p_std_exemption ',p_std_exemption );
2048: pay_in_utils.trace('p_adj_tot_income ',p_adj_tot_income );
2049: pay_in_utils.trace('p_std_exem_percent ',p_std_exem_percent );
2042: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
2043: pay_in_utils.trace('p_assact_id ',p_assact_id );
2044: pay_in_utils.trace('p_assignment_id ',p_assignment_id );
2045: pay_in_utils.trace('p_payroll_id ',p_payroll_id );
2046: pay_in_utils.trace('p_effective_date ',p_effective_date );
2047: pay_in_utils.trace('p_std_exemption ',p_std_exemption );
2048: pay_in_utils.trace('p_adj_tot_income ',p_adj_tot_income );
2049: pay_in_utils.trace('p_std_exem_percent ',p_std_exem_percent );
2050: pay_in_utils.trace('p_start_period_num ',p_start_period_num );
2043: pay_in_utils.trace('p_assact_id ',p_assact_id );
2044: pay_in_utils.trace('p_assignment_id ',p_assignment_id );
2045: pay_in_utils.trace('p_payroll_id ',p_payroll_id );
2046: pay_in_utils.trace('p_effective_date ',p_effective_date );
2047: pay_in_utils.trace('p_std_exemption ',p_std_exemption );
2048: pay_in_utils.trace('p_adj_tot_income ',p_adj_tot_income );
2049: pay_in_utils.trace('p_std_exem_percent ',p_std_exem_percent );
2050: pay_in_utils.trace('p_start_period_num ',p_start_period_num );
2051: pay_in_utils.trace('p_last_period_number',p_last_period_number);
2044: pay_in_utils.trace('p_assignment_id ',p_assignment_id );
2045: pay_in_utils.trace('p_payroll_id ',p_payroll_id );
2046: pay_in_utils.trace('p_effective_date ',p_effective_date );
2047: pay_in_utils.trace('p_std_exemption ',p_std_exemption );
2048: pay_in_utils.trace('p_adj_tot_income ',p_adj_tot_income );
2049: pay_in_utils.trace('p_std_exem_percent ',p_std_exem_percent );
2050: pay_in_utils.trace('p_start_period_num ',p_start_period_num );
2051: pay_in_utils.trace('p_last_period_number',p_last_period_number);
2052: pay_in_utils.trace('p_flag ',p_flag );
2045: pay_in_utils.trace('p_payroll_id ',p_payroll_id );
2046: pay_in_utils.trace('p_effective_date ',p_effective_date );
2047: pay_in_utils.trace('p_std_exemption ',p_std_exemption );
2048: pay_in_utils.trace('p_adj_tot_income ',p_adj_tot_income );
2049: pay_in_utils.trace('p_std_exem_percent ',p_std_exem_percent );
2050: pay_in_utils.trace('p_start_period_num ',p_start_period_num );
2051: pay_in_utils.trace('p_last_period_number',p_last_period_number);
2052: pay_in_utils.trace('p_flag ',p_flag );
2053: END IF;
2046: pay_in_utils.trace('p_effective_date ',p_effective_date );
2047: pay_in_utils.trace('p_std_exemption ',p_std_exemption );
2048: pay_in_utils.trace('p_adj_tot_income ',p_adj_tot_income );
2049: pay_in_utils.trace('p_std_exem_percent ',p_std_exem_percent );
2050: pay_in_utils.trace('p_start_period_num ',p_start_period_num );
2051: pay_in_utils.trace('p_last_period_number',p_last_period_number);
2052: pay_in_utils.trace('p_flag ',p_flag );
2053: END IF;
2054:
2047: pay_in_utils.trace('p_std_exemption ',p_std_exemption );
2048: pay_in_utils.trace('p_adj_tot_income ',p_adj_tot_income );
2049: pay_in_utils.trace('p_std_exem_percent ',p_std_exem_percent );
2050: pay_in_utils.trace('p_start_period_num ',p_start_period_num );
2051: pay_in_utils.trace('p_last_period_number',p_last_period_number);
2052: pay_in_utils.trace('p_flag ',p_flag );
2053: END IF;
2054:
2055: l3 := 0;
2048: pay_in_utils.trace('p_adj_tot_income ',p_adj_tot_income );
2049: pay_in_utils.trace('p_std_exem_percent ',p_std_exem_percent );
2050: pay_in_utils.trace('p_start_period_num ',p_start_period_num );
2051: pay_in_utils.trace('p_last_period_number',p_last_period_number);
2052: pay_in_utils.trace('p_flag ',p_flag );
2053: END IF;
2054:
2055: l3 := 0;
2056: l_80_exem := 0;
2072: END IF;
2073:
2074: IF (g_debug)
2075: THEN
2076: pay_in_utils.trace('l_element_name',l_element_name);
2077: pay_in_utils.trace('l_input_name',l_input_name);
2078: END IF;
2079:
2080: l_hri_entry_id := get_house_rent_info_entry_id(p_assact_id,
2073:
2074: IF (g_debug)
2075: THEN
2076: pay_in_utils.trace('l_element_name',l_element_name);
2077: pay_in_utils.trace('l_input_name',l_input_name);
2078: END IF;
2079:
2080: l_hri_entry_id := get_house_rent_info_entry_id(p_assact_id,
2081: p_effective_date,
2085: l_entry_end_date );
2086:
2087: IF (g_debug)
2088: THEN
2089: pay_in_utils.trace('l_hri_entry_id',l_hri_entry_id);
2090: END IF;
2091:
2092: get_monthly_rent( l_hri_entry_id,
2093: p_effective_date,
2145: END LOOP;
2146:
2147: END IF;
2148:
2149: pay_in_utils.trace('**************************************************','********************');
2150: pay_in_utils.set_location(g_debug,'Leaving: '||l_procedure,20);
2151:
2152: RETURN l_80_exem;
2153: END calculate_80gg_exemption;
2146:
2147: END IF;
2148:
2149: pay_in_utils.trace('**************************************************','********************');
2150: pay_in_utils.set_location(g_debug,'Leaving: '||l_procedure,20);
2151:
2152: RETURN l_80_exem;
2153: END calculate_80gg_exemption;
2154:
2315: l_message VARCHAR2(250);
2316: BEGIN
2317: g_debug := hr_utility.debug_enabled;
2318: l_procedure := g_package ||'check_ltc_exemption';
2319: pay_in_utils.set_location(g_debug,'Entering: '||l_procedure,10);
2320:
2321: /*1.Find the LTC entries which have been carried over from previous LTC Block in the current run and store it in a PL/SQL table.
2322: 2.When such entries exist and the user enters the previous employment information after making element entries, we need to validate if the user can still opt for carry over. So,we find the LTC journeys made
2323: in previous block in both current employment and previous employment and validate the entry.
2339: OPEN c_entry_id(l_carry_over_id, 'Y');
2340: LOOP
2341: FETCH c_entry_id into l_element_entry_id(k);
2342: EXIT WHEN c_entry_id%NOTFOUND;
2343: pay_in_utils.set_location(g_debug,'Entry id with carry over as Yes in current run '|| l_element_entry_id(k),10);
2344: k := k+1;
2345: END LOOP;
2346: CLOSE c_entry_id;
2347:
2344: k := k+1;
2345: END LOOP;
2346: CLOSE c_entry_id;
2347:
2348: pay_in_utils.set_location(g_debug,'ASSIGNMENT ACTION ID '||p_assignment_action_id,20);
2349:
2350: OPEN c_global_value('IN_MAX_JOURNEY_BLOCK_LTC');
2351: FETCH c_global_value INTO l_max_ltc;
2352: CLOSE c_global_value;
2351: FETCH c_global_value INTO l_max_ltc;
2352: CLOSE c_global_value;
2353:
2354: l_carry_over_entry_count := l_element_entry_id.COUNT;
2355: pay_in_utils.set_location(g_debug,'count is '||l_carry_over_entry_count,30);
2356:
2357: --------------------------
2358: --Carry over is opted
2359: --------------------------
2375: ,p_assignment_id );
2376: FETCH c_prev_employer_ltc_availed INTO l_prev_emplr_prev_blk;
2377: CLOSE c_prev_employer_ltc_availed;
2378:
2379: pay_in_utils.set_location(g_debug,'LTC in previous blk,previous employment '||l_prev_emplr_prev_blk,40);
2380:
2381: -- Previous Block Current Employment
2382: OPEN c_curr_emplr_ltc_block(l_prev_start_date
2383: ,l_prev_end_date
2387: ,l_exempted_id );
2388: FETCH c_curr_emplr_ltc_block INTO l_curr_emplr_prev_blk;
2389: CLOSE c_curr_emplr_ltc_block;
2390:
2391: pay_in_utils.set_location(g_debug,'LTC in previous blk,current employment '||l_curr_emplr_prev_blk,50);
2392: j := 0;
2393:
2394: --
2395: -- Start - Set the carry over flag appropriately
2406:
2407: RETURN 0;
2408:
2409: END IF;
2410: pay_in_utils.set_location(g_debug,'valid carryover ',60);
2411: ELSE
2412: pay_in_utils.set_location(g_debug,'invalid carryover ',70);
2413: l_curr_element_entry(j) := l_element_entry_id(i);
2414: j:=j+1;
2408:
2409: END IF;
2410: pay_in_utils.set_location(g_debug,'valid carryover ',60);
2411: ELSE
2412: pay_in_utils.set_location(g_debug,'invalid carryover ',70);
2413: l_curr_element_entry(j) := l_element_entry_id(i);
2414: j:=j+1;
2415: END IF;
2416: END LOOP;
2427: --Carry over is not opted
2428: --------------------------
2429: l_count := l_curr_element_entry.COUNT;
2430:
2431: pay_in_utils.set_location(g_debug, 'not the carry over stuff',80);
2432:
2433: OPEN c_ltc_block(p_date_earned);
2434: FETCH c_ltc_block INTO l_curr_block,l_curr_period;
2435: CLOSE c_ltc_block;
2443: ,p_assignment_id );
2444: FETCH c_prev_employer_ltc_availed INTO l_prev_emplr_curr_blk;
2445: CLOSE c_prev_employer_ltc_availed;
2446:
2447: pay_in_utils.set_location(g_debug,'Previous Employer Current block '||l_prev_emplr_curr_blk,90);
2448:
2449: -- Current Block Current Employment Exempted LTC entries that have been processed
2450: OPEN c_curr_emplr_ltc_block(l_curr_start_date
2451: ,l_curr_end_date
2455: ,l_exempted_id);
2456: FETCH c_curr_emplr_ltc_block INTO l_curr_emplr_curr_blk_exempted;
2457: CLOSE c_curr_emplr_ltc_block;
2458:
2459: pay_in_utils.set_location(g_debug,'l_count '||l_count||' '||l_curr_emplr_curr_blk_exempted||' '||l_prev_emplr_curr_blk ,100);
2460:
2461: /* Start - Find if the entries with invalid carry over are exempted in current block or not */
2462: IF l_count>0 then
2463: FOR i IN 0..l_count-1 LOOP
2467: p_carry_over_flag := 'N';
2468: END IF;
2469: END IF;
2470: END LOOP;
2471: pay_in_utils.set_location(g_debug,'find exemption for invalid carry overs ',110);
2472: END IF;
2473: /* End - Find if the entries with invalid carry over are exempted in current block or not */
2474:
2475: k := l_count;
2476: OPEN c_entry_id(l_carry_over_id, 'N');
2477: LOOP
2478: FETCH c_entry_id into l_curr_element_entry(k);
2479: EXIT WHEN c_entry_id%NOTFOUND;
2480: pay_in_utils.set_location(g_debug,'Entry id with carry over as No in current run '|| l_curr_element_entry(k),77);
2481: k := k+1;
2482: END LOOP;
2483: CLOSE c_entry_id;
2484:
2482: END LOOP;
2483: CLOSE c_entry_id;
2484:
2485: k := l_curr_element_entry.COUNT;
2486: pay_in_utils.set_location(g_debug,'Entry Count '||k,70);
2487:
2488: FOR i IN 0..k-1 LOOP
2489: IF(nvl(l_prev_emplr_curr_blk,0) +nvl(l_curr_emplr_curr_blk_exempted,0) + i < l_max_ltc ) THEN
2490: IF l_curr_element_entry(i)= p_element_entry_id THEN
2492: END IF;
2493: END IF;
2494: END LOOP;
2495:
2496: pay_in_utils.trace('**************************************************','********************');
2497: pay_in_utils.set_location(g_debug,'Leaving: '||l_procedure,20);
2498:
2499: RETURN 0;
2500:
2493: END IF;
2494: END LOOP;
2495:
2496: pay_in_utils.trace('**************************************************','********************');
2497: pay_in_utils.set_location(g_debug,'Leaving: '||l_procedure,20);
2498:
2499: RETURN 0;
2500:
2501: END check_ltc_exemption;
2536: l_def_bal_id NUMBER ;
2537: BEGIN
2538: g_debug := hr_utility.debug_enabled;
2539: l_procedure := g_package ||'get_balance_value';
2540: pay_in_utils.set_location(g_debug,'Entering: '||l_procedure, 10);
2541: l_message := 'SUCCESS';
2542:
2543: l_def_bal_id := get_defined_balance
2544: (p_balance_type => p_balance_name
2543: l_def_bal_id := get_defined_balance
2544: (p_balance_type => p_balance_name
2545: ,p_dimension_name => p_dimension_name);
2546:
2547: pay_in_utils.set_location(g_debug,l_procedure, 20);
2548:
2549: IF l_def_bal_id = -1 THEN
2550: pay_in_utils.set_location(g_debug,'Leaving: '||l_procedure, 25);
2551: RETURN -1;
2546:
2547: pay_in_utils.set_location(g_debug,l_procedure, 20);
2548:
2549: IF l_def_bal_id = -1 THEN
2550: pay_in_utils.set_location(g_debug,'Leaving: '||l_procedure, 25);
2551: RETURN -1;
2552: END IF;
2553:
2554: IF g_debug THEN
2560: hr_utility.trace ('INDIA: Context Value : '||p_context_value);
2561: END IF;
2562:
2563: IF p_context_name = 'NULL' THEN
2564: pay_in_utils.set_location(g_debug,l_procedure, 30);
2565: l_balance_value := pay_balance_pkg.get_value
2566: (p_assignment_action_id => p_assignment_action_id
2567: ,p_defined_balance_id => l_def_bal_id
2568: ,p_tax_unit_id => null
2576: ,p_source_text2 => null
2577: ,p_source_number => null
2578: );
2579: ELSE
2580: pay_in_utils.set_location(g_debug,l_procedure, 40);
2581: IF p_context_name NOT IN ('SOURCE_ID'
2582: ,'SOURCE_TEXT'
2583: ,'SOURCE_TEXT2'
2584: ,'JURISDICTION_CODE'
2583: ,'SOURCE_TEXT2'
2584: ,'JURISDICTION_CODE'
2585: ,'TAX_UNIT_ID')
2586: THEN
2587: pay_in_utils.set_location(g_debug,l_procedure, 50);
2588: l_balance_value := -1;
2589: ELSE
2590: pay_in_utils.set_location(g_debug,l_procedure, 60);
2591: pay_balance_pkg.set_context(p_context_name, p_context_value);
2586: THEN
2587: pay_in_utils.set_location(g_debug,l_procedure, 50);
2588: l_balance_value := -1;
2589: ELSE
2590: pay_in_utils.set_location(g_debug,l_procedure, 60);
2591: pay_balance_pkg.set_context(p_context_name, p_context_value);
2592: IF p_context_name = 'SOURCE_ID' THEN
2593: pay_in_utils.set_location(g_debug,l_procedure, 70);
2594: l_balance_value := pay_balance_pkg.get_value
2589: ELSE
2590: pay_in_utils.set_location(g_debug,l_procedure, 60);
2591: pay_balance_pkg.set_context(p_context_name, p_context_value);
2592: IF p_context_name = 'SOURCE_ID' THEN
2593: pay_in_utils.set_location(g_debug,l_procedure, 70);
2594: l_balance_value := pay_balance_pkg.get_value
2595: (p_assignment_action_id => p_assignment_action_id
2596: ,p_defined_balance_id => l_def_bal_id
2597: ,p_tax_unit_id => null
2605: ,p_source_text2 => null
2606: ,p_source_number => null
2607: );
2608: ELSIF p_context_name = 'SOURCE_TEXT' THEN
2609: pay_in_utils.set_location(g_debug,l_procedure, 80);
2610: l_balance_value := pay_balance_pkg.get_value
2611: (p_assignment_action_id => p_assignment_action_id
2612: ,p_defined_balance_id => l_def_bal_id
2613: ,p_tax_unit_id => null
2621: ,p_source_text2 => null
2622: ,p_source_number => null
2623: );
2624: ELSIF p_context_name = 'SOURCE_TEXT2' THEN
2625: pay_in_utils.set_location(g_debug,l_procedure, 90);
2626: l_balance_value := pay_balance_pkg.get_value
2627: (p_assignment_action_id => p_assignment_action_id
2628: ,p_defined_balance_id => l_def_bal_id
2629: ,p_tax_unit_id => null
2637: ,p_source_text2 => p_context_value
2638: ,p_source_number => null
2639: );
2640: ELSIF p_context_name = 'JURISDICTION_CODE' THEN
2641: pay_in_utils.set_location(g_debug,l_procedure, 100);
2642: l_balance_value := pay_balance_pkg.get_value
2643: (p_assignment_action_id => p_assignment_action_id
2644: ,p_defined_balance_id => l_def_bal_id
2645: ,p_tax_unit_id => null
2653: ,p_source_text2 => null
2654: ,p_source_number => null
2655: );
2656: ELSIF p_context_name = 'TAX_UNIT_ID' THEN
2657: pay_in_utils.set_location(g_debug,l_procedure, 110);
2658: l_balance_value := pay_balance_pkg.get_value
2659: (p_assignment_action_id => p_assignment_action_id
2660: ,p_defined_balance_id => l_def_bal_id
2661: ,p_tax_unit_id => TO_NUMBER(p_context_value)
2673: END IF;
2674: END IF;
2675:
2676: hr_utility.trace ('INDIA: Balance Value : '||to_char(l_balance_value));
2677: pay_in_utils.set_location(g_debug,'Leaving: '||l_procedure, 120);
2678: RETURN l_balance_value;
2679:
2680: EXCEPTION
2681: WHEN OTHERS THEN
2678: RETURN l_balance_value;
2679:
2680: EXCEPTION
2681: WHEN OTHERS THEN
2682: l_message := pay_in_utils.get_pay_message('PER_IN_ORACLE_GENERIC_ERROR', 'FUNCTION:'||l_procedure, 'SQLERRMC:'||sqlerrm);
2683: hr_utility.trace(l_message);
2684: pay_in_utils.set_location(g_debug,'Leaving : '||l_procedure, 130);
2685: RETURN -1;
2686: END get_balance_value;
2680: EXCEPTION
2681: WHEN OTHERS THEN
2682: l_message := pay_in_utils.get_pay_message('PER_IN_ORACLE_GENERIC_ERROR', 'FUNCTION:'||l_procedure, 'SQLERRMC:'||sqlerrm);
2683: hr_utility.trace(l_message);
2684: pay_in_utils.set_location(g_debug,'Leaving : '||l_procedure, 130);
2685: RETURN -1;
2686: END get_balance_value;
2687:
2688:
2734:
2735: l_procedure := g_package||'get_org_id';
2736: g_debug := hr_utility.debug_enabled;
2737:
2738: pay_in_utils.set_location(g_debug,'Entering : '||l_procedure, 10);
2739:
2740: OPEN cur_org (p_assignment_id
2741: ,p_business_group_id
2742: ,p_date);
2742: ,p_date);
2743: FETCH cur_org into l_segment2
2744: ,l_segment3
2745: ,l_segment4;
2746: pay_in_utils.set_location (g_debug,'l_segment2 = '||l_segment2,20);
2747: pay_in_utils.set_location (g_debug,'l_segment3 = '||l_segment3,30);
2748: pay_in_utils.set_location (g_debug,'l_segment4 = '||l_segment4,40);
2749: CLOSE cur_org;
2750:
2743: FETCH cur_org into l_segment2
2744: ,l_segment3
2745: ,l_segment4;
2746: pay_in_utils.set_location (g_debug,'l_segment2 = '||l_segment2,20);
2747: pay_in_utils.set_location (g_debug,'l_segment3 = '||l_segment3,30);
2748: pay_in_utils.set_location (g_debug,'l_segment4 = '||l_segment4,40);
2749: CLOSE cur_org;
2750:
2751: IF p_org_type = 'PF' THEN
2744: ,l_segment3
2745: ,l_segment4;
2746: pay_in_utils.set_location (g_debug,'l_segment2 = '||l_segment2,20);
2747: pay_in_utils.set_location (g_debug,'l_segment3 = '||l_segment3,30);
2748: pay_in_utils.set_location (g_debug,'l_segment4 = '||l_segment4,40);
2749: CLOSE cur_org;
2750:
2751: IF p_org_type = 'PF' THEN
2752: RETURN to_number(l_segment2);
2755: ELSIF p_org_type = 'ESI' THEN
2756: RETURN to_number(l_segment4);
2757: END IF;
2758:
2759: pay_in_utils.set_location(g_debug,'Leaving : '||l_procedure, 30);
2760:
2761: EXCEPTION
2762: WHEN OTHERS THEN
2763: l_message := pay_in_utils.get_pay_message('PER_IN_ORACLE_GENERIC_ERROR', 'FUNCTION:'||l_procedure, 'SQLERRMC:'||sqlerrm);
2759: pay_in_utils.set_location(g_debug,'Leaving : '||l_procedure, 30);
2760:
2761: EXCEPTION
2762: WHEN OTHERS THEN
2763: l_message := pay_in_utils.get_pay_message('PER_IN_ORACLE_GENERIC_ERROR', 'FUNCTION:'||l_procedure, 'SQLERRMC:'||sqlerrm);
2764: pay_in_utils.set_location(g_debug,' Leaving : '||l_procedure, 30);
2765: hr_utility.trace(l_message);
2766: RETURN NULL;
2767:
2760:
2761: EXCEPTION
2762: WHEN OTHERS THEN
2763: l_message := pay_in_utils.get_pay_message('PER_IN_ORACLE_GENERIC_ERROR', 'FUNCTION:'||l_procedure, 'SQLERRMC:'||sqlerrm);
2764: pay_in_utils.set_location(g_debug,' Leaving : '||l_procedure, 30);
2765: hr_utility.trace(l_message);
2766: RETURN NULL;
2767:
2768:
2815: l_message VARCHAR2(250);
2816: BEGIN
2817: g_debug := hr_utility.debug_enabled;
2818: l_procedure := g_package ||'le_start_date';
2819: pay_in_utils.set_location(g_debug,'Entering: '||l_procedure,10);
2820: IF (g_debug)
2821: THEN
2822: pay_in_utils.trace('**************************************************','********************');
2823: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
2818: l_procedure := g_package ||'le_start_date';
2819: pay_in_utils.set_location(g_debug,'Entering: '||l_procedure,10);
2820: IF (g_debug)
2821: THEN
2822: pay_in_utils.trace('**************************************************','********************');
2823: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
2824: pay_in_utils.trace('p_tax_unit_id',p_tax_unit_id);
2825: pay_in_utils.trace('p_assignment_id',p_assignment_id);
2826: pay_in_utils.trace('p_effective_date',p_effective_date);
2819: pay_in_utils.set_location(g_debug,'Entering: '||l_procedure,10);
2820: IF (g_debug)
2821: THEN
2822: pay_in_utils.trace('**************************************************','********************');
2823: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
2824: pay_in_utils.trace('p_tax_unit_id',p_tax_unit_id);
2825: pay_in_utils.trace('p_assignment_id',p_assignment_id);
2826: pay_in_utils.trace('p_effective_date',p_effective_date);
2827: END IF;
2820: IF (g_debug)
2821: THEN
2822: pay_in_utils.trace('**************************************************','********************');
2823: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
2824: pay_in_utils.trace('p_tax_unit_id',p_tax_unit_id);
2825: pay_in_utils.trace('p_assignment_id',p_assignment_id);
2826: pay_in_utils.trace('p_effective_date',p_effective_date);
2827: END IF;
2828:
2821: THEN
2822: pay_in_utils.trace('**************************************************','********************');
2823: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
2824: pay_in_utils.trace('p_tax_unit_id',p_tax_unit_id);
2825: pay_in_utils.trace('p_assignment_id',p_assignment_id);
2826: pay_in_utils.trace('p_effective_date',p_effective_date);
2827: END IF;
2828:
2829: OPEN csr_asg_start;
2822: pay_in_utils.trace('**************************************************','********************');
2823: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
2824: pay_in_utils.trace('p_tax_unit_id',p_tax_unit_id);
2825: pay_in_utils.trace('p_assignment_id',p_assignment_id);
2826: pay_in_utils.trace('p_effective_date',p_effective_date);
2827: END IF;
2828:
2829: OPEN csr_asg_start;
2830: FETCH csr_asg_start INTO l_le_asg_start;
2831: CLOSE csr_asg_start;
2832:
2833: IF (g_debug)
2834: THEN
2835: pay_in_utils.trace('l_le_asg_start',l_le_asg_start);
2836: END IF;
2837:
2838:
2839: IF l_le_asg_start IS NULL THEN
2843: END IF;
2844:
2845: IF (g_debug)
2846: THEN
2847: pay_in_utils.trace('l_le_asg_start',l_le_asg_start);
2848: END IF;
2849:
2850: RETURN l_le_asg_start;
2851:
2848: END IF;
2849:
2850: RETURN l_le_asg_start;
2851:
2852: pay_in_utils.trace('**************************************************','********************');
2853: pay_in_utils.set_location(g_debug,'Leaving: '||l_procedure,20);
2854:
2855: END le_start_date;
2856:
2849:
2850: RETURN l_le_asg_start;
2851:
2852: pay_in_utils.trace('**************************************************','********************');
2853: pay_in_utils.set_location(g_debug,'Leaving: '||l_procedure,20);
2854:
2855: END le_start_date;
2856:
2857: --------------------------------------------------------------------------
2900: l_message VARCHAR2(250);
2901: BEGIN
2902: g_debug := hr_utility.debug_enabled;
2903: l_procedure := g_package ||'le_end_date';
2904: pay_in_utils.set_location(g_debug,'Entering: '||l_procedure,10);
2905:
2906: IF (g_debug)
2907: THEN
2908: pay_in_utils.trace('**************************************************','********************');
2904: pay_in_utils.set_location(g_debug,'Entering: '||l_procedure,10);
2905:
2906: IF (g_debug)
2907: THEN
2908: pay_in_utils.trace('**************************************************','********************');
2909: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
2910: pay_in_utils.trace('p_tax_unit_id',p_tax_unit_id);
2911: pay_in_utils.trace('p_assignment_id',p_assignment_id);
2912: pay_in_utils.trace('p_effective_date',p_effective_date);
2905:
2906: IF (g_debug)
2907: THEN
2908: pay_in_utils.trace('**************************************************','********************');
2909: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
2910: pay_in_utils.trace('p_tax_unit_id',p_tax_unit_id);
2911: pay_in_utils.trace('p_assignment_id',p_assignment_id);
2912: pay_in_utils.trace('p_effective_date',p_effective_date);
2913: END IF;
2906: IF (g_debug)
2907: THEN
2908: pay_in_utils.trace('**************************************************','********************');
2909: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
2910: pay_in_utils.trace('p_tax_unit_id',p_tax_unit_id);
2911: pay_in_utils.trace('p_assignment_id',p_assignment_id);
2912: pay_in_utils.trace('p_effective_date',p_effective_date);
2913: END IF;
2914:
2907: THEN
2908: pay_in_utils.trace('**************************************************','********************');
2909: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
2910: pay_in_utils.trace('p_tax_unit_id',p_tax_unit_id);
2911: pay_in_utils.trace('p_assignment_id',p_assignment_id);
2912: pay_in_utils.trace('p_effective_date',p_effective_date);
2913: END IF;
2914:
2915:
2908: pay_in_utils.trace('**************************************************','********************');
2909: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
2910: pay_in_utils.trace('p_tax_unit_id',p_tax_unit_id);
2911: pay_in_utils.trace('p_assignment_id',p_assignment_id);
2912: pay_in_utils.trace('p_effective_date',p_effective_date);
2913: END IF;
2914:
2915:
2916: OPEN csr_asg_end;
2924: END IF;
2925:
2926: IF (g_debug)
2927: THEN
2928: pay_in_utils.trace('l_le_asg_start',l_le_asg_end);
2929: END IF;
2930:
2931: pay_in_utils.trace('**************************************************','********************');
2932: pay_in_utils.set_location(g_debug,'Leaving: '||l_procedure,20);
2927: THEN
2928: pay_in_utils.trace('l_le_asg_start',l_le_asg_end);
2929: END IF;
2930:
2931: pay_in_utils.trace('**************************************************','********************');
2932: pay_in_utils.set_location(g_debug,'Leaving: '||l_procedure,20);
2933:
2934: RETURN l_le_asg_end;
2935:
2928: pay_in_utils.trace('l_le_asg_start',l_le_asg_end);
2929: END IF;
2930:
2931: pay_in_utils.trace('**************************************************','********************');
2932: pay_in_utils.set_location(g_debug,'Leaving: '||l_procedure,20);
2933:
2934: RETURN l_le_asg_end;
2935:
2936: END le_end_date;
2981: l_message VARCHAR2(250);
2982: BEGIN
2983: g_debug := hr_utility.debug_enabled;
2984: l_procedure := g_package ||'get_pay_periods';
2985: pay_in_utils.set_location(g_debug,'Entering: '||l_procedure,10);
2986: IF (g_debug)
2987: THEN
2988: pay_in_utils.trace('**************************************************','********************');
2989: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
2984: l_procedure := g_package ||'get_pay_periods';
2985: pay_in_utils.set_location(g_debug,'Entering: '||l_procedure,10);
2986: IF (g_debug)
2987: THEN
2988: pay_in_utils.trace('**************************************************','********************');
2989: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
2990: pay_in_utils.trace('p_payroll_id ',p_payroll_id );
2991: pay_in_utils.trace('p_tax_unit_id ',p_tax_unit_id );
2992: pay_in_utils.trace('p_assignment_id ',p_assignment_id );
2985: pay_in_utils.set_location(g_debug,'Entering: '||l_procedure,10);
2986: IF (g_debug)
2987: THEN
2988: pay_in_utils.trace('**************************************************','********************');
2989: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
2990: pay_in_utils.trace('p_payroll_id ',p_payroll_id );
2991: pay_in_utils.trace('p_tax_unit_id ',p_tax_unit_id );
2992: pay_in_utils.trace('p_assignment_id ',p_assignment_id );
2993: pay_in_utils.trace('p_date_earned ',p_date_earned );
2986: IF (g_debug)
2987: THEN
2988: pay_in_utils.trace('**************************************************','********************');
2989: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
2990: pay_in_utils.trace('p_payroll_id ',p_payroll_id );
2991: pay_in_utils.trace('p_tax_unit_id ',p_tax_unit_id );
2992: pay_in_utils.trace('p_assignment_id ',p_assignment_id );
2993: pay_in_utils.trace('p_date_earned ',p_date_earned );
2994: pay_in_utils.trace('p_period_end_date ',p_period_end_date );
2987: THEN
2988: pay_in_utils.trace('**************************************************','********************');
2989: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
2990: pay_in_utils.trace('p_payroll_id ',p_payroll_id );
2991: pay_in_utils.trace('p_tax_unit_id ',p_tax_unit_id );
2992: pay_in_utils.trace('p_assignment_id ',p_assignment_id );
2993: pay_in_utils.trace('p_date_earned ',p_date_earned );
2994: pay_in_utils.trace('p_period_end_date ',p_period_end_date );
2995: pay_in_utils.trace('p_termination_date',p_termination_date);
2988: pay_in_utils.trace('**************************************************','********************');
2989: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
2990: pay_in_utils.trace('p_payroll_id ',p_payroll_id );
2991: pay_in_utils.trace('p_tax_unit_id ',p_tax_unit_id );
2992: pay_in_utils.trace('p_assignment_id ',p_assignment_id );
2993: pay_in_utils.trace('p_date_earned ',p_date_earned );
2994: pay_in_utils.trace('p_period_end_date ',p_period_end_date );
2995: pay_in_utils.trace('p_termination_date',p_termination_date);
2996: pay_in_utils.trace('p_period_number ',p_period_number );
2989: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
2990: pay_in_utils.trace('p_payroll_id ',p_payroll_id );
2991: pay_in_utils.trace('p_tax_unit_id ',p_tax_unit_id );
2992: pay_in_utils.trace('p_assignment_id ',p_assignment_id );
2993: pay_in_utils.trace('p_date_earned ',p_date_earned );
2994: pay_in_utils.trace('p_period_end_date ',p_period_end_date );
2995: pay_in_utils.trace('p_termination_date',p_termination_date);
2996: pay_in_utils.trace('p_period_number ',p_period_number );
2997: pay_in_utils.trace('p_condition ',p_condition );
2990: pay_in_utils.trace('p_payroll_id ',p_payroll_id );
2991: pay_in_utils.trace('p_tax_unit_id ',p_tax_unit_id );
2992: pay_in_utils.trace('p_assignment_id ',p_assignment_id );
2993: pay_in_utils.trace('p_date_earned ',p_date_earned );
2994: pay_in_utils.trace('p_period_end_date ',p_period_end_date );
2995: pay_in_utils.trace('p_termination_date',p_termination_date);
2996: pay_in_utils.trace('p_period_number ',p_period_number );
2997: pay_in_utils.trace('p_condition ',p_condition );
2998: END IF;
2991: pay_in_utils.trace('p_tax_unit_id ',p_tax_unit_id );
2992: pay_in_utils.trace('p_assignment_id ',p_assignment_id );
2993: pay_in_utils.trace('p_date_earned ',p_date_earned );
2994: pay_in_utils.trace('p_period_end_date ',p_period_end_date );
2995: pay_in_utils.trace('p_termination_date',p_termination_date);
2996: pay_in_utils.trace('p_period_number ',p_period_number );
2997: pay_in_utils.trace('p_condition ',p_condition );
2998: END IF;
2999:
2992: pay_in_utils.trace('p_assignment_id ',p_assignment_id );
2993: pay_in_utils.trace('p_date_earned ',p_date_earned );
2994: pay_in_utils.trace('p_period_end_date ',p_period_end_date );
2995: pay_in_utils.trace('p_termination_date',p_termination_date);
2996: pay_in_utils.trace('p_period_number ',p_period_number );
2997: pay_in_utils.trace('p_condition ',p_condition );
2998: END IF;
2999:
3000: l_tot_pay_periods :=12;
2993: pay_in_utils.trace('p_date_earned ',p_date_earned );
2994: pay_in_utils.trace('p_period_end_date ',p_period_end_date );
2995: pay_in_utils.trace('p_termination_date',p_termination_date);
2996: pay_in_utils.trace('p_period_number ',p_period_number );
2997: pay_in_utils.trace('p_condition ',p_condition );
2998: END IF;
2999:
3000: l_tot_pay_periods :=12;
3001: l_year_end := get_financial_year_end(p_period_end_date);
3022:
3023: l_tot_pay_periods := get_period_number(p_payroll_id,l_end_date);
3024: l_rem_pay_periods := GREATEST(l_tot_pay_periods - p_period_number, 0);
3025:
3026: pay_in_utils.trace('**************************************************','********************');
3027: pay_in_utils.set_location(g_debug,'Leaving: '||l_procedure,20);
3028:
3029: RETURN l_rem_pay_periods;
3030:
3023: l_tot_pay_periods := get_period_number(p_payroll_id,l_end_date);
3024: l_rem_pay_periods := GREATEST(l_tot_pay_periods - p_period_number, 0);
3025:
3026: pay_in_utils.trace('**************************************************','********************');
3027: pay_in_utils.set_location(g_debug,'Leaving: '||l_procedure,20);
3028:
3029: RETURN l_rem_pay_periods;
3030:
3031: END get_pay_periods;
3095: l_message VARCHAR2(250);
3096: BEGIN
3097: g_debug := hr_utility.debug_enabled;
3098: l_procedure := g_package ||'get_income_tax';
3099: pay_in_utils.set_location(g_debug,'Entering: '||l_procedure,10);
3100: IF (g_debug)
3101: THEN
3102: pay_in_utils.trace('**************************************************','********************');
3103: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
3098: l_procedure := g_package ||'get_income_tax';
3099: pay_in_utils.set_location(g_debug,'Entering: '||l_procedure,10);
3100: IF (g_debug)
3101: THEN
3102: pay_in_utils.trace('**************************************************','********************');
3103: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
3104: pay_in_utils.trace('p_business_group_id',p_business_group_id);
3105: pay_in_utils.trace('p_total_income ',p_total_income );
3106: pay_in_utils.trace('p_gender ',p_gender );
3099: pay_in_utils.set_location(g_debug,'Entering: '||l_procedure,10);
3100: IF (g_debug)
3101: THEN
3102: pay_in_utils.trace('**************************************************','********************');
3103: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
3104: pay_in_utils.trace('p_business_group_id',p_business_group_id);
3105: pay_in_utils.trace('p_total_income ',p_total_income );
3106: pay_in_utils.trace('p_gender ',p_gender );
3107: pay_in_utils.trace('p_age ',p_age );
3100: IF (g_debug)
3101: THEN
3102: pay_in_utils.trace('**************************************************','********************');
3103: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
3104: pay_in_utils.trace('p_business_group_id',p_business_group_id);
3105: pay_in_utils.trace('p_total_income ',p_total_income );
3106: pay_in_utils.trace('p_gender ',p_gender );
3107: pay_in_utils.trace('p_age ',p_age );
3108: pay_in_utils.trace('p_pay_end_date ',p_pay_end_date );
3101: THEN
3102: pay_in_utils.trace('**************************************************','********************');
3103: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
3104: pay_in_utils.trace('p_business_group_id',p_business_group_id);
3105: pay_in_utils.trace('p_total_income ',p_total_income );
3106: pay_in_utils.trace('p_gender ',p_gender );
3107: pay_in_utils.trace('p_age ',p_age );
3108: pay_in_utils.trace('p_pay_end_date ',p_pay_end_date );
3109: END IF;
3102: pay_in_utils.trace('**************************************************','********************');
3103: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
3104: pay_in_utils.trace('p_business_group_id',p_business_group_id);
3105: pay_in_utils.trace('p_total_income ',p_total_income );
3106: pay_in_utils.trace('p_gender ',p_gender );
3107: pay_in_utils.trace('p_age ',p_age );
3108: pay_in_utils.trace('p_pay_end_date ',p_pay_end_date );
3109: END IF;
3110:
3103: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
3104: pay_in_utils.trace('p_business_group_id',p_business_group_id);
3105: pay_in_utils.trace('p_total_income ',p_total_income );
3106: pay_in_utils.trace('p_gender ',p_gender );
3107: pay_in_utils.trace('p_age ',p_age );
3108: pay_in_utils.trace('p_pay_end_date ',p_pay_end_date );
3109: END IF;
3110:
3111: l_income_tax:=0;
3104: pay_in_utils.trace('p_business_group_id',p_business_group_id);
3105: pay_in_utils.trace('p_total_income ',p_total_income );
3106: pay_in_utils.trace('p_gender ',p_gender );
3107: pay_in_utils.trace('p_age ',p_age );
3108: pay_in_utils.trace('p_pay_end_date ',p_pay_end_date );
3109: END IF;
3110:
3111: l_income_tax:=0;
3112:
3119: END IF;
3120:
3121: IF (g_debug)
3122: THEN
3123: pay_in_utils.trace('l_table_name',l_table_name);
3124: END IF;
3125:
3126: l_tax_slab := fnd_number.canonical_to_number(pay_in_utils.get_user_table_value
3127: (p_business_group_id => p_business_group_id
3122: THEN
3123: pay_in_utils.trace('l_table_name',l_table_name);
3124: END IF;
3125:
3126: l_tax_slab := fnd_number.canonical_to_number(pay_in_utils.get_user_table_value
3127: (p_business_group_id => p_business_group_id
3128: ,p_table_name => l_table_name
3129: ,p_column_name => 'Tax Rate'
3130: ,p_row_name => 'Tax Slabs'
3132: ,p_effective_date => p_pay_end_date
3133: ,p_message => p_message
3134: ));
3135:
3136: l_additional_amount := fnd_number.canonical_to_number(pay_in_utils.get_user_table_value
3137: (p_business_group_id => p_business_group_id
3138: ,p_table_name => l_table_name
3139: ,p_column_name => 'Additional Amount'
3140: ,p_row_name => 'Tax Slabs'
3142: ,p_effective_date => p_pay_end_date
3143: ,p_message => p_message
3144: ));
3145:
3146: l_reduced_amount := fnd_number.canonical_to_number(pay_in_utils.get_user_table_value
3147: (p_business_group_id => p_business_group_id
3148: ,p_table_name => l_table_name
3149: ,p_column_name => 'Reduced Amount'
3150: ,p_row_name => 'Tax Slabs'
3154: ));
3155:
3156: IF (g_debug)
3157: THEN
3158: pay_in_utils.trace('l_tax_slab',l_tax_slab);
3159: pay_in_utils.trace('l_additional_amount',l_additional_amount);
3160: pay_in_utils.trace('l_reduced_amount',l_reduced_amount);
3161: END IF;
3162:
3155:
3156: IF (g_debug)
3157: THEN
3158: pay_in_utils.trace('l_tax_slab',l_tax_slab);
3159: pay_in_utils.trace('l_additional_amount',l_additional_amount);
3160: pay_in_utils.trace('l_reduced_amount',l_reduced_amount);
3161: END IF;
3162:
3163: l_income_tax := l_tax_slab * (p_total_income - l_reduced_amount) + l_additional_amount;
3156: IF (g_debug)
3157: THEN
3158: pay_in_utils.trace('l_tax_slab',l_tax_slab);
3159: pay_in_utils.trace('l_additional_amount',l_additional_amount);
3160: pay_in_utils.trace('l_reduced_amount',l_reduced_amount);
3161: END IF;
3162:
3163: l_income_tax := l_tax_slab * (p_total_income - l_reduced_amount) + l_additional_amount;
3164: p_marginal_relief := 0;
3171: CLOSE csr_global_value;
3172:
3173: IF (g_debug)
3174: THEN
3175: pay_in_utils.trace('l_surcharge_applicable_amt',l_surcharge_applicable_amt);
3176: END IF;
3177:
3178:
3179: /* Calculate Surcharge and marginal relief */
3193: CLOSE csr_global_value;
3194:
3195: IF (g_debug)
3196: THEN
3197: pay_in_utils.trace('l_relief_ceiling',l_relief_ceiling);
3198: pay_in_utils.trace('l_relief_limit',l_relief_limit);
3199: pay_in_utils.trace('p_pay_end_date',p_pay_end_date);
3200: END IF;
3201:
3194:
3195: IF (g_debug)
3196: THEN
3197: pay_in_utils.trace('l_relief_ceiling',l_relief_ceiling);
3198: pay_in_utils.trace('l_relief_limit',l_relief_limit);
3199: pay_in_utils.trace('p_pay_end_date',p_pay_end_date);
3200: END IF;
3201:
3202: IF p_total_income <= l_relief_limit THEN
3195: IF (g_debug)
3196: THEN
3197: pay_in_utils.trace('l_relief_ceiling',l_relief_ceiling);
3198: pay_in_utils.trace('l_relief_limit',l_relief_limit);
3199: pay_in_utils.trace('p_pay_end_date',p_pay_end_date);
3200: END IF;
3201:
3202: IF p_total_income <= l_relief_limit THEN
3203: tax_on_mr_ceiling := l_additional_amount
3236: l_income_tax := GREATEST(l_income_tax,0);
3237:
3238: IF (g_debug)
3239: THEN
3240: pay_in_utils.trace('l_cess_percent',l_cess_percent);
3241: pay_in_utils.trace('p_marginal_relief',p_marginal_relief);
3242: pay_in_utils.trace('p_surcharge',p_surcharge);
3243: pay_in_utils.trace('p_education_cess',p_education_cess);
3244: pay_in_utils.trace('p_sec_and_he_cess',p_sec_and_he_cess);
3237:
3238: IF (g_debug)
3239: THEN
3240: pay_in_utils.trace('l_cess_percent',l_cess_percent);
3241: pay_in_utils.trace('p_marginal_relief',p_marginal_relief);
3242: pay_in_utils.trace('p_surcharge',p_surcharge);
3243: pay_in_utils.trace('p_education_cess',p_education_cess);
3244: pay_in_utils.trace('p_sec_and_he_cess',p_sec_and_he_cess);
3245: pay_in_utils.trace('l_income_tax',l_income_tax);
3238: IF (g_debug)
3239: THEN
3240: pay_in_utils.trace('l_cess_percent',l_cess_percent);
3241: pay_in_utils.trace('p_marginal_relief',p_marginal_relief);
3242: pay_in_utils.trace('p_surcharge',p_surcharge);
3243: pay_in_utils.trace('p_education_cess',p_education_cess);
3244: pay_in_utils.trace('p_sec_and_he_cess',p_sec_and_he_cess);
3245: pay_in_utils.trace('l_income_tax',l_income_tax);
3246: pay_in_utils.trace('p_tax_on_income',p_tax_on_income);
3239: THEN
3240: pay_in_utils.trace('l_cess_percent',l_cess_percent);
3241: pay_in_utils.trace('p_marginal_relief',p_marginal_relief);
3242: pay_in_utils.trace('p_surcharge',p_surcharge);
3243: pay_in_utils.trace('p_education_cess',p_education_cess);
3244: pay_in_utils.trace('p_sec_and_he_cess',p_sec_and_he_cess);
3245: pay_in_utils.trace('l_income_tax',l_income_tax);
3246: pay_in_utils.trace('p_tax_on_income',p_tax_on_income);
3247: END IF;
3240: pay_in_utils.trace('l_cess_percent',l_cess_percent);
3241: pay_in_utils.trace('p_marginal_relief',p_marginal_relief);
3242: pay_in_utils.trace('p_surcharge',p_surcharge);
3243: pay_in_utils.trace('p_education_cess',p_education_cess);
3244: pay_in_utils.trace('p_sec_and_he_cess',p_sec_and_he_cess);
3245: pay_in_utils.trace('l_income_tax',l_income_tax);
3246: pay_in_utils.trace('p_tax_on_income',p_tax_on_income);
3247: END IF;
3248:
3241: pay_in_utils.trace('p_marginal_relief',p_marginal_relief);
3242: pay_in_utils.trace('p_surcharge',p_surcharge);
3243: pay_in_utils.trace('p_education_cess',p_education_cess);
3244: pay_in_utils.trace('p_sec_and_he_cess',p_sec_and_he_cess);
3245: pay_in_utils.trace('l_income_tax',l_income_tax);
3246: pay_in_utils.trace('p_tax_on_income',p_tax_on_income);
3247: END IF;
3248:
3249: pay_in_utils.trace('**************************************************','********************');
3242: pay_in_utils.trace('p_surcharge',p_surcharge);
3243: pay_in_utils.trace('p_education_cess',p_education_cess);
3244: pay_in_utils.trace('p_sec_and_he_cess',p_sec_and_he_cess);
3245: pay_in_utils.trace('l_income_tax',l_income_tax);
3246: pay_in_utils.trace('p_tax_on_income',p_tax_on_income);
3247: END IF;
3248:
3249: pay_in_utils.trace('**************************************************','********************');
3250: pay_in_utils.set_location(g_debug,'Leaving: '||l_procedure,20);
3245: pay_in_utils.trace('l_income_tax',l_income_tax);
3246: pay_in_utils.trace('p_tax_on_income',p_tax_on_income);
3247: END IF;
3248:
3249: pay_in_utils.trace('**************************************************','********************');
3250: pay_in_utils.set_location(g_debug,'Leaving: '||l_procedure,20);
3251:
3252: RETURN l_income_tax;
3253: END get_income_tax;
3246: pay_in_utils.trace('p_tax_on_income',p_tax_on_income);
3247: END IF;
3248:
3249: pay_in_utils.trace('**************************************************','********************');
3250: pay_in_utils.set_location(g_debug,'Leaving: '||l_procedure,20);
3251:
3252: RETURN l_income_tax;
3253: END get_income_tax;
3254:
3262: l_message VARCHAR2(250);
3263: BEGIN
3264: g_debug := hr_utility.debug_enabled;
3265: l_procedure := g_package ||'set_context';
3266: pay_in_utils.set_location(g_debug,'Entering: '||l_procedure,10);
3267: IF (g_debug)
3268: THEN
3269: pay_in_utils.trace('**************************************************','********************');
3270: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
3265: l_procedure := g_package ||'set_context';
3266: pay_in_utils.set_location(g_debug,'Entering: '||l_procedure,10);
3267: IF (g_debug)
3268: THEN
3269: pay_in_utils.trace('**************************************************','********************');
3270: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
3271: pay_in_utils.trace('p_context_name',p_context_name);
3272: pay_in_utils.trace('p_context_value',p_context_value);
3273: END IF;
3266: pay_in_utils.set_location(g_debug,'Entering: '||l_procedure,10);
3267: IF (g_debug)
3268: THEN
3269: pay_in_utils.trace('**************************************************','********************');
3270: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
3271: pay_in_utils.trace('p_context_name',p_context_name);
3272: pay_in_utils.trace('p_context_value',p_context_value);
3273: END IF;
3274:
3267: IF (g_debug)
3268: THEN
3269: pay_in_utils.trace('**************************************************','********************');
3270: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
3271: pay_in_utils.trace('p_context_name',p_context_name);
3272: pay_in_utils.trace('p_context_value',p_context_value);
3273: END IF;
3274:
3275: pay_balance_pkg.set_context('IN',p_context_name, p_context_value);
3268: THEN
3269: pay_in_utils.trace('**************************************************','********************');
3270: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
3271: pay_in_utils.trace('p_context_name',p_context_name);
3272: pay_in_utils.trace('p_context_value',p_context_value);
3273: END IF;
3274:
3275: pay_balance_pkg.set_context('IN',p_context_name, p_context_value);
3276:
3273: END IF;
3274:
3275: pay_balance_pkg.set_context('IN',p_context_name, p_context_value);
3276:
3277: pay_in_utils.trace('**************************************************','********************');
3278: pay_in_utils.set_location(g_debug,'Leaving: '||l_procedure,20);
3279:
3280: RETURN 0;
3281: END set_context;
3274:
3275: pay_balance_pkg.set_context('IN',p_context_name, p_context_value);
3276:
3277: pay_in_utils.trace('**************************************************','********************');
3278: pay_in_utils.set_location(g_debug,'Leaving: '||l_procedure,20);
3279:
3280: RETURN 0;
3281: END set_context;
3282:
3354: l_proc := g_package||'get_value_on_le_start';
3355:
3356: IF (g_debug)
3357: THEN
3358: pay_in_utils.trace('**************************************************','********************');
3359: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
3360: pay_in_utils.trace('p_assignment_id ',p_assignment_id );
3361: pay_in_utils.trace('p_tax_unit_id ',p_tax_unit_id );
3362: pay_in_utils.trace('p_effective_date',p_effective_date);
3355:
3356: IF (g_debug)
3357: THEN
3358: pay_in_utils.trace('**************************************************','********************');
3359: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
3360: pay_in_utils.trace('p_assignment_id ',p_assignment_id );
3361: pay_in_utils.trace('p_tax_unit_id ',p_tax_unit_id );
3362: pay_in_utils.trace('p_effective_date',p_effective_date);
3363: pay_in_utils.trace('p_context_value',p_context_value);
3356: IF (g_debug)
3357: THEN
3358: pay_in_utils.trace('**************************************************','********************');
3359: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
3360: pay_in_utils.trace('p_assignment_id ',p_assignment_id );
3361: pay_in_utils.trace('p_tax_unit_id ',p_tax_unit_id );
3362: pay_in_utils.trace('p_effective_date',p_effective_date);
3363: pay_in_utils.trace('p_context_value',p_context_value);
3364: END IF;
3357: THEN
3358: pay_in_utils.trace('**************************************************','********************');
3359: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
3360: pay_in_utils.trace('p_assignment_id ',p_assignment_id );
3361: pay_in_utils.trace('p_tax_unit_id ',p_tax_unit_id );
3362: pay_in_utils.trace('p_effective_date',p_effective_date);
3363: pay_in_utils.trace('p_context_value',p_context_value);
3364: END IF;
3365:
3358: pay_in_utils.trace('**************************************************','********************');
3359: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
3360: pay_in_utils.trace('p_assignment_id ',p_assignment_id );
3361: pay_in_utils.trace('p_tax_unit_id ',p_tax_unit_id );
3362: pay_in_utils.trace('p_effective_date',p_effective_date);
3363: pay_in_utils.trace('p_context_value',p_context_value);
3364: END IF;
3365:
3366:
3359: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
3360: pay_in_utils.trace('p_assignment_id ',p_assignment_id );
3361: pay_in_utils.trace('p_tax_unit_id ',p_tax_unit_id );
3362: pay_in_utils.trace('p_effective_date',p_effective_date);
3363: pay_in_utils.trace('p_context_value',p_context_value);
3364: END IF;
3365:
3366:
3367: l_year_start := pay_in_tax_utils.get_financial_year_start(p_effective_date );
3372: l_pre_le_end_date := l_le_start_date - 1;
3373:
3374: IF (g_debug)
3375: THEN
3376: pay_in_utils.trace('l_year_start ',l_year_start );
3377: pay_in_utils.trace('l_le_start_date ',l_le_start_date );
3378: pay_in_utils.trace('l_pre_le_end_date',l_pre_le_end_date);
3379: END IF;
3380:
3373:
3374: IF (g_debug)
3375: THEN
3376: pay_in_utils.trace('l_year_start ',l_year_start );
3377: pay_in_utils.trace('l_le_start_date ',l_le_start_date );
3378: pay_in_utils.trace('l_pre_le_end_date',l_pre_le_end_date);
3379: END IF;
3380:
3381:
3374: IF (g_debug)
3375: THEN
3376: pay_in_utils.trace('l_year_start ',l_year_start );
3377: pay_in_utils.trace('l_le_start_date ',l_le_start_date );
3378: pay_in_utils.trace('l_pre_le_end_date',l_pre_le_end_date);
3379: END IF;
3380:
3381:
3382: OPEN csr_cyclic_gre(l_year_start,l_pre_le_end_date);
3388: END IF;
3389: CLOSE csr_cyclic_gre;
3390:
3391: l_def_bal_id := pay_in_tax_utils.get_defined_balance(p_balance_name, p_dimension_name);
3392: pay_in_utils.set_location(g_debug, ' INDIA:l_def_bal_id '||l_def_bal_id,30);
3393:
3394: OPEN c_max_asact(l_pre_le_end_date);
3395: FETCH c_max_asact INTO p_assignment_action_id;
3396: CLOSE c_max_asact;
3394: OPEN c_max_asact(l_pre_le_end_date);
3395: FETCH c_max_asact INTO p_assignment_action_id;
3396: CLOSE c_max_asact;
3397:
3398: pay_in_utils.set_location(g_debug, ' INDIA:l_asg_action_id '||p_assignment_action_id,50);
3399:
3400:
3401: IF p_context_name = 'SOURCE_TEXT2' THEN
3402:
3431: ,p_source_number => null
3432: );
3433: END IF;
3434:
3435: pay_in_utils.set_location(g_debug, ' INDIA:l_value '||l_balance_value,60);
3436: pay_in_utils.trace('**************************************************','********************');
3437: pay_in_utils.set_location(g_debug,'Leaving: '||l_proc,70);
3438: p_success := 'Y';
3439: RETURN l_balance_value;
3432: );
3433: END IF;
3434:
3435: pay_in_utils.set_location(g_debug, ' INDIA:l_value '||l_balance_value,60);
3436: pay_in_utils.trace('**************************************************','********************');
3437: pay_in_utils.set_location(g_debug,'Leaving: '||l_proc,70);
3438: p_success := 'Y';
3439: RETURN l_balance_value;
3440: --
3433: END IF;
3434:
3435: pay_in_utils.set_location(g_debug, ' INDIA:l_value '||l_balance_value,60);
3436: pay_in_utils.trace('**************************************************','********************');
3437: pay_in_utils.set_location(g_debug,'Leaving: '||l_proc,70);
3438: p_success := 'Y';
3439: RETURN l_balance_value;
3440: --
3441: END get_value_on_le_start;
3477: BEGIN
3478:
3479: g_debug := hr_utility.debug_enabled;
3480: l_procedure := g_package ||'prev_med_reimbursement';
3481: pay_in_utils.set_location(g_debug,'Entering: '||l_procedure,10);
3482: IF (g_debug)
3483: THEN
3484: pay_in_utils.trace('**************************************************','********************');
3485: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
3480: l_procedure := g_package ||'prev_med_reimbursement';
3481: pay_in_utils.set_location(g_debug,'Entering: '||l_procedure,10);
3482: IF (g_debug)
3483: THEN
3484: pay_in_utils.trace('**************************************************','********************');
3485: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
3486: pay_in_utils.trace('p_assignment_id',p_assignment_id);
3487: pay_in_utils.trace('p_date_earned',p_date_earned);
3488:
3481: pay_in_utils.set_location(g_debug,'Entering: '||l_procedure,10);
3482: IF (g_debug)
3483: THEN
3484: pay_in_utils.trace('**************************************************','********************');
3485: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
3486: pay_in_utils.trace('p_assignment_id',p_assignment_id);
3487: pay_in_utils.trace('p_date_earned',p_date_earned);
3488:
3489: END IF;
3482: IF (g_debug)
3483: THEN
3484: pay_in_utils.trace('**************************************************','********************');
3485: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
3486: pay_in_utils.trace('p_assignment_id',p_assignment_id);
3487: pay_in_utils.trace('p_date_earned',p_date_earned);
3488:
3489: END IF;
3490:
3483: THEN
3484: pay_in_utils.trace('**************************************************','********************');
3485: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
3486: pay_in_utils.trace('p_assignment_id',p_assignment_id);
3487: pay_in_utils.trace('p_date_earned',p_date_earned);
3488:
3489: END IF;
3490:
3491: p_prev_med_reimburse_amt := 0;
3511: CLOSE c_prev_emp_details;
3512:
3513: IF (g_debug)
3514: THEN
3515: pay_in_utils.trace('p_prev_med_reimburse_amt',p_prev_med_reimburse_amt);
3516: END IF;
3517: pay_in_utils.trace('**************************************************','********************');
3518: pay_in_utils.set_location(g_debug,'Leaving: '||l_procedure,20);
3519:
3513: IF (g_debug)
3514: THEN
3515: pay_in_utils.trace('p_prev_med_reimburse_amt',p_prev_med_reimburse_amt);
3516: END IF;
3517: pay_in_utils.trace('**************************************************','********************');
3518: pay_in_utils.set_location(g_debug,'Leaving: '||l_procedure,20);
3519:
3520: RETURN p_prev_med_reimburse_amt;
3521:
3514: THEN
3515: pay_in_utils.trace('p_prev_med_reimburse_amt',p_prev_med_reimburse_amt);
3516: END IF;
3517: pay_in_utils.trace('**************************************************','********************');
3518: pay_in_utils.set_location(g_debug,'Leaving: '||l_procedure,20);
3519:
3520: RETURN p_prev_med_reimburse_amt;
3521:
3522: END prev_med_reimbursement;
3587: BEGIN
3588:
3589: g_debug := hr_utility.debug_enabled;
3590: l_procedure := g_package ||'get_value_prev_period';
3591: pay_in_utils.set_location(g_debug,'Entering: '||l_procedure,10);
3592:
3593:
3594: IF (g_debug)
3595: THEN
3592:
3593:
3594: IF (g_debug)
3595: THEN
3596: pay_in_utils.trace('**************************************************','********************');
3597: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
3598: pay_in_utils.trace('p_assignment_id ',p_assignment_id );
3599: pay_in_utils.trace('p_assignment_action_id ',p_assignment_action_id );
3600: pay_in_utils.trace('p_payroll_action_id',p_payroll_action_id);
3593:
3594: IF (g_debug)
3595: THEN
3596: pay_in_utils.trace('**************************************************','********************');
3597: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
3598: pay_in_utils.trace('p_assignment_id ',p_assignment_id );
3599: pay_in_utils.trace('p_assignment_action_id ',p_assignment_action_id );
3600: pay_in_utils.trace('p_payroll_action_id',p_payroll_action_id);
3601: pay_in_utils.trace('p_tax_unit_id',p_tax_unit_id);
3594: IF (g_debug)
3595: THEN
3596: pay_in_utils.trace('**************************************************','********************');
3597: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
3598: pay_in_utils.trace('p_assignment_id ',p_assignment_id );
3599: pay_in_utils.trace('p_assignment_action_id ',p_assignment_action_id );
3600: pay_in_utils.trace('p_payroll_action_id',p_payroll_action_id);
3601: pay_in_utils.trace('p_tax_unit_id',p_tax_unit_id);
3602: pay_in_utils.trace('p_balance_name',p_balance_name);
3595: THEN
3596: pay_in_utils.trace('**************************************************','********************');
3597: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
3598: pay_in_utils.trace('p_assignment_id ',p_assignment_id );
3599: pay_in_utils.trace('p_assignment_action_id ',p_assignment_action_id );
3600: pay_in_utils.trace('p_payroll_action_id',p_payroll_action_id);
3601: pay_in_utils.trace('p_tax_unit_id',p_tax_unit_id);
3602: pay_in_utils.trace('p_balance_name',p_balance_name);
3603: pay_in_utils.trace('p_le_start_date',p_le_start_date);
3596: pay_in_utils.trace('**************************************************','********************');
3597: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
3598: pay_in_utils.trace('p_assignment_id ',p_assignment_id );
3599: pay_in_utils.trace('p_assignment_action_id ',p_assignment_action_id );
3600: pay_in_utils.trace('p_payroll_action_id',p_payroll_action_id);
3601: pay_in_utils.trace('p_tax_unit_id',p_tax_unit_id);
3602: pay_in_utils.trace('p_balance_name',p_balance_name);
3603: pay_in_utils.trace('p_le_start_date',p_le_start_date);
3604: END IF;
3597: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
3598: pay_in_utils.trace('p_assignment_id ',p_assignment_id );
3599: pay_in_utils.trace('p_assignment_action_id ',p_assignment_action_id );
3600: pay_in_utils.trace('p_payroll_action_id',p_payroll_action_id);
3601: pay_in_utils.trace('p_tax_unit_id',p_tax_unit_id);
3602: pay_in_utils.trace('p_balance_name',p_balance_name);
3603: pay_in_utils.trace('p_le_start_date',p_le_start_date);
3604: END IF;
3605:
3598: pay_in_utils.trace('p_assignment_id ',p_assignment_id );
3599: pay_in_utils.trace('p_assignment_action_id ',p_assignment_action_id );
3600: pay_in_utils.trace('p_payroll_action_id',p_payroll_action_id);
3601: pay_in_utils.trace('p_tax_unit_id',p_tax_unit_id);
3602: pay_in_utils.trace('p_balance_name',p_balance_name);
3603: pay_in_utils.trace('p_le_start_date',p_le_start_date);
3604: END IF;
3605:
3606: OPEN c_recent_run_action;
3599: pay_in_utils.trace('p_assignment_action_id ',p_assignment_action_id );
3600: pay_in_utils.trace('p_payroll_action_id',p_payroll_action_id);
3601: pay_in_utils.trace('p_tax_unit_id',p_tax_unit_id);
3602: pay_in_utils.trace('p_balance_name',p_balance_name);
3603: pay_in_utils.trace('p_le_start_date',p_le_start_date);
3604: END IF;
3605:
3606: OPEN c_recent_run_action;
3607: FETCH c_recent_run_action INTO l_assignment_action_id ;
3627: ,p_source_number => null
3628: );
3629: IF (g_debug)
3630: THEN
3631: pay_in_utils.trace('l_balance_value',l_balance_value);
3632: END IF;
3633:
3634: END IF;
3635: pay_in_utils.trace('**************************************************','********************');
3631: pay_in_utils.trace('l_balance_value',l_balance_value);
3632: END IF;
3633:
3634: END IF;
3635: pay_in_utils.trace('**************************************************','********************');
3636: pay_in_utils.set_location(g_debug,'Leaving: '||l_procedure,30);
3637:
3638: RETURN l_balance_value;
3639: END get_value_prev_period;
3632: END IF;
3633:
3634: END IF;
3635: pay_in_utils.trace('**************************************************','********************');
3636: pay_in_utils.set_location(g_debug,'Leaving: '||l_procedure,30);
3637:
3638: RETURN l_balance_value;
3639: END get_value_prev_period;
3640:
3685:
3686: BEGIN
3687: g_debug := hr_utility.debug_enabled;
3688: l_procedure := g_package ||'get_regular_run_exists';
3689: pay_in_utils.set_location(g_debug,'Entering: '||l_procedure,10);
3690:
3691: IF (g_debug)
3692: THEN
3693: pay_in_utils.trace('**************************************************','********************');
3689: pay_in_utils.set_location(g_debug,'Entering: '||l_procedure,10);
3690:
3691: IF (g_debug)
3692: THEN
3693: pay_in_utils.trace('**************************************************','********************');
3694: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
3695: pay_in_utils.trace('p_assignment_action_id ',p_assignment_action_id );
3696: END IF;
3697:
3690:
3691: IF (g_debug)
3692: THEN
3693: pay_in_utils.trace('**************************************************','********************');
3694: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
3695: pay_in_utils.trace('p_assignment_action_id ',p_assignment_action_id );
3696: END IF;
3697:
3698:
3691: IF (g_debug)
3692: THEN
3693: pay_in_utils.trace('**************************************************','********************');
3694: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
3695: pay_in_utils.trace('p_assignment_action_id ',p_assignment_action_id );
3696: END IF;
3697:
3698:
3699: l_exists := 'N';
3701: OPEN csr_regular_run;
3702: FETCH csr_regular_run INTO l_exists;
3703: CLOSE csr_regular_run;
3704:
3705: pay_in_utils.set_location(g_debug, ' INDIA:l_exists '||l_exists,30);
3706: pay_in_utils.trace('**************************************************','********************');
3707: pay_in_utils.set_location(g_debug,'Leaving: '||l_procedure,40);
3708:
3709: RETURN l_exists;
3702: FETCH csr_regular_run INTO l_exists;
3703: CLOSE csr_regular_run;
3704:
3705: pay_in_utils.set_location(g_debug, ' INDIA:l_exists '||l_exists,30);
3706: pay_in_utils.trace('**************************************************','********************');
3707: pay_in_utils.set_location(g_debug,'Leaving: '||l_procedure,40);
3708:
3709: RETURN l_exists;
3710:
3703: CLOSE csr_regular_run;
3704:
3705: pay_in_utils.set_location(g_debug, ' INDIA:l_exists '||l_exists,30);
3706: pay_in_utils.trace('**************************************************','********************');
3707: pay_in_utils.set_location(g_debug,'Leaving: '||l_procedure,40);
3708:
3709: RETURN l_exists;
3710:
3711: END get_regular_run_exists;
3761: BEGIN
3762:
3763: g_debug := hr_utility.debug_enabled;
3764: l_procedure := g_package ||'bon_section_89_relief';
3765: pay_in_utils.set_location(g_debug,'Entering: '||l_procedure,10);
3766:
3767: IF (g_debug)
3768: THEN
3769: pay_in_utils.trace('**************************************************','********************');
3765: pay_in_utils.set_location(g_debug,'Entering: '||l_procedure,10);
3766:
3767: IF (g_debug)
3768: THEN
3769: pay_in_utils.trace('**************************************************','********************');
3770: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
3771: pay_in_utils.trace('p_business_group_id ',p_business_group_id );
3772: pay_in_utils.trace('p_retro_earnings_py ',p_retro_earnings_py );
3773: pay_in_utils.trace('p_retro_allw_exempt_py',p_retro_allw_exempt_py);
3766:
3767: IF (g_debug)
3768: THEN
3769: pay_in_utils.trace('**************************************************','********************');
3770: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
3771: pay_in_utils.trace('p_business_group_id ',p_business_group_id );
3772: pay_in_utils.trace('p_retro_earnings_py ',p_retro_earnings_py );
3773: pay_in_utils.trace('p_retro_allw_exempt_py',p_retro_allw_exempt_py);
3774: pay_in_utils.trace('p_emplr_class',p_emplr_class);
3767: IF (g_debug)
3768: THEN
3769: pay_in_utils.trace('**************************************************','********************');
3770: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
3771: pay_in_utils.trace('p_business_group_id ',p_business_group_id );
3772: pay_in_utils.trace('p_retro_earnings_py ',p_retro_earnings_py );
3773: pay_in_utils.trace('p_retro_allw_exempt_py',p_retro_allw_exempt_py);
3774: pay_in_utils.trace('p_emplr_class',p_emplr_class);
3775: pay_in_utils.trace('p_retro_ent_allw_py',p_retro_ent_allw_py);
3768: THEN
3769: pay_in_utils.trace('**************************************************','********************');
3770: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
3771: pay_in_utils.trace('p_business_group_id ',p_business_group_id );
3772: pay_in_utils.trace('p_retro_earnings_py ',p_retro_earnings_py );
3773: pay_in_utils.trace('p_retro_allw_exempt_py',p_retro_allw_exempt_py);
3774: pay_in_utils.trace('p_emplr_class',p_emplr_class);
3775: pay_in_utils.trace('p_retro_ent_allw_py',p_retro_ent_allw_py);
3776: pay_in_utils.trace('p_pay_end_date',p_pay_end_date);
3769: pay_in_utils.trace('**************************************************','********************');
3770: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
3771: pay_in_utils.trace('p_business_group_id ',p_business_group_id );
3772: pay_in_utils.trace('p_retro_earnings_py ',p_retro_earnings_py );
3773: pay_in_utils.trace('p_retro_allw_exempt_py',p_retro_allw_exempt_py);
3774: pay_in_utils.trace('p_emplr_class',p_emplr_class);
3775: pay_in_utils.trace('p_retro_ent_allw_py',p_retro_ent_allw_py);
3776: pay_in_utils.trace('p_pay_end_date',p_pay_end_date);
3777: pay_in_utils.trace('p_tax_section_89',p_tax_section_89);
3770: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
3771: pay_in_utils.trace('p_business_group_id ',p_business_group_id );
3772: pay_in_utils.trace('p_retro_earnings_py ',p_retro_earnings_py );
3773: pay_in_utils.trace('p_retro_allw_exempt_py',p_retro_allw_exempt_py);
3774: pay_in_utils.trace('p_emplr_class',p_emplr_class);
3775: pay_in_utils.trace('p_retro_ent_allw_py',p_retro_ent_allw_py);
3776: pay_in_utils.trace('p_pay_end_date',p_pay_end_date);
3777: pay_in_utils.trace('p_tax_section_89',p_tax_section_89);
3778: pay_in_utils.trace('p_tax_Pyble_Curr_Yr',p_tax_Pyble_Curr_Yr);
3771: pay_in_utils.trace('p_business_group_id ',p_business_group_id );
3772: pay_in_utils.trace('p_retro_earnings_py ',p_retro_earnings_py );
3773: pay_in_utils.trace('p_retro_allw_exempt_py',p_retro_allw_exempt_py);
3774: pay_in_utils.trace('p_emplr_class',p_emplr_class);
3775: pay_in_utils.trace('p_retro_ent_allw_py',p_retro_ent_allw_py);
3776: pay_in_utils.trace('p_pay_end_date',p_pay_end_date);
3777: pay_in_utils.trace('p_tax_section_89',p_tax_section_89);
3778: pay_in_utils.trace('p_tax_Pyble_Curr_Yr',p_tax_Pyble_Curr_Yr);
3779: pay_in_utils.trace('p_gender',p_gender);
3772: pay_in_utils.trace('p_retro_earnings_py ',p_retro_earnings_py );
3773: pay_in_utils.trace('p_retro_allw_exempt_py',p_retro_allw_exempt_py);
3774: pay_in_utils.trace('p_emplr_class',p_emplr_class);
3775: pay_in_utils.trace('p_retro_ent_allw_py',p_retro_ent_allw_py);
3776: pay_in_utils.trace('p_pay_end_date',p_pay_end_date);
3777: pay_in_utils.trace('p_tax_section_89',p_tax_section_89);
3778: pay_in_utils.trace('p_tax_Pyble_Curr_Yr',p_tax_Pyble_Curr_Yr);
3779: pay_in_utils.trace('p_gender',p_gender);
3780: pay_in_utils.trace('p_age',p_age);
3773: pay_in_utils.trace('p_retro_allw_exempt_py',p_retro_allw_exempt_py);
3774: pay_in_utils.trace('p_emplr_class',p_emplr_class);
3775: pay_in_utils.trace('p_retro_ent_allw_py',p_retro_ent_allw_py);
3776: pay_in_utils.trace('p_pay_end_date',p_pay_end_date);
3777: pay_in_utils.trace('p_tax_section_89',p_tax_section_89);
3778: pay_in_utils.trace('p_tax_Pyble_Curr_Yr',p_tax_Pyble_Curr_Yr);
3779: pay_in_utils.trace('p_gender',p_gender);
3780: pay_in_utils.trace('p_age',p_age);
3781: END IF;
3774: pay_in_utils.trace('p_emplr_class',p_emplr_class);
3775: pay_in_utils.trace('p_retro_ent_allw_py',p_retro_ent_allw_py);
3776: pay_in_utils.trace('p_pay_end_date',p_pay_end_date);
3777: pay_in_utils.trace('p_tax_section_89',p_tax_section_89);
3778: pay_in_utils.trace('p_tax_Pyble_Curr_Yr',p_tax_Pyble_Curr_Yr);
3779: pay_in_utils.trace('p_gender',p_gender);
3780: pay_in_utils.trace('p_age',p_age);
3781: END IF;
3782:
3775: pay_in_utils.trace('p_retro_ent_allw_py',p_retro_ent_allw_py);
3776: pay_in_utils.trace('p_pay_end_date',p_pay_end_date);
3777: pay_in_utils.trace('p_tax_section_89',p_tax_section_89);
3778: pay_in_utils.trace('p_tax_Pyble_Curr_Yr',p_tax_Pyble_Curr_Yr);
3779: pay_in_utils.trace('p_gender',p_gender);
3780: pay_in_utils.trace('p_age',p_age);
3781: END IF;
3782:
3783: Total_Income_wo_arrears := p_total_income
3776: pay_in_utils.trace('p_pay_end_date',p_pay_end_date);
3777: pay_in_utils.trace('p_tax_section_89',p_tax_section_89);
3778: pay_in_utils.trace('p_tax_Pyble_Curr_Yr',p_tax_Pyble_Curr_Yr);
3779: pay_in_utils.trace('p_gender',p_gender);
3780: pay_in_utils.trace('p_age',p_age);
3781: END IF;
3782:
3783: Total_Income_wo_arrears := p_total_income
3784: - p_retro_earnings_py
3788: Total_Income_wo_arrears := Total_Income_wo_arrears
3789: + p_retro_allw_exempt_py;
3790: END IF;
3791:
3792: pay_in_utils.set_location(g_debug, ' INDIA:Total_Income_wo_arrears '||Total_Income_wo_arrears,30);
3793:
3794: tax_payable_wo_arrears := get_income_tax( p_business_group_id
3795: ,Total_Income_wo_arrears
3796: ,p_gender
3814: Tax_Difference_Prev_Year := p_tax_section_89;
3815:
3816: IF (g_debug)
3817: THEN
3818: pay_in_utils.trace('Tax_Difference_Curr_Year ',Tax_Difference_Curr_Year );
3819: pay_in_utils.trace('Tax_Difference_Prev_Year ',Tax_Difference_Prev_Year );
3820: END IF;
3821:
3822: l_sec89_relief_bon := ROUND(GREATEST(Tax_Difference_Curr_Year - Tax_Difference_Prev_Year,0),0);
3815:
3816: IF (g_debug)
3817: THEN
3818: pay_in_utils.trace('Tax_Difference_Curr_Year ',Tax_Difference_Curr_Year );
3819: pay_in_utils.trace('Tax_Difference_Prev_Year ',Tax_Difference_Prev_Year );
3820: END IF;
3821:
3822: l_sec89_relief_bon := ROUND(GREATEST(Tax_Difference_Curr_Year - Tax_Difference_Prev_Year,0),0);
3823:
3820: END IF;
3821:
3822: l_sec89_relief_bon := ROUND(GREATEST(Tax_Difference_Curr_Year - Tax_Difference_Prev_Year,0),0);
3823:
3824: pay_in_utils.set_location(g_debug, ' INDIA:l_sec89_relief_bon '||l_sec89_relief_bon,40);
3825: pay_in_utils.trace('**************************************************','********************');
3826: pay_in_utils.set_location(g_debug,'Leaving: '||l_procedure,50);
3827:
3828:
3821:
3822: l_sec89_relief_bon := ROUND(GREATEST(Tax_Difference_Curr_Year - Tax_Difference_Prev_Year,0),0);
3823:
3824: pay_in_utils.set_location(g_debug, ' INDIA:l_sec89_relief_bon '||l_sec89_relief_bon,40);
3825: pay_in_utils.trace('**************************************************','********************');
3826: pay_in_utils.set_location(g_debug,'Leaving: '||l_procedure,50);
3827:
3828:
3829: RETURN l_sec89_relief_bon;
3822: l_sec89_relief_bon := ROUND(GREATEST(Tax_Difference_Curr_Year - Tax_Difference_Prev_Year,0),0);
3823:
3824: pay_in_utils.set_location(g_debug, ' INDIA:l_sec89_relief_bon '||l_sec89_relief_bon,40);
3825: pay_in_utils.trace('**************************************************','********************');
3826: pay_in_utils.set_location(g_debug,'Leaving: '||l_procedure,50);
3827:
3828:
3829: RETURN l_sec89_relief_bon;
3830:
3909:
3910: /* 80gg Starts without bonus */
3911: g_debug := hr_utility.debug_enabled;
3912: l_procedure := g_package ||'bon_calculate_80g_gg';
3913: pay_in_utils.set_location(g_debug,'Entering: '||l_procedure,10);
3914:
3915:
3916: IF (g_debug)
3917: THEN
3914:
3915:
3916: IF (g_debug)
3917: THEN
3918: pay_in_utils.trace('**************************************************','********************');
3919: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
3920: pay_in_utils.trace('p_assact_id ',p_assact_id );
3921: pay_in_utils.trace('p_assignment_id ',p_assignment_id );
3922: pay_in_utils.trace('p_payroll_id ',p_payroll_id);
3915:
3916: IF (g_debug)
3917: THEN
3918: pay_in_utils.trace('**************************************************','********************');
3919: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
3920: pay_in_utils.trace('p_assact_id ',p_assact_id );
3921: pay_in_utils.trace('p_assignment_id ',p_assignment_id );
3922: pay_in_utils.trace('p_payroll_id ',p_payroll_id);
3923: pay_in_utils.trace('p_effective_date ',p_effective_date);
3916: IF (g_debug)
3917: THEN
3918: pay_in_utils.trace('**************************************************','********************');
3919: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
3920: pay_in_utils.trace('p_assact_id ',p_assact_id );
3921: pay_in_utils.trace('p_assignment_id ',p_assignment_id );
3922: pay_in_utils.trace('p_payroll_id ',p_payroll_id);
3923: pay_in_utils.trace('p_effective_date ',p_effective_date);
3924: pay_in_utils.trace('p_gross_Total_Income',p_gross_Total_Income);
3917: THEN
3918: pay_in_utils.trace('**************************************************','********************');
3919: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
3920: pay_in_utils.trace('p_assact_id ',p_assact_id );
3921: pay_in_utils.trace('p_assignment_id ',p_assignment_id );
3922: pay_in_utils.trace('p_payroll_id ',p_payroll_id);
3923: pay_in_utils.trace('p_effective_date ',p_effective_date);
3924: pay_in_utils.trace('p_gross_Total_Income',p_gross_Total_Income);
3925: pay_in_utils.trace('p_tot_via_exc_80gg_g',p_tot_via_exc_80gg_g);
3918: pay_in_utils.trace('**************************************************','********************');
3919: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
3920: pay_in_utils.trace('p_assact_id ',p_assact_id );
3921: pay_in_utils.trace('p_assignment_id ',p_assignment_id );
3922: pay_in_utils.trace('p_payroll_id ',p_payroll_id);
3923: pay_in_utils.trace('p_effective_date ',p_effective_date);
3924: pay_in_utils.trace('p_gross_Total_Income',p_gross_Total_Income);
3925: pay_in_utils.trace('p_tot_via_exc_80gg_g',p_tot_via_exc_80gg_g);
3926: pay_in_utils.trace('p_oth_inc ',p_oth_inc);
3919: pay_in_utils.set_location(g_debug,'Input Paramters value is',20);
3920: pay_in_utils.trace('p_assact_id ',p_assact_id );
3921: pay_in_utils.trace('p_assignment_id ',p_assignment_id );
3922: pay_in_utils.trace('p_payroll_id ',p_payroll_id);
3923: pay_in_utils.trace('p_effective_date ',p_effective_date);
3924: pay_in_utils.trace('p_gross_Total_Income',p_gross_Total_Income);
3925: pay_in_utils.trace('p_tot_via_exc_80gg_g',p_tot_via_exc_80gg_g);
3926: pay_in_utils.trace('p_oth_inc ',p_oth_inc);
3927: pay_in_utils.trace('p_80gg_periods ',p_80gg_periods);
3920: pay_in_utils.trace('p_assact_id ',p_assact_id );
3921: pay_in_utils.trace('p_assignment_id ',p_assignment_id );
3922: pay_in_utils.trace('p_payroll_id ',p_payroll_id);
3923: pay_in_utils.trace('p_effective_date ',p_effective_date);
3924: pay_in_utils.trace('p_gross_Total_Income',p_gross_Total_Income);
3925: pay_in_utils.trace('p_tot_via_exc_80gg_g',p_tot_via_exc_80gg_g);
3926: pay_in_utils.trace('p_oth_inc ',p_oth_inc);
3927: pay_in_utils.trace('p_80gg_periods ',p_80gg_periods);
3928: pay_in_utils.trace('p_start_period ',p_start_period);
3921: pay_in_utils.trace('p_assignment_id ',p_assignment_id );
3922: pay_in_utils.trace('p_payroll_id ',p_payroll_id);
3923: pay_in_utils.trace('p_effective_date ',p_effective_date);
3924: pay_in_utils.trace('p_gross_Total_Income',p_gross_Total_Income);
3925: pay_in_utils.trace('p_tot_via_exc_80gg_g',p_tot_via_exc_80gg_g);
3926: pay_in_utils.trace('p_oth_inc ',p_oth_inc);
3927: pay_in_utils.trace('p_80gg_periods ',p_80gg_periods);
3928: pay_in_utils.trace('p_start_period ',p_start_period);
3929: pay_in_utils.trace('p_end_period ',p_end_period);
3922: pay_in_utils.trace('p_payroll_id ',p_payroll_id);
3923: pay_in_utils.trace('p_effective_date ',p_effective_date);
3924: pay_in_utils.trace('p_gross_Total_Income',p_gross_Total_Income);
3925: pay_in_utils.trace('p_tot_via_exc_80gg_g',p_tot_via_exc_80gg_g);
3926: pay_in_utils.trace('p_oth_inc ',p_oth_inc);
3927: pay_in_utils.trace('p_80gg_periods ',p_80gg_periods);
3928: pay_in_utils.trace('p_start_period ',p_start_period);
3929: pay_in_utils.trace('p_end_period ',p_end_period);
3930: pay_in_utils.trace('p_flag ',p_flag);
3923: pay_in_utils.trace('p_effective_date ',p_effective_date);
3924: pay_in_utils.trace('p_gross_Total_Income',p_gross_Total_Income);
3925: pay_in_utils.trace('p_tot_via_exc_80gg_g',p_tot_via_exc_80gg_g);
3926: pay_in_utils.trace('p_oth_inc ',p_oth_inc);
3927: pay_in_utils.trace('p_80gg_periods ',p_80gg_periods);
3928: pay_in_utils.trace('p_start_period ',p_start_period);
3929: pay_in_utils.trace('p_end_period ',p_end_period);
3930: pay_in_utils.trace('p_flag ',p_flag);
3931: pay_in_utils.trace('p_exemptions_80g_ue ',p_exemptions_80g_ue);
3924: pay_in_utils.trace('p_gross_Total_Income',p_gross_Total_Income);
3925: pay_in_utils.trace('p_tot_via_exc_80gg_g',p_tot_via_exc_80gg_g);
3926: pay_in_utils.trace('p_oth_inc ',p_oth_inc);
3927: pay_in_utils.trace('p_80gg_periods ',p_80gg_periods);
3928: pay_in_utils.trace('p_start_period ',p_start_period);
3929: pay_in_utils.trace('p_end_period ',p_end_period);
3930: pay_in_utils.trace('p_flag ',p_flag);
3931: pay_in_utils.trace('p_exemptions_80g_ue ',p_exemptions_80g_ue);
3932: pay_in_utils.trace('p_exemptions_80g_le ',p_exemptions_80g_le);
3925: pay_in_utils.trace('p_tot_via_exc_80gg_g',p_tot_via_exc_80gg_g);
3926: pay_in_utils.trace('p_oth_inc ',p_oth_inc);
3927: pay_in_utils.trace('p_80gg_periods ',p_80gg_periods);
3928: pay_in_utils.trace('p_start_period ',p_start_period);
3929: pay_in_utils.trace('p_end_period ',p_end_period);
3930: pay_in_utils.trace('p_flag ',p_flag);
3931: pay_in_utils.trace('p_exemptions_80g_ue ',p_exemptions_80g_ue);
3932: pay_in_utils.trace('p_exemptions_80g_le ',p_exemptions_80g_le);
3933: pay_in_utils.trace('p_exemptions_80g_fp ',p_exemptions_80g_fp);
3926: pay_in_utils.trace('p_oth_inc ',p_oth_inc);
3927: pay_in_utils.trace('p_80gg_periods ',p_80gg_periods);
3928: pay_in_utils.trace('p_start_period ',p_start_period);
3929: pay_in_utils.trace('p_end_period ',p_end_period);
3930: pay_in_utils.trace('p_flag ',p_flag);
3931: pay_in_utils.trace('p_exemptions_80g_ue ',p_exemptions_80g_ue);
3932: pay_in_utils.trace('p_exemptions_80g_le ',p_exemptions_80g_le);
3933: pay_in_utils.trace('p_exemptions_80g_fp ',p_exemptions_80g_fp);
3934:
3927: pay_in_utils.trace('p_80gg_periods ',p_80gg_periods);
3928: pay_in_utils.trace('p_start_period ',p_start_period);
3929: pay_in_utils.trace('p_end_period ',p_end_period);
3930: pay_in_utils.trace('p_flag ',p_flag);
3931: pay_in_utils.trace('p_exemptions_80g_ue ',p_exemptions_80g_ue);
3932: pay_in_utils.trace('p_exemptions_80g_le ',p_exemptions_80g_le);
3933: pay_in_utils.trace('p_exemptions_80g_fp ',p_exemptions_80g_fp);
3934:
3935: END IF;
3928: pay_in_utils.trace('p_start_period ',p_start_period);
3929: pay_in_utils.trace('p_end_period ',p_end_period);
3930: pay_in_utils.trace('p_flag ',p_flag);
3931: pay_in_utils.trace('p_exemptions_80g_ue ',p_exemptions_80g_ue);
3932: pay_in_utils.trace('p_exemptions_80g_le ',p_exemptions_80g_le);
3933: pay_in_utils.trace('p_exemptions_80g_fp ',p_exemptions_80g_fp);
3934:
3935: END IF;
3936:
3929: pay_in_utils.trace('p_end_period ',p_end_period);
3930: pay_in_utils.trace('p_flag ',p_flag);
3931: pay_in_utils.trace('p_exemptions_80g_ue ',p_exemptions_80g_ue);
3932: pay_in_utils.trace('p_exemptions_80g_le ',p_exemptions_80g_le);
3933: pay_in_utils.trace('p_exemptions_80g_fp ',p_exemptions_80g_fp);
3934:
3935: END IF;
3936:
3937: p_dedn_Sec_80GG := 0;
3966: ,l_std_exem_percent
3967: ,p_start_period
3968: ,p_end_period
3969: ,p_flag);
3970: pay_in_utils.set_location(g_debug, ' INDIA:p_dedn_Sec_80GG '||p_dedn_Sec_80GG,30);
3971:
3972: /* Sec 80GG Ends */
3973:
3974: /* Sec 80G Starts with bonus */
3995: IF p_exemptions_80g_le <> 0 THEN
3996:
3997: adj_tot_income := GREATEST(l_total_income - p_oth_inc,0) ;
3998:
3999: pay_in_utils.set_location(g_debug, ' INDIA:adj_tot_income '||adj_tot_income,40);
4000:
4001: elig_amt := LEAST((p_exemptions_80g_le + p_exemptions_80g_fp),
4002: l_don_charity_80g * adj_tot_income) ;
4003:
4000:
4001: elig_amt := LEAST((p_exemptions_80g_le + p_exemptions_80g_fp),
4002: l_don_charity_80g * adj_tot_income) ;
4003:
4004: pay_in_utils.set_location(g_debug, ' INDIA:elig_amt '||elig_amt,40);
4005:
4006: IF elig_amt < p_exemptions_80g_fp THEN
4007: p_dedn_Sec_80G_LE := elig_amt;
4008: ELSE
4024: + p_dedn_Sec_80G_FP;
4025:
4026: IF (g_debug)
4027: THEN
4028: pay_in_utils.trace('p_dedn_Sec_80GG ',p_dedn_Sec_80GG);
4029: pay_in_utils.trace('p_dedn_Sec_80G ',p_dedn_Sec_80G);
4030: pay_in_utils.trace('p_dedn_Sec_80G_UE ',p_dedn_Sec_80G_UE);
4031: pay_in_utils.trace('p_dedn_Sec_80G_LE ',p_dedn_Sec_80G_LE);
4032: pay_in_utils.trace('p_Dedn_Sec_80G_FP ',p_Dedn_Sec_80G_FP);
4025:
4026: IF (g_debug)
4027: THEN
4028: pay_in_utils.trace('p_dedn_Sec_80GG ',p_dedn_Sec_80GG);
4029: pay_in_utils.trace('p_dedn_Sec_80G ',p_dedn_Sec_80G);
4030: pay_in_utils.trace('p_dedn_Sec_80G_UE ',p_dedn_Sec_80G_UE);
4031: pay_in_utils.trace('p_dedn_Sec_80G_LE ',p_dedn_Sec_80G_LE);
4032: pay_in_utils.trace('p_Dedn_Sec_80G_FP ',p_Dedn_Sec_80G_FP);
4033: pay_in_utils.trace('p_adj_total_income ',p_adj_total_income);
4026: IF (g_debug)
4027: THEN
4028: pay_in_utils.trace('p_dedn_Sec_80GG ',p_dedn_Sec_80GG);
4029: pay_in_utils.trace('p_dedn_Sec_80G ',p_dedn_Sec_80G);
4030: pay_in_utils.trace('p_dedn_Sec_80G_UE ',p_dedn_Sec_80G_UE);
4031: pay_in_utils.trace('p_dedn_Sec_80G_LE ',p_dedn_Sec_80G_LE);
4032: pay_in_utils.trace('p_Dedn_Sec_80G_FP ',p_Dedn_Sec_80G_FP);
4033: pay_in_utils.trace('p_adj_total_income ',p_adj_total_income);
4034: pay_in_utils.trace('**************************************************','********************');
4027: THEN
4028: pay_in_utils.trace('p_dedn_Sec_80GG ',p_dedn_Sec_80GG);
4029: pay_in_utils.trace('p_dedn_Sec_80G ',p_dedn_Sec_80G);
4030: pay_in_utils.trace('p_dedn_Sec_80G_UE ',p_dedn_Sec_80G_UE);
4031: pay_in_utils.trace('p_dedn_Sec_80G_LE ',p_dedn_Sec_80G_LE);
4032: pay_in_utils.trace('p_Dedn_Sec_80G_FP ',p_Dedn_Sec_80G_FP);
4033: pay_in_utils.trace('p_adj_total_income ',p_adj_total_income);
4034: pay_in_utils.trace('**************************************************','********************');
4035: END IF;
4028: pay_in_utils.trace('p_dedn_Sec_80GG ',p_dedn_Sec_80GG);
4029: pay_in_utils.trace('p_dedn_Sec_80G ',p_dedn_Sec_80G);
4030: pay_in_utils.trace('p_dedn_Sec_80G_UE ',p_dedn_Sec_80G_UE);
4031: pay_in_utils.trace('p_dedn_Sec_80G_LE ',p_dedn_Sec_80G_LE);
4032: pay_in_utils.trace('p_Dedn_Sec_80G_FP ',p_Dedn_Sec_80G_FP);
4033: pay_in_utils.trace('p_adj_total_income ',p_adj_total_income);
4034: pay_in_utils.trace('**************************************************','********************');
4035: END IF;
4036: pay_in_utils.set_location(g_debug,'Leaving: '||l_procedure,50);
4029: pay_in_utils.trace('p_dedn_Sec_80G ',p_dedn_Sec_80G);
4030: pay_in_utils.trace('p_dedn_Sec_80G_UE ',p_dedn_Sec_80G_UE);
4031: pay_in_utils.trace('p_dedn_Sec_80G_LE ',p_dedn_Sec_80G_LE);
4032: pay_in_utils.trace('p_Dedn_Sec_80G_FP ',p_Dedn_Sec_80G_FP);
4033: pay_in_utils.trace('p_adj_total_income ',p_adj_total_income);
4034: pay_in_utils.trace('**************************************************','********************');
4035: END IF;
4036: pay_in_utils.set_location(g_debug,'Leaving: '||l_procedure,50);
4037:
4030: pay_in_utils.trace('p_dedn_Sec_80G_UE ',p_dedn_Sec_80G_UE);
4031: pay_in_utils.trace('p_dedn_Sec_80G_LE ',p_dedn_Sec_80G_LE);
4032: pay_in_utils.trace('p_Dedn_Sec_80G_FP ',p_Dedn_Sec_80G_FP);
4033: pay_in_utils.trace('p_adj_total_income ',p_adj_total_income);
4034: pay_in_utils.trace('**************************************************','********************');
4035: END IF;
4036: pay_in_utils.set_location(g_debug,'Leaving: '||l_procedure,50);
4037:
4038: RETURN 0;
4032: pay_in_utils.trace('p_Dedn_Sec_80G_FP ',p_Dedn_Sec_80G_FP);
4033: pay_in_utils.trace('p_adj_total_income ',p_adj_total_income);
4034: pay_in_utils.trace('**************************************************','********************');
4035: END IF;
4036: pay_in_utils.set_location(g_debug,'Leaving: '||l_procedure,50);
4037:
4038: RETURN 0;
4039:
4040: END bon_calculate_80g_gg;