Current File : //home/obabain/public_html/abc/add_ToStock.jsp
<%@ page language="java" 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");
%>

<%@include file="master.jsp" %>
<style type="text/css">
.highlight-error {
  border-color: red;
}
</style>

<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<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>
<script src="js/jquery-2.1.0.min.js"></script>

<!-- plugin tableEdit load -->
<script src="js/tableEdit-0.1.js"></script>

<!-- load plugin for element -->

<body>



<form action="stock_action.jsp?id=<%=id%>" 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">Components Details:</h3>
        </div>
            
       <div class="panel-body">

            <a href="issue_view.jsp?id=<%=id%>"> <button type="button"  class="btn btn-primary" style="margin-left:930px;">View</button>  </a>       
<table class="table">
        <!-- <thead>
<tr>
<th>BOM No.</th>
<th>Product</th>
<th>Quantity</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>
       <b>
     <%=rs.getString("product") %> ::
     
      <%=rs.getString("quantity") %> <%=rs.getString("unit") %></b></td>
       </tr>
   
       <tr>
       <td>
       <table id="myTable" class="table table-bordered">
       <thead>
<tr>
<th>Raw Material</th>
<!-- <th>Required Quantity</th> -->
<th>Issued Qty</th>
<th>Unit</th>
<!-- <th>Edit</th> -->
<th>Acc</th>
<th>Rej</th>
<th>Qty&nbsp;Checker</th>
</tr>
</thead>
<%
Statement st1=con.createStatement();
ResultSet rs1=st1.executeQuery("select * from bom_rawmaterial1 where type='R' and d1_id="+id+"");
while(rs1.next())
{
%>
<tbody>

<tr>
 
<td> <input type="text" value="<%=rs1.getString("product")%>" name="material[]" class="form-control"> </td>
<td> <input type="text" value="<%=rs1.getString("required_quantity")%>" name="issue_quan[]" class="form-control"> </td>
 <td> <input type="text" value="<%=rs1.getString("unit")%>" name="unit[]" class="form-control"> </td> 
<td> <input type="text" name="accepted[]" class="form-control"> </td>
<td> <input type="text" name="rejected[]" class="form-control"> </td>
<td>  <select name="qc[]" class="form-control"> 
          <option value="0">select</option>
          <%
          rs=st.executeQuery("select * from ip_quality_checker");
          while(rs.next())
          {
          %>    
          <option value="<%=rs.getString("name")%>"><%=rs.getString("name") %></option>
          <%} %>
          </select>
</td>
</tr>

</tbody>
<%}%>

</table>
</td>
       </tr> 
       <%}%>
       </tbody>
       </table>
       
       

            
<script>
function myFunction() {
    var x = document.getElementById("myDIV");
    if (x.style.display === "none") {
        x.style.display = "block";
    } else {
        x.style.display = "none";
    }
}
</script>
 </div> 
       
      <div class="modal-footer" id="contact_submit">  
       <input type="button" value="Back" style="background:#204b58;" class="btn btn-info pull-left"  onclick="goBack()"/>
         <input type="submit" class="btn btn-primary" style="margin-left:450px;" value="Save">
      <!-- <a class="btn btn-default" href="#"  style="margin-right:10px">Reset</a> -->
        <!--  <button type="submit" style="background:" class="" ></button>-->
      </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">
 
</script>
<%@include file="footer.jsp" %>
</form>
<script type="text/javascript">
function goBack() {
    window.history.back();
   
};
</script>
</body>
</html>