340: WHERE resale_batch_id = p_batch_id;
341:
342: -- Cursor to get the org_id for purchase order
343: CURSOR c_purchase_order_org_id (p_header_id IN NUMBER)IS
344: SELECT org_id FROM po_headers_all
345: WHERE po_header_id = p_header_id;
346:
347: -- Cursor to get the org_id for invoice
348: CURSOR c_invoice_org_id (p_cust_trx_id IN NUMBER)IS