Current File : //home/obabain/khb_obaba_in/receivableBydate.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;
    %>
<!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">
<title>Insert title here</title>
</head>
<body>
<%@include file="master.jsp" %>
<div class="content">
 <div class="row">
    <div class="col-md-9" >
       <div class="panel panel-default" >
       <div class="panel-heading main-color-bg">
        <h3 class="panel-title">Payables</h3>
    </div>
<div class="panel-body">
<table class="table" style="width:80%;">

<thead>
<tr>
<th>Date</th>
<th>Invoice No.</th>
<th>Customer</th>
<th style="text-align:right;">Invoice Amount</th> 
<th style="text-align:right;">Pending Amount</th>
</tr>
</thead>
<tbody>
<%
/* if(!id.equals("0"))
{
if(typ.equals("3"))
{
	System.out.print(typ);
	rs=st.executeQuery("select tb.*,(select client_name from ip_clients where client_id=tb.supplier_id)suppl,(tb.total-tb.received_amt) as pending from ip_sales_invoice tb where supplier_id="+ref_id+" and (tb.total-tb.received_amt)>0 order by invoice_date_created asc");
}
else if(typ.equals("1"))
{
	rs=st.executeQuery("select tb.created_date as invoice_date_created,tb.journal_no as sales_invoice_no,(tb.credit-tb.paid_amt)as pending from journalentry tb where particulars="+id+" and type=2 and (tb.credit-tb.paid_amt)>0");
}
}
else
{ */
	rs=st.executeQuery("select tb.*,(select client_name from ip_clients where client_id=tb.supplier_id)suppl,(tb.total-tb.received_amt) as pending from ip_sales_invoice tb where  (tb.total-tb.received_amt)>0 order by invoice_date_created asc");


while(rs.next())
{

%>
<tr>
<td><%=rs.getString("invoice_date_created") %></td>
<td><%=rs.getString("suppl") %></td>
<td><%=rs.getString("sales_invoice_no") %></td>
<td align="right"><%=rs.getString("total") %></td> 
<td align="right"><%=rs.getString("pending") %></td>
</tr>
<%} %>
</tbody>
</table>
 <div class="modal-footer" id="contact_submit">
         <input type="button" value="Back" style="background:#204b58;" class="pull-left btn btn-info"  onclick="goBack()"/>
         </div>
</div>
</div>
</div>
</div>
</div>
<%@include file="footer.jsp" %>
</body>
<script type="text/javascript">
function goBack() {
    window.history.back(); 
};
</script>
</html>