1 PACKAGE PO_SHIPMENTS_SV2 AUTHID CURRENT_USER AS
2 /* $Header: POXPOS2S.pls 115.3 2002/11/23 02:42:45 sbull ship $*/
3
4 /*===========================================================================
5 FUNCTION NAME: get_number_shipments
6
7 DESCRIPTION: Gets the number of shipments for a Planned
8 or Blanket purchase order line.
9
10 PARAMETERS: X_po_line_id IN NUMBER,
11 X_shipment_type IN VARCHAR2
12
13 DESIGN REFERENCES:
14
15
16 ALGORITHM:
17
18 NOTES:
19
20 OPEN ISSUES:
21
22 CLOSED ISSUES:
23
24 CHANGE HISTORY: KPOWELL 5/1 Created
25
26 ===========================================================================*/
27 FUNCTION get_number_shipments
28 (X_po_line_id IN NUMBER,
29 X_shipment_type IN VARCHAR2) RETURN NUMBER;
30
31 /*===========================================================================
32 FUNCTION NAME: val_release_shipments
33
34 DESCRIPTION: Validates if there are any release shipments
35 created. If there is, we return failure.
36
37 PARAMETERS: X_po_line_id IN NUMBER,
38 X_shipment_type IN VARCHAR2
39
40 DESIGN REFERENCES:
41
42
43 ALGORITHM:
44
45 NOTES:
46
47 OPEN ISSUES:
48
49 CLOSED ISSUES:
50
51 CHANGE HISTORY: KPOWELL 5/2 Created
52
53 ===========================================================================*/
54 FUNCTION val_release_shipments
55 (X_po_line_id IN NUMBER,
56 X_shipment_type IN VARCHAR2) RETURN BOOLEAN;
57
58
59
60 /*===========================================================================
61 PROCEDURE NAME: get_shipment_status
62
63 DESCRIPTION: Gets the status flags of the shipment including:
64 approved,
65 cancelled,
66 closed,
67 encumbered
68
69 PARAMETERS:
70
71 DESIGN REFERENCES: X_line_location_id IN NUMBER
72 X_shipment_type IN VARCHAR2
73 X_approved_flag IN OUT VARCHAR2
74 X_encumbered_flag IN OUT VARCHAR2
75 X_closed_code IN OUT VARCHAR2
76 X_cancelled_flag IN OUT VARCHAR2
77
78 ALGORITHM:
79
80 NOTES:
81
82 OPEN ISSUES:
83
84 CLOSED ISSUES:
85
86 CHANGE HISTORY: KPOWELL 5/1 Created
87
88 ===========================================================================*/
89 PROCEDURE get_shipment_status
90 (X_po_line_id IN NUMBER,
91 X_shipment_type IN VARCHAR2,
92 X_line_location_id IN NUMBER,
93 X_approved_flag IN OUT NOCOPY VARCHAR2,
94 X_encumbered_flag IN OUT NOCOPY VARCHAR2,
95 X_closed_code IN OUT NOCOPY VARCHAR2,
96 X_cancelled_flag IN OUT NOCOPY VARCHAR2);
97
98 /*===========================================================================
99 FUNCTION NAME: update_shipment_quantity
100
101 DESCRIPTION: Updates the quantity on the shipment
102 to be same as it is on the purchase
103 order line.
104
105 PARAMETERS:
106
107 DESIGN REFERENCES: X_line_location_id IN NUMBER
108 X_shipment_type IN VARCHAR2
109 X_line_quantity IN NUMBER
110
111
112 ALGORITHM:
113
114 NOTES:
115
116 OPEN ISSUES: Should we be checking finally closed? DEBUG.
117 (5/1 - KP)
118
119 CLOSED ISSUES:
120
121 CHANGE HISTORY: KPOWELL 5/1 Created
122
123 ===========================================================================*/
124 FUNCTION update_shipment_qty
125 (X_line_location_id IN NUMBER,
126 X_shipment_type IN VARCHAR2,
127 X_line_quantity IN NUMBER) RETURN BOOLEAN;
128
129 /*===========================================================================
130 FUNCTION NAME: val_ship_qty
131
132 DESCRIPTION: Validates if the shipment quantity can
133 be updated with a planned or standard
134 purchase order line quantity is updated.
135
136 PARAMETERS: X_po_line_id IN NUMBER
137 X_shipment_type IN VARCHAR2
138 X_line_quantity IN NUMBER
139
140 DESIGN REFERENCES:
141
142
143 ALGORITHM: If this is not a standard or planned purchase
144 order, do not update the shipment quantity.
145
146 Get the number of shipments.
147
148 If there is more than one shipment, do
149 not update the shipment quantity.
150
151 Get the status of the shipment.
152
153 If the shipment is cancelled or encumbered,
154 do not update the shipment quantity.
155
156 Otherwise, update the shipment quantity.
157
158 NOTES:
159
160 OPEN ISSUES: Should we be checking finally closed? DEBUG.
161 (KP - 5/1)
162
163 CLOSED ISSUES:
164
165 CHANGE HISTORY: KPOWELL 5/1 Created
166
167 ===========================================================================*/
168 FUNCTION val_ship_qty
169 (X_po_line_id IN NUMBER,
170 X_shipment_type IN VARCHAR2,
171 X_line_quantity IN NUMBER) RETURN BOOLEAN;
172
173
174 /*===========================================================================
175 FUNCTION NAME: val_ship_price
176
177 DESCRIPTION: Validates if the shipment price can be
178 updated and calls the routine to update
179 the shipment price.
180
181 PARAMETERS: X_po_line_id IN NUMBER
182 X_shipment_type IN VARCHAR2
183 X_unit_price IN NUMBER
184
185 DESIGN REFERENCES:
186
187
188 ALGORITHM: If this is anything but a standard or planned purchase
189 order, the price on the shipment cannot be updated.
190
191 If it is a standard or planned purchase order, update
192 the price.
193
194 NOTES:
195
196 OPEN ISSUES: Should we be checking finally closed? DEBUG.
197 (5/1 - KP)
198
199 CLOSED ISSUES:
200
201 CHANGE HISTORY: KPOWELL 5/1 Created
202
203 ===========================================================================*/
204 FUNCTION val_ship_price
205 (X_po_line_id IN NUMBER,
206 X_shipment_type IN VARCHAR2,
207 X_unit_price IN NUMBER ) RETURN BOOLEAN;
208
209
210
211 /*===========================================================================
212 FUNCTION NAME: update_shipment_price
213
214 DESCRIPTION: Updates the price of the shipment. This is
215 called when a standard or planned purchase
216 order line is updated. This should
217 only be done if the shipment is not
218 cancelled.
219
220 PARAMETERS: X_po_line_id IN NUMBER
221 X_shipment_type IN VARCHAR2
222 X_unit_price IN NUMBER
223
224 DESIGN REFERENCES:
225
226
227 ALGORITHM:
228
229 NOTES:
230
231 OPEN ISSUES:
232
233 CLOSED ISSUES:
234
235 CHANGE HISTORY: KPOWELL 5/1 Created
236
237 ===========================================================================*/
238 FUNCTION update_shipment_price
239 (X_po_line_id IN NUMBER,
240 X_shipment_type IN VARCHAR2,
241 X_unit_price IN NUMBER) RETURN BOOLEAN;
242
243
244 /*===========================================================================
245 --togeorge 05/18/2001
246 --Bug# 1712919
247 PROCEDURE NAME: get_drop_ship_cust_locations
248 On enter po and release forms ship to location code
249 is required column. Since hz_locations does not
250 store location_code and corresponding location
251 code is null in hr_locations table, when a drop
252 ship PO/Rel is queried in the form the user wont
253 be allowed to save the records. So this procedure
254 gets the concatenated address1 and city from
255 hz_locations table for this specific condition.
256 Called from POXPOPOS.pld(post_query)
257
258 ===========================================================================*/
259 PROCEDURE get_drop_ship_cust_locations
260 (x_ship_to_location_id IN NUMBER,
261 x_ship_to_location_code IN OUT NOCOPY VARCHAR2);
262
263
264 END PO_SHIPMENTS_SV2;