Current File : /home/obabain/autoclutchess_obaba_in/ViewConfirm.jsp |
<%@include file="master.jsp"%>
<%Statement st=con1.createStatement(); %>
<%! int id10; String p_name =null; String p_Quantity=null; String p_name1 =null; String p_Quantity1=null;
int q1,q2;int str;int i2; String ty=null; String mid=null; int i1;int id1;int sub; int id;String p_id,type,mocus_id, Scheduledate, Product, BillofMaterial, ProductQty, ResponsiblePerson, RawMaterialLocation, Locations,qun ,p2, p1;%>
<%
ResultSet rs=st.executeQuery("select * from manufacture_order where mo_id=(select max(mo_id) as mo_id from manufacture_order)");
while(rs.next()){
mocus_id=rs.getString("mocus_id");
Scheduledate=rs.getString("Scheduledate");
Product=rs.getString("Product");
BillofMaterial=rs.getString("BillofMaterial");
ProductQty=rs.getString("ProductQty");
i1=Integer.parseInt(ProductQty);
ResponsiblePerson=rs.getString("ResponsiblePerson");
RawMaterialLocation=rs.getString("RawMaterialLocation");
Locations=rs.getString("Location");
p_id=rs.getString("p_id");
type=rs.getString("type");
mid=rs.getString("mo_id");
}
%>
<%!int i; String s=null;%>
<body>
<%
String count=null;String id=null;String sys_id=null;
ResultSet rs2 = null;
rs2 = st.executeQuery("select tb.*,(select concat(Prefix,MO_Id))code from system_generated_id tb");
while(rs2.next()){
count=rs2.getString("code");
id=rs2.getString("MO_Id");
i=Integer.parseInt(id)+1;
s=String.valueOf(i);
if(s.length()==1)
{
sys_id="00"+s;
}
else{
sys_id="0"+s;
}
System.out.println(count);
}
/* st.executeUpdate("INSERT INTO manufacture_order(mocus_id)VALUES('"+count+"');");
st.executeUpdate("update system_generated_id set MO_Id='"+sys_id+"'"); */
%>
<style type="text/css">
.highlight-error {
border-color: red;
}
table, th, td {
border: 1px solid black;
width:30px;
}
.inlineTable {
display: inline-block;
}
.panel-default>.panel-heading-custom {
background: #ff0000;
color: #fff;
}
</style>
<!-- <link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">-->
<script
src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/js/bootstrap.min.js"></script>
<script src="//code.jquery.com/jquery-1.11.1.min.js"></script>
<script src="http://code.jquery.com/jquery-2.1.1.min.js"></script>
<script
src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<body>
<div class="row">
<form action="addcustomer.jsp" method="post" id="contact" name="form1">
<section id="main">
<div class="container">
<div class="row" style="width: 110%">
<div class="col-md-10">
<div class="panel panel-default">
<div class="panel-heading main-color-bg">
<h3 class="panel-title">Confirmed View</h3>
</div>
<!-- <div class="panel panel-">-->
<!-- <div class="panel-heading main-color-bg"></div>--
<div class="onerow">
<div class="btn">
<button type="button" class="btn btn-warning ">Check
Availability</button>
<button type="button" class="btn btn-primary">Cancel
Production</button>
<button type="button" class="btn " style="margin-left: 297px;">NEW</button>
<button type="button" class="btn btn-primary">Production Start</button>
<button type="button" class="btn btn-primary">Done</button>
<button type="button" class="btn btn-primary"
style="margin-left: px;">Awaiting raw Material</button>
</div>
</div>-->
<br> <br>
<div class="panel-body">
<div class="row">
<!-- <label for="lastname" style="margin:5px;">manufacturingOrder:</label>
<input id="lastname" class=" input-group-lg reg_name" style="width:170px;margin:5px;" type="text"
title="Enter last name"
name="address" placeholder=""/> -->
<label for="lastname" style="margin-left: 11px;">manufacturing Order:</label> <input id="lastname" class="input-group-lg reg_name"
style="width: 170px;" type="text"
value="<%=count%>" name="address" placeholder="" />
<label for="lastname" style="margin-left: 40px;">Schedule
date:</label> <input id="lastname" class=""
style="width: 170px; margin: px;" type="date"
value="<%=Scheduledate %>" name="pincode" placeholder="" />
<div class="form-group col-xs-2">
<p>
<label for="lastname" style="margin: 5px;"> </label>
</p>
</div>
</div>
<b></b>
<div class="row">
<label for="lastname" style="margin-left: 90px;">Product
:</label> <input id="lastname" style="width: 170px; margin: 5px;"
type="text" title="Enter last name" name="mobile"
value="<%=Product %>" placeholder="" />
<label for="lastname"
style="margin-left: 35px;">Bill of Material:</label> <input
id="lastname" class="" style="width: 170px; margin: 5px;"
value="<%=BillofMaterial%>" name="contactperson" placeholder="" />
<div class="form-group col-xs-2">
<p>
<label for="firstname" style="margin: 5px;"></label>
</p>
</div>
</div>
<b></b>
<div class="row">
<label for="lastname" style="margin-left: 240px;">Product
Qty</label> <input id="lastname" class="input-group-lg reg_name"
style="width: 170px; margin: 5px;" type="text"
value="<%=i1 %>" title="Enter last name" name="cst" placeholder="" />
<label for="firstname" style="margin: 5px;">Responsible
Person</label> <input id="firstname" class=" "
style="width: 170px; margin: 5px;" type="text"
value="<%=ResponsiblePerson %>" name="designation" placeholder="" />
</div>
<div class="row">
<label for="lastname" style="margin-left: 175px;">RawMaterial
Location</label> <input id="firstname"
class=" input-group-lg reg_name"
value="<%=RawMaterialLocation %>" style="width: 170px; margin: 5px;" type="text"
name="cp" placeholder="" />
<label for="lastname" style="margin: 5px;">Location:</label>
<input id="lastname" class=" input-group-lg reg_name"
style="width: 170px; margin: 5px;" type="text"
value="<%=Locations %>" name="cl" placeholder="" />
</div>
<!-- <div class="modal-footer" id="contact_submit">
<!-- <input type="button" value="Back" style="background:#204b58;margin-right:720px" class="btn btn-info" />
<a class="btn btn-default" href="createCompany.jsp">Reset</a>
<button type="submit" style="background:#204b58" class="btn btn-info" >Save Changes</button>
</div> -->
<hr>
<div class="row">
<div class="panel-body">
<!-- <div class="inlineTable">
<div class="col-md-3">
<table class="table table-bordered" id="myTable">
<b>Consumed Products</b>
<tr>
<th>Product</th>
<th>Quantity</th>
</tr>
<tr>
<td><input type="text" name="item[]" style="width:80px;" ></td>
<td><input type="text" name="item[]" style="width:80px;" ></td>
</tr>
</table>
</div>
</div> -->
<!-- Start --> <div class="inlineTable">
<div class="col-md-3">
<table class="table table-bordered" id="loader" style=" height: 10px; width:70%"> <!-- style="display:none;" -->
<b>Product Consume</b>
<thead>
<tr>
<!-- <th>HSN</th> -->
<th>Product</th>
<th>Required Qty</th>
<!-- <th>Available Qty</th> -->
<!-- <th>Stock Status</th> -->
</tr>
</thead>
<tbody>
<%
ResultSet rq=st.executeQuery("select tb.hsn,tb.product,tb.fg_id, (quantity*"+ProductQty+")qty,(case when ((select product_qua from ip_products where product_id=tb.fg_id)+(select sum(qty_pur) from ip_stock_register where product_id=tb.fg_id))>((quantity*"+ProductQty+")) then 'black' else 'red' end) stat,(case when ((select product_qua from ip_products where product_id=tb.fg_id)+(select sum(qty_pur) from ip_stock_register where product_id=tb.fg_id))>((quantity*"+ProductQty+")) then 'Stock is available' else 'Insufficient Stock' end)stock,((select product_qua from ip_products where product_id=tb.fg_id)+(select sum(qty_pur) from ip_stock_register where product_id=tb.fg_id))avl from bom_rawmaterial tb where d1_id="+p_id+"");
while(rq.next())
{
%>
<tr>
<%-- <td><%=rq.getString("hsn") %></td> --%>
<td><%=rq.getString("product") %></td>
<td><%=rq.getString("qty") %></td>
<%-- <td><span style="color:<%=rq.getString("stat")%>;"><%=rq.getString("avl") %></span></td>
<td><span style="color:<%=rq.getString("stat")%>;"><%=rq.getString("stock") %></span></td> --%>
</tr>
<%} %>
</tbody>
</table>
<div></div>
<%
String s=null;
ResultSet rb1=st.executeQuery("select tb.hsn,tb.product,tb.fg_id from bom_rawmaterial tb where d1_id="+p_id+" and ((select product_qua from ip_products where product_id=tb.fg_id)+(select sum(qty_pur) from ip_stock_register where product_id=tb.fg_id))<(quantity*"+ProductQty+")");
if(rb1.next()){
s="Insufficient Stock";
}
else
{
s="Stock is Available";
}
%>
<input type="hidden" id="stock" name="stock" value="<%=s%>">
</div>
</div>
<!-- End-->
<!-- <div class="inlineTable">
<div class="col-md-3">
<table class="table table-bordered" >
<b>Product Consume</b>
<tr>
<th>Product</th>
<th>Quantity</th>
</tr>
<tr>
<td><input type="text" name="item[]" style="width:80px;" ></td>
<td><input type="text" name="item[]" style="width:80px;" ></td>
</tr>
</table>
</div>
</div> -->
<!-- -->
<div class="inlineTable">
<div class="col-md-5">
<table class="table table-bordered">
<b>Finished Goods</b>
<tr>
<%-- <%
ResultSet rs123=st.executeQuery("select max(product_id) as product_id from ip_products");
while(rs123.next()){
id10=rs123.getInt("product_id");
System.out.print(id10);
}
%>
<%
ResultSet rs5=st.executeQuery("select * from bom_rawmaterial where type='F' and fg_id='"+id10+"'");
while(rs5.next()){
p_name =rs5.getString("product");
p_Quantity = rs5.getString("quantity");
%> --%>
<th>Product</th>
<th>Quantity</th>
</tr>
<tr>
<td><input type="text" name="item[]" value="<%=Product %>" style="width:80px;" ></td>
<td><input type="text" name="item[]" value="<%=i1 %>" style="width:80px;" ></td>
</tr>
</table>
</div>
</div>
<!-- -->
<div class="inlineTable">
<div class="col-md-5">
<table class="table table-bordered" >
<b> Schedule Product</b>
<tr>
<th>Product</th>
<th>Quantity</th>
</tr>
<tr>
<td><input type="text" name="item[]" value="<%=Product %>" style="width:80px;" ></td>
<td><input type="text" name="item[]" value="<%=i1 %>" style="width:80px;" ></td>
</tr>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<%-- <% }else{
response.sendRedirect("login.jsp");
} %> --%>
<script src="http://cdn.ckeditor.com/4.6.1/standard/ckeditor.js"></script>
<script src="http://cdn.ckeditor.com/4.6.1/standard/ckeditor.js"></script>
<script src="https://code.jquery.com/jquery-1.11.1.min.js"></script>
<script
src="https://cdn.jsdelivr.net/jquery.validation/1.16.0/jquery.validate.min.js"></script>
<script
src="https://cdn.jsdelivr.net/jquery.validation/1.16.0/additional-methods.min.js"></script>
<script
src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script type="text/javascript">
$('[data-type="adhaar-number"]').keyup(
function() {
var value = $(this).val();
value = value.replace(/\D/g, "").split(/(?:([\d]{4}))/g)
.filter(s = s.length > 0).join("-");
$(this).val(value);
});
$('[data-type="adhaar-number"]').on("change, blur", function() {
var value = $(this).val();
var maxLength = $(this).attr("maxLength");
if (value.length != maxLength) {
$(this).addClass("highlight-error");
alert("Aadhar card number not valid");
} else {
$(this).removeClass("highlight-error");
}
});
</script>
</form>
</div>
</body>
</html>