19143:
19144: -- get the inventory item from the sales order
19145: CURSOR l_oeorderlines_csr(cp_line_id IN NUMBER) IS
19146: SELECT inventory_item_id, ship_from_org_id, ship_to_org_id
19147: FROM oe_order_lines_all
19148: WHERE line_id = cp_line_id;
19149:
19150: -- get the inventory item id and inventory item org for a financial asset
19151: CURSOR l_invitem_csr(cp_fin_asset_id IN NUMBER) IS
19530: END IF;
19531:
19532: OPEN l_oeorderlines_csr(l_billingdtls_rec.isl_id);
19533: FETCH l_oeorderlines_csr INTO l_inv_item_id, l_inv_item_org_id, lx_ship_to_siteuseid;
19534: -- ship_to_org_id from oe_order_lines_all is the site_use_id value from hz_cust_site_uses_all
19535: -- which is the ship_to_site_use_id
19536: IF l_oeorderlines_csr%NOTFOUND THEN
19537: OKC_API.set_message( p_app_name => 'OKC',
19538: p_msg_name => G_INVALID_VALUE,