382: hps.creation_date Cdate,
383: 'CUSTOMER' Company_Type
384: FROM wsh_locations wl, hz_party_sites hps, hz_parties hp,
385: hz_cust_acct_sites_all hcas, fte_location_parameters flp,
386: wsh_location_owners wlo
387: WHERE wl.wsh_location_id = flp.location_id(+)
388: AND wl.wsh_location_id = wlo.wsh_location_id
389: AND wlo.owner_type = 2
390: AND wlo.owner_party_id = hp.party_id
603: x_error_msg OUT NOCOPY VARCHAR2) IS
604:
605: CURSOR get_location_owner(c_location_id IN NUMBER) IS
606: SELECT owner_type
607: FROM wsh_location_owners
608: WHERE wsh_location_id = c_location_id
609: AND rownum = 1;
610:
611: CURSOR get_uom_class(c_uom_code IN VARCHAR2) IS
778: l_facility_codes(g_cur_index) := l_facility_description;
779:
780: -- Derive mileage_flag for a location depending on company type
781: -- from WSH global parameters
782: -- use wsh_location_owners to get the location company type
783: l_include_mileage_flag(g_cur_index) := 'N';
784:
785: OPEN get_location_owner(l_loc_id);
786: FETCH get_location_owner INTO l_owner_type;