13: end_cnt number;
14:
15: begin
16:
17: hr_utility.trace('get_table_position');
18: hr_utility.trace('EEID is : ' || to_char(p_entry_id));
19: hr_utility.trace('p_called_from is : ' || p_called_from);
20:
21: p_found := FALSE;
14:
15: begin
16:
17: hr_utility.trace('get_table_position');
18: hr_utility.trace('EEID is : ' || to_char(p_entry_id));
19: hr_utility.trace('p_called_from is : ' || p_called_from);
20:
21: p_found := FALSE;
22: p_pos_index := 0;
15: begin
16:
17: hr_utility.trace('get_table_position');
18: hr_utility.trace('EEID is : ' || to_char(p_entry_id));
19: hr_utility.trace('p_called_from is : ' || p_called_from);
20:
21: p_found := FALSE;
22: p_pos_index := 0;
23:
50: return;
51:
52: else
53:
54: hr_utility.trace('Value of COUNT is : ' || to_char(p_count));
55: hr_utility.trace('Value of FIRST is : ' || to_char(start_cnt));
56: hr_utility.trace('Value of LAST is : ' || to_char(end_cnt));
57: hr_utility.trace('Value of p_clear_asg is : ' || p_clear_asg);
58:
51:
52: else
53:
54: hr_utility.trace('Value of COUNT is : ' || to_char(p_count));
55: hr_utility.trace('Value of FIRST is : ' || to_char(start_cnt));
56: hr_utility.trace('Value of LAST is : ' || to_char(end_cnt));
57: hr_utility.trace('Value of p_clear_asg is : ' || p_clear_asg);
58:
59: for i in start_cnt .. end_cnt loop
52: else
53:
54: hr_utility.trace('Value of COUNT is : ' || to_char(p_count));
55: hr_utility.trace('Value of FIRST is : ' || to_char(start_cnt));
56: hr_utility.trace('Value of LAST is : ' || to_char(end_cnt));
57: hr_utility.trace('Value of p_clear_asg is : ' || p_clear_asg);
58:
59: for i in start_cnt .. end_cnt loop
60:
53:
54: hr_utility.trace('Value of COUNT is : ' || to_char(p_count));
55: hr_utility.trace('Value of FIRST is : ' || to_char(start_cnt));
56: hr_utility.trace('Value of LAST is : ' || to_char(end_cnt));
57: hr_utility.trace('Value of p_clear_asg is : ' || p_clear_asg);
58:
59: for i in start_cnt .. end_cnt loop
60:
61: if p_clear_asg is null then
61: if p_clear_asg is null then
62:
63: if p_called_from = 'STOPPER' then
64: if iter_stop.EXISTS(i) then
65: hr_utility.trace('Iter Stop Value EXISTS');
66: plsql_tab_entry_id := iter_stop(i).entry_id;
67: else
68: hr_utility.trace('Iter Stop Value Does Not EXISTS');
69: plsql_tab_entry_id := 0;
64: if iter_stop.EXISTS(i) then
65: hr_utility.trace('Iter Stop Value EXISTS');
66: plsql_tab_entry_id := iter_stop(i).entry_id;
67: else
68: hr_utility.trace('Iter Stop Value Does Not EXISTS');
69: plsql_tab_entry_id := 0;
70: end if;
71:
72: elsif p_called_from = 'INS_FLAG' then
70: end if;
71:
72: elsif p_called_from = 'INS_FLAG' then
73: if iter_ins.EXISTS(i) then
74: hr_utility.trace('Iter Ins Value EXISTS');
75: plsql_tab_entry_id := iter_ins(i).entry_id;
76: else
77: hr_utility.trace('Iter Ins Value Does Not EXISTS');
78: plsql_tab_entry_id := 0;
73: if iter_ins.EXISTS(i) then
74: hr_utility.trace('Iter Ins Value EXISTS');
75: plsql_tab_entry_id := iter_ins(i).entry_id;
76: else
77: hr_utility.trace('Iter Ins Value Does Not EXISTS');
78: plsql_tab_entry_id := 0;
79: end if;
80:
81: elsif p_called_from = 'ITER_AMT' then
79: end if;
80:
81: elsif p_called_from = 'ITER_AMT' then
82: if iter_amt.EXISTS(i) then
83: hr_utility.trace('Iter Amt Value EXISTS');
84: plsql_tab_entry_id := iter_amt(i).entry_id;
85: else
86: hr_utility.trace('Iter Amt Value Does Not EXISTS');
87: plsql_tab_entry_id := 0;
82: if iter_amt.EXISTS(i) then
83: hr_utility.trace('Iter Amt Value EXISTS');
84: plsql_tab_entry_id := iter_amt(i).entry_id;
85: else
86: hr_utility.trace('Iter Amt Value Does Not EXISTS');
87: plsql_tab_entry_id := 0;
88: end if;
89:
90: else
88: end if;
89:
90: else
91: if iter_val.EXISTS(i) then
92: hr_utility.trace('Iter Val Value EXISTS');
93: plsql_tab_entry_id := iter_val(i).entry_id;
94: else
95: hr_utility.trace('Iter Val Value Does Not EXISTS');
96: plsql_tab_entry_id := 0;
91: if iter_val.EXISTS(i) then
92: hr_utility.trace('Iter Val Value EXISTS');
93: plsql_tab_entry_id := iter_val(i).entry_id;
94: else
95: hr_utility.trace('Iter Val Value Does Not EXISTS');
96: plsql_tab_entry_id := 0;
97: end if;
98:
99: end if; /* p_called_from */
101: else /* p_clear_asg is null */
102:
103: if p_called_from = 'STOPPER' then
104: if iter_stop.EXISTS(i) then
105: hr_utility.trace('Iter Stop Value EXISTS');
106: plsql_tab_entry_id := iter_stop(i).asg_id;
107: else
108: hr_utility.trace('Iter Stop Value Does Not EXISTS');
109: plsql_tab_entry_id := 0;
104: if iter_stop.EXISTS(i) then
105: hr_utility.trace('Iter Stop Value EXISTS');
106: plsql_tab_entry_id := iter_stop(i).asg_id;
107: else
108: hr_utility.trace('Iter Stop Value Does Not EXISTS');
109: plsql_tab_entry_id := 0;
110: end if;
111:
112: elsif p_called_from = 'INS_FLAG' then
110: end if;
111:
112: elsif p_called_from = 'INS_FLAG' then
113: if iter_ins.EXISTS(i) then
114: hr_utility.trace('Iter Ins Value EXISTS');
115: plsql_tab_entry_id := iter_ins(i).asg_id;
116: else
117: hr_utility.trace('Iter Ins Value Does Not EXISTS');
118: plsql_tab_entry_id := 0;
113: if iter_ins.EXISTS(i) then
114: hr_utility.trace('Iter Ins Value EXISTS');
115: plsql_tab_entry_id := iter_ins(i).asg_id;
116: else
117: hr_utility.trace('Iter Ins Value Does Not EXISTS');
118: plsql_tab_entry_id := 0;
119: end if;
120:
121: elsif p_called_from = 'ITER_AMT' then
119: end if;
120:
121: elsif p_called_from = 'ITER_AMT' then
122: if iter_amt.EXISTS(i) then
123: hr_utility.trace('Iter Amt Value EXISTS');
124: plsql_tab_entry_id := iter_amt(i).asg_id;
125: else
126: hr_utility.trace('Iter Amt Value Does Not EXISTS');
127: plsql_tab_entry_id := 0;
122: if iter_amt.EXISTS(i) then
123: hr_utility.trace('Iter Amt Value EXISTS');
124: plsql_tab_entry_id := iter_amt(i).asg_id;
125: else
126: hr_utility.trace('Iter Amt Value Does Not EXISTS');
127: plsql_tab_entry_id := 0;
128: end if;
129:
130: elsif p_called_from = 'ITER_ELE' then
128: end if;
129:
130: elsif p_called_from = 'ITER_ELE' then
131: if iter_ele_type.EXISTS(i) then
132: hr_utility.trace('Iter Ele Value EXISTS');
133: plsql_tab_entry_id := iter_ele_type(i).asg_id;
134: else
135: hr_utility.trace('Iter Ele Value Does Not EXISTS');
136: plsql_tab_entry_id := 0;
131: if iter_ele_type.EXISTS(i) then
132: hr_utility.trace('Iter Ele Value EXISTS');
133: plsql_tab_entry_id := iter_ele_type(i).asg_id;
134: else
135: hr_utility.trace('Iter Ele Value Does Not EXISTS');
136: plsql_tab_entry_id := 0;
137: end if;
138:
139: else
137: end if;
138:
139: else
140: if iter_val.EXISTS(i) then
141: hr_utility.trace('Iter Val Value EXISTS');
142: plsql_tab_entry_id := iter_val(i).asg_id;
143: else
144: hr_utility.trace('Iter Val Value Does Not EXISTS');
145: plsql_tab_entry_id := 0;
140: if iter_val.EXISTS(i) then
141: hr_utility.trace('Iter Val Value EXISTS');
142: plsql_tab_entry_id := iter_val(i).asg_id;
143: else
144: hr_utility.trace('Iter Val Value Does Not EXISTS');
145: plsql_tab_entry_id := 0;
146: end if;
147: end if; /* p_called_from */
148:
147: end if; /* p_called_from */
148:
149: end if; /* p_clear_asg is null */
150:
151: hr_utility.trace('PLSQL EEID is : ' || to_char(plsql_tab_entry_id));
152: if ((p_entry_id = plsql_tab_entry_id) and (p_found = FALSE)) then
153:
154: p_found := TRUE;
155: p_pos_index := i;
160: end loop;
161:
162: end if;
163:
164: hr_utility.trace('Value of p_pos_index is : ' || to_char(p_pos_index));
165: return;
166:
167: end; /* get_table_position */
168:
176: p_stopper_flag varchar2(5);
177:
178: BEGIN /* get_stopper_flag */
179:
180: hr_utility.trace('get_stopper_flag');
181:
182: get_table_position(p_entry_id,l_found_flag, l_pos_no,'STOPPER');
183:
184: if l_found_flag = FALSE then
188:
189: p_stopper_flag := 'Y';
190: end if;
191:
192: hr_utility.trace('Value of p_stopper_flag is : '|| p_stopper_flag);
193: return p_stopper_flag;
194:
195: end; /* get_stopper_flag */
196:
203: l_found_flag boolean;
204:
205: BEGIN /* set_stopper_flag */
206:
207: hr_utility.trace('set_stopper_flag');
208:
209: get_table_position(p_entry_id,l_found_flag, l_pos_no,'STOPPER');
210:
211: hr_utility.trace('l_pos_no = '|| to_char(l_pos_no));
207: hr_utility.trace('set_stopper_flag');
208:
209: get_table_position(p_entry_id,l_found_flag, l_pos_no,'STOPPER');
210:
211: hr_utility.trace('l_pos_no = '|| to_char(l_pos_no));
212:
213: if l_found_flag = FALSE then
214:
215: hr_utility.trace('Found Flag is FALSE ');
211: hr_utility.trace('l_pos_no = '|| to_char(l_pos_no));
212:
213: if l_found_flag = FALSE then
214:
215: hr_utility.trace('Found Flag is FALSE ');
216: l_pos_no := iter_stop.COUNT + 1;
217: hr_utility.trace('increasing l_pos_no = '|| to_char(l_pos_no));
218:
219: iter_stop(l_pos_no).entry_id := p_entry_id;
213: if l_found_flag = FALSE then
214:
215: hr_utility.trace('Found Flag is FALSE ');
216: l_pos_no := iter_stop.COUNT + 1;
217: hr_utility.trace('increasing l_pos_no = '|| to_char(l_pos_no));
218:
219: iter_stop(l_pos_no).entry_id := p_entry_id;
220: iter_stop(l_pos_no).asg_id := p_asg_id;
221: iter_stop(l_pos_no).stop_flag := 'Y';
246: l_pos_no number;
247:
248: BEGIN /* get_iterative_value */
249:
250: hr_utility.trace('get_iterative_value');
251:
252: get_table_position(p_entry_id,l_found_flag, l_pos_no);
253:
254: if l_found_flag = FALSE then
273: p_clr_rep_amt := iter_val(l_pos_no).clr_rep_amt;
274:
275: end if;
276:
277: hr_utility.trace('Value of max is : ' || to_char(max_deduction));
278: hr_utility.trace('Value of min is : ' || to_char(min_deduction));
279: hr_utility.trace('Value of new is : ' || to_char(new_deduction));
280: hr_utility.trace('Value of Desired Amt is : ' || to_char(p_desired_amt));
281: hr_utility.trace('Value of Calc Method is : ' || p_calc_method);
274:
275: end if;
276:
277: hr_utility.trace('Value of max is : ' || to_char(max_deduction));
278: hr_utility.trace('Value of min is : ' || to_char(min_deduction));
279: hr_utility.trace('Value of new is : ' || to_char(new_deduction));
280: hr_utility.trace('Value of Desired Amt is : ' || to_char(p_desired_amt));
281: hr_utility.trace('Value of Calc Method is : ' || p_calc_method);
282: hr_utility.trace('Value of To Within is : ' || to_char(p_to_within));
275: end if;
276:
277: hr_utility.trace('Value of max is : ' || to_char(max_deduction));
278: hr_utility.trace('Value of min is : ' || to_char(min_deduction));
279: hr_utility.trace('Value of new is : ' || to_char(new_deduction));
280: hr_utility.trace('Value of Desired Amt is : ' || to_char(p_desired_amt));
281: hr_utility.trace('Value of Calc Method is : ' || p_calc_method);
282: hr_utility.trace('Value of To Within is : ' || to_char(p_to_within));
283: hr_utility.trace('Value of Clr Add Amt is : ' || to_char(p_clr_add_amt));
276:
277: hr_utility.trace('Value of max is : ' || to_char(max_deduction));
278: hr_utility.trace('Value of min is : ' || to_char(min_deduction));
279: hr_utility.trace('Value of new is : ' || to_char(new_deduction));
280: hr_utility.trace('Value of Desired Amt is : ' || to_char(p_desired_amt));
281: hr_utility.trace('Value of Calc Method is : ' || p_calc_method);
282: hr_utility.trace('Value of To Within is : ' || to_char(p_to_within));
283: hr_utility.trace('Value of Clr Add Amt is : ' || to_char(p_clr_add_amt));
284: hr_utility.trace('Value of Clr Rep Amt is : ' || to_char(p_clr_rep_amt));
277: hr_utility.trace('Value of max is : ' || to_char(max_deduction));
278: hr_utility.trace('Value of min is : ' || to_char(min_deduction));
279: hr_utility.trace('Value of new is : ' || to_char(new_deduction));
280: hr_utility.trace('Value of Desired Amt is : ' || to_char(p_desired_amt));
281: hr_utility.trace('Value of Calc Method is : ' || p_calc_method);
282: hr_utility.trace('Value of To Within is : ' || to_char(p_to_within));
283: hr_utility.trace('Value of Clr Add Amt is : ' || to_char(p_clr_add_amt));
284: hr_utility.trace('Value of Clr Rep Amt is : ' || to_char(p_clr_rep_amt));
285:
278: hr_utility.trace('Value of min is : ' || to_char(min_deduction));
279: hr_utility.trace('Value of new is : ' || to_char(new_deduction));
280: hr_utility.trace('Value of Desired Amt is : ' || to_char(p_desired_amt));
281: hr_utility.trace('Value of Calc Method is : ' || p_calc_method);
282: hr_utility.trace('Value of To Within is : ' || to_char(p_to_within));
283: hr_utility.trace('Value of Clr Add Amt is : ' || to_char(p_clr_add_amt));
284: hr_utility.trace('Value of Clr Rep Amt is : ' || to_char(p_clr_rep_amt));
285:
286: return new_deduction;
279: hr_utility.trace('Value of new is : ' || to_char(new_deduction));
280: hr_utility.trace('Value of Desired Amt is : ' || to_char(p_desired_amt));
281: hr_utility.trace('Value of Calc Method is : ' || p_calc_method);
282: hr_utility.trace('Value of To Within is : ' || to_char(p_to_within));
283: hr_utility.trace('Value of Clr Add Amt is : ' || to_char(p_clr_add_amt));
284: hr_utility.trace('Value of Clr Rep Amt is : ' || to_char(p_clr_rep_amt));
285:
286: return new_deduction;
287:
280: hr_utility.trace('Value of Desired Amt is : ' || to_char(p_desired_amt));
281: hr_utility.trace('Value of Calc Method is : ' || p_calc_method);
282: hr_utility.trace('Value of To Within is : ' || to_char(p_to_within));
283: hr_utility.trace('Value of Clr Add Amt is : ' || to_char(p_clr_add_amt));
284: hr_utility.trace('Value of Clr Rep Amt is : ' || to_char(p_clr_rep_amt));
285:
286: return new_deduction;
287:
288: END; /* get_iterative_value */
304: l_pos_no number;
305: l_found_flag boolean;
306:
307: BEGIN /* set_iterative_value */
308: hr_utility.trace('set_iterative_value');
309:
310: get_table_position(p_entry_id,l_found_flag, l_pos_no);
311:
312: hr_utility.trace('l_pos_no is '|| to_char(l_pos_no));
308: hr_utility.trace('set_iterative_value');
309:
310: get_table_position(p_entry_id,l_found_flag, l_pos_no);
311:
312: hr_utility.trace('l_pos_no is '|| to_char(l_pos_no));
313:
314: if l_found_flag = FALSE then
315: l_pos_no := iter_val.COUNT + 1;
316: iter_val(l_pos_no).entry_id := p_entry_id;
327: iter_val(l_pos_no).clr_add_amt := p_clr_add_amt;
328: iter_val(l_pos_no).clr_rep_amt := p_clr_rep_amt;
329:
330:
331: hr_utility.trace('Iter No is :' || to_char(iter_val(l_pos_no).iter_no));
332: hr_utility.trace('Max is :' || to_char(iter_val(l_pos_no).max_dedn));
333: hr_utility.trace('Min is :' || to_char(iter_val(l_pos_no).min_dedn));
334: hr_utility.trace('New is :' || to_char(iter_val(l_pos_no).new_dedn));
335: hr_utility.trace('Desired Amt is :' || to_char(iter_val(l_pos_no).des_amt));
328: iter_val(l_pos_no).clr_rep_amt := p_clr_rep_amt;
329:
330:
331: hr_utility.trace('Iter No is :' || to_char(iter_val(l_pos_no).iter_no));
332: hr_utility.trace('Max is :' || to_char(iter_val(l_pos_no).max_dedn));
333: hr_utility.trace('Min is :' || to_char(iter_val(l_pos_no).min_dedn));
334: hr_utility.trace('New is :' || to_char(iter_val(l_pos_no).new_dedn));
335: hr_utility.trace('Desired Amt is :' || to_char(iter_val(l_pos_no).des_amt));
336: hr_utility.trace('Calc Method is :' || iter_val(l_pos_no).calc_method);
329:
330:
331: hr_utility.trace('Iter No is :' || to_char(iter_val(l_pos_no).iter_no));
332: hr_utility.trace('Max is :' || to_char(iter_val(l_pos_no).max_dedn));
333: hr_utility.trace('Min is :' || to_char(iter_val(l_pos_no).min_dedn));
334: hr_utility.trace('New is :' || to_char(iter_val(l_pos_no).new_dedn));
335: hr_utility.trace('Desired Amt is :' || to_char(iter_val(l_pos_no).des_amt));
336: hr_utility.trace('Calc Method is :' || iter_val(l_pos_no).calc_method);
337: hr_utility.trace('To Within is :' || to_char(iter_val(l_pos_no).to_within));
330:
331: hr_utility.trace('Iter No is :' || to_char(iter_val(l_pos_no).iter_no));
332: hr_utility.trace('Max is :' || to_char(iter_val(l_pos_no).max_dedn));
333: hr_utility.trace('Min is :' || to_char(iter_val(l_pos_no).min_dedn));
334: hr_utility.trace('New is :' || to_char(iter_val(l_pos_no).new_dedn));
335: hr_utility.trace('Desired Amt is :' || to_char(iter_val(l_pos_no).des_amt));
336: hr_utility.trace('Calc Method is :' || iter_val(l_pos_no).calc_method);
337: hr_utility.trace('To Within is :' || to_char(iter_val(l_pos_no).to_within));
338: hr_utility.trace('Clr Add Amt is :' || to_char(iter_val(l_pos_no).clr_add_amt));
331: hr_utility.trace('Iter No is :' || to_char(iter_val(l_pos_no).iter_no));
332: hr_utility.trace('Max is :' || to_char(iter_val(l_pos_no).max_dedn));
333: hr_utility.trace('Min is :' || to_char(iter_val(l_pos_no).min_dedn));
334: hr_utility.trace('New is :' || to_char(iter_val(l_pos_no).new_dedn));
335: hr_utility.trace('Desired Amt is :' || to_char(iter_val(l_pos_no).des_amt));
336: hr_utility.trace('Calc Method is :' || iter_val(l_pos_no).calc_method);
337: hr_utility.trace('To Within is :' || to_char(iter_val(l_pos_no).to_within));
338: hr_utility.trace('Clr Add Amt is :' || to_char(iter_val(l_pos_no).clr_add_amt));
339: hr_utility.trace('Clr Rep Amt is :' || to_char(iter_val(l_pos_no).clr_rep_amt));
332: hr_utility.trace('Max is :' || to_char(iter_val(l_pos_no).max_dedn));
333: hr_utility.trace('Min is :' || to_char(iter_val(l_pos_no).min_dedn));
334: hr_utility.trace('New is :' || to_char(iter_val(l_pos_no).new_dedn));
335: hr_utility.trace('Desired Amt is :' || to_char(iter_val(l_pos_no).des_amt));
336: hr_utility.trace('Calc Method is :' || iter_val(l_pos_no).calc_method);
337: hr_utility.trace('To Within is :' || to_char(iter_val(l_pos_no).to_within));
338: hr_utility.trace('Clr Add Amt is :' || to_char(iter_val(l_pos_no).clr_add_amt));
339: hr_utility.trace('Clr Rep Amt is :' || to_char(iter_val(l_pos_no).clr_rep_amt));
340:
333: hr_utility.trace('Min is :' || to_char(iter_val(l_pos_no).min_dedn));
334: hr_utility.trace('New is :' || to_char(iter_val(l_pos_no).new_dedn));
335: hr_utility.trace('Desired Amt is :' || to_char(iter_val(l_pos_no).des_amt));
336: hr_utility.trace('Calc Method is :' || iter_val(l_pos_no).calc_method);
337: hr_utility.trace('To Within is :' || to_char(iter_val(l_pos_no).to_within));
338: hr_utility.trace('Clr Add Amt is :' || to_char(iter_val(l_pos_no).clr_add_amt));
339: hr_utility.trace('Clr Rep Amt is :' || to_char(iter_val(l_pos_no).clr_rep_amt));
340:
341: return new_deduction;
334: hr_utility.trace('New is :' || to_char(iter_val(l_pos_no).new_dedn));
335: hr_utility.trace('Desired Amt is :' || to_char(iter_val(l_pos_no).des_amt));
336: hr_utility.trace('Calc Method is :' || iter_val(l_pos_no).calc_method);
337: hr_utility.trace('To Within is :' || to_char(iter_val(l_pos_no).to_within));
338: hr_utility.trace('Clr Add Amt is :' || to_char(iter_val(l_pos_no).clr_add_amt));
339: hr_utility.trace('Clr Rep Amt is :' || to_char(iter_val(l_pos_no).clr_rep_amt));
340:
341: return new_deduction;
342:
335: hr_utility.trace('Desired Amt is :' || to_char(iter_val(l_pos_no).des_amt));
336: hr_utility.trace('Calc Method is :' || iter_val(l_pos_no).calc_method);
337: hr_utility.trace('To Within is :' || to_char(iter_val(l_pos_no).to_within));
338: hr_utility.trace('Clr Add Amt is :' || to_char(iter_val(l_pos_no).clr_add_amt));
339: hr_utility.trace('Clr Rep Amt is :' || to_char(iter_val(l_pos_no).clr_rep_amt));
340:
341: return new_deduction;
342:
343: END; /* set_iterative_value */
350: l_found_flag boolean;
351:
352: BEGIN /* clear_iterative_value */
353:
354: hr_utility.trace('In clear_iterative_value ');
355:
356: get_table_position(p_entry_id,l_found_flag, l_pos_no);
357:
358: hr_utility.trace('Position = ' || to_char(l_pos_no));
354: hr_utility.trace('In clear_iterative_value ');
355:
356: get_table_position(p_entry_id,l_found_flag, l_pos_no);
357:
358: hr_utility.trace('Position = ' || to_char(l_pos_no));
359:
360: if l_found_flag then
361: hr_utility.trace('Found flag is true');
362: iter_val.DELETE(l_pos_no) ;
357:
358: hr_utility.trace('Position = ' || to_char(l_pos_no));
359:
360: if l_found_flag then
361: hr_utility.trace('Found flag is true');
362: iter_val.DELETE(l_pos_no) ;
363:
364: end if;
365:
366: /* clear the iter_amt plsql table also. This is used by 401,403 and 457
367: elements. */
368:
369: get_table_position(p_entry_id,l_found_flag, l_pos_no,'ITER_AMT');
370: hr_utility.trace('Position = ' || to_char(l_pos_no));
371:
372: if l_found_flag then
373: hr_utility.trace('Found flag is true');
374: iter_amt.DELETE(l_pos_no) ;
369: get_table_position(p_entry_id,l_found_flag, l_pos_no,'ITER_AMT');
370: hr_utility.trace('Position = ' || to_char(l_pos_no));
371:
372: if l_found_flag then
373: hr_utility.trace('Found flag is true');
374: iter_amt.DELETE(l_pos_no) ;
375:
376: end if;
377:
396:
397: So if we get a different AAID we see if we have a record saved for that
398: assignment id, if yes then delete it else do nothing. */
399:
400: hr_utility.trace('In clear_on_asg ');
401: hr_utility.trace('g_aaid = ' || to_char(g_aaid));
402: hr_utility.trace('p_aaid = ' || to_char(p_aaid));
403: hr_utility.trace('p_asg_id = ' || to_char(p_asg_id));
404:
397: So if we get a different AAID we see if we have a record saved for that
398: assignment id, if yes then delete it else do nothing. */
399:
400: hr_utility.trace('In clear_on_asg ');
401: hr_utility.trace('g_aaid = ' || to_char(g_aaid));
402: hr_utility.trace('p_aaid = ' || to_char(p_aaid));
403: hr_utility.trace('p_asg_id = ' || to_char(p_asg_id));
404:
405: if ((g_aaid is null) OR
398: assignment id, if yes then delete it else do nothing. */
399:
400: hr_utility.trace('In clear_on_asg ');
401: hr_utility.trace('g_aaid = ' || to_char(g_aaid));
402: hr_utility.trace('p_aaid = ' || to_char(p_aaid));
403: hr_utility.trace('p_asg_id = ' || to_char(p_asg_id));
404:
405: if ((g_aaid is null) OR
406: (g_aaid <> p_aaid )) then
399:
400: hr_utility.trace('In clear_on_asg ');
401: hr_utility.trace('g_aaid = ' || to_char(g_aaid));
402: hr_utility.trace('p_aaid = ' || to_char(p_aaid));
403: hr_utility.trace('p_asg_id = ' || to_char(p_asg_id));
404:
405: if ((g_aaid is null) OR
406: (g_aaid <> p_aaid )) then
407:
431: l_found_flag boolean;
432:
433: BEGIN /* get_iter_count */
434:
435: hr_utility.trace('In get_iter_count');
436:
437: get_table_position(p_entry_id,l_found_flag, l_pos_no);
438:
439: hr_utility.trace('Value of l_pos_no is : '||to_char(l_pos_no));
435: hr_utility.trace('In get_iter_count');
436:
437: get_table_position(p_entry_id,l_found_flag, l_pos_no);
438:
439: hr_utility.trace('Value of l_pos_no is : '||to_char(l_pos_no));
440:
441: if l_found_flag = FALSE then
442:
443: iter_count := l_pos_no ;
444: else
445: iter_count := iter_val(l_pos_no).iter_no;
446: end if;
447:
448: hr_utility.trace('Value of iter count is : '||to_char(iter_count));
449: return iter_count;
450:
451: END; /* get_iter_count */
452:
459: l_found_flag boolean;
460:
461: BEGIN /* inc_iter_count */
462:
463: hr_utility.trace('In inc_iter_count');
464:
465: get_table_position(p_entry_id,l_found_flag, l_pos_no);
466:
467: hr_utility.trace('l_pos_no is : '|| to_char(l_pos_no));
463: hr_utility.trace('In inc_iter_count');
464:
465: get_table_position(p_entry_id,l_found_flag, l_pos_no);
466:
467: hr_utility.trace('l_pos_no is : '|| to_char(l_pos_no));
468: if l_found_flag = FALSE then
469:
470: raise NO_DATA_FOUND;
471: else
497:
498:
499: Begin
500:
501: hr_utility.trace('p_iter_count= '|| to_char(p_iter_count));
502: hr_utility.trace('p_amount= '|| to_char(p_amount));
503: hr_utility.trace('p_dedn_amt= '|| to_char(p_dedn_amt));
504: hr_utility.trace('p_arrears_itd= '|| to_char(p_arrears_itd));
505: hr_utility.trace('p_ins_flag= '|| p_ins_flag);
498:
499: Begin
500:
501: hr_utility.trace('p_iter_count= '|| to_char(p_iter_count));
502: hr_utility.trace('p_amount= '|| to_char(p_amount));
503: hr_utility.trace('p_dedn_amt= '|| to_char(p_dedn_amt));
504: hr_utility.trace('p_arrears_itd= '|| to_char(p_arrears_itd));
505: hr_utility.trace('p_ins_flag= '|| p_ins_flag);
506:
499: Begin
500:
501: hr_utility.trace('p_iter_count= '|| to_char(p_iter_count));
502: hr_utility.trace('p_amount= '|| to_char(p_amount));
503: hr_utility.trace('p_dedn_amt= '|| to_char(p_dedn_amt));
504: hr_utility.trace('p_arrears_itd= '|| to_char(p_arrears_itd));
505: hr_utility.trace('p_ins_flag= '|| p_ins_flag);
506:
507: /* call the arrearage function if this the first call from the
500:
501: hr_utility.trace('p_iter_count= '|| to_char(p_iter_count));
502: hr_utility.trace('p_amount= '|| to_char(p_amount));
503: hr_utility.trace('p_dedn_amt= '|| to_char(p_dedn_amt));
504: hr_utility.trace('p_arrears_itd= '|| to_char(p_arrears_itd));
505: hr_utility.trace('p_ins_flag= '|| p_ins_flag);
506:
507: /* call the arrearage function if this the first call from the
508: formula */
501: hr_utility.trace('p_iter_count= '|| to_char(p_iter_count));
502: hr_utility.trace('p_amount= '|| to_char(p_amount));
503: hr_utility.trace('p_dedn_amt= '|| to_char(p_dedn_amt));
504: hr_utility.trace('p_arrears_itd= '|| to_char(p_arrears_itd));
505: hr_utility.trace('p_ins_flag= '|| p_ins_flag);
506:
507: /* call the arrearage function if this the first call from the
508: formula */
509:
508: formula */
509:
510: if p_iter_count <= 1 and p_ins_flag = 'N' then /* main */
511:
512: hr_utility.trace('Calling Arrearage');
513: l_dedn_amt := hr_us_ff_udfs.Arrearage (
514: p_eletype_id => p_eletype_id,
515: p_date_earned => p_date_earned,
516: p_partial_flag => p_partial_flag,
542:
543: exception
544:
545: WHEN NO_DATA_FOUND THEN
546: hr_utility.set_location('Arrearage is NOT ON for this ele.', 99);
547: v_arrears_flag := 'N';
548:
549: WHEN TOO_MANY_ROWS THEN
550: hr_utility.set_location('Too many rows returned for Clear Arrears inpval.', 99);
546: hr_utility.set_location('Arrearage is NOT ON for this ele.', 99);
547: v_arrears_flag := 'N';
548:
549: WHEN TOO_MANY_ROWS THEN
550: hr_utility.set_location('Too many rows returned for Clear Arrears inpval.', 99);
551: v_arrears_flag := 'N';
552:
553: end;
554:
551: v_arrears_flag := 'N';
552:
553: end;
554:
555: hr_utility.trace('value of arrear flag : '|| v_arrears_flag);
556: hr_utility.trace('Partial Flag= '|| p_partial_flag);
557:
558: IF v_arrears_flag = 'N' THEN
559:
552:
553: end;
554:
555: hr_utility.trace('value of arrear flag : '|| v_arrears_flag);
556: hr_utility.trace('Partial Flag= '|| p_partial_flag);
557:
558: IF v_arrears_flag = 'N' THEN
559:
560: if p_partial_flag = 'N' then
706: l_other varchar2(5);
707:
708: BEGIN
709:
710: hr_utility.trace('In reduces_disposable_income ');
711: hr_utility.trace('Input assignment id is : '|| to_char(p_assignment_id));
712: hr_utility.trace('Input Date earned is : '|| p_date_earned);
713: hr_utility.trace('Input Tax Type is : '|| p_tax_type);
714:
707:
708: BEGIN
709:
710: hr_utility.trace('In reduces_disposable_income ');
711: hr_utility.trace('Input assignment id is : '|| to_char(p_assignment_id));
712: hr_utility.trace('Input Date earned is : '|| p_date_earned);
713: hr_utility.trace('Input Tax Type is : '|| p_tax_type);
714:
715: open csr_get_info;
708: BEGIN
709:
710: hr_utility.trace('In reduces_disposable_income ');
711: hr_utility.trace('Input assignment id is : '|| to_char(p_assignment_id));
712: hr_utility.trace('Input Date earned is : '|| p_date_earned);
713: hr_utility.trace('Input Tax Type is : '|| p_tax_type);
714:
715: open csr_get_info;
716: fetch csr_get_info INTO l_tax_rules_date_id;
709:
710: hr_utility.trace('In reduces_disposable_income ');
711: hr_utility.trace('Input assignment id is : '|| to_char(p_assignment_id));
712: hr_utility.trace('Input Date earned is : '|| p_date_earned);
713: hr_utility.trace('Input Tax Type is : '|| p_tax_type);
714:
715: open csr_get_info;
716: fetch csr_get_info INTO l_tax_rules_date_id;
717: close csr_get_info;
715: open csr_get_info;
716: fetch csr_get_info INTO l_tax_rules_date_id;
717: close csr_get_info;
718:
719: hr_utility.trace('Tax Rule Date Id is : '|| to_char(l_tax_rules_date_id));
720:
721: open c_get_tax_cat;
722: fetch c_get_tax_cat into l_cur_ele_tax_cat,l_classification_id;
723: close c_get_tax_cat;
730: l_ip_val_name,l_value;
731:
732: exit when c_garn_ele_exists%NOTFOUND;
733:
734: hr_utility.trace('Garnishment Element exists ');
735: hr_utility.trace('Classification Id : '||to_char(l_classification_id));
736: hr_utility.trace('Element Name is : '|| l_element_name);
737: hr_utility.trace('Tax Category is : '|| l_cur_ele_tax_cat);
738: hr_utility.trace('Input Value Name is : '|| l_ip_val_name);
731:
732: exit when c_garn_ele_exists%NOTFOUND;
733:
734: hr_utility.trace('Garnishment Element exists ');
735: hr_utility.trace('Classification Id : '||to_char(l_classification_id));
736: hr_utility.trace('Element Name is : '|| l_element_name);
737: hr_utility.trace('Tax Category is : '|| l_cur_ele_tax_cat);
738: hr_utility.trace('Input Value Name is : '|| l_ip_val_name);
739: hr_utility.trace('Value is : '|| l_value);
732: exit when c_garn_ele_exists%NOTFOUND;
733:
734: hr_utility.trace('Garnishment Element exists ');
735: hr_utility.trace('Classification Id : '||to_char(l_classification_id));
736: hr_utility.trace('Element Name is : '|| l_element_name);
737: hr_utility.trace('Tax Category is : '|| l_cur_ele_tax_cat);
738: hr_utility.trace('Input Value Name is : '|| l_ip_val_name);
739: hr_utility.trace('Value is : '|| l_value);
740:
733:
734: hr_utility.trace('Garnishment Element exists ');
735: hr_utility.trace('Classification Id : '||to_char(l_classification_id));
736: hr_utility.trace('Element Name is : '|| l_element_name);
737: hr_utility.trace('Tax Category is : '|| l_cur_ele_tax_cat);
738: hr_utility.trace('Input Value Name is : '|| l_ip_val_name);
739: hr_utility.trace('Value is : '|| l_value);
740:
741: open csr_tax_rules_exists('00-000-0000',l_cur_ele_tax_cat,
734: hr_utility.trace('Garnishment Element exists ');
735: hr_utility.trace('Classification Id : '||to_char(l_classification_id));
736: hr_utility.trace('Element Name is : '|| l_element_name);
737: hr_utility.trace('Tax Category is : '|| l_cur_ele_tax_cat);
738: hr_utility.trace('Input Value Name is : '|| l_ip_val_name);
739: hr_utility.trace('Value is : '|| l_value);
740:
741: open csr_tax_rules_exists('00-000-0000',l_cur_ele_tax_cat,
742: l_classification_id,l_tax_rules_date_id);
735: hr_utility.trace('Classification Id : '||to_char(l_classification_id));
736: hr_utility.trace('Element Name is : '|| l_element_name);
737: hr_utility.trace('Tax Category is : '|| l_cur_ele_tax_cat);
738: hr_utility.trace('Input Value Name is : '|| l_ip_val_name);
739: hr_utility.trace('Value is : '|| l_value);
740:
741: open csr_tax_rules_exists('00-000-0000',l_cur_ele_tax_cat,
742: l_classification_id,l_tax_rules_date_id);
743: fetch csr_tax_rules_exists into l_fed;
742: l_classification_id,l_tax_rules_date_id);
743: fetch csr_tax_rules_exists into l_fed;
744: close csr_tax_rules_exists;
745:
746: hr_utility.trace('Federal Taxability Rule is : '|| l_fed);
747:
748: if l_fed = 'Y' then
749: -- Addded code check for DCIA as DCIA has Earning rules
750: -- defined only at Federal level.
753: if l_value is null then
754: open csr_work_location;
755: fetch csr_work_location into l_value;
756: close csr_work_location;
757: hr_utility.trace('Work Location is : '|| l_value);
758: end if; /* l_value is null */
759:
760: l_value := l_value || '-000-0000';
761:
768: l_other := 'N';
769: end if;
770: close csr_tax_rules_exists;
771:
772: hr_utility.trace('State Taxability Rule is : '|| l_state);
773: else
774: l_other := 'Y';
775: end if; /* p_tax_type != 'DCIA' */
776:
798:
799: l_partial_deduction pay_element_types_f.element_information2%TYPE;
800:
801: Begin
802: hr_utility.trace('In partial_deduction_allowed function');
803: hr_utility.trace('Element Type Id is : '|| to_char(p_element_type_id));
804:
805: open c_get_partial_info;
806: fetch c_get_partial_info into l_partial_deduction;
799: l_partial_deduction pay_element_types_f.element_information2%TYPE;
800:
801: Begin
802: hr_utility.trace('In partial_deduction_allowed function');
803: hr_utility.trace('Element Type Id is : '|| to_char(p_element_type_id));
804:
805: open c_get_partial_info;
806: fetch c_get_partial_info into l_partial_deduction;
807: close c_get_partial_info;
805: open c_get_partial_info;
806: fetch c_get_partial_info into l_partial_deduction;
807: close c_get_partial_info;
808:
809: hr_utility.trace('l_partial_deduction is : '|| l_partial_deduction);
810: if l_partial_deduction is null then
811: return 'N';
812: else
813: return l_partial_deduction;
822: p_found boolean;
823: p_cnt number;
824:
825: BEGIN /* set_processing_element */
826: hr_utility.trace('In set_processing_element');
827:
828: if iter_ele_type.COUNT = 0 then
829: p_cnt := iter_ele_type.COUNT + 1;
830: iter_ele_type(p_cnt).ele_type := p_ele_type;
843: end loop;
844:
845: if not p_found then
846:
847: hr_utility.trace('Inserting ');
848: p_cnt := iter_ele_type.COUNT + 1;
849: iter_ele_type(p_cnt).ele_type := p_ele_type;
850: iter_ele_type(p_cnt).asg_id := p_asg_id;
851: end if;
861: p_out_val varchar2(50);
862:
863: BEGIN /* get_processing_element */
864:
865: hr_utility.trace('In get_processing_element');
866:
867: if iter_ele_type.COUNT = 0 then
868: p_out_val := 'Not Found';
869: return p_out_val;
881: end loop;
882:
883: if not p_found then
884:
885: hr_utility.trace('Not Found');
886: p_out_val := 'Not Found';
887: end if;
888:
889: return p_out_val;
900: cnt number;
901:
902: BEGIN /* set_inserted_flag */
903:
904: hr_utility.trace('In set_inserted_flag');
905:
906: get_table_position(p_entry_id,l_found_flag, l_pos_no,'INS_FLAG');
907:
908: hr_utility.trace('l_pos_no is '|| to_char(l_pos_no));
904: hr_utility.trace('In set_inserted_flag');
905:
906: get_table_position(p_entry_id,l_found_flag, l_pos_no,'INS_FLAG');
907:
908: hr_utility.trace('l_pos_no is '|| to_char(l_pos_no));
909:
910: if l_found_flag = FALSE then
911: cnt := iter_ins.COUNT + 1;
912: iter_ins(cnt).entry_id := p_entry_id;
928: p_ins_flag varchar2(5);
929:
930: BEGIN /* get_inserted_flag */
931:
932: hr_utility.trace('In get_inserted_flag');
933:
934: get_table_position(p_entry_id,l_found_flag, l_pos_no,'INS_FLAG');
935:
936: hr_utility.trace('l_pos_no is '|| to_char(l_pos_no));
932: hr_utility.trace('In get_inserted_flag');
933:
934: get_table_position(p_entry_id,l_found_flag, l_pos_no,'INS_FLAG');
935:
936: hr_utility.trace('l_pos_no is '|| to_char(l_pos_no));
937:
938: if l_found_flag = FALSE then
939: p_ins_flag := 'N';
940: else
956: p_calc_amt number;
957:
958: BEGIN /* get_iter_amt */
959:
960: hr_utility.trace('In get_iter_amt');
961:
962: get_table_position(p_entry_id,l_found_flag, l_pos_no,'ITER_AMT');
963:
964: hr_utility.trace('Value of l_pos_no is : '||to_char(l_pos_no));
960: hr_utility.trace('In get_iter_amt');
961:
962: get_table_position(p_entry_id,l_found_flag, l_pos_no,'ITER_AMT');
963:
964: hr_utility.trace('Value of l_pos_no is : '||to_char(l_pos_no));
965:
966: if l_found_flag = FALSE then
967:
968: p_calc_amt := 0;
986: l_found_flag boolean;
987:
988: BEGIN /* set_iter_amt */
989:
990: hr_utility.trace('In set_iter_amt');
991: get_table_position(p_entry_id,l_found_flag, l_pos_no,'ITER_AMT');
992:
993: hr_utility.trace('Value of l_pos_no is : '||to_char(l_pos_no));
994:
989:
990: hr_utility.trace('In set_iter_amt');
991: get_table_position(p_entry_id,l_found_flag, l_pos_no,'ITER_AMT');
992:
993: hr_utility.trace('Value of l_pos_no is : '||to_char(l_pos_no));
994:
995: if l_found_flag = FALSE then
996:
997: l_pos_no := iter_amt.COUNT + 1;
1012:
1013: l_count NUMBER;
1014:
1015: BEGIN /* clear_iter_ins */
1016: hr_utility.trace('In clear_iter_ins ');
1017:
1018: l_count := iter_ins.count;
1019: if l_count > 0 then
1020: iter_ins.DELETE;