279: l_bill_to_city hz_locations.city%TYPE;
280: l_bill_to_state hz_locations.state%TYPE;
281: l_bill_to_zip hz_locations.postal_code%TYPE;
282: l_bill_to_country hz_locations.country%TYPE;
283: l_ship_to_site_id aso_shipments.ship_to_party_site_id%TYPE;
284: l_ship_to_party_id aso_shipments.ship_to_party_id%TYPE;
285: l_ship_to_cust_account_id aso_shipments.ship_to_cust_account_id%TYPE;
286: l_ship_method_code aso_shipments.ship_method_code%TYPE;
287: l_ship_method varchar2(80);
280: l_bill_to_state hz_locations.state%TYPE;
281: l_bill_to_zip hz_locations.postal_code%TYPE;
282: l_bill_to_country hz_locations.country%TYPE;
283: l_ship_to_site_id aso_shipments.ship_to_party_site_id%TYPE;
284: l_ship_to_party_id aso_shipments.ship_to_party_id%TYPE;
285: l_ship_to_cust_account_id aso_shipments.ship_to_cust_account_id%TYPE;
286: l_ship_method_code aso_shipments.ship_method_code%TYPE;
287: l_ship_method varchar2(80);
288: l_ship_to_party_name hz_parties.party_name%TYPE;
281: l_bill_to_zip hz_locations.postal_code%TYPE;
282: l_bill_to_country hz_locations.country%TYPE;
283: l_ship_to_site_id aso_shipments.ship_to_party_site_id%TYPE;
284: l_ship_to_party_id aso_shipments.ship_to_party_id%TYPE;
285: l_ship_to_cust_account_id aso_shipments.ship_to_cust_account_id%TYPE;
286: l_ship_method_code aso_shipments.ship_method_code%TYPE;
287: l_ship_method varchar2(80);
288: l_ship_to_party_name hz_parties.party_name%TYPE;
289: l_ship_to_name VARCHAR2(400);
282: l_bill_to_country hz_locations.country%TYPE;
283: l_ship_to_site_id aso_shipments.ship_to_party_site_id%TYPE;
284: l_ship_to_party_id aso_shipments.ship_to_party_id%TYPE;
285: l_ship_to_cust_account_id aso_shipments.ship_to_cust_account_id%TYPE;
286: l_ship_method_code aso_shipments.ship_method_code%TYPE;
287: l_ship_method varchar2(80);
288: l_ship_to_party_name hz_parties.party_name%TYPE;
289: l_ship_to_name VARCHAR2(400);
290: l_ship_to_number VARCHAR2(70);
306: FROM hz_locations
307: WHERE location_id = ( SELECT location_id
308: FROM hz_party_sites
309: WHERE party_site_id = p_loc_site_id);
310: Cursor c_aso_shipments(p_quote_id NUMBER) IS
311: SELECT ship_to_cust_account_id, ship_to_party_site_id, ship_to_party_id, ship_method_code
312: FROM aso_shipments
313: WHERE quote_header_id = p_quote_id
314: AND quote_line_id IS NULL
308: FROM hz_party_sites
309: WHERE party_site_id = p_loc_site_id);
310: Cursor c_aso_shipments(p_quote_id NUMBER) IS
311: SELECT ship_to_cust_account_id, ship_to_party_site_id, ship_to_party_id, ship_method_code
312: FROM aso_shipments
313: WHERE quote_header_id = p_quote_id
314: AND quote_line_id IS NULL
315: AND rownum = 1;
316:
488: l_ship_to_site_id := null;
489: l_ship_to_party_id := null;
490: l_ship_method_code := null;
491:
492: FOR c_aso_shipments_rec IN c_aso_shipments(l_quote_id) LOOP
493: l_ship_to_site_id := c_aso_shipments_rec.ship_to_party_site_id;
494: l_ship_to_cust_account_id := c_aso_shipments_rec.ship_to_cust_account_id;
495: l_ship_to_party_id := c_aso_shipments_rec.ship_to_party_id;
496: l_ship_method_code := c_aso_shipments_rec.ship_method_code;
489: l_ship_to_party_id := null;
490: l_ship_method_code := null;
491:
492: FOR c_aso_shipments_rec IN c_aso_shipments(l_quote_id) LOOP
493: l_ship_to_site_id := c_aso_shipments_rec.ship_to_party_site_id;
494: l_ship_to_cust_account_id := c_aso_shipments_rec.ship_to_cust_account_id;
495: l_ship_to_party_id := c_aso_shipments_rec.ship_to_party_id;
496: l_ship_method_code := c_aso_shipments_rec.ship_method_code;
497: END LOOP;
490: l_ship_method_code := null;
491:
492: FOR c_aso_shipments_rec IN c_aso_shipments(l_quote_id) LOOP
493: l_ship_to_site_id := c_aso_shipments_rec.ship_to_party_site_id;
494: l_ship_to_cust_account_id := c_aso_shipments_rec.ship_to_cust_account_id;
495: l_ship_to_party_id := c_aso_shipments_rec.ship_to_party_id;
496: l_ship_method_code := c_aso_shipments_rec.ship_method_code;
497: END LOOP;
498:
491:
492: FOR c_aso_shipments_rec IN c_aso_shipments(l_quote_id) LOOP
493: l_ship_to_site_id := c_aso_shipments_rec.ship_to_party_site_id;
494: l_ship_to_cust_account_id := c_aso_shipments_rec.ship_to_cust_account_id;
495: l_ship_to_party_id := c_aso_shipments_rec.ship_to_party_id;
496: l_ship_method_code := c_aso_shipments_rec.ship_method_code;
497: END LOOP;
498:
499: For c_ship_method_rec in c_ship_methods(l_ship_method_code) LOOP
492: FOR c_aso_shipments_rec IN c_aso_shipments(l_quote_id) LOOP
493: l_ship_to_site_id := c_aso_shipments_rec.ship_to_party_site_id;
494: l_ship_to_cust_account_id := c_aso_shipments_rec.ship_to_cust_account_id;
495: l_ship_to_party_id := c_aso_shipments_rec.ship_to_party_id;
496: l_ship_method_code := c_aso_shipments_rec.ship_method_code;
497: END LOOP;
498:
499: For c_ship_method_rec in c_ship_methods(l_ship_method_code) LOOP
500: l_Ship_Method := c_ship_method_rec.Meaning;