159: --start for bug 6500750 gnramasa 13-Nov-07
160: cursor get_site_loc(P_CONTACT_ID number) is
161: select location_id
162: --Start for bug 8771065 gnramasa 6th-Aug-09
163: -- from ast_locations_v where party_site_id =
164: from ast_locations_v where party_site_id in
165: (select party_site_id
166: -- from hz_cust_acct_sites_all where cust_acct_site_id =
167: from hz_cust_acct_sites_all where cust_acct_site_id in
160: cursor get_site_loc(P_CONTACT_ID number) is
161: select location_id
162: --Start for bug 8771065 gnramasa 6th-Aug-09
163: -- from ast_locations_v where party_site_id =
164: from ast_locations_v where party_site_id in
165: (select party_site_id
166: -- from hz_cust_acct_sites_all where cust_acct_site_id =
167: from hz_cust_acct_sites_all where cust_acct_site_id in
168: (select address_id
174:
175: -- get organization location_id
176: cursor get_old_loc_crs1(P_ORG_PARTY_ID number) is
177: select location_id
178: from ast_locations_v
179: where party_id = P_ORG_PARTY_ID and
180: primary_flag = 'Y';
181:
182: BEGIN
772: -- Start for bug 6500750 gnramasa 13-Nov-07
773:
774: cursor get_old_loc_crs1(P_ORG_PARTY_ID number) is
775: select location_id
776: from ast_locations_v
777: where party_id = P_ORG_PARTY_ID and
778: primary_flag = 'Y';
779:
780: -- End for bug 6500750 gnramasa 13-Nov-07
18280:
18281: begin
18282: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' getting primary address');
18283: select location_id into l_location_id
18284: from ast_locations_v
18285: where party_id = l_party_id
18286: AND primary_flag = 'Y';
18287:
18288: WriteLog(G_PKG_NAME || ' ' || l_api_name || ' primart address location ID: ' || l_location_id);