1 package PA_PROJ_TSK_UTILS AUTHID CURRENT_USER as
2 -- $Header: PAXPTUTS.pls 120.2.12020000.2 2013/03/29 18:22:16 speddi ship $
3
4 --
5 -- FUNCTION
6 -- get_task_project_id
7 -- PURPOSE
8 -- This function retrieves the project id of a task.
9 -- If no project id is found, null is returned.
10 -- If Oracle error occurs, Oracle error number is returned.
11 -- HISTORY
12 -- 20-OCT-95 R. Chiu Created
13 --
14 function get_task_project_id (x_task_id IN number) return number;
15 pragma RESTRICT_REFERENCES (get_task_project_id, WNDS, WNPS);
16
17 -- FUNCTION
18 -- check_event_exists
19 -- PURPOSE
20 -- This function returns 1 if event exists for project id or
21 -- task id and returns 0 if no event is found.
22 --
23 -- User can pass either project id or task id. If both
24 -- project id and task id are provided, function treated
25 -- as if only task were passed. Events exist at project
26 -- and top tasks level.
27 -- If Oracle error occured, Oracle error code is returned.
28 --
29 -- HISTORY
30 -- 20-OCT-95 R. Chiu Created
31 --
32 function check_event_exists (x_project_id IN number
33 , x_task_id IN number ) return number;
34 pragma RESTRICT_REFERENCES (check_event_exists, WNDS, WNPS);
35
36
37 -- FUNCTION
38 -- check_exp_item_exists
39 -- PURPOSE
40 -- This function returns 1 if expenditure item exists for
41 -- a project or a task and returns 0 if no expenditure item
42 -- is found.
43 --
44 -- User can pass either project id or task id. If both
45 -- project id and task id are provided, function treated
46 -- as if only task were passed. Expenditure items exist
47 -- at project and lowest level tasks.
48 -- If Oracle error occured, Oracle error code is returned.
49 --
50 -- HISTORY
51 -- 20-OCT-95 R. Chiu Created
52 --
53 function check_exp_item_exists (x_project_id IN number
54 , x_task_id IN number
55 , x_check_subtasks IN boolean default TRUE)
56 return number;
57 pragma RESTRICT_REFERENCES (check_exp_item_exists, WNDS, WNPS);
58
59
60 -- FUNCTION
61 -- check_po_dist_exists
62 -- PURPOSE
63 -- This function returns 1 if purchase order distribution exists
64 -- for a project or a task and returns 0 if no purchase order
65 -- distribution is found.
66 --
67 -- User can pass either project id or task id. If both
68 -- project id and task id are provided, function treated
69 -- as if only task were passed. Purchase order exists
70 -- at project and lowest level tasks.
71 -- If Oracle error occured, Oracle error code is returned.
72 --
73 -- HISTORY
74 -- 20-OCT-95 R. Chiu Created
75 --
76 function check_po_dist_exists (x_project_id IN number
77 , x_task_id IN number
78 , x_check_subtasks IN boolean default TRUE) -- Added for Performance Fix 4903460
79 return number;
80 pragma RESTRICT_REFERENCES (check_po_dist_exists, WNDS, WNPS);
81
82
83 -- FUNCTION
84 -- check_po_req_dist_exists
85 -- PURPOSE
86 -- This function returns 1 if purchase requisition exists
87 -- for a project or a task and returns 0 if no purchase
88 -- requisition is found.
89 --
90 -- User can pass either project id or task id. If both
91 -- project id and task id are provided, function treated
92 -- as if only task were passed. Purchase requisition exists
93 -- at project and lowest level tasks.
94 -- If Oracle error occured, Oracle error code is returned.
95 --
96 -- HISTORY
97 -- 20-OCT-95 R. Chiu Created
98 --
99 function check_po_req_dist_exists (x_project_id IN number
100 , x_task_id IN number
101 , x_check_subtasks IN boolean default TRUE) -- Added for Performance Fix 4903460
102 return number;
103 pragma RESTRICT_REFERENCES (check_po_req_dist_exists, WNDS, WNPS);
104
105
106 -- FUNCTION
107 -- check_ap_invoice_exists
108 -- PURPOSE
109 -- This function returns 1 if supplier invoice exists
110 -- for a project or a task and returns 0 if no supplier
111 -- invoice is found.
112 --
113 -- User can pass either project id or task id. If both
114 -- project id and task id are provided, function treated
115 -- as if only task were passed. Supplier invoice exists
116 -- at project and lowest level tasks.
117 -- If Oracle error occured, Oracle error code is returned.
118 --
119 -- HISTORY
120 -- 20-OCT-95 R. Chiu Created
121 --
122 function check_ap_invoice_exists (x_project_id IN number
123 , x_task_id IN number
124 , x_check_subtasks IN boolean default TRUE ) -- Added for Performance Fix 4903460
125 return number;
126 pragma RESTRICT_REFERENCES (check_ap_invoice_exists, WNDS, WNPS);
127
128
129 -- FUNCTION
130 -- check_ap_inv_dist_exists
131 -- PURPOSE
132 -- This function returns 1 if supplier invoice distribution
133 -- exists for a project or a task and returns 0 if no supplier
134 -- invoice distribution is found.
135 --
136 -- User can pass either project id or task id. If both
137 -- project id and task id are provided, function treated
138 -- as if only task were passed. Supplier invoice distribution
139 -- exists at lowest level tasks.
140 -- If Oracle error occured, Oracle error code is returned.
141 --
142 -- HISTORY
143 -- 20-OCT-95 R. Chiu Created
144 --
145 function check_ap_inv_dist_exists (x_project_id IN number
146 , x_task_id IN number
147 , x_check_subtasks IN boolean default TRUE ) -- Added for Performance Fix 4903460
148 return number;
149 pragma RESTRICT_REFERENCES (check_ap_inv_dist_exists, WNDS, WNPS);
150
151
152 -- FUNCTION
153 -- check_funding_exists
154 -- PURPOSE
155 -- This function returns 1 if funding exists for a project
156 -- or a task and returns 0 if no funding is found.
157 --
158 -- User can pass either project id or task id. If both
159 -- project id and task id are provided, function treated
160 -- as if only task were passed. Funding can exist at project
161 -- and top task levels.
162 -- If Oracle error occured, Oracle error code is returned.
163 --
164 -- HISTORY
165 -- 20-OCT-95 R. Chiu Created
166 --
167 function check_funding_exists (x_project_id IN number
168 , x_task_id IN number ) return number;
169 pragma RESTRICT_REFERENCES (check_funding_exists, WNDS, WNPS);
170
171
172 -- FUNCTION
173 -- check_cdl_exists
174 -- PURPOSE
175 -- This function returns 1 if cost distribution lines exists
176 -- for a specified project or task and returns 0 if no
177 -- cost distribution line is found.
178 --
179 -- User can pass either project id or task id. If both
180 -- project id and task id are provided, function treated
181 -- as if only task were passed.
182 -- If Oracle error occured, Oracle error code is returned.
183 --
184 -- HISTORY
185 -- 20-OCT-95 R. Chiu Created
186 --
187 function check_cdl_exists (x_project_id IN number
188 , x_task_id IN number ) return number;
189 pragma RESTRICT_REFERENCES (check_cdl_exists, WNDS, WNPS);
190
191
192 -- FUNCTION
193 -- check_rdl_exists
194 -- PURPOSE
195 -- This function returns 1 if revenue distribution lines exists
196 -- for a specified project or task and returns 0 if no
197 -- revenue distribution line is found.
198 --
199 -- User can pass either project id or task id. If both
200 -- project id and task id are provided, function treated
201 -- as if only task were passed.
202 -- If Oracle error occured, Oracle error code is returned.
203 --
204 -- HISTORY
205 -- 20-OCT-95 R. Chiu Created
206 --
207 function check_rdl_exists (x_project_id IN number
208 , x_task_id IN number ) return number;
209 pragma RESTRICT_REFERENCES (check_rdl_exists, WNDS, WNPS);
210
211
212 -- FUNCTION
213 -- check_erdl_exists
214 -- PURPOSE
215 -- This function returns 1 if event revenue distribution
216 -- lines exists for a specified project or task and returns 0
217 -- if no event revenue distribution line is found for project
218 -- or task.
219 --
220 -- User can pass either project id or task id. If both
221 -- project id and task id are provided, function treated
222 -- as if only task were passed. User can also pass in a
223 -- specific event number.
224 -- If Oracle error occured, Oracle error code is returned.
225 --
226 -- HISTORY
227 -- 20-OCT-95 R. Chiu Created
228 --
229 function check_erdl_exists (x_project_id IN number
230 , x_task_id IN number
231 , x_event_num IN number ) return number;
232 pragma RESTRICT_REFERENCES (check_erdl_exists, WNDS, WNPS);
233
234
235 -- FUNCTION
236 -- check_draft_inv_item_exists
237 -- PURPOSE
238 -- This function returns 1 if draft invoice item exists
239 -- for a project or a task and returns 0 if no draft
240 -- invoice item is found for that project or task.
241 --
242 -- User can pass either project id or task id. If both
243 -- project id and task id are provided, function treated
244 -- as if only task were passed. Draft invoice item can exist
245 -- at project or lowest level tasks.
246 -- If Oracle error occured, Oracle error code is returned.
247 --
248 -- HISTORY
249 -- 20-OCT-95 R. Chiu Created
250 --
251 function check_draft_inv_item_exists (x_project_id IN number
252 , x_task_id IN number
253 , x_check_subtasks IN boolean default TRUE ) -- Added for Performance Fix 4903460
254 return number;
255 pragma RESTRICT_REFERENCES (check_draft_inv_item_exists, WNDS, WNPS);
256
257
258 -- FUNCTION
259 -- check_draft_rev_item_exists
260 -- PURPOSE
261 -- This function returns 1 if draft revenue item exists
262 -- for a project or a task and returns 0 if no draft
263 -- revenue item is found for that project or task.
264 --
265 -- User can pass either project id or task id. If both
266 -- project id and task id are provided, function treated
267 -- as if only task were passed. Draft revenue item can exist
268 -- at project or lowest level tasks.
269 -- If Oracle error occured, Oracle error code is returned.
270 --
271 -- HISTORY
272 -- 20-OCT-95 R. Chiu Created
273 --
274 function check_draft_rev_item_exists (x_project_id IN number
275 , x_task_id IN number
276 , x_check_subtasks IN boolean default TRUE ) -- Added for Performance Fix 4903460
277 return number;
278 pragma RESTRICT_REFERENCES (check_draft_rev_item_exists, WNDS, WNPS);
279
280 -- FUNCTION
281 -- check_draft_inv_details_exists
282 -- PURPOSE
283 -- This function returns 1 if draft invoice details exists
284 -- for a task and returns 0 if no draft
285 -- invoice details is found for that task.
286 --
287 -- User can pass task id. Draft invoice details can exist
288 -- at lowest level tasks. If Oracle error occured,
289 -- Oracle error code is returned.
290 --
291 -- HISTORY
292 -- 28-JUL-99 sbalasub Created
293 --
294 function check_draft_inv_details_exists (x_task_id IN number
295 , x_check_subtasks IN boolean default TRUE ) -- Added for Performance Fix 4903460
296 return number;
297 pragma RESTRICT_REFERENCES (check_draft_inv_details_exists, WNDS, WNPS);
298
299 -- FUNCTION
300 -- check_project_customer_exists
301 -- PURPOSE
302 -- This function returns 1 if project_customer_exists
303 -- for a task and returns 0 if no project_customer_exists
304 -- is found for that task.
305 --
306 -- User can pass task id. project_customer_exists can exist
307 -- at lowest level tasks. If Oracle error occured,
308 -- Oracle error code is returned.
309 --
310 -- HISTORY
311 -- 28-JUL-99 sbalasub Created
312 --
313 function check_project_customer_exists (x_task_id IN number
314 , x_check_subtasks IN boolean default TRUE ) -- Added for Performance Fix 4903460
315 return number;
316 pragma RESTRICT_REFERENCES (check_project_customer_exists, WNDS, WNPS);
317
318 -- FUNCTION
319 -- check_projects_exists
320 -- PURPOSE
321 -- This function returns 1 if projects_exists
322 -- for a task and returns 0 if no projects_exists
323 -- is found for that task.
324 --
325 -- User can pass task id. projects_exists can exist
326 -- at lowest level tasks. If Oracle error occured,
327 -- Oracle error code is returned.
328 --
329 -- HISTORY
330 -- 28-JUL-99 sbalasub Created
331 --
332 function check_projects_exists (x_task_id IN number
333 , x_check_subtasks IN boolean default TRUE -- Added for Performance Fix 4903460
334 ) return number;
335 pragma RESTRICT_REFERENCES (check_projects_exists, WNDS, WNPS);
336
337 -- FUNCTION
338 -- check_commitment_txn_exists
339 -- PURPOSE
340 -- This function returns 1 if commitment transaction exists
341 -- for a project or a task and returns 0 if no commitment
342 -- transaction is found for that project or task.
343 --
344 -- User can pass either project id or task id. If both
345 -- project id and task id are provided, function treated
346 -- as if only task were passed. commitment transaction can
347 -- exist at project or lowest level tasks.
348 -- If Oracle error occured, Oracle error code is returned.
349 --
350 -- HISTORY
351 -- 20-OCT-95 R. Chiu Created
352 --
353 function check_commitment_txn_exists (x_project_id IN number
354 , x_task_id IN number
355 , x_check_subtasks IN boolean default TRUE -- Added for Performance Fix 4903460
356 ) return number;
357 pragma RESTRICT_REFERENCES (check_commitment_txn_exists, WNDS, WNPS);
358
359
360 -- FUNCTION
361 -- check_comp_rule_set_exists
362 -- PURPOSE
363 -- This function returns 1 if compensation rule set exists
364 -- for a project or a task and returns 0 if no compensation
365 -- rule set is found for that project or task.
366 --
370 -- exist at project or lowest level tasks.
367 -- User can pass either project id or task id. If both
368 -- project id and task id are provided, function treated
369 -- as if only task were passed. Compensation rule set can
371 -- If Oracle error occured, Oracle error code is returned.
372 --
373 -- HISTORY
374 -- 20-OCT-95 R. Chiu Created
375 --
376 function check_comp_rule_set_exists (x_project_id IN number
377 , x_task_id IN number
378 , x_check_subtasks IN boolean default TRUE -- Added for Performance Fix 4903460
379 ) return number;
380 pragma RESTRICT_REFERENCES (check_comp_rule_set_exists, WNDS, WNPS);
381
382
383 -- FUNCTION
384 -- check_asset_assignmt_exists
385 -- PURPOSE
386 -- This function returns 1 if asset assignment exists
387 -- for a specific project or task and returns 0 if no asset
388 -- assignment is found for that project or task.
389 --
390 -- User can pass either project id or task id. If both
391 -- project id and task id are provided, function treated
392 -- as if only task were passed. Asset assignment can
393 -- exist at project or lowest level tasks.
394 -- If Oracle error occured, Oracle error code is returned.
395 --
396 -- HISTORY
397 -- 20-OCT-95 R. Chiu Created
398 --
399 function check_asset_assignmt_exists (x_project_id IN number
400 , x_task_id IN number
401 , x_check_subtasks IN boolean default TRUE -- Added for Performance Fix 4903460
402 ) return number;
403 pragma RESTRICT_REFERENCES (check_asset_assignmt_exists, WNDS, WNPS);
404
405
406 -- FUNCTION
407 -- check_job_bill_rate_override
408 -- PURPOSE
409 -- This function returns 1 if job bill rate override exists
410 -- for a specific project or task and returns 0 if no
411 -- job bill rate override is found for that project or task.
412 --
413 -- User can pass either project id or task id. If both
414 -- project id and task id are provided, function treated
415 -- as if only task were passed.
416 -- If Oracle error occured, Oracle error code is returned.
417 --
418 -- HISTORY
419 -- 20-OCT-95 R. Chiu Created
420 --
421 function check_job_bill_rate_override (x_project_id IN number
422 , x_task_id IN number ) return number;
423 pragma RESTRICT_REFERENCES (check_job_bill_rate_override, WNDS, WNPS);
424
425
426 -- FUNCTION
427 -- check_burden_sched_override
428 -- PURPOSE
429 -- This function returns 1 if burden schedule override exists
430 -- for a specific project or task and returns 0 if no
431 -- burden schedule override is found for that project or task.
432 --
433 -- User can pass either project id or task id. If both
434 -- project id and task id are provided, function treated
435 -- as if only task were passed.
436 -- If Oracle error occured, Oracle error code is returned.
437 --
438 -- HISTORY
439 -- 20-OCT-95 R. Chiu Created
440 --
441 function check_burden_sched_override (x_project_id IN number
442 , x_task_id IN number ) return number;
443 pragma RESTRICT_REFERENCES (check_burden_sched_override, WNDS); -- Bug 4363092: Removed WNPS restriction
444
445
446 -- FUNCTION
447 -- check_emp_bill_rate_override
448 -- PURPOSE
449 -- This function returns 1 if emp bill rate override exists
450 -- for a specific project or task and returns 0 if no
451 -- emp bill rate override is found for that project or task.
452 --
453 -- User can pass either project id or task id. If both
454 -- project id and task id are provided, function treated
455 -- as if only task were passed.
456 -- If Oracle error occured, Oracle error code is returned.
457 --
458 -- HISTORY
459 -- 20-OCT-95 R. Chiu Created
460 --
461 function check_emp_bill_rate_override (x_project_id IN number
462 , x_task_id IN number ) return number;
463 pragma RESTRICT_REFERENCES (check_emp_bill_rate_override, WNDS, WNPS);
464
465
466 -- FUNCTION
467 -- check_labor_multiplier
468 -- PURPOSE
469 -- This function returns 1 if labor multiplier exists
470 -- for a specific project or task and returns 0 if no
471 -- labor multiplier is found for that project or task.
472 --
473 -- User can pass either project id or task id. If both
474 -- project id and task id are provided, function treated
475 -- as if only task were passed.
476 -- If Oracle error occured, Oracle error code is returned.
477 --
478 -- HISTORY
479 -- 20-OCT-95 R. Chiu Created
480 --
481 function check_labor_multiplier (x_project_id IN number
482 , x_task_id IN number ) return number;
483 pragma RESTRICT_REFERENCES (check_labor_multiplier, WNDS, WNPS);
484
485 -- FUNCTION
486 -- check_transaction_control
487 -- PURPOSE
488 -- This function returns 1 if transaction control exists
489 -- for a specific project or task and returns 0 if no
490 -- transaction control is found for that project or task.
491 --
492 -- User can pass either project id or task id. If both
496 --
493 -- project id and task id are provided, function treated
494 -- as if only task were passed.
495 -- If Oracle error occured, Oracle error code is returned.
497 -- HISTORY
498 -- 20-OCT-95 R. Chiu Created
499 --
500 function check_transaction_control (x_project_id IN number
501 , x_task_id IN number ) return number;
502 pragma RESTRICT_REFERENCES (check_transaction_control, WNDS, WNPS);
503
504
505 -- FUNCTION
506 -- check_nl_bill_rate_override
507 -- PURPOSE
508 -- This function returns 1 if non-labor bill rate override
509 -- exists for a specific project or task and returns 0 if no
510 -- non-labor bill rate override is found for that project or task.
511 --
512 -- User can pass either project id or task id. If both
513 -- project id and task id are provided, function treated
514 -- as if only task were passed.
515 -- If Oracle error occured, Oracle error code is returned.
516 --
517 -- HISTORY
518 -- 20-OCT-95 R. Chiu Created
519 --
520 function check_nl_bill_rate_override (x_project_id IN number
521 , x_task_id IN number ) return number;
522 pragma RESTRICT_REFERENCES (check_nl_bill_rate_override, WNDS, WNPS);
523
524 -- FUNCTION
525 -- check_job_bill_title_override
526 -- PURPOSE
527 -- This function returns 1 if job bill title override
528 -- exists for a specific project or task and returns 0 if no
529 -- job bill title override is found for that project or task.
530 --
531 -- User can pass either project id or task id. If both
532 -- project id and task id are provided, function treated
533 -- as if only task were passed.
534 -- If Oracle error occured, Oracle error code is returned.
535 --
536 -- HISTORY
537 -- 20-OCT-95 R. Chiu Created
538 --
539 function check_job_bill_title_override (x_project_id IN number
540 , x_task_id IN number ) return number;
541 pragma RESTRICT_REFERENCES (check_job_bill_title_override, WNDS, WNPS);
542
543
544 -- FUNCTION
545 -- check_job_assignmt_override
546 -- PURPOSE
547 -- This function returns 1 if job assignment override
548 -- exists for a specific project or task and returns 0 if no
549 -- job assignment override is found for that project or task.
550 --
551 -- User can pass either project id or task id. If both
552 -- project id and task id are provided, function treated
553 -- as if only task were passed.
554 -- If Oracle error occured, Oracle error code is returned.
555 --
556 -- HISTORY
557 -- 20-OCT-95 R. Chiu Created
558 --
559 function check_job_assignmt_override (x_project_id IN number
560 , x_task_id IN number ) return number;
561 pragma RESTRICT_REFERENCES (check_job_assignmt_override, WNDS, WNPS);
562
563 -- FUNCTION
564 -- check_iex_task_charged
565 -- PURPOSE
566 -- This function returns 1 if the task is charged in iexpense
567 -- and returns 0 if no expense is charged against the task in iexpense.
568 --
569 -- User can pass the task id.
570 -- If Oracle error occured, Oracle error code is returned.
571 --
572 -- HISTORY
573 -- 29-MAY-2002 GJAIN Created
574 --
575 function check_iex_task_charged(x_task_id IN number ) return number;
576
577 pragma RESTRICT_REFERENCES (check_iex_task_charged, WNDS, WNPS);
578
579 /* Start changes for Service Intgration bug#16535441*/
580 -- FUNCTION
581 -- check_service_order_exists
582 -- PURPOSE
583 -- This function returns 1 if service order item exists
584 -- for a project or a task and returns 0 if no service
585 -- order item is found for that project or task.
586 --
587 -- User can pass either project id or task id. If both
588 -- project id and task id are provided, function treated
589 -- as if only task were passed. Service order item can exist
590 -- at project or lowest level tasks.
591 -- If Oracle error occured, Oracle error code is returned.
592 --
593 -- HISTORY
594 -- 25-MAR-13 speddi Created
595
596 function check_service_order_exists (x_project_id IN number
597 , x_task_id IN number
598 , x_check_subtasks IN boolean default TRUE )
599 return number;
600 pragma RESTRICT_REFERENCES (check_service_order_exists, WNDS, WNPS);
601
602 /* End changes for Service Intgration bug#16535441*/
603
604 end PA_PROJ_TSK_UTILS ;