DBA Data[Home] [Help]

PACKAGE: APPS.CSI_INSTANCE_PARTIES_VLD_PVT

Source


1 PACKAGE CSI_Instance_parties_vld_pvt  AS
2 /* $Header: csivipvs.pls 120.0 2005/05/24 17:47:45 appldev noship $ */
3 
4 /*-----------------------------------------------------------*/
5 /* Procedure name: Check_Reqd_Param                          */
6 /* Description : To Check if the reqd parameter is passed    */
7 /*-----------------------------------------------------------*/
8 
9 PROCEDURE Check_Reqd_Param_num
10 (
11 	p_number        IN      NUMBER,
12 	p_param_name    IN      VARCHAR2,
13 	p_api_name      IN      VARCHAR2
14 );
15 
16 /*-----------------------------------------------------------*/
17 /* Procedure name: Check_Reqd_Param                          */
18 /* Description : To Check if the reqd parameter is passed    */
19 /*-----------------------------------------------------------*/
20 
21 PROCEDURE Check_Reqd_Param_char
22 (
23 	p_variable      IN      VARCHAR2,
24 	p_param_name    IN      VARCHAR2,
25 	p_api_name      IN      VARCHAR2
26 );
27 
28 /*-----------------------------------------------------------*/
29 /* Procedure name: Check_Reqd_Param                          */
30 /* Description : To Check if the reqd parameter is passed    */
31 /*-----------------------------------------------------------*/
32 
33 PROCEDURE Check_Reqd_Param_date
34 (
35 	p_date          IN      DATE,
36 	p_param_name    IN      VARCHAR2,
37 	p_api_name      IN      VARCHAR2
38 );
39 
40 /*-----------------------------------------------------------*/
41 /* Procedure name: Is_Party_Rel_Comb_Exists                  */
42 /* Description : Check if the Party relationship combination */
43 /*                     exists already                        */
44 /*-----------------------------------------------------------*/
45 
46 FUNCTION Is_Party_Rel_Comb_Exists
47 (
48     p_instance_id         IN      NUMBER      ,
49     p_party_source_table  IN      VARCHAR2    ,
50     p_party_id            IN      NUMBER      ,
51     p_relationship_type   IN      VARCHAR2    ,
52     p_contact_flag        IN      VARCHAR2    ,
53     p_contact_ip_id       IN      NUMBER      ,
54     p_stack_err_msg       IN      BOOLEAN DEFAULT TRUE
55 ) RETURN BOOLEAN;
56 
57 /*-----------------------------------------------------------*/
58 /* Procedure name: Is_Inst_PartyID_exists                    */
59 /* Description : Check if the Instance Party Id exists       */
60 /*-----------------------------------------------------------*/
61 
62 FUNCTION Is_Inst_PartyID_exists
63 (
64  p_Instance_party_id     IN      NUMBER,
65  p_stack_err_msg         IN      BOOLEAN DEFAULT TRUE
66 ) RETURN BOOLEAN;
67 
68 /*-----------------------------------------------------------*/
69 /* Procedure name: Is_Inst_partyID_Expired                   */
70 /* Description : Check if the instance_party_id              */
71 /*               is expired                                  */
72 /*-----------------------------------------------------------*/
73 
74 FUNCTION Is_Inst_partyID_Expired
75 (
76  p_Instance_party_id     IN      NUMBER,
77  p_stack_err_msg         IN      BOOLEAN DEFAULT TRUE
78 ) RETURN BOOLEAN;
79 
80 /*-----------------------------------------------------------*/
81 /* Procedure name: Is_InstanceID_Valid                       */
82 /* Description : Check if the Instance Id exists             */
83 /*-----------------------------------------------------------*/
84 
85 FUNCTION Is_InstanceID_Valid
86 (
87 	p_instance_id       IN      NUMBER,
88 	p_stack_err_msg     IN      BOOLEAN DEFAULT TRUE
89 ) RETURN BOOLEAN;
90 
91 /*-----------------------------------------------------------*/
92 /* Procedure name: Is_Pty_Source_tab_Valid                   */
93 /* Description : Check if the Party Source Table is          */
94 /*              defined in fnd_lookups                       */
95 /*-----------------------------------------------------------*/
96 
97 FUNCTION Is_Pty_Source_tab_Valid
98 (   p_party_source_table    IN VARCHAR2,
99     p_stack_err_msg         IN      BOOLEAN DEFAULT TRUE
100  ) RETURN BOOLEAN;
101 
102 /*-----------------------------------------------------------*/
103 /* Procedure name: Is_Party_Valid                            */
104 /* Description : Check if the Party Id exists in hz_parties  */
105 /*    po_vendors , employee  depending on party_source_table */
106 /*         value                                             */
107 /*-----------------------------------------------------------*/
108 
109 FUNCTION Is_Party_Valid
110 (	p_party_source_table    IN      VARCHAR2,
111         p_party_id              IN      NUMBER ,
112 	p_contact_flag          IN      VARCHAR2,
113 	p_stack_err_msg         IN      BOOLEAN DEFAULT TRUE
114 ) RETURN BOOLEAN;
115 
116 /*-----------------------------------------------------------*/
117 /* Procedure name: Is_Pty_Rel_type_Valid                     */
118 /* Description : Check if the Party relationship type code   */
119 /*         exists in fnd_lookups table                       */
120 /*-----------------------------------------------------------*/
121 
122 FUNCTION  Is_Pty_Rel_type_Valid
123 (      p_party_rel_type_code   IN      VARCHAR2,
124        p_contact_flag          IN      VARCHAR2,
125        p_stack_err_msg         IN      BOOLEAN DEFAULT TRUE
126 ) RETURN BOOLEAN;
127 
128 /*-----------------------------------------------------------*/
129 /* Procedure name: Is_Contact_Valid                          */
130 /* Description : Check if it is defined as a contact for     */
131 /*         party_id in hz_party_relationships                */
132 /*-----------------------------------------------------------*/
133 
134 FUNCTION Is_Contact_Valid
135 ( p_contact_party_id          IN      NUMBER,
136   p_contact_source_table      IN      VARCHAR2,
137   p_ip_contact_id             IN      NUMBER,
138   p_stack_err_msg             IN      BOOLEAN DEFAULT TRUE
139  ) RETURN BOOLEAN;
140 
141 
142 /*-----------------------------------------------------------*/
143 /* Procedure name: Is_StartDate_Valid                        */
144 /* Description : Check if party relationship active start    */
145 /*    date is valid                                          */
146 /*-----------------------------------------------------------*/
147 
148 FUNCTION Is_StartDate_Valid
149 (   p_start_date            IN   DATE,
150     p_end_date              IN   DATE,
151     p_instance_id           IN   NUMBER,
152     p_stack_err_msg         IN   BOOLEAN DEFAULT TRUE
153 ) RETURN BOOLEAN;
154 
155 /*-----------------------------------------------------------*/
156 /* Procedure name: Is_EndDate_Valid                          */
157 /* Description : Check if party relationship active end      */
158 /*    date is valid                                          */
159 /*-----------------------------------------------------------*/
160 
161 FUNCTION Is_EndDate_Valid
162 (
163     p_start_date            IN   DATE,
164     p_end_date              IN   DATE,
165     p_instance_id           IN   NUMBER,
166     p_instance_party_id     IN   NUMBER,
167     p_txn_id                IN   NUMBER,
168     p_stack_err_msg         IN   BOOLEAN DEFAULT TRUE
169 ) RETURN BOOLEAN;
170 
171 /*-----------------------------------------------------------*/
172 /* Procedure name: Is_Inst_Owner_exists                      */
173 /* Description : Check if owner exists for instance_id       */
174 /*-----------------------------------------------------------*/
175 
176 FUNCTION Is_Inst_Owner_exists
177 ( p_Instance_id   IN      NUMBER,
178   p_instance_party_id IN  NUMBER,
179   p_stack_err_msg IN      BOOLEAN DEFAULT TRUE
180  ) RETURN BOOLEAN ;
181 
182 /*-----------------------------------------------------------*/
183 /* Procedure name: gen_inst_party_id                         */
184 /* Description : Generate instance_party_id from the sequence*/
185 /*-----------------------------------------------------------*/
186 
187 FUNCTION gen_inst_party_id
188  RETURN NUMBER;
189 
190 /*-----------------------------------------------------------*/
191 /* Procedure name: gen_inst_party_hist_id                    */
192 /* Description : Generate instance_party_history_id          */
193 /*               from the sequence                           */
194 /*-----------------------------------------------------------*/
195 
196 FUNCTION gen_inst_party_hist_id
197  RETURN NUMBER;
198 
199 /*-----------------------------------------------------------*/
200 /* Procedure name: Is_Instance_creation_complete             */
201 /* Description : Check if the instance creation is           */
202 /*               complete                                    */
203 /*-----------------------------------------------------------*/
204 
205 FUNCTION Is_Inst_creation_complete
206 ( p_Instance_id   IN      NUMBER,
207   p_stack_err_msg IN      BOOLEAN DEFAULT TRUE
208  ) RETURN BOOLEAN ;
209 
210 /*-----------------------------------------------------------*/
211 /* Procedure name: Is_Pty_Acct_Comb_Exists                   */
212 /* Description : Check if the party account combination      */
213 /*               exists in csi_ip_accounts                   */
214 /*-----------------------------------------------------------*/
215 
216 FUNCTION Is_Pty_Acct_Comb_Exists
217 (
218    p_instance_party_id    IN   NUMBER ,
219    p_party_account_id     IN   NUMBER ,
220    p_relationship_type    IN   VARCHAR2,
221    p_stack_err_msg        IN   BOOLEAN DEFAULT TRUE
222 ) RETURN BOOLEAN;
223 
224 /*-----------------------------------------------------------*/
225 /* Procedure name: Is_IP_account_Exists                      */
226 /* Description : Check if the IP_account_id                  */
227 /*               exists in csi_ip_accounts                   */
228 /*-----------------------------------------------------------*/
229 
230 FUNCTION Is_IP_account_Exists
231 (	p_ip_account_id       IN      NUMBER,
232 	p_stack_err_msg       IN      BOOLEAN DEFAULT TRUE
233 ) RETURN BOOLEAN;
234 
235 
236 /*-----------------------------------------------------------*/
237 /* Procedure name: Is_Inst_partyID_Valid                     */
238 /* Description : Check if the instance_party_id              */
239 /*               exists in csi_i_parties                     */
240 /*-----------------------------------------------------------*/
241 
242 FUNCTION Is_Inst_partyID_Valid
243 (
244  p_Instance_party_id     IN      NUMBER,
245  p_txn_type_id           IN      NUMBER,   -- Added for bug 3550541
246  p_mode                  IN      VARCHAR2, -- Added for bug 3550541
247  p_stack_err_msg         IN      BOOLEAN DEFAULT TRUE
248 ) RETURN BOOLEAN;
249 
250 /*-----------------------------------------------------------*/
251 /* Procedure name: Is_Pty_accountID_Valid                    */
252 /* Description : Check if the party account_id               */
253 /*               exists in hz_cust_accounts                  */
254 /*-----------------------------------------------------------*/
255 
256 
257 FUNCTION Is_Pty_accountID_Valid
258 (  p_party_account_id       IN      NUMBER,
259    p_instance_party_id      IN      NUMBER,
260    p_relationship_type_code IN      VARCHAR2,
261    p_txn_type_id            IN      NUMBER,   -- Added for bug 3550541
262    p_mode                   IN      VARCHAR2, -- Added for bug 3550541
263    p_stack_err_msg          IN      BOOLEAN DEFAULT TRUE
264 ) RETURN BOOLEAN;
265 
266 /*-----------------------------------------------------------*/
267 /* Procedure name: Is_Acct_Rel_type_Valid                    */
268 /* Description : Check if the Party account relationship     */
269 /*               type code exists in fnd_lookups             */
270 /*-----------------------------------------------------------*/
271 
272 FUNCTION  Is_Acct_Rel_type_Valid
273 (      p_acct_rel_type_code    IN      VARCHAR2,
274        p_stack_err_msg         IN      BOOLEAN DEFAULT TRUE
275 ) RETURN BOOLEAN;
276 
277 /*-----------------------------------------------------------*/
278 /* Procedure name: Is_Acct_StartDate_Valid                   */
279 /* Description : Check if the Account active Start date      */
280 /*               is valid                                    */
281 /*-----------------------------------------------------------*/
282 
283 FUNCTION Is_Acct_StartDate_Valid
284 (   p_start_date            IN   DATE,
285     p_end_date              IN   DATE,
286     p_instance_party_id     IN   NUMBER,
287     p_stack_err_msg         IN   BOOLEAN DEFAULT TRUE
288 ) RETURN BOOLEAN;
289 
290 /*-----------------------------------------------------------*/
291 /* Procedure name: Is_Acct_EndDate_Valid                     */
292 /* Description : Check if the Account active End date        */
293 /*               is valid                                    */
294 /*-----------------------------------------------------------*/
295 
296 FUNCTION Is_Acct_EndDate_Valid
297 (   p_start_date            IN   DATE,
298     p_end_date              IN   DATE,
299     p_inst_party_id         IN   NUMBER,
300     p_ip_account_id         IN   NUMBER,
301     p_txn_id                IN   NUMBER,
302     p_stack_err_msg         IN   BOOLEAN DEFAULT TRUE
303 ) RETURN BOOLEAN;
304 
305 /*-----------------------------------------------------------*/
306 /* Procedure name: generate_ip_account_id                    */
307 /* Description : Generate ip_account_id from the sequence    */
308 /*-----------------------------------------------------------*/
309 
310 
311 FUNCTION gen_ip_account_id
312  RETURN NUMBER;
313 
314 /*-----------------------------------------------------------*/
315 /* Procedure name: generate_ip_account_hist_id               */
316 /* Description : Generate ip_account_hist_id from            */
317 /*                           the sequence                    */
318 /*-----------------------------------------------------------*/
319 
320 FUNCTION gen_ip_account_hist_id
321  RETURN NUMBER;
322 
323 /*------------------------------------------------------------*/
324 /* Procedure name: Is_datetimestamp_Valid                     */
325 /* Description : Check if datetimestamp is greater than       */
326 /*  start effective date but less than the end effective date */
327 /*------------------------------------------------------------*/
328 
329 FUNCTION Is_timestamp_Valid
330 (   p_datetimestamp         IN   DATE,
331     p_instance_id           IN   NUMBER,
332     p_stack_err_msg         IN   BOOLEAN DEFAULT TRUE
333 ) RETURN BOOLEAN;
334 
335 /*-----------------------------------------------------------*/
336 /* Procedure name: generate_ver_label_id                     */
337 /* Description : Generate version_label_id  from            */
338 /*                           the sequence                    */
339 /*-----------------------------------------------------------*/
340 
341 FUNCTION gen_ver_label_id
342   RETURN NUMBER;
343 
344 /*-----------------------------------------------------------*/
345 /* Procedure name: Is_Ver_labelID_exists                     */
346 /* Description : Check if the version_label_id               */
347 /*               exists in csi_i_version_labels              */
348 /*-----------------------------------------------------------*/
349 
350 FUNCTION Is_Ver_labelID_exists
351 (	p_version_label_id      IN      NUMBER,
352 	p_stack_err_msg         IN      BOOLEAN DEFAULT TRUE
353 ) RETURN BOOLEAN;
354 
355 /*-----------------------------------------------------------*/
356 /* Procedure name: generate_ver_label_hist_id                */
357 /* Description : Generate version_label_hist_id  from        */
358 /*                           the sequence                    */
359 /*-----------------------------------------------------------*/
360 
361 FUNCTION gen_ver_label_hist_id
362   RETURN NUMBER;
363 
364 /*-----------------------------------------------------------*/
365 /* Procedure name:   generate_inst_asset_id                  */
366 /* Description : Generate instance asset id   from           */
367 /*                           the sequence                    */
368 /*-----------------------------------------------------------*/
369 
370 FUNCTION  gen_inst_asset_id
371   RETURN NUMBER;
372 
373 
374 /*-----------------------------------------------------------*/
375 /* Procedure name:  Is_Inst_assetID_exists                   */
376 /* Description : Check if the instance asset id              */
377 /*               exists in csi_i_assets                      */
378 /*-----------------------------------------------------------*/
379 
380 FUNCTION  Is_Inst_assetID_exists
381 
382 (	p_instance_asset_id     IN      NUMBER,
383 	p_stack_err_msg         IN      BOOLEAN DEFAULT TRUE
384 ) RETURN BOOLEAN ;
385 
386 
387 /*-----------------------------------------------------------*/
388 /* Procedure name: Is_Update_Status_Exists                   */
389 /* Description : Check if the update status  is              */
390 /*              defined in fnd_lookups                       */
391 /*-----------------------------------------------------------*/
392 
393 FUNCTION Is_Update_Status_Exists
394 (
395     p_update_status         IN      VARCHAR2,
396     p_stack_err_msg         IN      BOOLEAN DEFAULT TRUE
397 ) RETURN BOOLEAN;
398 
399 
400 /*-----------------------------------------------------------*/
401 /* Procedure name: Is_Quantity_Valid                         */
402 /* Description : Check if the asset quantity > 0             */
403 /*-----------------------------------------------------------*/
404 
405 FUNCTION Is_Quantity_Valid
406 (
407     p_asset_quantity        IN      NUMBER,
408     p_stack_err_msg         IN      BOOLEAN DEFAULT TRUE
409 ) RETURN BOOLEAN;
410 
411 
412 /*-----------------------------------------------------------*/
413 /* Procedure name:   generate_inst_asset_hist_id             */
414 /* Description : Generate instance asset id   from           */
415 /*                           the sequence                    */
416 /*-----------------------------------------------------------*/
417 
418 FUNCTION  gen_inst_asset_hist_id
419   RETURN NUMBER;
420 /*-----------------------------------------------------------*/
421 /* Procedure name:  Is_Asset_Comb_Valid                      */
422 /* Description : Check if the instance asset id and location */
423 /*               id exists in fa_books                       */
424 /*-----------------------------------------------------------*/
425 
426 FUNCTION  Is_Asset_Comb_Valid
427 
428 (   p_asset_id        IN      NUMBER,
429     p_book_type_code  IN      VARCHAR2,
430     p_stack_err_msg   IN      BOOLEAN DEFAULT TRUE
431 ) RETURN BOOLEAN ;
432 
433 /*-----------------------------------------------------------*/
434 /* Procedure name:  Is_Asset_Location_Valid                  */
435 /* Description : Check if the instance location id           */
436 /*                exists in csi_a_locations                  */
437 /*-----------------------------------------------------------*/
438 
439 FUNCTION  Is_Asset_Location_Valid
440 (	p_location_id     IN      NUMBER,
441     p_stack_err_msg   IN      BOOLEAN DEFAULT TRUE
442  ) RETURN BOOLEAN ;
443 
444 /*-----------------------------------------------------------*/
445 /* Procedure name: Is_IP_account_expired                     */
446 /* Description : Check if the IP_account_id                  */
447 /*               is expired                                  */
448 /*-----------------------------------------------------------*/
449 
450 FUNCTION Is_IP_account_expired
451 (	p_ip_account_id       IN      NUMBER,
452 	p_stack_err_msg       IN      BOOLEAN DEFAULT TRUE
453 ) RETURN BOOLEAN;
454 
455 /*-----------------------------------------------------------*/
456 /* Procedure name: Is_IP_account_Valid                       */
457 /* Description : Check if the IP_account_id                  */
458 /*               exists in csi_ip_accounts                   */
459 /*-----------------------------------------------------------*/
460 
461 FUNCTION Is_IP_account_Valid
462 (	p_ip_account_id       IN      NUMBER,
463 	p_stack_err_msg       IN      BOOLEAN DEFAULT TRUE
464 ) RETURN BOOLEAN ;
465 
466 /*-----------------------------------------------------------*/
467 /* Procedure name: Is_bill_to_add_valid                      */
468 /* Description : Check if the Bill to address                */
469 /*               exists in hz_cust_site_uses                 */
470 /*-----------------------------------------------------------*/
471 
472 FUNCTION Is_bill_to_add_valid
473 (	p_bill_to_add_id      IN      NUMBER,
474 	p_stack_err_msg       IN      BOOLEAN DEFAULT TRUE
475 ) RETURN BOOLEAN;
476 
477 /*-----------------------------------------------------------*/
478 /* Procedure name: Is_ship_to_add_valid                      */
479 /* Description : Check if the Ship to address                */
480 /*               exists in hz_cust_site_uses                 */
481 /*-----------------------------------------------------------*/
482 
483 FUNCTION Is_ship_to_add_valid
484 (	p_ship_to_add_id      IN      NUMBER,
485 	p_stack_err_msg       IN      BOOLEAN DEFAULT TRUE
486 ) RETURN BOOLEAN;
487 
488 
489 /*-----------------------------------------------------------*/
490 /* Procedure name: Is_Party_Contact_Exists                   */
491 /* Description : Check if the Party relationship combination */
492 /*                     exists already                        */
493 /*-----------------------------------------------------------*/
494 
495 FUNCTION Is_Party_Contact_Exists
496 (  p_contact_ip_id        IN      NUMBER      ,
497    p_stack_err_msg        IN   BOOLEAN DEFAULT TRUE
498 ) RETURN BOOLEAN;
499 
500 /*-----------------------------------------------------------*/
501 /* Procedure name: Acct_Rules_Check                          */
502 /* Description : Check if specific  party account            */
503 /*               rules are ok                                */
504 /*-----------------------------------------------------------*/
505 
506 FUNCTION Acct_Rules_Check
507 (
508    p_instance_party_id    IN   NUMBER ,
509    p_relationship_type    IN   VARCHAR2,
510    p_stack_err_msg        IN   BOOLEAN DEFAULT TRUE
511 ) RETURN BOOLEAN;
512 
513 /*-----------------------------------------------------------*/
514 /* Procedure name: Get_Party_relation                        */
515 /* Description : Get Party relationhip                       */
516 /*-----------------------------------------------------------*/
517 
518 FUNCTION Get_Party_relation
519 ( p_Instance_party_id     IN      NUMBER,
520   p_stack_err_msg         IN      BOOLEAN DEFAULT TRUE
521  ) RETURN VARCHAR2;
522 
523 /*-----------------------------------------------------------*/
524 /* Procedure name: Get_Party_Record                          */
525 /* Description : Get Party Record for the account            */
526 /*-----------------------------------------------------------*/
527 
528 FUNCTION Get_Party_Record
529 ( p_Instance_party_id     IN      NUMBER,
530   p_party_rec             OUT  NOCOPY   csi_datastructures_pub.party_rec,
531   p_stack_err_msg         IN      BOOLEAN DEFAULT TRUE
532  ) RETURN BOOLEAN;
533 
534 /*-----------------------------------------------------------*/
535 /* Procedure name: Is_Account_Expired                        */
536 /* Description : Is the account expired                      */
537 /*-----------------------------------------------------------*/
538 
539 FUNCTION Is_Account_Expired
540   (p_party_account_rec    IN  csi_datastructures_pub.party_account_rec
541   ,p_stack_err_msg        IN  BOOLEAN DEFAULT TRUE
542   ) RETURN BOOLEAN;
543 
544 
545 
546 /*-----------------------------------------------------------*/
547 /* Procedure name: Is_Party_Expired                          */
548 /* Description : Is the party expired                        */
549 /*-----------------------------------------------------------*/
550 FUNCTION Is_Party_Expired
551   (   p_party_rec                   IN  csi_datastructures_pub.party_rec
552      ,p_stack_err_msg               IN  BOOLEAN DEFAULT TRUE
553   ) RETURN BOOLEAN;
554 
555 
556 /*-----------------------------------------------------------*/
557 /* Procedure name: Transfer_Party_Rules                      */
558 /* Description : Expire accounts of the party if party is    */
559 /*               being changed                               */
560 /*-----------------------------------------------------------*/
561 
562 PROCEDURE Transfer_Party_Rules
563  (    p_api_version                 IN  NUMBER
564      ,p_commit                      IN  VARCHAR2 := fnd_api.g_false
565      ,p_init_msg_list               IN  VARCHAR2 := fnd_api.g_false
566      ,p_validation_level            IN  NUMBER   := fnd_api.g_valid_level_full
567      ,p_party_rec                   IN  csi_datastructures_pub.party_rec
568      ,p_stack_err_msg               IN  BOOLEAN DEFAULT TRUE
569      ,p_txn_rec                     IN OUT NOCOPY csi_datastructures_pub.transaction_rec
570      ,x_return_status               OUT NOCOPY VARCHAR2
571      ,x_msg_count                   OUT NOCOPY NUMBER
572      ,x_msg_data                    OUT NOCOPY VARCHAR2
573  );
574 
575 /*-----------------------------------------------------------*/
576 /* Procedure name: Is_Preferred_Contact_Pty                  */
577 /* Description : Check if Preferred party exist for the      */
578 /*                current party relationship                 */
579 /*-----------------------------------------------------------*/
580 
581 FUNCTION Is_Preferred_Contact_Pty
582 ( p_Instance_id         IN      NUMBER,
583   p_relationship_type   IN      VARCHAR2    ,
584   p_start_date          IN      DATE        ,
585   p_stack_err_msg IN      BOOLEAN DEFAULT TRUE
586  ) RETURN BOOLEAN;
587 
588 /*-----------------------------------------------------------*/
589 /* Procedure name: Is_Primary_Contact_Pty                    */
590 /* Description : Check if Primary party exist for the        */
591 /*                current party relationship                 */
592 /*-----------------------------------------------------------*/
593 
594 FUNCTION Is_Primary_Contact_Pty
595 ( p_Instance_id         IN      NUMBER,
596   p_contact_ip_id       IN      NUMBER,
597   p_relationship_type   IN      VARCHAR2,
598   p_start_date          IN      DATE,
599   p_end_date            IN      DATE,
600   p_stack_err_msg       IN      BOOLEAN DEFAULT TRUE
601  ) RETURN BOOLEAN;
602 
603 
604 /*-----------------------------------------------------------*/
605 /* Procedure name: Is_Primary_Pty                            */
606 /* Description : Check if Primary party exist for the        */
607 /*                current party relationship                 */
608 /*-----------------------------------------------------------*/
609 
610 FUNCTION Is_Primary_Pty
611 ( p_Instance_id         IN      NUMBER,
612   p_relationship_type   IN      VARCHAR2    ,
613   p_start_date          IN      DATE        ,
614   p_end_date            IN      DATE        ,
615   p_stack_err_msg       IN      BOOLEAN DEFAULT TRUE
616  ) RETURN BOOLEAN;
617 
618 
619 /*-----------------------------------------------------------*/
620 /* Procedure name: Is_Preferred_Pty                          */
621 /* Description : Check if Preferred party exist for the      */
622 /*                current party relationship                 */
623 /*-----------------------------------------------------------*/
624 
625 FUNCTION Is_Preferred_Pty
626 ( p_Instance_id         IN      NUMBER,
627   p_relationship_type   IN      VARCHAR2    ,
628   p_start_date          IN      DATE        ,
629   p_stack_err_msg IN      BOOLEAN DEFAULT TRUE
630  ) RETURN BOOLEAN;
631 
632 FUNCTION get_parties
633 (
634     p_start_date            IN   DATE,
635     p_end_date              IN   DATE,
636     p_instance_party_id     IN   NUMBER,
637     p_txn_id                IN   NUMBER
638 )
639 RETURN BOOLEAN;
640 
641 
642 END CSI_Instance_parties_vld_pvt ;