1 PACKAGE WSH_SC_DELIVERY_PVT AUTHID CURRENT_USER as
2 /* $Header: WSHSDELS.pls 115.4 99/07/16 08:21:13 porting ship $ */
3
4 --Package Name WSH_SC_DELIVERY_PVT
5
6 --Purpose
7 -- This package performs all the server side processing
8 -- required for the different delivery actions like close,
9 -- pack, unpack, backorder.
10
11 --History
12 -- Version 1.0 01/29/97 Raghu Manjunath
13 --
14
15 -- flag to indicate if edi is installed or not
16 -- valid values: 'U' - undefined
17 -- 'N' - not installed
18 -- 'Y' - installed
19 edi_installed_flag VARCHAR2(1) := 'U';
20
21 -- Function Name : Close_Delivery
22
23 -- Purpose :
24 -- To process Ship_all and Ship_entered actions on a Delivery
25
26 -- Parameters :
27 -- 1. Del_Id IN NUMBER
28 -- - delivery id we are working with
29 -- 2. Action_Code IN VARCHAR2
30 -- -ALL for Ship All
31 -- -ENTERED for Ship Entered
32 -- 3. default_fcc
33 -- - Default Freight Carrier Code for AutoCreate Departure purpose
34 -- 4. default_bol
35 -- - Default Bill Of Lading for AutoCreate Departure purpose
36 -- 5. default_actual_date
37 -- - Default actual departure date for AutoCreate Departure purpose
38
39 -- Return Value : BOOLEAN
40 --
41 FUNCTION Close_Delivery(Del_Id IN NUMBER,
42 Action_Code IN VARCHAR2,
43 default_fcc IN VARCHAR2,
44 default_bol IN VARCHAR2,
45 p_vehicle_item_id IN NUMBER DEFAULT NULL,
46 p_vehicle_number IN VARCHAR2 DEFAULT NULL,
47 p_seal_code IN VARCHAR2 DEFAULT NULL,
48 p_volume_uom IN VARCHAR2 DEFAULT NULL,
49 p_volume_total IN NUMBER DEFAULT NULL,
50 p_weight_uom IN VARCHAR2 DEFAULT NULL,
51 p_gross_wt IN NUMBER DEFAULT NULL,
52 p_tare_wt IN NUMBER DEFAULT NULL,
53 p_pack_instr IN VARCHAR2 DEFAULT NULL,
54 default_actual_date IN DATE DEFAULT SYSDATE)
55 RETURN BOOLEAN;
56
57 -- The message will be returned to show to user in parameter x_return_msg
58 FUNCTION Print_Shipping_Doc_Set( x_del_id IN NUMBER,
59 x_doc_set_id IN NUMBER,
60 x_return_msg OUT VARCHAR2 )
61 RETURN BOOLEAN;
62
63
64 -- Function Name : Backorder_Delivery
65
66 -- Purpose :
67 -- To process Backorder_all action on a Delivery
68
69 -- Parameters :
70 -- 1. Del_Id IN NUMBER
71 -- - delivery id we are working with
72
73 -- Return Value : BOOLEAN
74 --
75 FUNCTION Backorder_Delivery ( Del_Id IN NUMBER)
76 RETURN BOOLEAN;
77
78
79 -- Function Name : Unpack_Delivery
80
81 -- Purpose :
82 -- To process the unpacking action on a Delivery
83
84 -- Parameters :
85 -- 1. Del_Id IN NUMBER
86 -- - delivery id we are working with
87 -- 2. Source_Code IN VARCHAR2
88
89 -- Return Value : BOOLEAN
90 --
91 FUNCTION Unpack_Delivery (Del_Id IN NUMBER) RETURN BOOLEAN;
92
93 -- Procedure Name : Update_Del_Status
94
95 -- Purpose :
96 -- Updates the status code on a delivery to the required value
97
98 -- Parameters :
99 -- 1. Del_Id IN NUMBER
100 -- - delivery id we are working with
101 -- 2. Del_Status_Code
102 -- - status to which we want the delivery to be updated
103 PROCEDURE Update_Del_Status ( Del_Id IN NUMBER,
104 Del_Status_Code IN VARCHAR2);
105
106 -- Procedure Name : Insert_Ph_Row
107
108 -- Purpose :
109 -- Inserts a New Picking Header record in so_picking_headers
110
111 -- Parameters :
112 -- 1. Ph_Id IN NUMBER
113 -- - Picking Header record from which the new picking header
114 -- record is to be created
115 -- 2. New_Ph_Id IN NUMBER
116 -- - Picking Header Id for the New picking header record
117 PROCEDURE Insert_Ph_Row ( Ph_Id IN NUMBER,
118 New_Ph_Id IN NUMBER);
119
120 -- Procedure Name : Insert_Pl_Row
121
122 -- Purpose :
123 -- Inserts a new picking line record in so_picking_lines_all
124
125 -- Parameters :
126 -- 1. Pl_Id IN NUMBER
127 -- - picking line record from which the new picking line
128 -- record is created
129 -- 2. New_Pl_Id IN NUMBER
130 -- - picking line id for the new picking line record
131 -- 3. New_Ph_Id IN NUMBER
132 -- - Picking Header Id for the New picking header record
133 PROCEDURE Insert_Pl_Row ( Pl_Id IN NUMBER,
134 New_Pl_Id IN NUMBER,
135 New_Ph_Id IN NUMBER);
136
137 -- Procedure Name : Split_Picking_Headers
138
139 -- Purpose :
140 -- Splits Picking Headers and associated Picking Lines if
141 -- necessary while closing a delivery.
142
143 -- Parameters :
144 -- 1. Del_Id IN NUMBER
145 -- - delivery id we are working with
146 PROCEDURE Split_Picking_Headers (Del_Id IN NUMBER);
147
148
149 -- Function Name : Auto_Create_Departure
150
151 -- Purpose :
152 -- To Create a departure and assign it to a delivery if the
153 -- delivery is not already associated with a departure
154
155 -- Parameters :
156 -- All the parameters refer to the values on the delivery
157 -- for which we are creating the departure
158 -- 1. Org_Id IN Number
159 -- 2. Freight_Carrier IN Varchar2
160 -- 3. Weight_UOM IN Varchar2
161 -- 4. Volume_UOM IN Varchar2
162 -- 5. Weight_of_Delivery IN Number
163 -- 6. Volume_of_Delivery IN Number
164
165 -- Return Value : Number - the departure id of the created
166 -- departure
167 --
168 FUNCTION Auto_Create_Departure (
169 Org_Id IN Number,
170 Freight_Carrier IN Varchar2,
171 Weight_UOM IN Varchar2,
172 Volume_UOM IN Varchar2,
173 Weight_of_Delivery IN Number,
174 p_tare_wt IN Number,
175 Volume_of_Delivery IN Number,
176 p_vehicle_item_id IN Number,
177 p_vehicle_number IN Varchar2,
178 p_seal_code IN Varchar2,
179 p_pack_instr IN Varchar2,
180 bol IN VARCHAR2,
181 actual_date IN DATE DEFAULT SYSDATE,
182 dep_name IN VARCHAR2 DEFAULT NULL)
183 RETURN NUMBER;
184
185 -- Function Name : Delete_Container_Contents
186
187 -- Purpose :
188
189 -- Parameters : X_Contaier_Id IN Number
190
191 -- Return Value : Boolean
192
193 FUNCTION Delete_Container_Contents( x_container_id IN NUMBER)
194 RETURN BOOLEAN;
195
196 END WSH_SC_DELIVERY_PVT;