-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rec_PO_Add.jsp
229 lines (190 loc) · 7.02 KB
/
Rec_PO_Add.jsp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-logic" prefix="logic" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@page import="org.apache.commons.logging.Log"%>
<%@page import="org.apache.commons.logging.LogFactory"%>
<html:html>
<head>
<title>Sample</title>
<meta name="generator" content="">
<meta name="description" content="">
<meta name="keywords" content="">
<style type="text/css">
<!--
.style1 {font-size: 9px}
.style2 {font-size: 12px}
.style3 {
font-size: xx-small;
font-family: Verdana, Arial, Helvetica, sans-serif;
}
table.stats
{text-align: center;
font-family: Verdana, Geneva, Arial, Helvetica, sans-serif ;
font-weight: normal;
font-size: 11px;
color: #fff;
width: 320px;
border: 0px;
border-collapse: collapse;
border-spacing: 0px;}
table.stats td
{
color: #000;
font-size:10px;
padding: 4px;
text-align: left;
border: 1px #fff solid;
}
.table.Small {
font-family: Arial, Helvetica, sans-serif;
font-size: 10px;
line-height: 10px;
}
table.stats td.hed
{background-color: #666;
color: #fff;
padding: 4px;
text-align: left;
border-bottom: 2px #fff solid;
font-size: 10px;
font-weight: bold;}
-->
</style>
<script type="text/javascript">
window.onload = function() {
setTimeout("document.forms[0].boxNum.select()",1);
}
function valNoBox(){
if((document.getElementById('boxNum').value=='')||(document.getElementById('boxNum').value==null)){
alert('Please enter Number of Box(es)');
document.getElementById('boxNum').focus();
return false;
}
else if (isNaN(document.getElementById('boxNum').value)){
alert('Please enter a numeric value for Number of Box(es)');
document.getElementById('boxNum').focus();
return false;
}
else
return true;
}
function valQty(){
if((document.getElementById('qty').value=='')||(document.getElementById('qty').value==null)){
alert('Please enter Quantity');
document.getElementById('qty').focus();
return false;
}
else if (isNaN(document.getElementById('qty').value)){
alert('Please enter a numeric value for Quantity');
document.getElementById('qty').focus();
return false;
}
else
document.getElementById('qty').value = parseInt(document.getElementById('qty').value);
//alert (document.getElementById('qty').value);
return true;
}
function valPO(){
if((document.getElementById('poId').value=='')||(document.getElementById('poId').value==null)){
alert('Please enter Purchase Order Number');
document.getElementById('poId').focus();
return false;
}
else
return true;
}
function valItem(){
if((document.getElementById('itemId').value=='')||(document.getElementById('itemId').value==null)){
alert('Please enter Item ID. \n Enter MISC for a miscellaneous item');
document.getElementById('itemId').focus();
return false;
}
else
return true;
}
function validate(frm){
if (valNoBox() && valPO() && valQty() ){
frm.submit();
}else{
return false;
}
}
</script>
</head>
<jsp:useBean class="com.vicr.mfg.hhd.util.ChooseList"
scope="page"
id="chooseListBean">
<body bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
<html:form focus="boxNum" action="/FetchPO" method="post">
<table height="55" border="0" width="300" align="center">
<tr>
<td align="left"><img src="images/logo.GIF"/></td>
<td align="right"><a href="logoff.jsp"><img border="0" src="images/logout.png" alt="Single Signout"></a></td>
</tr>
</table>
<table height="180" width="260" align="left" border="0" >
<%String receiverId = (String) request.getAttribute("receiverId");%>
<% if(receiverId != null) {%>
<tr>
<td><div class="style3"><font color="red"><b>Transaction successful!<br>Receiver ID:</b><%=receiverId%></font>
</div>
</td>
</tr>
<%}
%>
<tr valign="bottom">
<td>
<table height="90" width="260" align="left" border="0" class="stats" BGCOLOR="#cccccc" >
<tr height="35" valign="bottom">
<td width="35%" class="hed" align="left"><b>BU</b></td>
<td width="50%"><SELECT NAME="bu" size=1 id="selbu" >
<jsp:getProperty name="chooseListBean" property="buList"/>
</select><font color="red">*</font> </td>
</tr>
<tr height="20">
<td width="35%" align="left" class="hed" ><b>No. of Boxes</b></td>
<td width="50%" align="left"><INPUT TYPE=TEXT SIZE=10 NAME="boxNum" id="boxNum" VALUE="" class="Small" onchange="return valNoBox();"><font color="red">*</font></td>
</tr>
<tr height="20">
<td width="35%" align="left" class="hed" ><b>PO #</b></td>
<td width="50%" align="left"><INPUT TYPE=TEXT SIZE=15 NAME="poId" id="poId" VALUE="" class="Small" onchange="return valPO();"><font color="red">*</font></td>
</tr>
<tr height="20">
<td width="35%" align="left" class="hed"><b>Item ID</b></td>
<td width="50%" align="left"><INPUT TYPE=TEXT SIZE=15 NAME="itemId" id="itemId" VALUE="" class="Small"> <!--onchange="return valItem();"--></td>
</tr>
<tr height="20">
<td width="35%" align="left" class="hed"><b>Quantity</b></td>
<td width="50%" align="left"><INPUT TYPE=TEXT SIZE=10 NAME="qty" id="qty" VALUE="" class="Small" onchange="return validate(this.form);"><font color="red">*</font></td>
</tr>
</table>
</td>
</tr>
<tr><td>
<logic:present name="messages">
<div class="style3"><font color="red"><b>Error:</b>
<logic:iterate id="msg" name="messages">
<bean:message name="msg"/></div>
</logic:iterate>
<br>
</logic:present>
<table BGCOLOR="#cccccc" align="center" >
<tr valign="middle" height="10">
<td width="35%" align="right" >
<a href="Mainmenu.jsp"><img src="images/back.gif" name="back" border="0" height="25px" alt="Back"></a>
</td>
<td width="10%"></td>
<td width="35%" align="left">
<input type="image" src="images/ru.bmp" alt="Fetch" height="25px" onClick="return validate(this.form);">
</td>
</tr>
</table>
</td></tr>
</table>
</html:form>
</body>
</jsp:useBean>
</html:html>