274: l_bill_to_party_name hz_parties.party_name%TYPE;
275: l_bill_to_name VARCHAR2(400);
276: l_bill_to_number VARCHAR2(70);
277: l_bill_to_fax VARCHAR2(70);
278: l_bill_to_address hz_locations.address1%TYPE;
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;
275: l_bill_to_name VARCHAR2(400);
276: l_bill_to_number VARCHAR2(70);
277: l_bill_to_fax VARCHAR2(70);
278: l_bill_to_address hz_locations.address1%TYPE;
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;
276: l_bill_to_number VARCHAR2(70);
277: l_bill_to_fax VARCHAR2(70);
278: l_bill_to_address hz_locations.address1%TYPE;
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;
277: l_bill_to_fax VARCHAR2(70);
278: l_bill_to_address hz_locations.address1%TYPE;
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;
278: l_bill_to_address hz_locations.address1%TYPE;
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;
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);
291: l_ship_to_fax VARCHAR2(70);
292: l_ship_to_address hz_locations.address1%TYPE;
293: l_ship_to_city hz_locations.city%TYPE;
294: l_ship_to_state hz_locations.state%TYPE;
295: l_ship_to_zip hz_locations.postal_code%TYPE;
296: l_ship_to_country hz_locations.country%TYPE;
289: l_ship_to_name VARCHAR2(400);
290: l_ship_to_number VARCHAR2(70);
291: l_ship_to_fax VARCHAR2(70);
292: l_ship_to_address hz_locations.address1%TYPE;
293: l_ship_to_city hz_locations.city%TYPE;
294: l_ship_to_state hz_locations.state%TYPE;
295: l_ship_to_zip hz_locations.postal_code%TYPE;
296: l_ship_to_country hz_locations.country%TYPE;
297: l_document VARCHAR2(32000) := '';
290: l_ship_to_number VARCHAR2(70);
291: l_ship_to_fax VARCHAR2(70);
292: l_ship_to_address hz_locations.address1%TYPE;
293: l_ship_to_city hz_locations.city%TYPE;
294: l_ship_to_state hz_locations.state%TYPE;
295: l_ship_to_zip hz_locations.postal_code%TYPE;
296: l_ship_to_country hz_locations.country%TYPE;
297: l_document VARCHAR2(32000) := '';
298: l_temp_str VARCHAR2(2000):='';
291: l_ship_to_fax VARCHAR2(70);
292: l_ship_to_address hz_locations.address1%TYPE;
293: l_ship_to_city hz_locations.city%TYPE;
294: l_ship_to_state hz_locations.state%TYPE;
295: l_ship_to_zip hz_locations.postal_code%TYPE;
296: l_ship_to_country hz_locations.country%TYPE;
297: l_document VARCHAR2(32000) := '';
298: l_temp_str VARCHAR2(2000):='';
299:
292: l_ship_to_address hz_locations.address1%TYPE;
293: l_ship_to_city hz_locations.city%TYPE;
294: l_ship_to_state hz_locations.state%TYPE;
295: l_ship_to_zip hz_locations.postal_code%TYPE;
296: l_ship_to_country hz_locations.country%TYPE;
297: l_document VARCHAR2(32000) := '';
298: l_temp_str VARCHAR2(2000):='';
299:
300: Cursor c_hz_locations(p_loc_site_id NUMBER) IS
296: l_ship_to_country hz_locations.country%TYPE;
297: l_document VARCHAR2(32000) := '';
298: l_temp_str VARCHAR2(2000):='';
299:
300: Cursor c_hz_locations(p_loc_site_id NUMBER) IS
301: SELECT rtrim(address1) || ' ' || rtrim(address2) || ' ' || rtrim(address3) || ' ' || rtrim(address4) loc_address,
302: rtrim(city) loc_city,
303: rtrim(state)||'/' || rtrim(province) loc_state,
304: rtrim(postal_code) loc_zip,
302: rtrim(city) loc_city,
303: rtrim(state)||'/' || rtrim(province) loc_state,
304: rtrim(postal_code) loc_zip,
305: rtrim(country) loc_country
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
464: l_bill_to_country := null;
465:
466: /* Bill to Location id using invoice_to_party_site_id */
467:
468: FOR c_hz_locations_rec IN c_hz_locations(g_quote_header_rec.invoice_to_party_site_id) LOOP
469:
470: l_bill_to_address := c_hz_locations_rec.loc_address;
471: l_bill_to_city := c_hz_locations_rec.loc_city;
472: l_bill_to_state := c_hz_locations_rec.loc_state;
466: /* Bill to Location id using invoice_to_party_site_id */
467:
468: FOR c_hz_locations_rec IN c_hz_locations(g_quote_header_rec.invoice_to_party_site_id) LOOP
469:
470: l_bill_to_address := c_hz_locations_rec.loc_address;
471: l_bill_to_city := c_hz_locations_rec.loc_city;
472: l_bill_to_state := c_hz_locations_rec.loc_state;
473: l_bill_to_zip := c_hz_locations_rec.loc_zip;
474: l_bill_to_country := c_hz_locations_rec.loc_country;
467:
468: FOR c_hz_locations_rec IN c_hz_locations(g_quote_header_rec.invoice_to_party_site_id) LOOP
469:
470: l_bill_to_address := c_hz_locations_rec.loc_address;
471: l_bill_to_city := c_hz_locations_rec.loc_city;
472: l_bill_to_state := c_hz_locations_rec.loc_state;
473: l_bill_to_zip := c_hz_locations_rec.loc_zip;
474: l_bill_to_country := c_hz_locations_rec.loc_country;
475:
468: FOR c_hz_locations_rec IN c_hz_locations(g_quote_header_rec.invoice_to_party_site_id) LOOP
469:
470: l_bill_to_address := c_hz_locations_rec.loc_address;
471: l_bill_to_city := c_hz_locations_rec.loc_city;
472: l_bill_to_state := c_hz_locations_rec.loc_state;
473: l_bill_to_zip := c_hz_locations_rec.loc_zip;
474: l_bill_to_country := c_hz_locations_rec.loc_country;
475:
476: END LOOP;
469:
470: l_bill_to_address := c_hz_locations_rec.loc_address;
471: l_bill_to_city := c_hz_locations_rec.loc_city;
472: l_bill_to_state := c_hz_locations_rec.loc_state;
473: l_bill_to_zip := c_hz_locations_rec.loc_zip;
474: l_bill_to_country := c_hz_locations_rec.loc_country;
475:
476: END LOOP;
477:
470: l_bill_to_address := c_hz_locations_rec.loc_address;
471: l_bill_to_city := c_hz_locations_rec.loc_city;
472: l_bill_to_state := c_hz_locations_rec.loc_state;
473: l_bill_to_zip := c_hz_locations_rec.loc_zip;
474: l_bill_to_country := c_hz_locations_rec.loc_country;
475:
476: END LOOP;
477:
478: IF aso_debug_pub.g_debug_flag = 'Y' THEN
552: l_ship_to_state := null;
553: l_ship_to_zip := null;
554: l_ship_to_country := null;
555:
556: FOR c_hz_locations_rec IN c_hz_locations(l_ship_to_site_id) LOOP
557:
558: l_ship_to_address := c_hz_locations_rec.loc_address;
559: l_ship_to_city := c_hz_locations_rec.loc_city;
560: l_ship_to_state := c_hz_locations_rec.loc_state;
554: l_ship_to_country := null;
555:
556: FOR c_hz_locations_rec IN c_hz_locations(l_ship_to_site_id) LOOP
557:
558: l_ship_to_address := c_hz_locations_rec.loc_address;
559: l_ship_to_city := c_hz_locations_rec.loc_city;
560: l_ship_to_state := c_hz_locations_rec.loc_state;
561: l_ship_to_zip := c_hz_locations_rec.loc_zip;
562: l_ship_to_country := c_hz_locations_rec.loc_country;
555:
556: FOR c_hz_locations_rec IN c_hz_locations(l_ship_to_site_id) LOOP
557:
558: l_ship_to_address := c_hz_locations_rec.loc_address;
559: l_ship_to_city := c_hz_locations_rec.loc_city;
560: l_ship_to_state := c_hz_locations_rec.loc_state;
561: l_ship_to_zip := c_hz_locations_rec.loc_zip;
562: l_ship_to_country := c_hz_locations_rec.loc_country;
563:
556: FOR c_hz_locations_rec IN c_hz_locations(l_ship_to_site_id) LOOP
557:
558: l_ship_to_address := c_hz_locations_rec.loc_address;
559: l_ship_to_city := c_hz_locations_rec.loc_city;
560: l_ship_to_state := c_hz_locations_rec.loc_state;
561: l_ship_to_zip := c_hz_locations_rec.loc_zip;
562: l_ship_to_country := c_hz_locations_rec.loc_country;
563:
564: END LOOP;
557:
558: l_ship_to_address := c_hz_locations_rec.loc_address;
559: l_ship_to_city := c_hz_locations_rec.loc_city;
560: l_ship_to_state := c_hz_locations_rec.loc_state;
561: l_ship_to_zip := c_hz_locations_rec.loc_zip;
562: l_ship_to_country := c_hz_locations_rec.loc_country;
563:
564: END LOOP;
565:
558: l_ship_to_address := c_hz_locations_rec.loc_address;
559: l_ship_to_city := c_hz_locations_rec.loc_city;
560: l_ship_to_state := c_hz_locations_rec.loc_state;
561: l_ship_to_zip := c_hz_locations_rec.loc_zip;
562: l_ship_to_country := c_hz_locations_rec.loc_country;
563:
564: END LOOP;
565:
566: