117: --
118: /********
119: CURSOR c_party_id IS
120: SELECT customer_id
121: FROM ra_customer_trx_all
122: WHERE invoice_number = p_contract_number;
123: ***/
124:
125: BEGIN
531: -- Function : Get_Customer_From_InvoiceNum
532: -- Usage : Used by the Routing module to get the customer ID from the
533: -- sales invoice number.
534: -- Description : This function retrieves a customer ID from the
535: -- RA_CUSTOMER_TRX_ALL table given an invoice number. If there
536: -- are more than one customer associated with the given
537: -- invoice, this function will return the first customer ID
538: -- that it retrieves.
539: -- Parameters :
546: FUNCTION Get_Customer_From_InvoiceNum
547: ( p_invoice_number IN VARCHAR2)
548: RETURN NUMBER IS
549:
550: p_ship_to_customer_id ra_customer_trx_all.ship_to_customer_id%type;
551: p_bill_to_customer_id ra_customer_trx_all.bill_to_customer_id%type;
552:
553: --
554: -- get customer ID given an invoice number
547: ( p_invoice_number IN VARCHAR2)
548: RETURN NUMBER IS
549:
550: p_ship_to_customer_id ra_customer_trx_all.ship_to_customer_id%type;
551: p_bill_to_customer_id ra_customer_trx_all.bill_to_customer_id%type;
552:
553: --
554: -- get customer ID given an invoice number
555: --
554: -- get customer ID given an invoice number
555: --
556: CURSOR c_customer_id (invnum VARCHAR2) IS
557: SELECT ship_to_customer_id, bill_to_customer_id
558: FROM ra_customer_trx_all
559: WHERE trx_number = invnum;
560:
561: BEGIN
562: