10:
11: begin
12: --
13: /* Added for GSI Bug 5472781 */
14: IF NOT hr_utility.chk_product_install('Oracle Human Resources', 'FR') THEN
15: hr_utility.set_location('Leaving : hr_fr_asg_rules.mandatory_checks' , 10);
16: return;
17: END IF;
18: --
11: begin
12: --
13: /* Added for GSI Bug 5472781 */
14: IF NOT hr_utility.chk_product_install('Oracle Human Resources', 'FR') THEN
15: hr_utility.set_location('Leaving : hr_fr_asg_rules.mandatory_checks' , 10);
16: return;
17: END IF;
18: --
19: hr_utility.set_location('HR_FR_ASG_RULES',10);
15: hr_utility.set_location('Leaving : hr_fr_asg_rules.mandatory_checks' , 10);
16: return;
17: END IF;
18: --
19: hr_utility.set_location('HR_FR_ASG_RULES',10);
20: hr_utility.trace('p_assignment_id: '||to_char(p_assignment_id));
21: hr_utility.trace('p_payroll_id: '||to_char(p_payroll_id));
22: hr_utility.trace('p_establishment_id: '||to_char(p_establishment_id));
23: hr_utility.trace('p_contract_id: '||to_char(p_contract_id));
16: return;
17: END IF;
18: --
19: hr_utility.set_location('HR_FR_ASG_RULES',10);
20: hr_utility.trace('p_assignment_id: '||to_char(p_assignment_id));
21: hr_utility.trace('p_payroll_id: '||to_char(p_payroll_id));
22: hr_utility.trace('p_establishment_id: '||to_char(p_establishment_id));
23: hr_utility.trace('p_contract_id: '||to_char(p_contract_id));
24: hr_utility.trace('p_assignment_type: '||p_assignment_type);
17: END IF;
18: --
19: hr_utility.set_location('HR_FR_ASG_RULES',10);
20: hr_utility.trace('p_assignment_id: '||to_char(p_assignment_id));
21: hr_utility.trace('p_payroll_id: '||to_char(p_payroll_id));
22: hr_utility.trace('p_establishment_id: '||to_char(p_establishment_id));
23: hr_utility.trace('p_contract_id: '||to_char(p_contract_id));
24: hr_utility.trace('p_assignment_type: '||p_assignment_type);
25:
18: --
19: hr_utility.set_location('HR_FR_ASG_RULES',10);
20: hr_utility.trace('p_assignment_id: '||to_char(p_assignment_id));
21: hr_utility.trace('p_payroll_id: '||to_char(p_payroll_id));
22: hr_utility.trace('p_establishment_id: '||to_char(p_establishment_id));
23: hr_utility.trace('p_contract_id: '||to_char(p_contract_id));
24: hr_utility.trace('p_assignment_type: '||p_assignment_type);
25:
26: IF nvl(fnd_profile.value('PAY_FR_CHECK_MANDATORY_ASG_ATTRIBUTES'),'Y') <> 'N' then -- [
19: hr_utility.set_location('HR_FR_ASG_RULES',10);
20: hr_utility.trace('p_assignment_id: '||to_char(p_assignment_id));
21: hr_utility.trace('p_payroll_id: '||to_char(p_payroll_id));
22: hr_utility.trace('p_establishment_id: '||to_char(p_establishment_id));
23: hr_utility.trace('p_contract_id: '||to_char(p_contract_id));
24: hr_utility.trace('p_assignment_type: '||p_assignment_type);
25:
26: IF nvl(fnd_profile.value('PAY_FR_CHECK_MANDATORY_ASG_ATTRIBUTES'),'Y') <> 'N' then -- [
27:
20: hr_utility.trace('p_assignment_id: '||to_char(p_assignment_id));
21: hr_utility.trace('p_payroll_id: '||to_char(p_payroll_id));
22: hr_utility.trace('p_establishment_id: '||to_char(p_establishment_id));
23: hr_utility.trace('p_contract_id: '||to_char(p_contract_id));
24: hr_utility.trace('p_assignment_type: '||p_assignment_type);
25:
26: IF nvl(fnd_profile.value('PAY_FR_CHECK_MANDATORY_ASG_ATTRIBUTES'),'Y') <> 'N' then -- [
27:
28: IF p_assignment_type = 'E' and (Not pqh_utility.is_pqh_installed(hr_general.get_business_group_id)) THEN -- [
29: /* ============================================================================= */
30: /*=================== Commented by DN to test Emp Stat Situation ==============
31:
32: IF p_establishment_id is null then -- [
33: hr_utility.trace('HR_FR_ASG_RULES: error PER_74964_MANDATORY_ESTAB. ASSIGNMENT_ID:'||
34: to_char(p_assignment_id));
35: hr_utility.set_message (800,'PER_74964_MANDATORY_ESTAB') ;
36: hr_utility.raise_error;
37: END IF; -- ]
31:
32: IF p_establishment_id is null then -- [
33: hr_utility.trace('HR_FR_ASG_RULES: error PER_74964_MANDATORY_ESTAB. ASSIGNMENT_ID:'||
34: to_char(p_assignment_id));
35: hr_utility.set_message (800,'PER_74964_MANDATORY_ESTAB') ;
36: hr_utility.raise_error;
37: END IF; -- ]
38: =========================== End of comment by DN ===================*/
39: NULL; --added by DN
32: IF p_establishment_id is null then -- [
33: hr_utility.trace('HR_FR_ASG_RULES: error PER_74964_MANDATORY_ESTAB. ASSIGNMENT_ID:'||
34: to_char(p_assignment_id));
35: hr_utility.set_message (800,'PER_74964_MANDATORY_ESTAB') ;
36: hr_utility.raise_error;
37: END IF; -- ]
38: =========================== End of comment by DN ===================*/
39: NULL; --added by DN
40: -- contract is no longer mandatory - library code will show a warning if profile is set and
40: -- contract is no longer mandatory - library code will show a warning if profile is set and
41: -- assignment is on a payroll. Same logic should apply to api but commenting out while
42: -- investigating whether this can be done withing user hook
43: -- IF p_contract_id is null and p_payroll_id is not null then -- [
44: -- hr_utility.trace('HR_FR_ASG_RULES: error PER_74965_MANDATORY_CONTRACT. ASSIGNMENT_ID:'||
45: -- to_char(p_assignment_id));
46: -- hr_utility.set_message (800,'PER_74965_MANDATORY_CONTRACT');
47: -- END IF; -- ]
48: END IF; -- ] end assignment_type E
42: -- investigating whether this can be done withing user hook
43: -- IF p_contract_id is null and p_payroll_id is not null then -- [
44: -- hr_utility.trace('HR_FR_ASG_RULES: error PER_74965_MANDATORY_CONTRACT. ASSIGNMENT_ID:'||
45: -- to_char(p_assignment_id));
46: -- hr_utility.set_message (800,'PER_74965_MANDATORY_CONTRACT');
47: -- END IF; -- ]
48: END IF; -- ] end assignment_type E
49: END IF; -- ] end check profile not N
50:
47: -- END IF; -- ]
48: END IF; -- ] end assignment_type E
49: END IF; -- ] end check profile not N
50:
51: hr_utility.set_location('HR_FR_ASG_RULES',20);
52:
53: end mandatory_checks;
54:
55: procedure mandatory_checks_ins(
75:
76: begin
77: --
78: /* Added for GSI Bug 5472781 */
79: IF NOT hr_utility.chk_product_install('Oracle Human Resources', 'FR') THEN
80: hr_utility.set_location('Leaving : hr_fr_asg_rules.mandatory_checks_ins' , 30);
81: return;
82: END IF;
83: --
76: begin
77: --
78: /* Added for GSI Bug 5472781 */
79: IF NOT hr_utility.chk_product_install('Oracle Human Resources', 'FR') THEN
80: hr_utility.set_location('Leaving : hr_fr_asg_rules.mandatory_checks_ins' , 30);
81: return;
82: END IF;
83: --
84: -- the employee api first inserts a default assignment with minimal attribution
83: --
84: -- the employee api first inserts a default assignment with minimal attribution
85: -- detect this situation and bypass validation for the default assignment
86:
87: hr_utility.set_location('HR_FR_ASG_RULES.mandatory_checks_ins enter',30);
88: hr_utility.trace('p_assignment_id: '||to_char(p_assignment_id));
89: hr_utility.trace('p_payroll_id: '||to_char(p_payroll_id));
90: hr_utility.trace('p_establishment_id: '||to_char(p_establishment_id));
91: hr_utility.trace('p_contract_id: '||to_char(p_contract_id));
84: -- the employee api first inserts a default assignment with minimal attribution
85: -- detect this situation and bypass validation for the default assignment
86:
87: hr_utility.set_location('HR_FR_ASG_RULES.mandatory_checks_ins enter',30);
88: hr_utility.trace('p_assignment_id: '||to_char(p_assignment_id));
89: hr_utility.trace('p_payroll_id: '||to_char(p_payroll_id));
90: hr_utility.trace('p_establishment_id: '||to_char(p_establishment_id));
91: hr_utility.trace('p_contract_id: '||to_char(p_contract_id));
92: hr_utility.trace('p_period_of_service_id:'||to_char(p_period_of_service_id));
85: -- detect this situation and bypass validation for the default assignment
86:
87: hr_utility.set_location('HR_FR_ASG_RULES.mandatory_checks_ins enter',30);
88: hr_utility.trace('p_assignment_id: '||to_char(p_assignment_id));
89: hr_utility.trace('p_payroll_id: '||to_char(p_payroll_id));
90: hr_utility.trace('p_establishment_id: '||to_char(p_establishment_id));
91: hr_utility.trace('p_contract_id: '||to_char(p_contract_id));
92: hr_utility.trace('p_period_of_service_id:'||to_char(p_period_of_service_id));
93: hr_utility.trace('p_assignment_type: '||p_assignment_type);
86:
87: hr_utility.set_location('HR_FR_ASG_RULES.mandatory_checks_ins enter',30);
88: hr_utility.trace('p_assignment_id: '||to_char(p_assignment_id));
89: hr_utility.trace('p_payroll_id: '||to_char(p_payroll_id));
90: hr_utility.trace('p_establishment_id: '||to_char(p_establishment_id));
91: hr_utility.trace('p_contract_id: '||to_char(p_contract_id));
92: hr_utility.trace('p_period_of_service_id:'||to_char(p_period_of_service_id));
93: hr_utility.trace('p_assignment_type: '||p_assignment_type);
94:
87: hr_utility.set_location('HR_FR_ASG_RULES.mandatory_checks_ins enter',30);
88: hr_utility.trace('p_assignment_id: '||to_char(p_assignment_id));
89: hr_utility.trace('p_payroll_id: '||to_char(p_payroll_id));
90: hr_utility.trace('p_establishment_id: '||to_char(p_establishment_id));
91: hr_utility.trace('p_contract_id: '||to_char(p_contract_id));
92: hr_utility.trace('p_period_of_service_id:'||to_char(p_period_of_service_id));
93: hr_utility.trace('p_assignment_type: '||p_assignment_type);
94:
95: IF nvl(fnd_profile.value('PAY_FR_CHECK_MANDATORY_ASG_ATTRIBUTES'),'Y') <> 'N' then -- [
88: hr_utility.trace('p_assignment_id: '||to_char(p_assignment_id));
89: hr_utility.trace('p_payroll_id: '||to_char(p_payroll_id));
90: hr_utility.trace('p_establishment_id: '||to_char(p_establishment_id));
91: hr_utility.trace('p_contract_id: '||to_char(p_contract_id));
92: hr_utility.trace('p_period_of_service_id:'||to_char(p_period_of_service_id));
93: hr_utility.trace('p_assignment_type: '||p_assignment_type);
94:
95: IF nvl(fnd_profile.value('PAY_FR_CHECK_MANDATORY_ASG_ATTRIBUTES'),'Y') <> 'N' then -- [
96:
89: hr_utility.trace('p_payroll_id: '||to_char(p_payroll_id));
90: hr_utility.trace('p_establishment_id: '||to_char(p_establishment_id));
91: hr_utility.trace('p_contract_id: '||to_char(p_contract_id));
92: hr_utility.trace('p_period_of_service_id:'||to_char(p_period_of_service_id));
93: hr_utility.trace('p_assignment_type: '||p_assignment_type);
94:
95: IF nvl(fnd_profile.value('PAY_FR_CHECK_MANDATORY_ASG_ATTRIBUTES'),'Y') <> 'N' then -- [
96:
97: IF p_assignment_type = 'E' THEN -- [
98: IF p_establishment_id is null then -- [
99: open csr_existing_assignment;
100: fetch csr_existing_assignment
101: into l_assignment_exists;
102: hr_utility.set_location('HR_FR_ASG_RULES.mandatory_checks_ins ',40);
103: if l_assignment_exists > 0 then -- [ not default assignment
104: hr_utility.trace('HR_FR_ASG_RULES: error PER_74964_MANDATORY_ESTAB. ASSIGNMENT_ID:'||
105: to_char(p_assignment_id));
106: hr_utility.set_message (800,'PER_74964_MANDATORY_ESTAB') ;
100: fetch csr_existing_assignment
101: into l_assignment_exists;
102: hr_utility.set_location('HR_FR_ASG_RULES.mandatory_checks_ins ',40);
103: if l_assignment_exists > 0 then -- [ not default assignment
104: hr_utility.trace('HR_FR_ASG_RULES: error PER_74964_MANDATORY_ESTAB. ASSIGNMENT_ID:'||
105: to_char(p_assignment_id));
106: hr_utility.set_message (800,'PER_74964_MANDATORY_ESTAB') ;
107: hr_utility.raise_error;
108: END iF; -- ] end not default asg
102: hr_utility.set_location('HR_FR_ASG_RULES.mandatory_checks_ins ',40);
103: if l_assignment_exists > 0 then -- [ not default assignment
104: hr_utility.trace('HR_FR_ASG_RULES: error PER_74964_MANDATORY_ESTAB. ASSIGNMENT_ID:'||
105: to_char(p_assignment_id));
106: hr_utility.set_message (800,'PER_74964_MANDATORY_ESTAB') ;
107: hr_utility.raise_error;
108: END iF; -- ] end not default asg
109: END IF; -- ] end establishment null
110:
103: if l_assignment_exists > 0 then -- [ not default assignment
104: hr_utility.trace('HR_FR_ASG_RULES: error PER_74964_MANDATORY_ESTAB. ASSIGNMENT_ID:'||
105: to_char(p_assignment_id));
106: hr_utility.set_message (800,'PER_74964_MANDATORY_ESTAB') ;
107: hr_utility.raise_error;
108: END iF; -- ] end not default asg
109: END IF; -- ] end establishment null
110:
111: -- contract is no longer mandatory - library code will show a warning if profile is set and
111: -- contract is no longer mandatory - library code will show a warning if profile is set and
112: -- assignment is on a payroll. Same logic should apply to api but commenting out while
113: -- investigating whether this can be done withing user hook
114: -- IF p_contract_id is null and p_payroll_id is not null then -- [
115: -- hr_utility.trace('HR_FR_ASG_RULES: error PER_74965_MANDATORY_CONTRACT. ASSIGNMENT_ID:'||
116: -- to_char(p_assignment_id));
117: -- hr_utility.set_message (800,'PER_74965_MANDATORY_CONTRACT');
118: -- END IF; -- ]
119: END IF; -- ] end assignment_type E
113: -- investigating whether this can be done withing user hook
114: -- IF p_contract_id is null and p_payroll_id is not null then -- [
115: -- hr_utility.trace('HR_FR_ASG_RULES: error PER_74965_MANDATORY_CONTRACT. ASSIGNMENT_ID:'||
116: -- to_char(p_assignment_id));
117: -- hr_utility.set_message (800,'PER_74965_MANDATORY_CONTRACT');
118: -- END IF; -- ]
119: END IF; -- ] end assignment_type E
120: END IF; -- ] end check profile not N
121:
118: -- END IF; -- ]
119: END IF; -- ] end assignment_type E
120: END IF; -- ] end check profile not N
121:
122: hr_utility.set_location('HR_FR_ASG_RULES.mandatory_checks_ins exit',50);
123:
124: end mandatory_checks_ins;
125:
126: --