Current File : /home/obabain/ms_obaba_in/InvoGrnPdf.jsp
<%@ page language="java" import="java.util.Date" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
     <%@include file="Connection.jsp" %>
    <%
    String from=request.getParameter("from");
    String to=request.getParameter("to");
    String iid=request.getParameter("invno");

   
	Statement st=con.createStatement();
	Statement st1=con.createStatement();
	ResultSet rs = null;
%>
<%!				
		String comp=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">
<link href="css/Mystyle.css" rel="stylesheet">
<script src="js/jscolor.js"></script>
<title>Insert title here</title>
</head>
<body>

<%
 Statement ss1=con.createStatement();
	    rs=ss1.executeQuery("select * from ip_users");
	   while(rs.next())
	   {
	   	comp=rs.getString("user_company");
	
	   }
	   %>
<table style=" width:210mm;">
   <thead><tr><td><div style=" background-color:#DED9D1; font-size:x-large; width:210mm; text-align:center; font-family:Times New Roman; "><b><%=comp %></b></div></td></tr>
   <tr>
   <td>
   <div style=" width:210mm;font-size: medium; text-align:center; font-family:Times New Roman; "><b><u>Out standing GRNs </u></b></div>
   </td>
   </tr>
   <tr><td>
<table style="width:210mm; border-bottom:1px solid black; font-size:15px;" >
<tr>
<%
          Statement smaster=con.createStatement();
          ResultSet rdetails=smaster.executeQuery("select * from ip_users");
          while(rdetails.next())
          {
          %>
<td style="padding-left:40px; width:30%;" valign="top"><img alt="" src="<%=rdetails.getString("user_logo")%>"></td>
<%} %>
<td style=" width:70%; ">
<table style="width:100%">
<tr>
<%
   Date date = new Date();
   out.print( "<h5 align=\"right\">" +date.toString()+"</h5>");
%>
<%
          Statement s=con.createStatement();
          ResultSet rsdetails=smaster.executeQuery("select * from ip_users");
          while(rsdetails.next())
          {
          %>

<%} %>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</thead>
</table>

<table class="pdftable">
<thead>
<tr>
<th >Invoice No.</th>
 <th>Invoice Date</th>
 <th>PO No.</th>
  <th>PO Date</th>
<th>Product Name</th>
<!-- <th>HSN</th> -->
<th>Invoice Qty</th>
<th> Purchase Accepted</th>
<th> Purchase Rejected </th>
<th> QC</th>

</tr>
</thead>
<tbody>

<%
if(from.length()==0)
{
	rs=st1.executeQuery("select * from ip_stock_register where type='P' and invno='"+iid+"'");
}
else{
	

rs=st1.executeQuery("select * from ip_stock_register where type='P'and last_updated_date between '"+from+"' and '"+to+"' AND invno='"+iid+"'");
}
   while(rs.next())
	   {
	 %>  
	
<tr>	  
<td><%=rs.getString("invno") %></td>
<td><%=rs.getString("invdate") %></td>
<td><%=rs.getString("pono") %></td>
<td><%=rs.getString("podate") %></td>
<td><%=rs.getString("product_name") %></td>
<%-- <td><%=rs.getString("product_hsn") %></td> --%>
<td><%=rs.getString("total_qty") %></td>
<td><%=rs.getString("qty_pur") %></td>
<td><%=rs.getString("rej_qty") %></td>
<td><%=rs.getString("qc_name") %></td>
</tr>
<%} %>

</tr>
</tbody>
</table>
</div>
</body>
</html>