Current File : /home/obabain/public_html/abc/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 grnno=null;
String pid=null;
String pgroup=null;
String phsn=null;
String grndate=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");
grnno=rs.getString("grnno");
grndate=rs.getString("grndate");
}
%>
<!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">
<input type="hidden" value="<%=grndate%>" name="grndate1">
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="row">
<div class="form-group col-xs-2">
<div class="onerow">
GRN No.
<input type="text" name="grnno" class="form-control input-group-lg reg_name" style="width:200px;margin:5px;" value="<%=grnno %>">
</div>
</div>
</div>
<div class="row">
<div class="col-md-3" style="margin-left :0px";>
<label> From Date </label><input type="date" name="from" required class="form-control" style="width:160px; float-right:30px; margin-left: 3px; margin-top:-4px;height:28px;border-radius:5px;border:1px solid #ccc; ">
</div>
<div class="col-md-3" style="margin-left: px; margin-top: -2px;">
<label>To Date</label><input type="date" name="to" required class="form-control" style="width:160px;height:28px;margin-top: -2px; border-radius:5px;border:1px solid #ccc;">
</div>
<div class="col-md-1" style="margin-left: px; margin-top: 17px;">
<!-- <a href="viewissue_2.jsp" class="form-control btn btn-success" style="margin-top:px;" >Reset</a>
-->
</div>
</div>
<div class="panal-body">
<table id="myTable" 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="iprice" value="<%=rs.getString("item_price") %>">
<input type="hidden" name="netamt" value="<%=rs.getString("netamt") %>">
<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" id="tt" value="<%=rs.getString("item_qty") %>" class="tot1 txtstylesmal" name="tot" > </td>
<td><input type="text" id='ac' value="<%=rs.getString("item_qty") %>" class="accc3 txtstylesmall" name="acc"></td>
<td><input type="text" id="rj" class="rej2 txtstylesmall" 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 src="http://code.jquery.com/jquery-1.11.0.min.js"></script>
<script>
$(document).on("change",'.rej2', function(){
"use strict";
var parent = $(this).parents('tr');
var s=$('.tot1',parent).val();
var di=this.value;
//var di=$('#rj').val()
var g=parseFloat(s)-parseFloat(di);
$('.accc3',parent).val(g);
});
</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>