Current File : /home/obabain/ms_obaba_in/debitvouch.jsp |
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<%@ include file="Connection.jsp" %>
<%@include file="master.jsp" %>
<%
ResultSet rsRowCnt = null;
%>
<% String from=request.getParameter("from");
String to=request.getParameter("to");
String pid=request.getParameter("pid");
Statement st=con.createStatement();
String id=request.getParameter("Id");
%>
<!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">
<script src='https://code.jquery.com/jquery-3.3.1.js'></script>
<script src='https://cdn.datatables.net/1.10.19/js/jquery.dataTables.min.js'></script>
<script src="https://cdn.datatables.net/1.10.19/js/dataTables.bootstrap4.min.js" charset="utf-8">
</script>
<!-- <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
-->
<!-- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.1.1/css/bootstrap.css"> -->
<link rel="stylesheet" href="https://cdn.datatables.net/1.10.19/css/dataTables.bootstrap4.min.css">
<title>Inventory</title>
</head>
<style>
.dropbtn {
background-color: #4CAF50;
color: white;
padding: 12px;
font-size: 16px;
border: none;
cursor: pointer;
height:35px;
}
.dropdown {
position: relative;
display: inline-block;
}
.dropdown-content {
display: none;
position: absolute;
background-color: #f9f9f9;
min-width: 160px;
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
z-index: 1;
}
.dropdown-content a {
color: black;
padding: 12px 16px;
text-decoration: none;
display: block;
}
.dropdown-content a:hover {background-color: #f1f1f1}
.dropdown:hover .dropdown-content {
display: block;
}
.dropdown:hover .dropbtn {
background-color: #3e8e41;
}
</style>
<style>
table {
border-collapse: collapse;
border-spacing: 0;
width: 100%;
border: 1px solid #ddd;
}
tr, td {
text-align: left;
padding: 8px;
}
tr:nth-child(even){background-color: #f2f2f2}
</style>
<body>
<script type="text/javascript">
$(document).ready(function() {
$('#example').DataTable();
} );
</script>
<form>
<div class="content">
<div class="row">
<div class="col-md-9" style="background-color:#eae9e9;width:80%;">
<div class="panel panel-default" >
<div class="panel-heading main-color-bg">
<h3 class="panel-title">Debit Note</h3>
</div>
</div>
<div class="headerbar-item pull-right" style="margin-top:-55px;"><a class="btn btn-danger" style="background:" onclick="goBack()">Back</a>
</div>
<br>
<table class="table table-bordered" id="example">
<thead>
<tr>
<th>Date</th>
<th>Voucher No.</th>
<th>Particulars</th>
<!-- <th>Debit</th> -->
<th style="text-align:right;">Credit</th>
<!-- <th>Options</th> -->
</tr>
</thead>
<tbody>
<%
ResultSet rs=st.executeQuery("select tb.*,(select supplier_name from ip_suppliers where supplier_id=tb.supplier)suppl from debit_note tb where voucher_date between '"+from+"' and '"+to+"'");
while(rs.next())
{
%>
<tr>
<td><%=rs.getString("voucher_date") %></td>
<td><a href="#"><%=rs.getString("voucher_no") %></a></td>
<td><%=rs.getString("suppl") %></td>
<%-- <td><%=rs.getString("debit") %></td> --%>
<td align="right"><%=rs.getString("total") %></td>
<%-- <td align="right">
<a href="deleteJournal.jsp?Id=<%=rs.getString("voucher_id")%>" onclick = "if (! confirm('Continue?')) { return false; }">
<li class="glyphicon glyphicon-trash"></li></a></td> --%>
<%-- <td align="right">
<div class="options btn-group">
<a class="btn btn-default dropdown-toggle fontstyle" data-toggle="dropdown">
<li class="glyphicon glyphicon-cog"><span class="fontstyle">Options</span></li>
</a>
<ul class="dropdown-menu">
<li>
<a href="editPO.jsp?Id=<%=rs.getString("porder_id")%>">
<span class="fontstyle">Edit</span>
</a>
</li>
<li>
<a href="ReceiptpdfFrame.jsp?Id=<%=rs.getString("id")%>"><span class="fontstyle">Download PDF(Original)</span></a>
<a href="deleteReceipt.jsp?Id=<%=rs.getString("voucher_no")%>" onclick = "if (! confirm('Continue?')) { return false; }">
<span class="fontstyle">Delete</span>
</a>
</li>
</ul>
</div>
</td> --%>
</tr>
<%} %>
</tbody>
<tr>
<td></td>
<td></td>
<td></td>
<td style="text-align: center;"> <label>Total Amount</label></td>
<%
ResultSet re=null;
re=st.executeQuery ("select IFNULL(sum(total),0)sqty from debit_note tb where voucher_date between '"+from+"' and '"+to+"' ");
while(re.next())
{
%>
<td style="text-align: center;"> <b> <input style="text-align: center;width:150px;margin-left:0px; " class="form-control" type="text" value="<%=re.getString("sqty")%>" readonly ></b>
</td>
<%} %>
</tr>
</table>
</div>
</div>
</div>
</div>
</form>
<script type="text/javascript">
function goBack() {
window.history.back();
};
</script>
</body>
</html>