1: Package Body pay_cnu_bus as
2: /* $Header: pycnurhi.pkb 120.0 2005/05/29 04:04:56 appldev noship $ */
3: --
4: -- ----------------------------------------------------------------------------
5: -- | Private Global Definitions |
4: -- ----------------------------------------------------------------------------
5: -- | Private Global Definitions |
6: -- ----------------------------------------------------------------------------
7: --
8: g_package varchar2(33) := ' pay_cnu_bus.'; -- Global package name
9: --
10: -- The following two global variables are only to be
11: -- used by the return_legislation_code function.
12: --
106: ,p_argument => 'contribution_usage_id'
107: ,p_argument_value => p_contribution_usage_id
108: );
109: --
110: if ( nvl(pay_cnu_bus.g_contribution_usage_id, hr_api.g_number)
111: = p_contribution_usage_id) then
112: --
113: -- The legislation code has already been found with a previous
114: -- call to this function. Just return the value in the global
113: -- The legislation code has already been found with a previous
114: -- call to this function. Just return the value in the global
115: -- variable.
116: --
117: l_legislation_code := pay_cnu_bus.g_legislation_code;
118: hr_utility.set_location(l_proc, 20);
119: else
120: --
121: -- The ID is different to the last call to this function
137: -- Set the global variables so the values are
138: -- available for the next call to this function.
139: --
140: close csr_leg_code;
141: pay_cnu_bus.g_contribution_usage_id := p_contribution_usage_id;
142: pay_cnu_bus.g_legislation_code := l_legislation_code;
143: end if;
144: hr_utility.set_location(' Leaving:'|| l_proc, 40);
145: return l_legislation_code;
138: -- available for the next call to this function.
139: --
140: close csr_leg_code;
141: pay_cnu_bus.g_contribution_usage_id := p_contribution_usage_id;
142: pay_cnu_bus.g_legislation_code := l_legislation_code;
143: end if;
144: hr_utility.set_location(' Leaving:'|| l_proc, 40);
145: return l_legislation_code;
146: end return_legislation_code;
313: hr_api.validate_bus_grp_id(p_rec.business_group_id); -- Validate Bus Grp
314: end if;
315: --
316: hr_utility.set_location(' Step:'|| l_proc, 10);
317: pay_cnu_bus1.chk_dates (
318: p_contribution_usage_id => p_rec.contribution_usage_id
319: ,p_object_version_number => p_rec.object_version_number
320: ,p_date_from => p_rec.date_from
321: ,p_date_to => p_rec.date_to
327: );
328: --
329:
330: hr_utility.set_location(' Step:'|| l_proc, 15);
331: pay_cnu_bus1.chk_lu_group_code (
332: p_effective_date => p_effective_date
333: ,p_group_code => p_rec.group_code
334: );
335: --
333: ,p_group_code => p_rec.group_code
334: );
335: --
336: hr_utility.set_location(' Step:'|| l_proc, 20);
337: pay_cnu_bus1.chk_group_code (
338: p_group_code => p_rec.group_code
339: ,p_process_type => p_rec.process_type
340: ,p_element_name => p_rec.element_name
341: ,p_contribution_usage_type => p_rec.contribution_usage_type
342: ,p_business_group_id => p_rec.business_group_id
343: );
344: --
345: hr_utility.set_location(' Step:'|| l_proc, 30);
346: pay_cnu_bus1.chk_contribution_type (
347: p_contribution_type => p_rec.contribution_type
348: );
349: --
350: hr_utility.set_location(' Step:'|| l_proc, 40);
347: p_contribution_type => p_rec.contribution_type
348: );
349: --
350: hr_utility.set_location(' Step:'|| l_proc, 40);
351: pay_cnu_bus1.chk_contribution_codes (
352: p_contribution_usage_id => p_rec.contribution_usage_id
353: ,p_object_version_number => p_rec.object_version_number
354: ,p_contribution_type => p_rec.contribution_type
355: ,p_contribution_code => p_rec.contribution_code
357: ,p_rate_category => p_rec.rate_category
358: );
359: --
360: hr_utility.set_location(' Step:'|| l_proc, 50);
361: pay_cnu_bus1.chk_rate_category_type (
362: p_rate_type => p_rec.rate_type
363: ,p_rate_category => p_rec.rate_category
364: );
365: --
363: ,p_rate_category => p_rec.rate_category
364: );
365: --
366: hr_utility.set_location(' Step:'|| l_proc, 60);
367: pay_cnu_bus1.chk_business_group_id (
368: p_business_group_id => p_rec.business_group_id
369: );
370: --
371: hr_utility.set_location(' Step:'|| l_proc, 80);
368: p_business_group_id => p_rec.business_group_id
369: );
370: --
371: hr_utility.set_location(' Step:'|| l_proc, 80);
372: pay_cnu_bus1.chk_process_type (
373: p_effective_date => p_effective_date
374: ,p_process_type => p_rec.process_type
375: );
376: --
374: ,p_process_type => p_rec.process_type
375: );
376: --
377: hr_utility.set_location(' Step:'|| l_proc, 90);
378: pay_cnu_bus1.chk_rate_type (
379: p_effective_date => p_effective_date
380: ,p_rate_type => p_rec.rate_type
381: );
382: --
380: ,p_rate_type => p_rec.rate_type
381: );
382: --
383: hr_utility.set_location(' Step:'|| l_proc, 90);
384: pay_cnu_bus1.chk_contribution_usage_type (
385: p_effective_date => p_effective_date
386: ,p_contribution_usage_type => p_rec.contribution_usage_type
387: );
388: --
386: ,p_contribution_usage_type => p_rec.contribution_usage_type
387: );
388: --
389: hr_utility.set_location(' Step:'|| l_proc, 100);
390: pay_cnu_bus1.chk_element_name (
391: p_element_name => p_rec.element_name
392: );
393: --
394: hr_utility.set_location(' Step:'|| l_proc, 110);
391: p_element_name => p_rec.element_name
392: );
393: --
394: hr_utility.set_location(' Step:'|| l_proc, 110);
395: pay_cnu_bus1.chk_code_rate_id (
396: p_code_rate_id => l_code_Rate_id
397: ,p_contribution_code => p_rec.contribution_code
398: ,p_business_group_id => p_rec.business_group_id
399: ,p_rate_type => p_rec.rate_type
426: (p_rec => p_rec
427: );
428: --
429: hr_utility.set_location(' Step:'|| l_proc, 10);
430: pay_cnu_bus1.chk_dates (
431: p_contribution_usage_id => p_rec.contribution_usage_id
432: ,p_object_version_number => p_rec.object_version_number
433: ,p_date_from => p_rec.date_from
434: ,p_date_to => p_rec.date_to
440: );
441: -- The contribution type is also updated. Though the contribution
442: -- type is checked in chk_non_updateable_args, it is also checked here.
443: hr_utility.set_location(' Step:'|| l_proc, 50);
444: pay_cnu_bus1.chk_contribution_type (
445: p_contribution_type => p_rec.contribution_type
446: );
447: --
448: hr_utility.set_location(' Step:'|| l_proc, 40);
445: p_contribution_type => p_rec.contribution_type
446: );
447: --
448: hr_utility.set_location(' Step:'|| l_proc, 40);
449: pay_cnu_bus1.chk_contribution_codes (
450: p_contribution_usage_id => p_rec.contribution_usage_id
451: ,p_object_version_number => p_rec.object_version_number
452: ,p_contribution_type => p_rec.contribution_type
453: ,p_contribution_code => p_rec.contribution_code
473: --
474: hr_utility.set_location(' Leaving:'||l_proc, 10);
475: End delete_validate;
476: --
477: end pay_cnu_bus;