98: --
99:
100: if p_debug then
101: l_proc:='PAY_PL_POST_TERMINATION_PKG.Actual_Term_sii_tax_records';
102: hr_utility.set_location('Entering: '||l_proc, 10);
103: end if;
104:
105:
106: for i in csr_term_normal_assignments loop
108:
109: --Check for Paye details
110: --Check for Sii details
111: if p_debug then
112: hr_utility.trace('Term Normal Assignment Found '||i.assignment_id);
113: end if;
114: open csr_paye_details(r_per_or_asg_id => i.assignment_id,
115: r_contract_category => 'TERM_NORMAL' ,
116: r_effective_date => null );
156:
157: end if;
158:
159: else --csr_paye_details%found terminated record
160: hr_utility.set_location(l_proc,25);
161: close csr_paye_details;
162:
163: open csr_paye_details(r_per_or_asg_id => i.person_id ,
164: r_contract_category => 'NORMAL',
191: /*******************Paye record done******************/
192:
193:
194: if p_debug then
195: hr_utility.set_location(l_proc,30);
196: end if;
197: /***************Sii record********************/
198: open csr_sii_details(r_per_or_asg_id => i.assignment_id,
199: r_contract_category => 'TERM_NORMAL' ,
200: r_effective_date => null );
201:
202: fetch csr_sii_details into l_csr_sii_details;
203: if csr_sii_details%found then
204: hr_utility.set_location(l_proc,40);
205: close csr_sii_details;
206: if ((p_actual_termination_date+1)< l_csr_sii_details.effective_start_date) then
207: -- 18th
208: -- Assgn terminated.Sii record created
251:
252: end if;
253:
254: else --csr_sii_details%found 1 terminated record
255: hr_utility.set_location(l_proc,45);
256: close csr_sii_details;--terminated one is closed
257:
258: open csr_sii_details(r_per_or_asg_id => i.person_id ,
259: r_contract_category => 'NORMAL',
294: end if;--csr_sii_details found-- non-terminated record
295:
296: end if;--csr_sii_details%found terminated record
297: if p_debug then
298: hr_utility.set_location(l_proc,60);
299: end if;
300: end loop;
301:
302: if p_debug then
299: end if;
300: end loop;
301:
302: if p_debug then
303: hr_utility.set_location('Leaving: '||l_proc, 100);
304: end if;
305:
306: End Actual_term_sii_tax_records;--End of procedure
307: