434:
435: CURSOR trip_deliveries (l_trip_id IN NUMBER) IS
436: SELECT delivery_id
437: FROM wsh_delivery_legs wdl,
438: wsh_trip_stops wts
439: WHERE wts.trip_id = l_trip_id
440: AND wdl.pick_up_stop_id = wts.stop_id;
441:
442: CURSOR get_trip_stops ( c_trip_id IN NUMBER) IS
439: WHERE wts.trip_id = l_trip_id
440: AND wdl.pick_up_stop_id = wts.stop_id;
441:
442: CURSOR get_trip_stops ( c_trip_id IN NUMBER) IS
443: SELECT stop_id FROM wsh_trip_stops WHERE trip_id = c_trip_id;
444:
445: --OTM R12, glog proj
446: CURSOR c_get_trip_status (p_trip_id IN NUMBER) IS
447: SELECT NVL(ignore_for_planning, 'N'),
589: DELETE FROM wsh_freight_costs WHERE stop_id = l_stop_id;
590: end loop;
591: close get_trip_stops;
592:
593: DELETE FROM wsh_trip_stops
594: WHERE trip_id = l_trip_id;
595:
596: --
597: -- DBI Project
594: WHERE trip_id = l_trip_id;
595:
596: --
597: -- DBI Project
598: -- DELETE from WSH_TRIP_STOPS.
599: -- Call DBI API after the DELETE.
600: -- This API will also check for DBI Installed or not
601: IF l_debug_on THEN
602: WSH_DEBUG_SV.log(l_module_name,'Calling DBI API.Detail Count -',l_stop_tab.count);
723: l_rowid VARCHAR2(30);
724:
725: CURSOR c_iscarriersmcchanged IS
726: SELECT wnd.organization_id, wnd.name
727: FROM wsh_new_deliveries wnd, wsh_trip_stops wts, wsh_delivery_legs wdl
728: WHERE wnd.delivery_id=wdl.delivery_id
729: and wdl.pick_up_stop_id=wts.stop_id
730: and wts.trip_id = p_trip_info.trip_id
731: and (carrier_id <> p_trip_info.carrier_id