20: l_effective_end_date date;
21: l_proc varchar2(72) := 'pay_ie_bik.get_global_value';
22:
23: BEGIN
24: hr_utility.set_location('Entering ' || l_proc, 20);
25: open c_global_value_cursor;
26: FETCH c_global_value_cursor into l_global_value;
27: close c_global_value_cursor;
28:
25: open c_global_value_cursor;
26: FETCH c_global_value_cursor into l_global_value;
27: close c_global_value_cursor;
28:
29: hr_utility.set_location('Leaving ' || l_proc, 100);
30: return to_number(l_global_value);
31: EXCEPTION
32: when NO_DATA_FOUND then
33: raise_application_error(-20001,l_proc||'- '||sqlerrm);
55: l_proc varchar2(72) := 'pay_ie_bik.get_max_start_date';
56:
57: BEGIN
58:
59: hr_utility.set_location('Entering ' || l_proc, 20);
60:
61: l_max_start_date:=p_max_start_date;
62:
63: open c_first_period_start_date(p_payroll_action_id);
69: if p_benefit_start_date between l_max_start_date and p_max_start_date then
70: l_max_start_date := p_benefit_start_date;
71: end if;
72: end if;
73: hr_utility.set_location('Leaving ' || l_proc, 100);
74: return l_max_start_date;
75: EXCEPTION
76: when NO_DATA_FOUND then
77: null;
164: l_end_date date;
165:
166:
167: begin
168: hr_utility.set_location('Entering ' || l_proc, 20);
169: -- hr_utility.trace_on(null,'BIK');
170: hr_utility.trace(' p_maximum_start_date' || to_char(p_maximum_start_date,'dd-mon-yyyy'));
171: hr_utility.trace(' p_minimum_end_date' || to_char(p_minimum_end_date,'dd-mon-yyyy'));
172: hr_utility.trace(' p_formula_context' || p_formula_context);
165:
166:
167: begin
168: hr_utility.set_location('Entering ' || l_proc, 20);
169: -- hr_utility.trace_on(null,'BIK');
170: hr_utility.trace(' p_maximum_start_date' || to_char(p_maximum_start_date,'dd-mon-yyyy'));
171: hr_utility.trace(' p_minimum_end_date' || to_char(p_minimum_end_date,'dd-mon-yyyy'));
172: hr_utility.trace(' p_formula_context' || p_formula_context);
173:
166:
167: begin
168: hr_utility.set_location('Entering ' || l_proc, 20);
169: -- hr_utility.trace_on(null,'BIK');
170: hr_utility.trace(' p_maximum_start_date' || to_char(p_maximum_start_date,'dd-mon-yyyy'));
171: hr_utility.trace(' p_minimum_end_date' || to_char(p_minimum_end_date,'dd-mon-yyyy'));
172: hr_utility.trace(' p_formula_context' || p_formula_context);
173:
174: open get_end_date(p_minimum_end_date);
167: begin
168: hr_utility.set_location('Entering ' || l_proc, 20);
169: -- hr_utility.trace_on(null,'BIK');
170: hr_utility.trace(' p_maximum_start_date' || to_char(p_maximum_start_date,'dd-mon-yyyy'));
171: hr_utility.trace(' p_minimum_end_date' || to_char(p_minimum_end_date,'dd-mon-yyyy'));
172: hr_utility.trace(' p_formula_context' || p_formula_context);
173:
174: open get_end_date(p_minimum_end_date);
175: fetch get_end_date into l_end_date;
168: hr_utility.set_location('Entering ' || l_proc, 20);
169: -- hr_utility.trace_on(null,'BIK');
170: hr_utility.trace(' p_maximum_start_date' || to_char(p_maximum_start_date,'dd-mon-yyyy'));
171: hr_utility.trace(' p_minimum_end_date' || to_char(p_minimum_end_date,'dd-mon-yyyy'));
172: hr_utility.trace(' p_formula_context' || p_formula_context);
173:
174: open get_end_date(p_minimum_end_date);
175: fetch get_end_date into l_end_date;
176: if to_char(l_end_date,'YYYY') =
179: else
180: l_end_date := p_minimum_end_date;
181: end if;
182: close get_end_date;
183: hr_utility.trace('l_end_date ' || to_char(l_end_date,'dd-mon-yyyy'));
184:
185: if p_formula_context='f1' then
186: open get_periods(p_maximum_start_date, l_end_date);
187: fetch get_periods into l_periods;
185: if p_formula_context='f1' then
186: open get_periods(p_maximum_start_date, l_end_date);
187: fetch get_periods into l_periods;
188: close get_periods;
189: hr_utility.trace('l_periods ' || l_periods.pay_periods);
190: hr_utility.set_location('Leaving ' || l_proc, 100);
191: --hr_utility.trace_off;
192: return l_periods.pay_periods;
193: end if;
186: open get_periods(p_maximum_start_date, l_end_date);
187: fetch get_periods into l_periods;
188: close get_periods;
189: hr_utility.trace('l_periods ' || l_periods.pay_periods);
190: hr_utility.set_location('Leaving ' || l_proc, 100);
191: --hr_utility.trace_off;
192: return l_periods.pay_periods;
193: end if;
194:
187: fetch get_periods into l_periods;
188: close get_periods;
189: hr_utility.trace('l_periods ' || l_periods.pay_periods);
190: hr_utility.set_location('Leaving ' || l_proc, 100);
191: --hr_utility.trace_off;
192: return l_periods.pay_periods;
193: end if;
194:
195: if p_formula_context='f2' then
195: if p_formula_context='f2' then
196: open get_cumulative_periods(p_maximum_start_date, l_end_date);
197: fetch get_cumulative_periods into l_cumulative_periods;
198: close get_cumulative_periods;
199: hr_utility.trace('l_cumulative_periods.pay_periods ' || l_cumulative_periods.pay_periods);
200: hr_utility.set_location('Leaving ' || l_proc, 200);
201: -- hr_utility.trace_off;
202: return l_cumulative_periods.pay_periods;
203: end if;
196: open get_cumulative_periods(p_maximum_start_date, l_end_date);
197: fetch get_cumulative_periods into l_cumulative_periods;
198: close get_cumulative_periods;
199: hr_utility.trace('l_cumulative_periods.pay_periods ' || l_cumulative_periods.pay_periods);
200: hr_utility.set_location('Leaving ' || l_proc, 200);
201: -- hr_utility.trace_off;
202: return l_cumulative_periods.pay_periods;
203: end if;
204:
197: fetch get_cumulative_periods into l_cumulative_periods;
198: close get_cumulative_periods;
199: hr_utility.trace('l_cumulative_periods.pay_periods ' || l_cumulative_periods.pay_periods);
200: hr_utility.set_location('Leaving ' || l_proc, 200);
201: -- hr_utility.trace_off;
202: return l_cumulative_periods.pay_periods;
203: end if;
204:
205: Exception
203: end if;
204:
205: Exception
206: when others then
207: hr_utility.trace('error ' ||sqlerrm);
208: --hr_utility.trace_off;
209: raise_application_error(-20002,l_proc||'- '||sqlerrm);
210: end get_max_no_of_periods;
211:
204:
205: Exception
206: when others then
207: hr_utility.trace('error ' ||sqlerrm);
208: --hr_utility.trace_off;
209: raise_application_error(-20002,l_proc||'- '||sqlerrm);
210: end get_max_no_of_periods;
211:
212:
234: l_get_values csr_get_values%rowtype;
235: l_proc varchar2(72) := 'pay_ie_bik.get_balance_values';
236:
237: begin
238: hr_utility.set_location('Entering ' || l_proc, 20);
239:
240: open csr_get_values;
241: fetch csr_get_values into l_get_values;
242: close csr_get_values;
240: open csr_get_values;
241: fetch csr_get_values into l_get_values;
242: close csr_get_values;
243:
244: hr_utility.set_location('Leaving ' || l_proc, 200);
245:
246: return l_get_values. Cumulative_Taxable_Value;
247:
248: Exception
246: return l_get_values. Cumulative_Taxable_Value;
247:
248: Exception
249: when others then
250: hr_utility.trace('error ' ||sqlerrm);
251: raise_application_error(-20004,l_proc||'- '||sqlerrm);
252: end get_balance_values;
253:
254:
264: cursor return l_address_rec;
265: l_address_refcur l_address_refcur_type;
266: l_proc varchar2(72) := 'pay_ie_bik.get_address';
267: begin
268: hr_utility.set_location('Entering ' || l_proc, 20);
269: if l_address_type='address_line1' then
270: open l_address_refcur for select address_line1
271: from per_addresses
272: where address_id=l_address_id;
297: end if;
298:
299: fetch l_address_refcur into l_address;
300: CLOSE l_address_refcur;
301: hr_utility.set_location('Leaving ' || l_proc, 200);
302:
303: return (l_address.info);
304:
305: Exception
303: return (l_address.info);
304:
305: Exception
306: when others then
307: hr_utility.trace('error ' ||sqlerrm);
308: raise_application_error(-20005,l_proc||'- '||sqlerrm);
309:
310: end get_address;
311:
321:
322: l_proc varchar2(72) := 'pay_ie_bik.get_landlord_address';
323: begin
324:
325: hr_utility.set_location('Entering ' || l_proc, 20);
326:
327: if l_address_type='address_line1' then
328:
329: open l_landlord_refcur for select hl.ADDRESS_LINE_1
377: end if;
378: fetch l_landlord_refcur into l_landlord;
379: CLOSE l_landlord_refcur;
380:
381: hr_utility.set_location('Leaving ' || l_proc, 200);
382:
383: return (l_landlord.info);
384:
385: Exception
383: return (l_landlord.info);
384:
385: Exception
386: when others then
387: hr_utility.trace('error ' ||sqlerrm);
388: raise_application_error(-20006,l_proc||'- '||sqlerrm);
389:
390: end get_landlord_address;
391: