138:
139: -- bug8568734
140: CURSOR get_le_name_csr IS
141: SELECT xle.name
142: FROM xle_entity_profiles xle
143: WHERE xle.legal_entity_id = p_le_id;
144: l_party_name VARCHAR2(240);
145:
146: -- Logging Infra
313: ELSIF P_Party_Type_Code = 'FIRST_PARTY' Then
314: -- Getting first party PTP
315: SELECT ptp.party_tax_profile_id
316: INTO p_ptp_id
317: FROM zx_party_tax_profile ptp, xle_entity_profiles xle
318: WHERE xle.legal_entity_id = p_le_id
319: AND ptp.party_id = xle.party_id
320: AND ptp.Party_Type_Code = p_party_type_code;
321:
453: OUTPUT Parameters: p_ptp_id - Party Tax Profile ID
454: p_return_status - Success is p_ptp_id is not null
455: ====================================================================== */
456: PROCEDURE GET_PTP_HQ(
457: p_le_id IN xle_entity_profiles.legal_entity_id%TYPE,
458: p_ptp_id OUT NOCOPY zx_party_tax_profile.party_tax_profile_id%TYPE,
459: p_return_status OUT NOCOPY VARCHAR2)
460: IS
461: CURSOR c_get_ptp_id_hq
476:
477: -- bug8568734
478: CURSOR get_le_name_csr IS
479: SELECT xle.name
480: FROM xle_entity_profiles xle
481: WHERE xle.legal_entity_id = p_le_id;
482: l_party_name VARCHAR2(240);
483:
484: BEGIN
575:
576: CURSOR c_ptp_of_le IS
577: SELECT ptp.party_tax_profile_id
578: FROM zx_party_tax_profile ptp,
579: xle_entity_profiles xle
580: WHERE xle.legal_entity_id = p_le_id
581: AND ptp.party_id = xle.party_id
582: AND ptp.Party_Type_Code = 'FIRST_PARTY';
583:
593: WHERE organization_id = p_org_id;
594:
595: CURSOR get_le_name_csr IS
596: SELECT name
597: FROM xle_entity_profiles xle
598: WHERE xle.legal_entity_id = p_le_id;
599:
600: l_party_name VARCHAR2(240);
601: