232:
233: --Find Customer Name
234: select party_name
235: into l_customer_name
236: from hz_parties party, hz_cust_accounts cust
237: where cust.cust_account_id = p_customer_id
238: and cust.party_id = party.party_id;
239:
240: --Use existing message/define new nessage for the question.
281: IS
282: l_customer_id NUMBER;
283: BEGIN
284:
285: --If user searches by customer, get customer id from hz_cust_accounts
286: IF p_search_type = 'CUSTOMER_NUMBER' THEN
287: SELECT cust_account_id
288: INTO l_customer_id
289: FROM hz_cust_accounts
285: --If user searches by customer, get customer id from hz_cust_accounts
286: IF p_search_type = 'CUSTOMER_NUMBER' THEN
287: SELECT cust_account_id
288: INTO l_customer_id
289: FROM hz_cust_accounts
290: where account_number = p_search_number;
291:
292: --If user searches by transactions, get customer id from ar_payment_schedules
293: ELSIF p_search_type = 'INVOICES' OR