46: --Find all non terminated normal contracts
47: --that are not terminated as on actual_termination_date+1
48: --if exists,check if they have sii/tax record.If they do,zap the sii/tax record
49:
50: l_debug:=hr_utility.debug_enabled;
51:
52: --If performing any HR related validation
53: --after post termination,call chk_product_install for
54: --Oracle Human Resources also.
53: --after post termination,call chk_product_install for
54: --Oracle Human Resources also.
55:
56:
57: IF NOT hr_utility.chk_product_install( p_product =>'Oracle Payroll'
58: ,p_legislation =>'PL'
59: ,p_language =>'US'
60: ) then
61: if l_debug then
58: ,p_legislation =>'PL'
59: ,p_language =>'US'
60: ) then
61: if l_debug then
62: hr_utility.trace('PL PAY not installed.Not performing validations');
63: end if;
64: return; -- Polish HR not installed
65: End if;
66:
65: End if;
66:
67: if l_debug then
68: l_proc:='PER_PL_TERMINATION.REVERSE';
69: hr_utility.set_location('Entering: '||l_proc,10);
70: end if;
71:
72: for i in csr_normal_assignments loop
73:
71:
72: for i in csr_normal_assignments loop
73:
74: if l_debug then
75: hr_utility.set_location(l_proc ,i.assignment_id);
76: end if;
77: open csr_term_paye_records(r_per_or_asg_id=>i.assignment_id);
78: fetch csr_term_paye_records into l_csr_term_paye_records;
79: if csr_term_paye_records%found then
79: if csr_term_paye_records%found then
80: close csr_term_paye_records;
81: --zap the unwanted record
82: if l_debug then
83: hr_utility.trace('Calling Paye Zap');
84: end if;
85: pay_pl_paye_api.delete_pl_paye_details
86: (p_validate =>false
87: ,p_effective_date =>l_csr_term_paye_records.effective_start_date
95: close csr_term_paye_records;
96: end if;
97:
98: if l_debug then
99: hr_utility.set_location(l_proc ,15);
100: end if;
101: --Paye records processed.SII record next
102:
103: open csr_term_sii_records(r_per_or_asg_id=>i.assignment_id);
105: if csr_term_sii_records%found then
106: close csr_term_sii_records;
107: --zap the unwanted record
108: if l_debug then
109: hr_utility.trace('Calling SII Zap');
110: end if;
111: pay_pl_sii_api.delete_pl_sii_details
112: (p_validate =>false
113: ,p_effective_date =>l_csr_term_sii_records.effective_start_date
121: close csr_term_sii_records;
122: end if;
123:
124: if l_debug then
125: hr_utility.set_location(l_proc ,20);
126: end if;
127:
128: end loop;
129:
127:
128: end loop;
129:
130: if l_debug then
131: hr_utility.set_location('Leaving: '||l_proc,30);
132: end if;
133:
134: End REVERSE;
135: PROCEDURE ACTUAL_TERMINATION_EMP(p_period_of_service_id per_periods_of_service.period_of_service_id%TYPE
153:
154: l_debug boolean;
155: l_proc varchar2(41);
156: Begin
157: l_debug:=hr_utility.debug_enabled;
158:
159: if l_debug then
160: l_proc:='PER_PL_TERMINATION.ACTUAL_TERMINATION_EMP';
161: hr_utility.set_location(l_proc,10);
157: l_debug:=hr_utility.debug_enabled;
158:
159: if l_debug then
160: l_proc:='PER_PL_TERMINATION.ACTUAL_TERMINATION_EMP';
161: hr_utility.set_location(l_proc,10);
162: end if;
163:
164:
165: IF NOT hr_utility.chk_product_install( p_product =>'Oracle Human Resources'
161: hr_utility.set_location(l_proc,10);
162: end if;
163:
164:
165: IF NOT hr_utility.chk_product_install( p_product =>'Oracle Human Resources'
166: ,p_legislation =>'PL'
167: ,p_language =>'US'
168: ) then
169: if l_debug then
166: ,p_legislation =>'PL'
167: ,p_language =>'US'
168: ) then
169: if l_debug then
170: hr_utility.set_location(l_proc,20);
171: hr_utility.trace('PL PER not installed.Not performing validations');
172: end if;
173:
174: return; -- Polish HR not installed
167: ,p_language =>'US'
168: ) then
169: if l_debug then
170: hr_utility.set_location(l_proc,20);
171: hr_utility.trace('PL PER not installed.Not performing validations');
172: end if;
173:
174: return; -- Polish HR not installed
175:
180: --calls to Payroll related pkg to be done after
181: --checking Polish Payroll Installation.
182:
183:
184: IF hr_utility.chk_product_install( p_product =>'Oracle Payroll' --should use PAY :)
185: ,p_legislation =>'PL'
186: ,p_language =>'US'
187: ) then
188: if l_debug then
185: ,p_legislation =>'PL'
186: ,p_language =>'US'
187: ) then
188: if l_debug then
189: hr_utility.set_location(l_proc,30);
190: end if;
191:
192: Pay_PL_POST_TERMINATION_PKG.Actual_term_sii_tax_records( p_debug => l_debug
193: ,p_period_of_service_id => p_period_of_service_id
196: );
197: End if;
198:
199: if l_debug then
200: hr_utility.set_location(l_proc,40);
201: end if;
202: END Actual_Termination_Emp;
203: End PER_PL_TERMINATION;
204: