391: l_bill_to_party_name hz_parties.party_name%TYPE;
392: l_bill_to_name VARCHAR2(400);
393: l_bill_to_number VARCHAR2(70);
394: l_bill_to_fax VARCHAR2(70);
395: l_bill_to_address hz_locations.address1%TYPE;
396: l_bill_to_city hz_locations.city%TYPE;
397: l_bill_to_state hz_locations.state%TYPE;
398: l_bill_to_zip hz_locations.postal_code%TYPE;
399: l_bill_to_country hz_locations.country%TYPE;
392: l_bill_to_name VARCHAR2(400);
393: l_bill_to_number VARCHAR2(70);
394: l_bill_to_fax VARCHAR2(70);
395: l_bill_to_address hz_locations.address1%TYPE;
396: l_bill_to_city hz_locations.city%TYPE;
397: l_bill_to_state hz_locations.state%TYPE;
398: l_bill_to_zip hz_locations.postal_code%TYPE;
399: l_bill_to_country hz_locations.country%TYPE;
400: l_ship_to_site_id aso_shipments.ship_to_party_site_id%TYPE;
393: l_bill_to_number VARCHAR2(70);
394: l_bill_to_fax VARCHAR2(70);
395: l_bill_to_address hz_locations.address1%TYPE;
396: l_bill_to_city hz_locations.city%TYPE;
397: l_bill_to_state hz_locations.state%TYPE;
398: l_bill_to_zip hz_locations.postal_code%TYPE;
399: l_bill_to_country hz_locations.country%TYPE;
400: l_ship_to_site_id aso_shipments.ship_to_party_site_id%TYPE;
401: l_ship_to_party_id aso_shipments.ship_to_party_id%TYPE;
394: l_bill_to_fax VARCHAR2(70);
395: l_bill_to_address hz_locations.address1%TYPE;
396: l_bill_to_city hz_locations.city%TYPE;
397: l_bill_to_state hz_locations.state%TYPE;
398: l_bill_to_zip hz_locations.postal_code%TYPE;
399: l_bill_to_country hz_locations.country%TYPE;
400: l_ship_to_site_id aso_shipments.ship_to_party_site_id%TYPE;
401: l_ship_to_party_id aso_shipments.ship_to_party_id%TYPE;
402: l_ship_to_cust_account_id aso_shipments.ship_to_cust_account_id%TYPE;
395: l_bill_to_address hz_locations.address1%TYPE;
396: l_bill_to_city hz_locations.city%TYPE;
397: l_bill_to_state hz_locations.state%TYPE;
398: l_bill_to_zip hz_locations.postal_code%TYPE;
399: l_bill_to_country hz_locations.country%TYPE;
400: l_ship_to_site_id aso_shipments.ship_to_party_site_id%TYPE;
401: l_ship_to_party_id aso_shipments.ship_to_party_id%TYPE;
402: l_ship_to_cust_account_id aso_shipments.ship_to_cust_account_id%TYPE;
403: l_ship_method_code aso_shipments.ship_method_code%TYPE;
407: l_ship_to_party_name hz_parties.party_name%TYPE;
408: l_ship_to_name VARCHAR2(400);
409: l_ship_to_number VARCHAR2(70);
410: l_ship_to_fax VARCHAR2(70);
411: l_ship_to_address hz_locations.address1%TYPE;
412: l_ship_to_city hz_locations.city%TYPE;
413: l_ship_to_state hz_locations.state%TYPE;
414: l_ship_to_zip hz_locations.postal_code%TYPE;
415: l_ship_to_country hz_locations.country%TYPE;
408: l_ship_to_name VARCHAR2(400);
409: l_ship_to_number VARCHAR2(70);
410: l_ship_to_fax VARCHAR2(70);
411: l_ship_to_address hz_locations.address1%TYPE;
412: l_ship_to_city hz_locations.city%TYPE;
413: l_ship_to_state hz_locations.state%TYPE;
414: l_ship_to_zip hz_locations.postal_code%TYPE;
415: l_ship_to_country hz_locations.country%TYPE;
416: l_document VARCHAR2(32000) := '';
409: l_ship_to_number VARCHAR2(70);
410: l_ship_to_fax VARCHAR2(70);
411: l_ship_to_address hz_locations.address1%TYPE;
412: l_ship_to_city hz_locations.city%TYPE;
413: l_ship_to_state hz_locations.state%TYPE;
414: l_ship_to_zip hz_locations.postal_code%TYPE;
415: l_ship_to_country hz_locations.country%TYPE;
416: l_document VARCHAR2(32000) := '';
417: l_temp_str VARCHAR2(2000):='';
410: l_ship_to_fax VARCHAR2(70);
411: l_ship_to_address hz_locations.address1%TYPE;
412: l_ship_to_city hz_locations.city%TYPE;
413: l_ship_to_state hz_locations.state%TYPE;
414: l_ship_to_zip hz_locations.postal_code%TYPE;
415: l_ship_to_country hz_locations.country%TYPE;
416: l_document VARCHAR2(32000) := '';
417: l_temp_str VARCHAR2(2000):='';
418:
411: l_ship_to_address hz_locations.address1%TYPE;
412: l_ship_to_city hz_locations.city%TYPE;
413: l_ship_to_state hz_locations.state%TYPE;
414: l_ship_to_zip hz_locations.postal_code%TYPE;
415: l_ship_to_country hz_locations.country%TYPE;
416: l_document VARCHAR2(32000) := '';
417: l_temp_str VARCHAR2(2000):='';
418:
419: Cursor c_hz_locations(p_loc_site_id NUMBER) IS
415: l_ship_to_country hz_locations.country%TYPE;
416: l_document VARCHAR2(32000) := '';
417: l_temp_str VARCHAR2(2000):='';
418:
419: Cursor c_hz_locations(p_loc_site_id NUMBER) IS
420: SELECT rtrim(address1) || ' ' || rtrim(address2) || ' ' || rtrim(address3) || ' ' || rtrim(address4) loc_address,
421: rtrim(city) loc_city,
422: rtrim(state)||'/' || rtrim(province) loc_state,
423: rtrim(postal_code) loc_zip,
421: rtrim(city) loc_city,
422: rtrim(state)||'/' || rtrim(province) loc_state,
423: rtrim(postal_code) loc_zip,
424: rtrim(country) loc_country
425: FROM hz_locations
426: WHERE location_id = ( SELECT location_id
427: FROM hz_party_sites
428: WHERE party_site_id = p_loc_site_id);
429: Cursor c_aso_shipments(p_quote_id NUMBER) IS
621: l_bill_to_country := null;
622:
623: /* Bill to Location id using invoice_to_party_site_id */
624:
625: FOR c_hz_locations_rec IN c_hz_locations(g_quote_header_rec.invoice_to_party_site_id)
626: LOOP
627:
628: l_bill_to_address := c_hz_locations_rec.loc_address;
629: l_bill_to_city := c_hz_locations_rec.loc_city;
624:
625: FOR c_hz_locations_rec IN c_hz_locations(g_quote_header_rec.invoice_to_party_site_id)
626: LOOP
627:
628: l_bill_to_address := c_hz_locations_rec.loc_address;
629: l_bill_to_city := c_hz_locations_rec.loc_city;
630: l_bill_to_state := c_hz_locations_rec.loc_state;
631: l_bill_to_zip := c_hz_locations_rec.loc_zip;
632: l_bill_to_country := c_hz_locations_rec.loc_country;
625: FOR c_hz_locations_rec IN c_hz_locations(g_quote_header_rec.invoice_to_party_site_id)
626: LOOP
627:
628: l_bill_to_address := c_hz_locations_rec.loc_address;
629: l_bill_to_city := c_hz_locations_rec.loc_city;
630: l_bill_to_state := c_hz_locations_rec.loc_state;
631: l_bill_to_zip := c_hz_locations_rec.loc_zip;
632: l_bill_to_country := c_hz_locations_rec.loc_country;
633:
626: LOOP
627:
628: l_bill_to_address := c_hz_locations_rec.loc_address;
629: l_bill_to_city := c_hz_locations_rec.loc_city;
630: l_bill_to_state := c_hz_locations_rec.loc_state;
631: l_bill_to_zip := c_hz_locations_rec.loc_zip;
632: l_bill_to_country := c_hz_locations_rec.loc_country;
633:
634: END LOOP;
627:
628: l_bill_to_address := c_hz_locations_rec.loc_address;
629: l_bill_to_city := c_hz_locations_rec.loc_city;
630: l_bill_to_state := c_hz_locations_rec.loc_state;
631: l_bill_to_zip := c_hz_locations_rec.loc_zip;
632: l_bill_to_country := c_hz_locations_rec.loc_country;
633:
634: END LOOP;
635:
628: l_bill_to_address := c_hz_locations_rec.loc_address;
629: l_bill_to_city := c_hz_locations_rec.loc_city;
630: l_bill_to_state := c_hz_locations_rec.loc_state;
631: l_bill_to_zip := c_hz_locations_rec.loc_zip;
632: l_bill_to_country := c_hz_locations_rec.loc_country;
633:
634: END LOOP;
635:
636: IF ASO_DEBUG_PUB.G_Debug_Flag = 'Y' THEN
715: l_ship_to_state := null;
716: l_ship_to_zip := null;
717: l_ship_to_country := null;
718:
719: FOR c_hz_locations_rec IN c_hz_locations(l_ship_to_site_id)
720: LOOP
721:
722: l_ship_to_address := c_hz_locations_rec.loc_address;
723: l_ship_to_city := c_hz_locations_rec.loc_city;
718:
719: FOR c_hz_locations_rec IN c_hz_locations(l_ship_to_site_id)
720: LOOP
721:
722: l_ship_to_address := c_hz_locations_rec.loc_address;
723: l_ship_to_city := c_hz_locations_rec.loc_city;
724: l_ship_to_state := c_hz_locations_rec.loc_state;
725: l_ship_to_zip := c_hz_locations_rec.loc_zip;
726: l_ship_to_country := c_hz_locations_rec.loc_country;
719: FOR c_hz_locations_rec IN c_hz_locations(l_ship_to_site_id)
720: LOOP
721:
722: l_ship_to_address := c_hz_locations_rec.loc_address;
723: l_ship_to_city := c_hz_locations_rec.loc_city;
724: l_ship_to_state := c_hz_locations_rec.loc_state;
725: l_ship_to_zip := c_hz_locations_rec.loc_zip;
726: l_ship_to_country := c_hz_locations_rec.loc_country;
727:
720: LOOP
721:
722: l_ship_to_address := c_hz_locations_rec.loc_address;
723: l_ship_to_city := c_hz_locations_rec.loc_city;
724: l_ship_to_state := c_hz_locations_rec.loc_state;
725: l_ship_to_zip := c_hz_locations_rec.loc_zip;
726: l_ship_to_country := c_hz_locations_rec.loc_country;
727:
728: END LOOP;
721:
722: l_ship_to_address := c_hz_locations_rec.loc_address;
723: l_ship_to_city := c_hz_locations_rec.loc_city;
724: l_ship_to_state := c_hz_locations_rec.loc_state;
725: l_ship_to_zip := c_hz_locations_rec.loc_zip;
726: l_ship_to_country := c_hz_locations_rec.loc_country;
727:
728: END LOOP;
729:
722: l_ship_to_address := c_hz_locations_rec.loc_address;
723: l_ship_to_city := c_hz_locations_rec.loc_city;
724: l_ship_to_state := c_hz_locations_rec.loc_state;
725: l_ship_to_zip := c_hz_locations_rec.loc_zip;
726: l_ship_to_country := c_hz_locations_rec.loc_country;
727:
728: END LOOP;
729:
730: