274: Select 'Y'
275: From pay_grossup_bal_exclusions
276: Where not
277: ((start_date < p_start_date
278: and nvl(end_date, hr_general.END_OF_TIME) < p_start_date)
279: OR
280: (start_date > p_end_date
281: AND NVL(end_date, hr_general.END_OF_TIME) > NVL(p_end_date, hr_general.END_OF_TIME))
282: )
277: ((start_date < p_start_date
278: and nvl(end_date, hr_general.END_OF_TIME) < p_start_date)
279: OR
280: (start_date > p_end_date
281: AND NVL(end_date, hr_general.END_OF_TIME) > NVL(p_end_date, hr_general.END_OF_TIME))
282: )
283: And not (grossup_balances_id = p_grossup_balances_id)
284: And source_type = p_source_type
285: And source_id = p_source_id
289: hr_utility.set_location('Entering:'|| l_proc, 1);
290: --
291: -- check that the start date is not on or more than the end date
292: --
293: IF nvl(p_start_date, hr_general.START_OF_TIME)
294: > NVL(p_end_date, hr_general.END_OF_TIME) THEN
295: --
296: hr_utility.set_message
297: (800
290: --
291: -- check that the start date is not on or more than the end date
292: --
293: IF nvl(p_start_date, hr_general.START_OF_TIME)
294: > NVL(p_end_date, hr_general.END_OF_TIME) THEN
295: --
296: hr_utility.set_message
297: (800
298: ,'PAY_52900_GBE_DATE_ERROR'
305: p_grossup_balances_id => p_grossup_balances_id
306: ,p_object_version_number => p_object_version_number );
307: --
308: if (l_api_updating
309: and ( nvl(p_start_date,hr_general.start_of_time)
310: <> nvl(per_asp_shd.g_old_rec.start_date, hr_general.start_of_time)
311: or nvl(p_end_date,hr_general.end_of_time)
312: <> nvl(per_asp_shd.g_old_rec.end_date, hr_general.end_of_time))) then
313: hr_utility.set_location(l_proc, 4);
306: ,p_object_version_number => p_object_version_number );
307: --
308: if (l_api_updating
309: and ( nvl(p_start_date,hr_general.start_of_time)
310: <> nvl(per_asp_shd.g_old_rec.start_date, hr_general.start_of_time)
311: or nvl(p_end_date,hr_general.end_of_time)
312: <> nvl(per_asp_shd.g_old_rec.end_date, hr_general.end_of_time))) then
313: hr_utility.set_location(l_proc, 4);
314: open c1_upd;
307: --
308: if (l_api_updating
309: and ( nvl(p_start_date,hr_general.start_of_time)
310: <> nvl(per_asp_shd.g_old_rec.start_date, hr_general.start_of_time)
311: or nvl(p_end_date,hr_general.end_of_time)
312: <> nvl(per_asp_shd.g_old_rec.end_date, hr_general.end_of_time))) then
313: hr_utility.set_location(l_proc, 4);
314: open c1_upd;
315: fetch c1_upd into l_exists;
308: if (l_api_updating
309: and ( nvl(p_start_date,hr_general.start_of_time)
310: <> nvl(per_asp_shd.g_old_rec.start_date, hr_general.start_of_time)
311: or nvl(p_end_date,hr_general.end_of_time)
312: <> nvl(per_asp_shd.g_old_rec.end_date, hr_general.end_of_time))) then
313: hr_utility.set_location(l_proc, 4);
314: open c1_upd;
315: fetch c1_upd into l_exists;
316: If c1_upd%found then
373: Select 'Y'
374: From pay_grossup_bal_exclusions
375: Where not
376: ((start_date < p_start_date
377: and nvl(end_date, hr_general.END_OF_TIME) < p_start_date)
378: OR
379: (start_date > p_end_date
380: AND NVL(end_date, hr_general.END_OF_TIME) > NVL(p_end_date, hr_general.END_OF_TIME))
381: )
376: ((start_date < p_start_date
377: and nvl(end_date, hr_general.END_OF_TIME) < p_start_date)
378: OR
379: (start_date > p_end_date
380: AND NVL(end_date, hr_general.END_OF_TIME) > NVL(p_end_date, hr_general.END_OF_TIME))
381: )
382: And source_type = p_source_type
383: And source_id = p_source_id
384: And balance_type_id = p_balance_type_id ;
387: hr_utility.set_location('Entering:'|| l_proc, 1);
388: --
389: -- check that the start date is not on or more than the end date
390: --
391: IF nvl(p_start_date, hr_general.START_OF_TIME)
392: > NVL(p_end_date, hr_general.END_OF_TIME) THEN
393: --
394: hr_utility.set_message
395: (800
388: --
389: -- check that the start date is not on or more than the end date
390: --
391: IF nvl(p_start_date, hr_general.START_OF_TIME)
392: > NVL(p_end_date, hr_general.END_OF_TIME) THEN
393: --
394: hr_utility.set_message
395: (800
396: ,'PAY_52900_GBE_DATE_ERROR'