Current File : //home/obabain/autoclutchess_obaba_in/Print2.jsp |
<%@ page language="java" import="java.util.Date" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<%@include file="Connection.jsp" %>
<%
Statement st=con.createStatement();
ResultSet rs=null;
String id=request.getParameter("id");
String bom_no=request.getParameter("bom_no");
%>
<%!
String comp=null;
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<link href="css/Mystyle.css" rel="stylesheet">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/js/bootstrap.min.js"></script>
<script src="js/jscolor.js"></script>
<title>Insert title here</title>
</head>
<body>
<%
rs=st.executeQuery("select * from ip_users");
while(rs.next())
{
comp=rs.getString("user_company");
}
%>
<div style=" background-color:#DED9D1; font-size:x-large; width:238mm; text-align:center; font-family:Times New Roman;"> <b><%=comp%></b> </div>
<%
Date date = new Date();
out.print( "<h5 align=\"right\">" +date.toString()+"</h5>");
%>
<%
Statement smaster=con.createStatement();
ResultSet rdetails=smaster.executeQuery("select * from ip_users");
while(rdetails.next())
{
%>
<div style="padding-left:440px; width:30%;" valign="top"><img alt="" src="<%=rdetails.getString("user_logo")%>"></div>
<%} %>
<h3 align="center">Finished Goods Details</h3>
<table class="table table-bordered">
<thead>
<tr class="success">
<th>Indent No</th>
<th>Product</th>
<th>Qty</th>
<th>Unit</th>
</tr>
</thead>
<tbody>
<%
rs=st.executeQuery("select tb.*,(select unit_name_plrl from ip_units where unit_id=tb.unit)un from bom_rawmaterial tb where type='F' and fg_id="+id+"");
while(rs.next())
{
%>
<tr>
<td> <%=bom_no%></td>
<td> <%=rs.getString("product")%> </td>
<td> <%=rs.getString("quantity")%> </td>
<td> <%=rs.getString("unit")%> </td>
</tr>
</tbody>
</table>
<h3 align="center">Raw Materials Details</h3>
<table class="table table-bordered">
<thead>
<tr class="success">
<th>Raw Material</th>
<th>Qty</th>
<th>Unit</th>
</tr>
</thead>
<%
Statement st1=con.createStatement();
/* ResultSet rs1=st1.executeQuery("select * from bom_rawmaterial1 where type='R' and d1_id="+id+""); */
ResultSet rs1=st1.executeQuery("select tb.*,(select product_name from ip_products where product_id=tb.product)prod,(select unit_name_plrl from ip_units where unit_id=tb.unit)uni from bom_rawmaterial1 tb where type='R' and d1_id="+id+"");
while(rs1.next())
{
%>
<tbody>
<tr>
<td><%=rs1.getString("prod") %></td>
<td><%=rs1.getString("quantity") %></td>
<td><%=rs1.getString("unit") %></td>
</tr>
</tbody>
<% } %>
</table>
<%} %>
<div class="col-sm-3" style="margin-left:670px;">
<label for="">Total Quantity:</label>
<input type="text" class="form-control" id="" name="">
</div>
<br>
<h4>Approved By:</h4>
</body>
</html>