DBA Data[Home] [Help]

APPS.WSH_DELIVERY_VALIDATIONS dependencies on WSH_DELIVERY_LEGS

Line 1693: FROM wsh_delivery_legs dg,

1689: dg.net_weight,
1690: dg.weight_uom_code,
1691: dg.volume,
1692: dg.volume_uom_code
1693: FROM wsh_delivery_legs dg,
1694: wsh_new_deliveries dl
1695: WHERE dl.delivery_id = dg.delivery_id AND
1696: dg.delivery_leg_id = p_delivery_leg_id;
1697:

Line 3670: wsh_delivery_legs dg,

3666:
3667: CURSOR stop_status IS
3668: SELECT st.status_code
3669: FROM wsh_trip_stops st,
3670: wsh_delivery_legs dg,
3671: wsh_new_deliveries dl
3672: WHERE dl.delivery_id = p_delivery_id AND
3673: dg.delivery_id = dl.delivery_id AND
3674: st.stop_id = dg.pick_up_stop_id AND

Line 3816: wsh_delivery_legs dg,

3812: CURSOR dropoff_stop_info (l_delivery_id NUMBER) IS
3813: SELECT dg.drop_off_stop_id,
3814: st.stop_location_id
3815: FROM wsh_new_deliveries dl,
3816: wsh_delivery_legs dg,
3817: wsh_trip_stops st
3818: WHERE dl.delivery_id = l_delivery_id AND
3819: dl.delivery_id = dg.delivery_id AND
3820: dg.drop_off_stop_id = st.stop_id AND

Line 3822: /*Refer POD Information from WSH_DELIVERY_LEGS. Bug#1918342*/

3818: WHERE dl.delivery_id = l_delivery_id AND
3819: dl.delivery_id = dg.delivery_id AND
3820: dg.drop_off_stop_id = st.stop_id AND
3821: dl.ultimate_dropoff_location_id = st.stop_location_id;
3822: /*Refer POD Information from WSH_DELIVERY_LEGS. Bug#1918342*/
3823: CURSOR check_POD (l_stop_id NUMBER, l_delivery_id NUMBER) IS
3824: SELECT dg.pod_flag
3825: FROM wsh_delivery_legs dg,
3826: wsh_document_instances di

Line 3825: FROM wsh_delivery_legs dg,

3821: dl.ultimate_dropoff_location_id = st.stop_location_id;
3822: /*Refer POD Information from WSH_DELIVERY_LEGS. Bug#1918342*/
3823: CURSOR check_POD (l_stop_id NUMBER, l_delivery_id NUMBER) IS
3824: SELECT dg.pod_flag
3825: FROM wsh_delivery_legs dg,
3826: wsh_document_instances di
3827: WHERE dg.drop_off_stop_id = l_stop_id AND
3828: di.entity_id = dg.delivery_leg_id AND
3829: di.entity_name = 'WSH_DELIVERY_LEGS' AND

Line 3829: di.entity_name = 'WSH_DELIVERY_LEGS' AND

3825: FROM wsh_delivery_legs dg,
3826: wsh_document_instances di
3827: WHERE dg.drop_off_stop_id = l_stop_id AND
3828: di.entity_id = dg.delivery_leg_id AND
3829: di.entity_name = 'WSH_DELIVERY_LEGS' AND
3830: di.document_type = 'BOL' AND
3831: dg.pod_flag = 'Y' AND
3832: dg.pod_date IS NULL AND
3833: di.status IN ('OPEN','PLANNED');

Line 3843: FROM wsh_delivery_legs

3839: AND rownum = 1;
3840:
3841: CURSOR have_legs(l_delivery_id NUMBER) IS
3842: SELECT delivery_leg_id
3843: FROM wsh_delivery_legs
3844: WHERE delivery_id = l_delivery_id;
3845:
3846: CURSOR delivery_leg_stops(l_delivery_id NUMBER) IS
3847: SELECT dg.pick_up_stop_id,

Line 3851: FROM wsh_delivery_legs dg,

3847: SELECT dg.pick_up_stop_id,
3848: pu_stop.status_code pu_status,
3849: dg.drop_off_stop_id,
3850: do_stop.status_code do_status
3851: FROM wsh_delivery_legs dg,
3852: wsh_trip_stops pu_stop,
3853: wsh_trip_stops do_stop
3854: WHERE dg.delivery_id = l_delivery_id
3855: AND pu_stop.stop_id = dg.pick_up_stop_id

Line 3860: FROM wsh_delivery_legs dg, wsh_new_deliveries nd

3856: AND do_stop.stop_id = dg.drop_off_stop_id;
3857:
3858: CURSOR shared_stops(l_delivery_id NUMBER, l_stop_id NUMBER) IS
3859: SELECT dg.delivery_leg_id
3860: FROM wsh_delivery_legs dg, wsh_new_deliveries nd
3861: WHERE dg.pick_up_stop_id = l_stop_id
3862: AND dg.delivery_id <> l_delivery_id
3863: AND dg.delivery_id = nd.delivery_id
3864: AND nd.delivery_type = 'STANDARD'

Line 3867: FROM wsh_delivery_legs dg, wsh_new_deliveries nd

3863: AND dg.delivery_id = nd.delivery_id
3864: AND nd.delivery_type = 'STANDARD'
3865: UNION
3866: SELECT dg.delivery_leg_id
3867: FROM wsh_delivery_legs dg, wsh_new_deliveries nd
3868: WHERE dg.drop_off_stop_id = l_stop_id
3869: AND dg.delivery_id <> l_delivery_id
3870: AND dg.delivery_id = nd.delivery_id
3871: AND nd.delivery_type = 'STANDARD';

Line 3880: wsh_delivery_legs dg

3876: -- A drop off stop being closed implies that pick up stop is closed.
3877: CURSOR stops_not_closed(l_delivery_id NUMBER) IS
3878: SELECT ts.stop_id
3879: FROM wsh_trip_stops ts,
3880: wsh_delivery_legs dg
3881: WHERE dg.delivery_id = l_delivery_id
3882: AND ts.stop_id = dg.drop_off_stop_id
3883: AND ts.status_code in ('OP', 'AR')
3884: AND rownum = 1;

Line 3888: l_pod_flag wsh_delivery_legs.pod_flag%TYPE;

3884: AND rownum = 1;
3885:
3886: l_stop_id NUMBER;
3887: l_stop_location_id NUMBER;
3888: l_pod_flag wsh_delivery_legs.pod_flag%TYPE;
3889: leg delivery_leg_stops%ROWTYPE;
3890: num NUMBER;
3891: shared_flag BOOLEAN;
3892:

Line 4161: wsh_delivery_legs dg

4157: -- A drop off stop being closed implies that pick up stop is closed.
4158: CURSOR stops_not_closed(p_delivery_id NUMBER, p_stop_id NUMBER) IS
4159: SELECT 1
4160: FROM wsh_trip_stops ts,
4161: wsh_delivery_legs dg
4162: WHERE dg.delivery_id = p_delivery_id
4163: AND ts.stop_id = dg.drop_off_stop_id
4164: AND ts.stop_id <> p_stop_id
4165: AND ts.status_code in ('OP', 'AR')

Line 4169: /*Refer POD Information from WSH_DELIVERY_LEGS. Bug#1918342*/

4165: AND ts.status_code in ('OP', 'AR')
4166: AND rownum = 1;
4167: --
4168: --
4169: /*Refer POD Information from WSH_DELIVERY_LEGS. Bug#1918342*/
4170: --
4171: -- Check if POD has been pending (pod_date null)
4172: --
4173: CURSOR check_POD (p_stop_id NUMBER) IS

Line 4175: FROM wsh_delivery_legs dg,

4171: -- Check if POD has been pending (pod_date null)
4172: --
4173: CURSOR check_POD (p_stop_id NUMBER) IS
4174: SELECT 1
4175: FROM wsh_delivery_legs dg,
4176: wsh_document_instances di
4177: WHERE dg.drop_off_stop_id = p_stop_id
4178: AND di.entity_id = dg.delivery_leg_id
4179: AND di.entity_name = 'WSH_DELIVERY_LEGS'

Line 4179: AND di.entity_name = 'WSH_DELIVERY_LEGS'

4175: FROM wsh_delivery_legs dg,
4176: wsh_document_instances di
4177: WHERE dg.drop_off_stop_id = p_stop_id
4178: AND di.entity_id = dg.delivery_leg_id
4179: AND di.entity_name = 'WSH_DELIVERY_LEGS'
4180: AND di.document_type = 'BOL'
4181: AND dg.pod_flag = 'Y'
4182: AND dg.pod_date IS NULL
4183: AND di.status IN ('OPEN','PLANNED');

Line 4195: FROM wsh_delivery_legs

4191: --
4192: --
4193: CURSOR have_legs (p_delivery_id NUMBER) IS
4194: SELECT 1
4195: FROM wsh_delivery_legs
4196: WHERE delivery_id = p_delivery_id
4197: AND rownum = 1;
4198: --
4199: --

Line 4206: FROM wsh_delivery_legs wdl,

4202: --
4203: CURSOR shared_stops_csr (p_delivery_id NUMBER)
4204: IS
4205: SELECT 1
4206: FROM wsh_delivery_legs wdl,
4207: wsh_Trip_stops wts
4208: WHERE wdl.delivery_id = p_delivery_id
4209: AND (
4210: wdl.pick_up_stop_id = wts.stop_id

Line 4217: FROM wsh_delivery_legs wdl1, wsh_new_deliveries wnd

4213: AND wts.status_code <> 'CL'
4214: AND EXISTS
4215: (
4216: SELECT 1
4217: FROM wsh_delivery_legs wdl1, wsh_new_deliveries wnd
4218: WHERE wdl1.delivery_id <> p_delivery_id
4219: AND wdl1.delivery_id = wnd.delivery_id
4220: AND wnd.delivery_type = 'STANDARD'
4221: AND (

Line 4591: FROM wsh_delivery_legs

4587: FOR UPDATE NOWAIT;
4588:
4589: CURSOR leg_info IS
4590: SELECT delivery_leg_id
4591: FROM wsh_delivery_legs
4592: WHERE delivery_id = p_delivery_id
4593: FOR UPDATE NOWAIT;
4594:
4595: CURSOR freight_costs_exist IS

Line 5042: FROM wsh_delivery_legs

5038:
5039: CURSOR has_delivery_legs
5040: IS
5041: SELECT delivery_leg_id
5042: FROM wsh_delivery_legs
5043: WHERE delivery_id = p_delivery_id
5044: AND ROWNUM=1;
5045:
5046: l_detail_id NUMBER;

Line 6144: FROM wsh_delivery_legs

6140: ) RETURN VARCHAR2 IS
6141:
6142: cursor check_assigned(c_delivery_id in number) is
6143: select delivery_id
6144: FROM wsh_delivery_legs
6145: WHERE delivery_id = c_delivery_id
6146: AND rownum = 1;
6147:
6148: l_delivery_id NUMBER;

Line 6314: from wsh_delivery_legs pleg,

6310: l_delivery_type wsh_new_deliveries.delivery_type%type;
6311:
6312: CURSOR cur_check_consol_delivery (p_delivery_id IN NUMBER) IS
6313: select 1
6314: from wsh_delivery_legs pleg,
6315: wsh_delivery_legs cleg
6316: where pleg.delivery_leg_id = cleg.parent_delivery_leg_id
6317: and cleg.delivery_id = p_delivery_id;
6318:

Line 6315: wsh_delivery_legs cleg

6311:
6312: CURSOR cur_check_consol_delivery (p_delivery_id IN NUMBER) IS
6313: select 1
6314: from wsh_delivery_legs pleg,
6315: wsh_delivery_legs cleg
6316: where pleg.delivery_leg_id = cleg.parent_delivery_leg_id
6317: and cleg.delivery_id = p_delivery_id;
6318:
6319: l_dummy number;

Line 10582: wsh_delivery_legs wdl,

10578: cursor l_pick_up_leg_csr( p_del_id IN VARCHAR2,
10579: p_pickup_locn_id IN NUMBER) is
10580: select wt.name, wnd.name
10581: from wsh_new_deliveries wnd,
10582: wsh_delivery_legs wdl,
10583: wsh_trip_stops wts,
10584: wsh_trips wt
10585: where wnd.delivery_id = p_del_id
10586: and wnd.delivery_id = wdl.delivery_id

Line 10599: wsh_delivery_legs wdl,

10595: cursor l_drop_off_leg_csr( p_del_id IN VARCHAR2,
10596: p_dropoff_locn_id IN NUMBER) is
10597: select wt.name, wnd.name
10598: from wsh_new_deliveries wnd,
10599: wsh_delivery_legs wdl,
10600: wsh_trip_stops wts,
10601: wsh_trips wt
10602: where wnd.delivery_id = p_del_id
10603: and wnd.delivery_id = wdl.delivery_id

Line 12674: wsh_delivery_legs wdl,

12670: SELECT wt.trip_id,
12671: wt.name,
12672: wt.status_code
12673: FROM wsh_trip_stops wts,
12674: wsh_delivery_legs wdl,
12675: wsh_trips wt,
12676: wsh_new_deliveries wnd
12677: WHERE wnd.delivery_id = p_del_id
12678: AND wdl.delivery_id = wnd.delivery_id