1 Package ota_tdb_bus2 AUTHID CURRENT_USER as
2 /* $Header: ottdb01t.pkh 120.7 2011/05/20 06:58:24 jaysridh ship $ */
3 -- ----------------------------------------------------------------------------
4 -- |-------------------------< check_person_address >-------------------------|
5 -- ----------------------------------------------------------------------------
6 --
7 -- PUBLIC
8 -- Description: Check Person Address
9 --
10 -- Checks that the given person is registered at the given address
11 --
12 Procedure check_person_address (p_person_id in number,
13 p_address_id in number,
14 p_delegate_or_contact in varchar2);
15 -- ----------------------------------------------------------------------------
16 -- |-------------------------< other_bookings_clash >-------------------------|
17 -- ----------------------------------------------------------------------------
18 --
19 -- Description: Other Bookings Clash
20 --
21 -- Checks if the booking being made clashes with any other
22 -- bookings for the delegate
23 -- Note - bookings only clash if they are confirmed
24 --
25 Function other_bookings_clash (p_delegate_person_id in varchar2,
26 p_delegate_contact_id in varchar2,
27 p_event_id in number,
28 p_booking_status_type_id in varchar2)
29 Return boolean;
30 -- ----------------------------------------------------------------------------
31 -- |-------------------------< overdraft_exceeded >---------------------------|
32 -- ----------------------------------------------------------------------------
33 --
34 -- Description: Overdraft Exceeded
35 --
36 -- Checks if the booking being made is greater than the
37 -- overdraft limit if there is one. It takes into account
38 -- all other bookings as well for the pre-purchase agreement.
39 --
40 Function overdraft_exceeded (p_booking_deal_id in number,
41 p_money_amount in number)
42 Return boolean;
43 -- ----------------------------------------------------------------------------
44 -- |--------------------------< check_person_visible >------------------------|
45 -- ----------------------------------------------------------------------------
46 --
47 -- Description: Check Person Visible
48 --
49 -- Checks that the specified person is visible on the given date
50 --
51 Procedure check_person_visible (p_person_id in number,
52 p_date_booking_placed in date,
53 p_person_type in varchar2,
54 p_person_address_type in varchar2);
55
56 --
57 --
58 -- ----------------------------------------------------------------------------
59 -- |--------------------------< check_enrollment_type >-----------------------|
60 -- ----------------------------------------------------------------------------
61 --
62 -- Description: Check Enrollment Type
63 --
64 -- Checks whether a customer based enrollment follows the rules
65 --
66 Procedure check_enrollment_type(p_event_id in number,
67 p_person_id in number,
68 p_enrollment_type in varchar2,
69 p_booking_id in number);
70 --
71 --
72 -- ----------------------------------------------------------------------------
73 -- |--------------------------< check_organization_details >------------------|
74 -- ----------------------------------------------------------------------------
75 --
76 -- Description: Check Organization Id related information
77 --
78 -- Checks whether organization id is not null and whether :
79 -- if sponsor_person_id is not null then
80 -- sponsor_assignment_id must be not null
81 -- if delegate_person_id is not null then
82 -- delegate_assignment_id must be not null
83 --
84 Procedure check_organization_details(p_organization_id in number,
85 p_delegate_person_id in number,
86 p_delegate_assignment_id in number,
87 p_sponsor_person_id in number,
88 p_sponsor_assignment_id in number);
89 --
90 --
91 -- ----------------------------------------------------------------------------
92 -- |--------------------------< check_customer_details >----------------------|
93 -- ----------------------------------------------------------------------------
94 --
95 -- Description: Check Customer Id related information
96 --
97 -- Checks whether customer id is not null and whether :
98 -- if contact_id is not null then
99 -- contact must exist for the customer id
100 -- if delegate_contact_id is not null then
101 -- delegate_contact_id must exist for the customer
102 --
103 Procedure check_customer_details(p_customer_id in number,
104 p_delegate_contact_id in number,
105 p_sponsor_contact_id in number);
106 --
107 --
108 -- ----------------------------------------------------------------------------
109 -- |--------------------------< check_contact_address >-----------------------|
110 -- ----------------------------------------------------------------------------
111 --
112 -- Description: Check Contact Address Id related information
113 --
114 -- Checks whether contact address id is not null and that :
115 -- The address_id is valid for the customer
116 --
117 Procedure check_contact_address (p_contact_address_id in number,
118 p_customer_id in number);
119 --
120 --
121 -- ----------------------------------------------------------------------------
122 -- |--------------------------< check_org_business_group >--------------------|
123 -- ----------------------------------------------------------------------------
124 --
125 -- Description: Checks Organization business group information
126 --
127 -- Checks whether business group id for an internal enrollment is :
128 -- the same as the organization_id
129 -- the same as the delegate_person_id
130 -- the same as the sponsor_person_id
131 -- the same as the delegate_assignment_id
132 -- the same as the sponsor_assignment_id
133 --
134 Procedure check_org_business_group (p_event_id in number,
135 p_business_group_id in number,
136 p_organization_id in number,
137 p_delegate_person_id in number,
138 p_sponsor_person_id in number,
139 p_delegate_assignment_id in number,
140 p_sponsor_assignment_id in number,
141 p_date_booking_placed in date);
142 --
143 --
144 --
145 --
146 -- ----------------------------------------------------------------------------
147 -- |--------------------------< check_spon_del_validity >---------------------|
148 -- ----------------------------------------------------------------------------
149 --
150 -- Description: Check whether delegate and sponsor are valid at the time
151 -- of the enrollment and at the time when the event started.
152 -- They must exist as employees around the time periods above.
153 --
154 -- Checks whether organization id is not null and whether :
155 -- if sponsor_person_id is not null then
156 -- sponsor_person_id must exist from before the
157 -- event start date and on the day of the enrollment
158 -- if delegate_person_id is not null then
159 -- delegate_person_id must exist from before the
160 -- event start date and on the day of the enrollment
161 --
162 Procedure check_spon_del_validity(p_event_id in number,
163 p_organization_id in number,
164 p_delegate_person_id in number,
165 p_sponsor_person_id in number,
166 p_date_booking_placed in date);
167 --
168 --
169 --
170 -- ----------------------------------------------------------------------------
171 -- |---------------------------< chk_old_event_changed >------------------------|
172 -- ----------------------------------------------------------------------------
173 -- This procedure will check whether the event id is changed.
174 Procedure chk_old_event_changed
175 (p_booking_id in number
176 ,p_event_id in number
177 ) ;
178
179 --
180 -- ----------------------------------------------------------------------------
181 -- |---------------------------< check_commitment_date >------------------------|
182 -- ----------------------------------------------------------------------------
183 -- This procedure will check whether Event End Date is on or before
184 -- commitment_end_date. If it is, then raise an error.
185 --
186 Procedure check_commitment_date(p_line_id IN NUMBER,
187 p_event_id IN NUMBER);
188
189 --
190 -- ----------------------------------------------------------------------------
191 -- |-------------------------< Check Location >----------------------------|
192 -- ----------------------------------------------------------------------------
193 --
194 -- Description: Check the event location when Inserting or updating. If country
195 -- of the event is the not the same as that of Operating Unit, then raise an error.
196 -- This check is performed only when the profile 'OTA:Restrict Enrollment by Country'
197 -- is set to yes.
198 --
199 --
200 procedure Check_Location(p_event_id IN NUMBER,
201 p_om_org_id IN VARCHAR2) ;
202 --
203 --
204 end ota_tdb_bus2;