Commit 9c1e7f32 authored by manohar's avatar manohar

new wostockhelp and bomstockhelp added


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@93064 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 3c9cdc9e
<% 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"%>
<jsp:useBean id="WoStkBean" scope="session" class="ibase.webitm.ejb.mfg.adv.WoStockBean"/>
<html>
<head>
<title>Work order Stock</title>
<script type="text/javascript">
function callValidate()
{
var woOrd = document.form1.work_order.value;
if( woOrd == "" )
{
alert("Please enter work Order.");
document.form1.work_order.focus();
return false;
}
}
function CloseWindow()
{
var win=window.open("about:blank","_self");
win.close();
}
/*function getWordData()
{
var word = document.form1.work_order.value;
alert("work order form function"+word);
return false;
}*/
</script>
</head>
<body>
<a style="position:absolute;top:10;left:0;height:50;width:1200;background:url(/ibase/webitm/images/title_bar_bg_blue.jpg);font-family:Verdana"></a>
<%
GenericUtility genericUtility = GenericUtility.getInstance();
DecimalFormat df = new DecimalFormat( "##.000" );
if((request.getParameter("form") == null ) || (!request.getParameter("form").equals("2")))
{
%>
<Form name = "form1" action = "WoStockButton.jsp?form=2" method = "post">
<%
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 + "]");
%>
<br/><br/><br/><br/>
<table align = "center">
<tr>
<td> Work Order:</td>
<td> <input type = "text" name = "work_order" size = "10" value = "<%= workOrder %>" onChange = "javascript: this.value = this.value.toUpperCase();"/></td>
</tr>
<tr>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tr>
<tr>
<td></td>
<td> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type = "submit" VALUE = "Retrieve" onClick = "return callValidate();" /></td>
</td>
<td></td>
</tr>
</table>
</FORM>
<%
}
if((request.getParameter("form") != null ) && (request.getParameter("form").equals("2")))
{
%>
<Form name = "form2" action = "WoStockButton.jsp" method = "POST">
<body>
<%
String workOrder = request.getParameter("work_order");
WoStkBean.setWorkOrder( workOrder.toUpperCase() );
ArrayList WoStockHelpList = WoStkBean.getDetails();
if( WoStockHelpList.size() > 0 )
{
%>
<br/>
<DIV ID="TableBorder" class="tableborderDiv">
<TABLE name="main" border = "1" id="main" CLASS="sort-table" STYLE="class:header_css;POSITION:relative;TOP:20;left:10;width:790" >
<tr><input type = "button" VALUE = "Back" onClick = "history.back();" /></tr>
<thead>
<TH WIDTH=66><P>Work Order</P></TH>
<TH WIDTH=59><P>Item Code</P></TH>
<TH WIDTH=128><P>Item Description</P></TH>
<TH WIDTH=60><P>Quantity</P></TH>
<TH WIDTH=97><P>Stock Usable Quantity</P></TH>
<TH WIDTH=126><P>Stock NonUsable Quantity</P></TH>
<TH WIDTH=66><P>Allocated Quantity</P></TH>
</thead>
<%
for(int i=0;i<WoStockHelpList.size();i++)
{
WoStkBean = ( ibase.webitm.ejb.mfg.adv.WoStockBean)(WoStockHelpList.get(i));
System.out.println("WoStkBean.qtyPer [" + WoStkBean.qtyPer+ "]");
System.out.println("WoStkBean.stkQty [" + WoStkBean.stkQty+ "]");
System.out.println("WoStkBean.nonStkQty [" + WoStkBean.nonStkQty+ "]");
System.out.println("WoStkBean.allockQty [" + WoStkBean.allockQty+ "]");
%>
<tr BGCOLOR="#FFFFFF">
<td align = "left"><font size="-1"><%= workOrder %></font></td>
<td align = "left"><font size="-1"><%=(WoStkBean.itemCode != null && WoStkBean.itemCode.equals("")) ? "-" : WoStkBean.itemCode%></font></td>
<td align = "left"><font size="-1"><%=(WoStkBean.descr != null && WoStkBean.descr.equals("")) ? "-" : WoStkBean.descr%></font></td>
<td align = "right"><font size="-1"><%=WoStkBean.qtyPer%></font></td>
<td align = "right"><font size="-1"><%=df.format(WoStkBean.stkQty)%></font></td>
<td align = "right"><font size="-1"><%=df.format(WoStkBean.nonStkQty)%></font></td>
<td align = "right"><font size="-1"><%= WoStkBean.allockQty %></font></td>
</tr>
<%
}
%>
</TABLE>
</DIV>
<%
}
else
{
System.out.println("Inside else");
%>
<BR/><BR/><BR/><BR/>
<p><b><center><h2>
No any stock detail found for entered data.
</h2></center></b></p>
<%
}
%>
<BR/><BR/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<!-- <input type = "button" VALUE = "Back" onClick = "history.back()"/> -->
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<!--input type = "button" value = "Close" onclick="return CloseWindow();"/-->
<!--<a href="javascript:window.opener='x';window.close();">Close me</a>-->
<!-- Running code in mozilla 1.5 -->
<!-- <a href="javascript:window.open('','_parent','');window.close();">
<input type="button" value="Close Window"/></a> -->
</body>
</FORM>
<%
}
%>
</body>
</html>
<% 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>
...@@ -52,9 +52,21 @@ ...@@ -52,9 +52,21 @@
<% <%
String saleOrder = request.getParameter("PK_VALUES"); String saleOrder = request.getParameter("PK_VALUES");
System.out.println("dsfsfsf"+saleOrder); System.out.println("dsfsfsf"+saleOrder);
String siteCode = request.getParameter("site_code") == null ? "" : request.getParameter("site_code"); String siteCode = request.getParameter("site_code");// == null ? "" : request.getParameter("site_code");
String itemCode = request.getParameter("item_code") == null ? "" : request.getParameter("item_code"); String itemCode = request.getParameter("item_code");// == null ? "" : request.getParameter("item_code");
String itemDescr = "";
if (siteCode == null)
{
siteCode = request.getParameter("SITE_CODE") == null ? "" : request.getParameter("SITE_CODE");
}
if (itemCode == null)
{
itemCode = request.getParameter("ITEM_CODE") == null ? "" : request.getParameter("ITEM_CODE");
}
System.out.println("siteCode [" + siteCode + "]");
System.out.println("itemCode [" + itemCode + "]");
itemDescr = stkHlpBn.getItemDescr(itemCode);
System.out.println("itemDescr [" + itemDescr + "]");
%> %>
<br/><br/><br/><br/> <br/><br/><br/><br/>
<table align = "center"> <table align = "center">
...@@ -63,12 +75,13 @@ ...@@ -63,12 +75,13 @@
<td><input type = "text" name = "site_code" size = "10" value = "<%= siteCode %>" onChange = "javascript: this.value = this.value.toUpperCase();"/></td> <td><input type = "text" name = "site_code" size = "10" value = "<%= siteCode %>" onChange = "javascript: this.value = this.value.toUpperCase();"/></td>
<td>&nbsp;&nbsp;Item Code:</td> <td>&nbsp;&nbsp;Item Code:</td>
<td><input type = "text" name = "item_code" size = "10" value = "<%= itemCode %>" onChange = "javascript: this.value = this.value.toUpperCase();"/></td> <td><input type = "text" name = "item_code" size = "10" value = "<%= itemCode %>" onChange = "javascript: this.value = this.value.toUpperCase();"/></td>
<td align = "right"><font size="10"><%= itemDescr %></font></td>
</tr> </tr>
<tr>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tr> <tr>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tr>
<tr> <tr>
<td></td> <td></td>
<td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type = "submit" VALUE = "Retrieve" onClick = "return callValidate();" /></td> <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type = "submit" VALUE = "Retrieve" onClick = "return callValidate();" /></td>
<td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type = "button" value = " Close " onClick = "return CloseWindow();"/> <!--td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type = "button" value = " Close " onClick = "return CloseWindow();"/-->
</td> </td>
<td></td> <td></td>
</tr> </tr>
...@@ -310,7 +323,7 @@ ...@@ -310,7 +323,7 @@
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<!-- <input type = "button" VALUE = "Back" onClick = "history.back()"/> --> <!-- <input type = "button" VALUE = "Back" onClick = "history.back()"/> -->
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<input type = "button" value = "Close" onclick="return CloseWindow();"/> <!--input type = "button" value = "Close" onclick="return CloseWindow();"/-->
<!--<a href="javascript:window.opener='x';window.close();">Close me</a>--> <!--<a href="javascript:window.opener='x';window.close();">Close me</a>-->
<!-- Running code in mozilla 1.5 --> <!-- Running code in mozilla 1.5 -->
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment