1 PACKAGE PO_VENDOR_SITES_SV AS
2 /* $Header: POXVDVSS.pls 120.1 2006/08/14 17:58:12 tpoon noship $*/
3
4
5 FUNCTION get_vendor_site_id -- <GA FPI>
6 ( p_po_header_id IN PO_HEADERS_ALL.po_header_id%TYPE
7 ) RETURN PO_HEADERS_ALL.vendor_site_id%TYPE;
8
9 /*===========================================================================
10 FUNCTION NAME: val_vendor_site_id()
11
12 DESCRIPTION: This function checks whether a given Supplier Site
13 is still active. For Purchase Orders, it also
14 confirms that the Site is not specified as
15 "RFQ Only."
16
17
18 PARAMETERS: X_document_type IN VARCHAR2,
19 X_vendor_site_id IN NUMBER
20
21 RETURN TYPE: BOOLEAN
22
23 DESIGN REFERENCES:
24
25 ALGORITHM:
26
27 NOTES:
28
29 OPEN ISSUES:
30
31 CLOSED ISSUES:
32
33 CHANGE HISTORY: Created 09-JUL-1995 LBROADBE
34 Changed to 14-AUG-1995 LBROADBE
35 Function
36 ===========================================================================*/
37 FUNCTION val_vendor_site_id
38 (
39 p_document_type IN VARCHAR2,
40 p_vendor_site_id IN NUMBER,
41 p_org_id IN NUMBER DEFAULT NULL --< Shared Proc FPJ >
42 )
43 return BOOLEAN;
44
45 /*===========================================================================
46 PROCEDURE NAME: get_def_vendor_site()
47
48 DESCRIPTION: If for a given vendor there is only one site,
49 bring that vendor site as the default vendor site.
50
51 PARAMETERS:
52
53 DESIGN REFERENCES: ../POXPOMPO.doc
54
55 ALGORITHM:
56
57 NOTES:
58
59 OPEN ISSUES:
60
61 CLOSED ISSUES:
62
63 CHANGE HISTORY: Sudha Iyer 04/95 Created
64 Melissa Snyder 11/14/95 Added X_document_type
65 parameter.
66 ===========================================================================*/
67
68
69 PROCEDURE get_def_vendor_site(X_vendor_id IN number,
70 X_vendor_site_id OUT NOCOPY number,
71 X_vendor_site_code OUT NOCOPY varchar2,
72 X_document_type IN varchar2);
73
74 /*===========================================================================
75 PROCEDURE NAME: get_vendor_site_info()
76
77 DESCRIPTION: For a given vendor site,this procedure gets the other
78 attributes of that vendor site.
79
80 PARAMETERS:
81
82 DESIGN REFERENCES: ../POXPOMPO.doc
83 ../POXSCERQ.dd
84
85 ALGORITHM:
86
87 NOTES:
88
89 OPEN ISSUES:
90
91 CLOSED ISSUES:
92
93 CHANGE HISTORY:
94 ===========================================================================*/
95
96 PROCEDURE get_vendor_site_info(X_vendor_site_id IN number,
97 X_vs_ship_to_location_id IN OUT NOCOPY number,
98 X_vs_bill_to_location_id IN OUT NOCOPY number,
99 X_vs_ship_via_lookup_code IN OUT NOCOPY varchar2,
100 X_vs_fob_lookup_code IN OUT NOCOPY varchar2,
101 X_vs_pay_on_code IN OUT NOCOPY varchar2,
102 X_vs_freight_terms_lookup_code IN OUT NOCOPY varchar2,
103 X_vs_terms_id IN OUT NOCOPY number,
104 X_vs_invoice_currency_code IN OUT NOCOPY varchar2,
105 x_vs_shipping_control IN OUT NOCOPY VARCHAR2 -- <INBOUND LOGISTICS FPJ>
106 );
107
108 /*===========================================================================
109 PROCEDURE NAME: val_vendor_site()
110
111 DESCRIPTION:
112 o DEF - If there is only one purchasing site for this vendor, default the vendor site.
113 only those vendor sites are valid for input that are purchasing
114 sites and are not rfq only sites.
115 PARAMETERS:
116
117 DESIGN REFERENCES: ../POXPOMPO.doc
118
119 ALGORITHM:
120
121 NOTES:
122
123 OPEN ISSUES:
124
125 CLOSED ISSUES:
126
127 CHANGE HISTORY:
128 ===========================================================================*/
129 PROCEDURE val_vendor_site (X_vendor_id IN number,
130 X_vendor_site_id IN number,
131 X_org_id IN number,
132 X_set_of_books_id IN number,
133 X_res_ship_to_loc_id IN OUT NOCOPY number,
134 X_ship_to_loc_dsp IN OUT NOCOPY varchar2,
135 X_ship_org_code IN OUT NOCOPY varchar2,
136 X_ship_org_name IN OUT NOCOPY varchar2,
137 X_ship_org_id IN OUT NOCOPY number,
138 X_res_bill_to_loc_id IN OUT NOCOPY number ,
139 X_bill_to_loc_dsp IN OUT NOCOPY varchar2,
140 X_res_fob IN OUT NOCOPY varchar2,
141 X_res_pay_on_code IN OUT NOCOPY varchar2,
142 X_res_ship_via IN OUT NOCOPY varchar2 ,
143 X_res_freight_terms IN OUT NOCOPY varchar2 ,
144 X_res_terms_id IN OUT NOCOPY number,
145 X_res_invoice_currency_code IN OUT NOCOPY varchar2,
146 X_fob_dsp IN OUT NOCOPY varchar2,
147 X_pay_on_dsp IN OUT NOCOPY varchar2,
148 X_ship_via_dsp IN OUT NOCOPY varchar2,
149 X_freight_terms_dsp IN OUT NOCOPY varchar2,
150 X_terms_dsp IN OUT NOCOPY varchar2 ,
151 X_vendor_contact_id IN OUT NOCOPY number,
152 X_vendor_contact_name IN OUT NOCOPY varchar2,
153 x_res_shipping_control IN OUT NOCOPY VARCHAR2 -- <INBOUND LOGISTICS FPJ>
154 ) ;
155
156
157
158 /*===========================================================================
159 PROCEDURE NAME : get_vendor_site_name()
160
161 DESCRIPTION :
162
163 PARAMETERS:
164
165 RETURN VALUE:
166
167 DESIGN REFERENCES: ../POXPOREL.doc
168
169 ALGORITHM:
170
171 NOTES:
172
173 OPEN ISSUES:
174
175 CLOSED ISSUES:
176
177 CHANGE HISTORY:
178
179 ========================================================================*/
180
181 PROCEDURE get_vendor_site_name
182 (X_vendor_site_id IN NUMBER,
183 X_vendor_site_name IN OUT NOCOPY VARCHAR2);
184
185
186 /*===========================================================================
187 PROCEDURE NAME: derive_vendor_site_info()
188
189 DESCRIPTION: Accepts as input a vendor site record and using the components
190 that have values, derives the values for components that do not have
191 any values (are null)
192
193 PARAMETERS: p_vendor_site_record IN OUT NOCOPY RCV_SHIPMENT_HEADER_SV.VendorSiteRecType
194
195 DESIGN REFERENCES:
196
197 ALGORITHM:
198
199 NOTES: dbms_sql is used to generate the WHERE clause based on components that
200 have values
201
202 OPEN ISSUES:
203
204 CLOSED ISSUES:
205
206 CHANGE HISTORY: 10/24 Raj Bhakta
207 ===========================================================================*/
208
209 PROCEDURE derive_vendor_site_info(
210 p_vendor_site_record IN OUT NOCOPY RCV_SHIPMENT_HEADER_SV.VendorSiteRecType);
211
212
213 /*===========================================================================
214 PROCEDURE NAME: validate_vendor_site_info()
215
216 DESCRIPTION: Accepts as input a vendor site record, validates the
217 components that have values and also some other business rules.
218
219 PARAMETERS: p_vendor_site_record IN OUT NOCOPY RCV_SHIPMENT_HEADER_SV.VendorSiteRecType
220
221 DESIGN REFERENCES:
222
223 ALGORITHM:
224
225 NOTES: dbms_sql is used to generate the WHERE clause based on components that
226 have values
227
228 OPEN ISSUES:
229
230 CLOSED ISSUES:
231
232 CHANGE HISTORY: 10/24 Raj Bhakta
233 ===========================================================================*/
234
235 PROCEDURE validate_vendor_site_info(
236 p_vendor_site_record IN OUT NOCOPY RCV_SHIPMENT_HEADER_SV.VendorSiteRecType,
237 p_remit_to_site_id NUMBER DEFAULT NULL); -- Bug# 3532503
238
239 /* RETROACTIVE FPI START */
240 /*******************************************************************
241 PROCEDURE NAME: Get_Transmission_Defaults
242
243 DESCRIPTION : This procedure get the default transmission method that
244 User has set up in the Supplier Site window.
245
246 Referenced by :
247 parameters : p_document_id - Document header_id
248 p_document_type - Document Type (PO/RELEASE etc)
249 p_preparer_id - Preparer_id of the document.
250 x_default_method - Default supplier communication method
251 set up in the vendor sites.
252 x_email_address - Email address where the email should be
253 sent.
254 x_fax_number - Fax number where the fax should be sent.
255 x_document_num - Document Number.
256 p_retrieve_only_flag - By default, this procedure updates the
257 xml_flag in the database based on whether the vendor site
258 is set up for XML. If this parameter is 'Y', we will not
259 update the database. This is necessary to avoid locking
260 issues from HTML. (Bug 5407459)
261
262 CHANGE History: Created 30-Sep-2002 pparthas
263 *******************************************************************/
264
265 Procedure Get_Transmission_Defaults(p_document_id IN NUMBER,
266 p_document_type IN VARCHAR2,
267 p_document_subtype IN VARCHAR2,
268 p_preparer_id IN OUT NOCOPY NUMBER,
269 x_default_method OUT NOCOPY VARCHAR2,
270 x_email_address OUT NOCOPY VARCHAR2,
271 x_fax_number OUT NOCOPY VARCHAR2,
272 x_document_num OUT NOCOPY VARCHAR2,
273 p_retrieve_only_flag IN VARCHAR2 DEFAULT NULL);
274
275 -- Bug 5407459 Added this procedure.
276 procedure get_transmission_defaults_edi (
277 p_document_id IN NUMBER,
278 p_document_type IN VARCHAR2,
279 p_document_subtype IN VARCHAR2,
280 p_preparer_id IN OUT NOCOPY NUMBER,
281 x_default_method OUT NOCOPY VARCHAR2,
282 x_email_address OUT NOCOPY VARCHAR2,
283 x_fax_number OUT NOCOPY VARCHAR2,
284 x_document_num OUT NOCOPY VARCHAR2,
285 p_retrieve_only_flag IN VARCHAR2 DEFAULT NULL);
286
287 --<Shared Proc FPJ>
288 FUNCTION get_org_id_from_vendor_site(p_vendor_site_id IN NUMBER)
289 RETURN PO_HEADERS_ALL.org_id%TYPE;
290
291 END PO_VENDOR_SITES_SV;
292 /* RETROACTIVE FPI END */