Current File : /home/obabain/anms_obaba_in/receivableByIddd.jsp |
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<%@include file="Connection.jsp" %>
<%
ResultSet ri=null;
Statement ss1=con.createStatement();
rcom=ss1.executeQuery("select * from ip_users");
while(rcom.next())
{
comp=rcom.getString("user_company");
add1=rcom.getString("user_address_1");
add2=rcom.getString("user_address_2");
city=rcom.getString("user_city");
zip=rcom.getString("user_zip");
phone=rcom.getString("user_phone");
email=rcom.getString("user_email");
web=rcom.getString("user_web");
gst=rcom.getString("user_vat_id");
bankname=rcom.getString("bank_name");
acno=rcom.getString("account_no");
ifsc=rcom.getString("ifsc");
branch=rcom.getString("bank_branch");
}
Statement st=con.createStatement();
String id=request.getParameter("Id");
String typ=request.getParameter("type");
ResultSet rs=st.executeQuery("select * from ip_sales_invoice2 where sinvoice_id="+id+"");
while(rs.next())
{
sno=rs.getString("sales_invoice_no");
qno=rs.getString("pono");
podate=rs.getString("podate");
sdate=rs.getString("invoice_date_created");
deptch=rs.getString("dispatch");
paym=rs.getString("payment_method");
total=rs.getString("total");
freight=rs.getString("freight");
pfc=rs.getString("purchase_pfc");
ship=rs.getString("ship_addr");
eway1=rs.getString("eway_bill");
motor1=rs.getString("motor_no");
}
%>
<%!
int str;
double sub;
String sno=null;
String total=null;
String qno=null;
String sdate=null;
String podate=null;
String deptch=null;
String paym=null;
String freight=null;
String pfc=null;
String ship=null;
String comp=null;
String add1=null;
String add2=null;
String city=null;
String zip=null;
String phone=null;
String email=null;
String web=null;
String gst=null;
String bankname=null;
String acno=null;
String ifsc=null;
String branch=null;
String motor1=null;
String eway1=null;
ResultSet rcom=null;
%>
<%
if(id.equals("0"))
{
//String type=request.getParameter("type");
rs=st.executeQuery("select tb.*,(select client_name from ip_clients where client_id=tb.supplier_id)suppl from ip_sales_invoice2 tb where yrid=3");
supplname="All";
}
else
{
rs=st.executeQuery("select tb.*,(select client_name from ip_clients where client_id=tb.supplier_id)suppl from ip_sales_invoice2 tb where sinvoice_id="+id+"");
while(rs.next())
{
supplname=rs.getString("suppl");
}
}
%>
<%!
String supplname=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">
<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>
<title>Reports</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">Sales</h3>
</div>
<div class="panel-body">
<div style="width:80%;" align="center"><span style="color:Green; font-size:large;""><b><u><%=supplname %></u></b></span></div>
<table class="table">
<thead>
</thead>
<tbody>
<tr><td>
<table class="table table-bordered" id="example">
<thead>
<tr style="border-bottom:1px solid black;">
<th style="text-align:left">No.</th>
<th style="text-align:left">HSN</th>
<th style="text-align:left">Product Description</th>
<th style="text-align:right">Qty</th>
<th style="text-align:right">UOM</th>
<th style="text-align:right">Price</th>
<th style="text-align:right">Amount</th>
</tr>
</thead>
<tbody>
<tr>
<%
if(!id.equals("0"))
{
Statement si=con.createStatement();
ri=si.executeQuery("select * from ip_sales_invoice_item2 where invoice_id="+id+"");
}
while(ri.next())
{
%>
<td><%=ri.getString("item_order")%></td><br>
<td><%=ri.getString("item_sku")%></td>
<td>
<%=ri.getString("item_name")%><br>
<%=ri.getString("item_description")%></td>
<td align="right"><%=ri.getString("item_qty")%></td>
<td align="right"><%=ri.getString("item_UOM")%></td>
<td align="right"><%=ri.getString("item_price")%></td>
<td align="right"><%=ri.getString("item_subtotal")%></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>