<% System.out.println(" *****WoStockButton.jsp***** "); %>
<%@page import = "java.util.*"%>
<%@page import ="ibase.webitm.utility.*"%>
<%@page import = "ibase.webitm.ejb.mfg.adv.*"%>
<%@page import = "java.sql.*"%>
<%@page import = "java.text.DecimalFormat"%>
<%@page import = "ibase.webitm.utility.GenericUtility"%>
<%@page import ="java.net.URLDecoder"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<jsp:useBean id="WoStockStatus" scope="session" class="ibase.webitm.ejb.mfg.WoStockStatus"/>

<body>

<%
	 System.out.println("Inside WoStockStatus.jsp");    
	GenericUtility genericUtility = GenericUtility.getInstance(); 
	DecimalFormat df = new DecimalFormat( "##.000" );

		  String param = null;
		  String paramvalue = null, workOrder = null;
		  
		 Enumeration enum1 = request.getParameterNames();
		  while( enum1.hasMoreElements() )
		  {
			  param = (String)enum1.nextElement();
			  paramvalue = request.getParameter(param);
			 System.out.println("param ["+param+"] paramvalue ["+paramvalue+"]");    
		  } 
		String paramList[];
		if ( paramvalue.indexOf("~") != -1 )
		{
		  paramList = paramvalue.split("~");
		  workOrder = paramList[0];
		}
		else
		{
		  workOrder = paramvalue;
		}

		System.out.println("workOrder [" + workOrder + "]");
		String htmlString =  WoStockStatus.getStockStatus(workOrder);
		System.out.println("htmlString [" + htmlString + "]");
		
	%>
	<%=htmlString%>
</body>
</html>
