1 PACKAGE WSH_DELIVERY_LEGS_ACTIONS as
2 /* $Header: WSHDGACS.pls 120.0 2005/05/26 18:14:45 appldev noship $ */
3 /* H integration anxsharm added new parameters for assign deliveries
4 of stop sequence number */
5 --
6 -- Procedure: Assign Deliveries
7 -- Parameters: p_del_rows
8 -- p_trip_id
9 -- p_pickup_stop_id
10 -- p_pickup_stop_seq
11 -- p_dropoff_stop_id
12 -- p_dropoff_stop_seq
13 -- p_create_flag
14 -- x_return_status
15 -- Description: Used to assign number of deliveries to either a trip
16 -- or a pickup/dropoff stop creating delivery legs and
17 -- where necessary trip stops
18 -- p_del_rows - Table of delivery ids
19 -- p_trip_id - Trip id for assignment
20 -- p_pickup_stop_id - pickup stop id for assignment
21 -- p_dropoff_stop_id - dropoff stop id for assignment
22 -- p_pickup_location_id - pickup location id for assignment (overrides deliveries initial_pickup_location_id)
23 -- p_dropoff_location_id - dropoff location id for assignment (overrides deliveries ultimate dropoff location id)
24 -- p_create_flag - Creates new trip stops if set to 'Y'
25 -- x_leg_rows - table of delivery leg ids for assignment
26 -- x_return_status - Returns FND_API.G_RET_STS_[SUCCESS/ERROR/UNEXP_ERROR]
27 --
28
29 PROCEDURE Assign_Deliveries
30 (p_del_rows IN wsh_util_core.id_tab_type,
31 p_trip_id IN NUMBER := NULL,
32 p_pickup_stop_id IN NUMBER := NULL,
33 p_pickup_stop_seq IN NUMBER := NULL,
34 p_dropoff_stop_id IN NUMBER := NULL,
35 p_dropoff_stop_seq IN NUMBER := NULL,
36 p_pickup_location_id IN NUMBER := NULL,
37 p_dropoff_location_id IN NUMBER := NULL,
38 p_create_flag IN VARCHAR2 := NULL,
39 x_leg_rows OUT NOCOPY wsh_util_core.id_tab_type,
40 x_return_status OUT NOCOPY VARCHAR2,
41 --tkt
42 p_caller IN VARCHAR2 DEFAULT NULL,
43 p_pickup_arr_date IN DATE := to_date(NULL),
44 p_pickup_dep_date IN DATE := to_date(NULL),
45 p_dropoff_arr_date IN DATE := to_date(NULL),
46 p_dropoff_dep_date IN DATE := to_date(NULL),
47 p_sc_pickup_date IN DATE DEFAULT NULL,
48 p_sc_dropoff_date IN DATE DEFAULT NULL
49 );
50
51
52 --
53 -- Procedure: Unassign_Deliveries
54 -- Parameters: p_del_rows
55 -- p_trip_id
56 -- p_pickup_stop_id
57 -- p_dropoff_stop_id
58 -- x_return_status
59 -- Description: This procedure will unassign deliveries from a
60 -- trip or pickup/dropoff location. Same description as above for parameters
61 --
62 PROCEDURE Unassign_Deliveries
63 (p_del_rows IN wsh_util_core.id_tab_type,
64 p_trip_id IN NUMBER := NULL,
65 p_pickup_stop_id IN NUMBER := NULL,
66 p_dropoff_stop_id IN NUMBER := NULL,
67 x_return_status OUT NOCOPY VARCHAR2 );
68
69 --
70 -- Procedure: Set_Load_Tender
71 -- Parameters: p_del_leg_rows - Delivery_leg_id of delivery to perform
72 -- load tender action
73 -- p_action - action to be performed
74 -- x_return_status - status of procedure call
75 -- Description: This procedure will set the load_tender_flag based
76 -- on p_action values of
77 -- TENDER - sets load_tender_flag 'L'
78 -- CANCEL - sets load_tender_flag 'N'
79 -- ACCEPT - sets load_tender_flag 'A'
80 -- REJECT - sets load_tender_flag 'R'
81 --
82 -- COMMENTING OUT AS LOAD TENDER FUNCTIONALITY IS BEING TEMPORARILY REMOVED
83 /*
84 PROCEDURE Set_Load_Tender
85 ( p_del_leg_rows IN wsh_util_core.id_tab_type,
86 p_action IN VARCHAR2,
87 x_return_status OUT NOCOPY VARCHAR2);
88 */
89
90 /* H integration: Pricing integration csun
91 */
92 --
93 -- Name Mark_Reprice_Required
94 -- Purpose This procedure will set REPRICE_REQUIRED_FLAG of
95 -- delivery leg record
96 --
97 -- Input Arguments
98 -- p_entity_type: entity type, valid values are
99 -- 'DELIVERY_DETAIL', 'DELIVERY', 'STOP', 'TRIP',
100 -- 'DELIVERY_LEG'
101 -- p_entity_id : the entity id of the entity type
102 --
103 PROCEDURE Mark_Reprice_Required(
104 p_entity_type IN VARCHAR2,
105 p_entity_ids IN WSH_UTIL_CORE.id_tab_type,
106 p_consolidation_change IN VARCHAR2 DEFAULT 'N',
107 x_return_status OUT NOCOPY VARCHAR2) ;
108
109
110 --
111 -- J-IB-NPARIKH-{
112
113 C_PICKUP_STOP CONSTANT VARCHAR2(30) := 'PICKUP';
114 C_DROPOFF_STOP CONSTANT VARCHAR2(30) := 'DROPOFF';
115 --
116
117 -- FUNCTION: Check_Rate_Delivery
118 -- PARAMETERS: p_delivery_id, p_freight_terms_code, p_shipment_direction
119 -- DESCRIPTION: This API will take in a delivery id or the shipment direction and freight code
120 -- of a delivery. It will return values of 'Y' or 'N' depending on whether the delivery
121 -- needs to be rated or does not need to be rated based on the global parameter values.
122
123
124 FUNCTION Check_Rate_Delivery (p_delivery_id IN NUMBER,
125 p_freight_terms_code VARCHAR2,
126 p_shipment_direction VARCHAR2,
127 x_return_status out nocopy VARCHAR2)
128 RETURN VARCHAR2;
129
130
131
132 END WSH_DELIVERY_LEGS_ACTIONS;
133