Current File : /home/obabain/khb_obaba_in/InwardFromPurchaseInvoice.jsp
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
    <%@ include file="Connection.jsp" %>
    <%!
    String id=null;
    String invno=null;
    String invdate=null;
    String pono=null;
    String podate=null;
    
    String pid=null;
    String pgroup=null;
    String phsn=null;
    %>
    <%
    String pino=request.getParameter("pino");
    Statement st=con.createStatement();
    ResultSet rs=null;
    rs=st.executeQuery("select * from ip_puchase_invoice where pinvoice_id='"+pino+"'");
    while(rs.next())
    {
    	invno=rs.getString("purchase_invoice_no");
    	invdate=rs.getString("invoice_date_created");
    	pono=rs.getString("pono");
    	podate=rs.getString("podate");
    	
    	
    }
    
    
    %>
<!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="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"  rel="stylesheet">
<link href="css/jquery.datetimepicker.css" rel="stylesheet">
<title>Insert title here</title>
</head>
<body>
<%@include file="master.jsp" %>
<form action="PurchaseInvoiceAddstockDA.jsp">


<div class="content">
<div class="row">
<div class="col-md-9"  style="width:80%;background-color:white;">
<div class="panel panel-default" >
       <div class="panel-heading main-color-bg">
        <h3 class="panel-title">Inward Stock</h3>
              </div>
             </div>
               <div class="headerbar-item pull-right">
 
<a class="btn btn-info" style="background:#204b58"  href="ViewInvoicePurchase.jsp">View</a>
 
</div>
  <div class="row">
<div class="form-group col-xs-2">
            <div class="onerow">
            <input type="hidden" value="<%=pino%>" name="pid">
Invoice No.

<input type="text" name="invno" class="form-control input-group-lg reg_name" style="width:200px;margin:5px;" value="<%=invno %>">
</div>
</div>


<!-- 
<td style="padding:0px 0px 0px 10px;"><a class="btn btn-warning" onclick="getqc(document.inv.qc)">QC</a></td>
 -->
<div class="form-group col-xs-2">
            <div class="onerow">
Invoice Date
<input type="text" name="invdate" class="form-control input-group-lg reg_name" style="width:200px;margin:5px;" id="datetimepicker" value="<%=invdate%>">
</div>
</div>
<div class="form-group col-xs-2">
            <div class="onerow">
P.O.No
<input type="text" name="pono" class="form-control input-group-lg reg_name" style="width:200px;margin:5px;" value="<%=pono %>">
</div>
</div>
<div class="form-group col-xs-2">
            <div class="onerow">
P.O. Date
<input type="text" name="podate" class="form-control input-group-lg reg_name" style="width:200px;margin:5px;" id="datetimepicker2" value="<%=podate %>">
</div>
</div>
<div class="form-group col-xs-2">
            <div class="onerow">
Quality Checker

<select name="qc"  class="form-control input-group-lg reg_name" style="width:200px;margin:5px;">
<%


 rs=st.executeQuery("SELECT * FROM ip_quality_checker where branch_id="+loginid+" order by name asc");
while(rs.next())
{
%>
<option>
<%=rs.getString("name") %>
</option>
<%} %>
</select>
</div>
 </div>
</div> 
<div class="panal-body">
<table class="table table-bordered"style="width:85%;" >
<thead>
<tr>
<th>Product Name
</th>
<th>Unit</th>
<th>Qty</th>
<th>Accepted Qty</th>
<th>Rejected Qty</th>
<th>Remarks</th>
</tr>
</thead>
<tbody>
<%
rs=st.executeQuery("select tb.*,(select product_sku from ip_products where product_id=tb.item_product_id )hsn,(select family_id from ip_products where product_id=tb.item_product_id )family from ip_purchase_invoice_item tb where invoice_id="+pino+"");
while(rs.next())
{
%>
<tr>
<td>
<input type="hidden" name="prid" value="<%=rs.getString("item_product_id") %>">
<input type="hidden" name="hsn" value="<%=rs.getString("hsn") %>">

<input type="hidden" name="pgroup" value="<%=rs.getString("family")%>"> 
<input type="text" value="<%=rs.getString("item_name") %>" class="form-control" name="pname"></td>
<td><%=rs.getString("item_UOM") %></td>
<td><input type="text" value="<%=rs.getString("item_qty") %>" class="form-control" name="tot"></td>
<td><input type="text" value="<%=rs.getString("item_qty") %>" class="form-control" name="acc"></td>
<td><input type="text" value="0" class="form-control" name="rej"> </td>
<td><input type="text" class="form-control"></td>

</tr>
<%} %>
</tbody>
</table>
</div>
<div class="modal-footer" id="contact_submit">
 <a class="pull-left btn btn-danger"  onclick="goBack()">Back</a>
 <a class="btn btn-default" href="InventoryPurchase.jsp" >Reset</a>
<input type="submit" value="Save Changes" class="btn btn-info" style="background:#204b58" onclick="validate()">

</div>
</div>
</div>
</div>
<%@include file="footer.jsp" %>
</form>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"></script>
    <script src="js/select2.min.js"></script>
    <script src="js/jquery.datetimepicker.full.js"></script>
    <script>
     jQuery('#datetimepicker').datetimepicker({
    	 timepicker:false,
    	 todayBtn: "linked"
    	 //mask:true, // '9999/19/39 29:59' - digit is the maximum possible for a cell
    	});
     
     jQuery('#datetimepicker2').datetimepicker({
    	 timepicker:false,
    	 todayBtn: "linked"
    	 //mask:true, // '9999/19/39 29:59' - digit is the maximum possible for a cell
    	});
    </script>
    <script type="text/javascript">
function goBack() {
    window.history.back();
   
};
</script>
</body>
</html>