96:
97:
98: if nip_sum = 10 then
99: if nip_number(10) <> 0 then
100: hr_utility.set_message(800,'HR_NIP_INVALID_NUMBER_PL');
101: hr_utility.raise_error;
102:
103: end if;
104: elsif nip_sum <> nip_number(10) then
97:
98: if nip_sum = 10 then
99: if nip_number(10) <> 0 then
100: hr_utility.set_message(800,'HR_NIP_INVALID_NUMBER_PL');
101: hr_utility.raise_error;
102:
103: end if;
104: elsif nip_sum <> nip_number(10) then
105: hr_utility.set_message(800,'HR_NIP_INVALID_NUMBER_PL');
101: hr_utility.raise_error;
102:
103: end if;
104: elsif nip_sum <> nip_number(10) then
105: hr_utility.set_message(800,'HR_NIP_INVALID_NUMBER_PL');
106: hr_utility.raise_error;
107: end if;
108: OPEN cur_nip;
109: FETCH cur_nip into p_org_info;
102:
103: end if;
104: elsif nip_sum <> nip_number(10) then
105: hr_utility.set_message(800,'HR_NIP_INVALID_NUMBER_PL');
106: hr_utility.raise_error;
107: end if;
108: OPEN cur_nip;
109: FETCH cur_nip into p_org_info;
110:
108: OPEN cur_nip;
109: FETCH cur_nip into p_org_info;
110:
111: If cur_nip%found then
112: hr_utility.set_message(800,'HR_NIP_UNIQUE_NUMBER_PL');
113: hr_utility.raise_error;
114: end if;
115: CLOSE cur_nip;
116:
109: FETCH cur_nip into p_org_info;
110:
111: If cur_nip%found then
112: hr_utility.set_message(800,'HR_NIP_UNIQUE_NUMBER_PL');
113: hr_utility.raise_error;
114: end if;
115: CLOSE cur_nip;
116:
117:
155: BEGIN
156:
157:
158: if (fnd_date.canonical_to_date(P_FLEX_START_DATE) > fnd_date.canonical_to_date(P_FLEX_END_DATE)) then
159: hr_utility.set_message(800,'HR_ORG_START_DATE_PL');
160: -- This message will be 'Please enter a Start date >= End date
161: hr_utility.raise_error;
162: end if;
163:
157:
158: if (fnd_date.canonical_to_date(P_FLEX_START_DATE) > fnd_date.canonical_to_date(P_FLEX_END_DATE)) then
159: hr_utility.set_message(800,'HR_ORG_START_DATE_PL');
160: -- This message will be 'Please enter a Start date >= End date
161: hr_utility.raise_error;
162: end if;
163:
164: -- Code to check with Org Start Date
165: open csr_org_dates;
168:
169: open csr_overlap_rec;
170: fetch csr_overlap_rec into overlap_found;
171: if csr_overlap_rec%found then
172: hr_utility.set_message(800,'HR_ORG_OVERLAP_REC_PL');
173: hr_utility.set_message_token('ORGFLEX',hr_general.decode_lookup('PL_FORM_LABELS',ORG_INFO_TYPE_CODE||'_FLEX'));
174: hr_utility.set_message_token('STARTDATE',to_char(fnd_date.canonical_to_date(P_FLEX_START_DATE),'DD/MM/RRRR'));
175: hr_utility.set_message_token('ENDDATE',nvl(to_char(fnd_date.canonical_to_date(P_FLEX_END_DATE),'DD/MM/RRRR'),'31/12/4712'));
176: hr_utility.raise_error;
169: open csr_overlap_rec;
170: fetch csr_overlap_rec into overlap_found;
171: if csr_overlap_rec%found then
172: hr_utility.set_message(800,'HR_ORG_OVERLAP_REC_PL');
173: hr_utility.set_message_token('ORGFLEX',hr_general.decode_lookup('PL_FORM_LABELS',ORG_INFO_TYPE_CODE||'_FLEX'));
174: hr_utility.set_message_token('STARTDATE',to_char(fnd_date.canonical_to_date(P_FLEX_START_DATE),'DD/MM/RRRR'));
175: hr_utility.set_message_token('ENDDATE',nvl(to_char(fnd_date.canonical_to_date(P_FLEX_END_DATE),'DD/MM/RRRR'),'31/12/4712'));
176: hr_utility.raise_error;
177: end if;
170: fetch csr_overlap_rec into overlap_found;
171: if csr_overlap_rec%found then
172: hr_utility.set_message(800,'HR_ORG_OVERLAP_REC_PL');
173: hr_utility.set_message_token('ORGFLEX',hr_general.decode_lookup('PL_FORM_LABELS',ORG_INFO_TYPE_CODE||'_FLEX'));
174: hr_utility.set_message_token('STARTDATE',to_char(fnd_date.canonical_to_date(P_FLEX_START_DATE),'DD/MM/RRRR'));
175: hr_utility.set_message_token('ENDDATE',nvl(to_char(fnd_date.canonical_to_date(P_FLEX_END_DATE),'DD/MM/RRRR'),'31/12/4712'));
176: hr_utility.raise_error;
177: end if;
178: close csr_overlap_rec;
171: if csr_overlap_rec%found then
172: hr_utility.set_message(800,'HR_ORG_OVERLAP_REC_PL');
173: hr_utility.set_message_token('ORGFLEX',hr_general.decode_lookup('PL_FORM_LABELS',ORG_INFO_TYPE_CODE||'_FLEX'));
174: hr_utility.set_message_token('STARTDATE',to_char(fnd_date.canonical_to_date(P_FLEX_START_DATE),'DD/MM/RRRR'));
175: hr_utility.set_message_token('ENDDATE',nvl(to_char(fnd_date.canonical_to_date(P_FLEX_END_DATE),'DD/MM/RRRR'),'31/12/4712'));
176: hr_utility.raise_error;
177: end if;
178: close csr_overlap_rec;
179:
172: hr_utility.set_message(800,'HR_ORG_OVERLAP_REC_PL');
173: hr_utility.set_message_token('ORGFLEX',hr_general.decode_lookup('PL_FORM_LABELS',ORG_INFO_TYPE_CODE||'_FLEX'));
174: hr_utility.set_message_token('STARTDATE',to_char(fnd_date.canonical_to_date(P_FLEX_START_DATE),'DD/MM/RRRR'));
175: hr_utility.set_message_token('ENDDATE',nvl(to_char(fnd_date.canonical_to_date(P_FLEX_END_DATE),'DD/MM/RRRR'),'31/12/4712'));
176: hr_utility.raise_error;
177: end if;
178: close csr_overlap_rec;
179:
180: if ((nvl(fnd_date.canonical_to_date(P_FLEX_END_DATE),to_date('31/12/4712','DD/MM/YYYY')) > org_end_date)
178: close csr_overlap_rec;
179:
180: if ((nvl(fnd_date.canonical_to_date(P_FLEX_END_DATE),to_date('31/12/4712','DD/MM/YYYY')) > org_end_date)
181: or (fnd_date.canonical_to_date(P_FLEX_START_DATE) < org_start_date))then
182: hr_utility.set_message(800,'HR_ORG_DATE_RANGE_PL');
183: hr_utility.set_message_token('ORGINFO',hr_general.decode_lookup('PL_FORM_LABELS',ORG_INFO_TYPE_CODE));
184: -- This message will be 'Please enter date range so that it falls within org date range
185: hr_utility.raise_error;
186: end if;
179:
180: if ((nvl(fnd_date.canonical_to_date(P_FLEX_END_DATE),to_date('31/12/4712','DD/MM/YYYY')) > org_end_date)
181: or (fnd_date.canonical_to_date(P_FLEX_START_DATE) < org_start_date))then
182: hr_utility.set_message(800,'HR_ORG_DATE_RANGE_PL');
183: hr_utility.set_message_token('ORGINFO',hr_general.decode_lookup('PL_FORM_LABELS',ORG_INFO_TYPE_CODE));
184: -- This message will be 'Please enter date range so that it falls within org date range
185: hr_utility.raise_error;
186: end if;
187:
181: or (fnd_date.canonical_to_date(P_FLEX_START_DATE) < org_start_date))then
182: hr_utility.set_message(800,'HR_ORG_DATE_RANGE_PL');
183: hr_utility.set_message_token('ORGINFO',hr_general.decode_lookup('PL_FORM_LABELS',ORG_INFO_TYPE_CODE));
184: -- This message will be 'Please enter date range so that it falls within org date range
185: hr_utility.raise_error;
186: end if;
187:
188: END CREATE_ORG_DETAILS;
189: -- CREATE_ORG_DETAILS
226:
227: BEGIN
228:
229: if (fnd_date.canonical_to_date(P_FLEX_START_DATE) > fnd_date.canonical_to_date(P_FLEX_END_DATE)) then
230: hr_utility.set_message(800,'HR_ORG_START_DATE_PL');
231: -- This message will be 'Please enter a Start date >= End date
232: hr_utility.raise_error;
233: end if;
234:
228:
229: if (fnd_date.canonical_to_date(P_FLEX_START_DATE) > fnd_date.canonical_to_date(P_FLEX_END_DATE)) then
230: hr_utility.set_message(800,'HR_ORG_START_DATE_PL');
231: -- This message will be 'Please enter a Start date >= End date
232: hr_utility.raise_error;
233: end if;
234:
235: -- Code to check with Org Start Date
236: open csr_org_dates;
239:
240: open csr_overlap_upd_rec;
241: fetch csr_overlap_upd_rec into overlap_upd_found;
242: if csr_overlap_upd_rec%found then
243: hr_utility.set_message(800,'HR_ORG_OVERLAP_REC_PL');
244: hr_utility.set_message_token('ORGFLEX',hr_general.decode_lookup('PL_FORM_LABELS',P_ORG_INFO_TYPE_CODE||'_FLEX'));
245: hr_utility.set_message_token('STARTDATE',to_char(fnd_date.canonical_to_date(P_FLEX_START_DATE),'DD/MM/RRRR'));
246: hr_utility.set_message_token('ENDDATE',nvl(to_char(fnd_date.canonical_to_date(P_FLEX_END_DATE),'DD/MM/RRRR'),'31/12/4712'));
247: hr_utility.raise_error;
240: open csr_overlap_upd_rec;
241: fetch csr_overlap_upd_rec into overlap_upd_found;
242: if csr_overlap_upd_rec%found then
243: hr_utility.set_message(800,'HR_ORG_OVERLAP_REC_PL');
244: hr_utility.set_message_token('ORGFLEX',hr_general.decode_lookup('PL_FORM_LABELS',P_ORG_INFO_TYPE_CODE||'_FLEX'));
245: hr_utility.set_message_token('STARTDATE',to_char(fnd_date.canonical_to_date(P_FLEX_START_DATE),'DD/MM/RRRR'));
246: hr_utility.set_message_token('ENDDATE',nvl(to_char(fnd_date.canonical_to_date(P_FLEX_END_DATE),'DD/MM/RRRR'),'31/12/4712'));
247: hr_utility.raise_error;
248: end if;
241: fetch csr_overlap_upd_rec into overlap_upd_found;
242: if csr_overlap_upd_rec%found then
243: hr_utility.set_message(800,'HR_ORG_OVERLAP_REC_PL');
244: hr_utility.set_message_token('ORGFLEX',hr_general.decode_lookup('PL_FORM_LABELS',P_ORG_INFO_TYPE_CODE||'_FLEX'));
245: hr_utility.set_message_token('STARTDATE',to_char(fnd_date.canonical_to_date(P_FLEX_START_DATE),'DD/MM/RRRR'));
246: hr_utility.set_message_token('ENDDATE',nvl(to_char(fnd_date.canonical_to_date(P_FLEX_END_DATE),'DD/MM/RRRR'),'31/12/4712'));
247: hr_utility.raise_error;
248: end if;
249: close csr_overlap_upd_rec;
242: if csr_overlap_upd_rec%found then
243: hr_utility.set_message(800,'HR_ORG_OVERLAP_REC_PL');
244: hr_utility.set_message_token('ORGFLEX',hr_general.decode_lookup('PL_FORM_LABELS',P_ORG_INFO_TYPE_CODE||'_FLEX'));
245: hr_utility.set_message_token('STARTDATE',to_char(fnd_date.canonical_to_date(P_FLEX_START_DATE),'DD/MM/RRRR'));
246: hr_utility.set_message_token('ENDDATE',nvl(to_char(fnd_date.canonical_to_date(P_FLEX_END_DATE),'DD/MM/RRRR'),'31/12/4712'));
247: hr_utility.raise_error;
248: end if;
249: close csr_overlap_upd_rec;
250:
243: hr_utility.set_message(800,'HR_ORG_OVERLAP_REC_PL');
244: hr_utility.set_message_token('ORGFLEX',hr_general.decode_lookup('PL_FORM_LABELS',P_ORG_INFO_TYPE_CODE||'_FLEX'));
245: hr_utility.set_message_token('STARTDATE',to_char(fnd_date.canonical_to_date(P_FLEX_START_DATE),'DD/MM/RRRR'));
246: hr_utility.set_message_token('ENDDATE',nvl(to_char(fnd_date.canonical_to_date(P_FLEX_END_DATE),'DD/MM/RRRR'),'31/12/4712'));
247: hr_utility.raise_error;
248: end if;
249: close csr_overlap_upd_rec;
250:
251: if ((nvl(fnd_date.canonical_to_date(P_FLEX_END_DATE),to_date('31/12/4712','DD/MM/YYYY')) > org_end_date)
249: close csr_overlap_upd_rec;
250:
251: if ((nvl(fnd_date.canonical_to_date(P_FLEX_END_DATE),to_date('31/12/4712','DD/MM/YYYY')) > org_end_date)
252: or (fnd_date.canonical_to_date(P_FLEX_START_DATE) < org_start_date))then
253: hr_utility.set_message(800,'HR_ORG_DATE_RANGE_PL');
254: hr_utility.set_message_token('ORGINFO',hr_general.decode_lookup('PL_FORM_LABELS',P_ORG_INFO_TYPE_CODE));
255: -- This message will be 'Please enter date range so that it falls within org date range
256: hr_utility.raise_error;
257: end if;
250:
251: if ((nvl(fnd_date.canonical_to_date(P_FLEX_END_DATE),to_date('31/12/4712','DD/MM/YYYY')) > org_end_date)
252: or (fnd_date.canonical_to_date(P_FLEX_START_DATE) < org_start_date))then
253: hr_utility.set_message(800,'HR_ORG_DATE_RANGE_PL');
254: hr_utility.set_message_token('ORGINFO',hr_general.decode_lookup('PL_FORM_LABELS',P_ORG_INFO_TYPE_CODE));
255: -- This message will be 'Please enter date range so that it falls within org date range
256: hr_utility.raise_error;
257: end if;
258:
252: or (fnd_date.canonical_to_date(P_FLEX_START_DATE) < org_start_date))then
253: hr_utility.set_message(800,'HR_ORG_DATE_RANGE_PL');
254: hr_utility.set_message_token('ORGINFO',hr_general.decode_lookup('PL_FORM_LABELS',P_ORG_INFO_TYPE_CODE));
255: -- This message will be 'Please enter date range so that it falls within org date range
256: hr_utility.raise_error;
257: end if;
258:
259:
260: END UPDATE_ORG_DETAILS;
288:
289: BEGIN
290:
291: /* Added for GSI Bug 5472781 */
292: IF NOT hr_utility.chk_product_install('Oracle Human Resources', 'PL') THEN
293: hr_utility.trace('PL not installed.Leaving CREATE_PL_ORG_INFO');
294: return;
295: END IF;
296:
289: BEGIN
290:
291: /* Added for GSI Bug 5472781 */
292: IF NOT hr_utility.chk_product_install('Oracle Human Resources', 'PL') THEN
293: hr_utility.trace('PL not installed.Leaving CREATE_PL_ORG_INFO');
294: return;
295: END IF;
296:
297: IF p_org_info_type_code='PL_TO_ADD_INFO' THEN
405:
406: BEGIN
407:
408: /* Added for GSI Bug 5472781 */
409: IF NOT hr_utility.chk_product_install('Oracle Human Resources', 'PL') THEN
410: hr_utility.trace('PL not installed.Leaving UPDATE_PL_ORG_INFO');
411: return;
412: END IF;
413:
406: BEGIN
407:
408: /* Added for GSI Bug 5472781 */
409: IF NOT hr_utility.chk_product_install('Oracle Human Resources', 'PL') THEN
410: hr_utility.trace('PL not installed.Leaving UPDATE_PL_ORG_INFO');
411: return;
412: END IF;
413:
414: open csr_org_id;