Current File : //usr/local/tomcat8/work/Catalina/anms.obaba.in/ROOT/org/apache/jsp/receiptPDF_jsp.java |
/*
* Generated by the Jasper component of Apache Tomcat
* Version: Apache Tomcat/8.0.39
* Generated at: 2023-01-17 05:04:56 UTC
* Note: The last modified time of this file was set to
* the last modified time of the source file after
* generation to assist with modification tracking.
*/
package org.apache.jsp;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import java.sql.*;
public final class receiptPDF_jsp extends org.apache.jasper.runtime.HttpJspBase
implements org.apache.jasper.runtime.JspSourceDependent,
org.apache.jasper.runtime.JspSourceImports {
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 logo=null;
String state=null;
ResultSet rcom=null;
String partii=null;
String payno=null;
String paydate=null;
String acc=null;
String amt=null;
String narr=null;
private static final javax.servlet.jsp.JspFactory _jspxFactory =
javax.servlet.jsp.JspFactory.getDefaultFactory();
private static java.util.Map<java.lang.String,java.lang.Long> _jspx_dependants;
static {
_jspx_dependants = new java.util.HashMap<java.lang.String,java.lang.Long>(1);
_jspx_dependants.put("/Connection.jsp", Long.valueOf(1656676498000L));
}
private static final java.util.Set<java.lang.String> _jspx_imports_packages;
private static final java.util.Set<java.lang.String> _jspx_imports_classes;
static {
_jspx_imports_packages = new java.util.HashSet<>();
_jspx_imports_packages.add("java.sql");
_jspx_imports_packages.add("javax.servlet");
_jspx_imports_packages.add("javax.servlet.http");
_jspx_imports_packages.add("javax.servlet.jsp");
_jspx_imports_classes = null;
}
private volatile javax.el.ExpressionFactory _el_expressionfactory;
private volatile org.apache.tomcat.InstanceManager _jsp_instancemanager;
public java.util.Map<java.lang.String,java.lang.Long> getDependants() {
return _jspx_dependants;
}
public java.util.Set<java.lang.String> getPackageImports() {
return _jspx_imports_packages;
}
public java.util.Set<java.lang.String> getClassImports() {
return _jspx_imports_classes;
}
public javax.el.ExpressionFactory _jsp_getExpressionFactory() {
if (_el_expressionfactory == null) {
synchronized (this) {
if (_el_expressionfactory == null) {
_el_expressionfactory = _jspxFactory.getJspApplicationContext(getServletConfig().getServletContext()).getExpressionFactory();
}
}
}
return _el_expressionfactory;
}
public org.apache.tomcat.InstanceManager _jsp_getInstanceManager() {
if (_jsp_instancemanager == null) {
synchronized (this) {
if (_jsp_instancemanager == null) {
_jsp_instancemanager = org.apache.jasper.runtime.InstanceManagerFactory.getInstanceManager(getServletConfig());
}
}
}
return _jsp_instancemanager;
}
public void _jspInit() {
}
public void _jspDestroy() {
}
public void _jspService(final javax.servlet.http.HttpServletRequest request, final javax.servlet.http.HttpServletResponse response)
throws java.io.IOException, javax.servlet.ServletException {
final java.lang.String _jspx_method = request.getMethod();
if (!"GET".equals(_jspx_method) && !"POST".equals(_jspx_method) && !"HEAD".equals(_jspx_method) && !javax.servlet.DispatcherType.ERROR.equals(request.getDispatcherType())) {
response.sendError(HttpServletResponse.SC_METHOD_NOT_ALLOWED, "JSPs only permit GET POST or HEAD");
return;
}
final javax.servlet.jsp.PageContext pageContext;
javax.servlet.http.HttpSession session = null;
final javax.servlet.ServletContext application;
final javax.servlet.ServletConfig config;
javax.servlet.jsp.JspWriter out = null;
final java.lang.Object page = this;
javax.servlet.jsp.JspWriter _jspx_out = null;
javax.servlet.jsp.PageContext _jspx_page_context = null;
try {
response.setContentType("text/html; charset=ISO-8859-1");
pageContext = _jspxFactory.getPageContext(this, request, response,
null, true, 8192, true);
_jspx_page_context = pageContext;
application = pageContext.getServletContext();
config = pageContext.getServletConfig();
session = pageContext.getSession();
out = pageContext.getOut();
_jspx_out = out;
out.write("\r\n");
out.write(" ");
out.write("\n");
out.write(" \n");
out.write("<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\n");
out.write("<html>\n");
out.write("<head>\n");
out.write("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=ISO-8859-1\">\n");
out.write("\n");
out.write("</head>\n");
out.write("<body>\n");
Class.forName("com.mysql.jdbc.Driver");
Connection con=DriverManager.getConnection("jdbc:mysql://localhost/obabain_anmspl","obabain_anms22","y8*8i9DU2");
out.write("\n");
out.write(" </body>\n");
out.write(" </html>\n");
out.write("\r\n");
out.write(" ");
String id=request.getParameter("Id");
Statement st=con.createStatement();
ResultSet rs=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");
logo=rcom.getString("user_logo");
}
rs=st.executeQuery("select tb.*,(select ledger_name from account_ledger where l_id=tb.particular)parti,IFNULL((select ledger_name from account_ledger where l_id=tb.account),'')acc from account_voucher_main tb where voucher_id="+id+" and voucher_type='receipt'");
while(rs.next())
{
payno=rs.getString("voucher_no");
paydate=rs.getString("voucher_date");
acc=rs.getString("acc");
partii=rs.getString("parti");
amt=rs.getString("credit_amt");
narr=rs.getString("narration");
}
out.write("\r\n");
out.write(" \r\n");
out.write(" ");
out.write("\r\n");
out.write("<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\r\n");
out.write("<html>\r\n");
out.write("<head>\r\n");
out.write("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=ISO-8859-1\">\r\n");
out.write("<link rel=\"shortcut icon\" type=\"image/x-icon\" href=\"img/ico.ico\" />\r\n");
out.write(" <link href=\"css/bootstrap.min.css\" rel=\"stylesheet\">\r\n");
out.write(" <link href=\"css/estilos.css\" rel=\"stylesheet\">\r\n");
out.write(" \r\n");
out.write(" <link href=\"css/Mystyle.css\" rel=\"stylesheet\">\r\n");
out.write(" <script src=\"http://cdn.ckeditor.com/4.6.1/standard/ckeditor.js\"></script>\r\n");
out.write(" <script src=\"https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js\"></script>\r\n");
out.write("<script src=\"js/jscolor.js\"></script>\r\n");
out.write("<style type=\"text/css\">\r\n");
out.write("footer {\r\n");
out.write(" /* font-size: 9px; */\r\n");
out.write(" width:120mm;\r\n");
out.write(" text-align: left;\r\n");
out.write(" /* border-top:1px solid black; */\r\n");
out.write("}\r\n");
out.write("\r\n");
out.write("@page {\r\n");
out.write(" size: landscape;\r\n");
out.write(" margin: 0mm 0mm 0mm 0mm;\r\n");
out.write("}\r\n");
out.write("\r\n");
out.write("@media print {\r\n");
out.write(" footer {\r\n");
out.write(" position: fixed;\r\n");
out.write(" bottom: 0;\r\n");
out.write(" /* border-top:1px solid black; */\r\n");
out.write(" width:120mm;\r\n");
out.write(" text-align:left;\r\n");
out.write(" \r\n");
out.write(" }\r\n");
out.write(" body {\r\n");
out.write(" width: 120mm;\r\n");
out.write(" height: 100mm; \r\n");
out.write(" \r\n");
out.write(" \r\n");
out.write(" }\r\n");
out.write(" </style>\r\n");
out.write("<title>Insert title here</title>\r\n");
out.write("</head>\r\n");
out.write("<body>\r\n");
out.write("<div style=\"background-color:white;\">\r\n");
out.write("<div class=\"col-md-4\" style=\"text-align:center;\"><img style=\"height:75px;width:75px;\" src=\"");
out.print(logo );
out.write("\"></div>\r\n");
out.write("<div class=\"col-md-4\"><div style=\" text-align:center; font-size:medium; \">\r\n");
out.write("<font style=\"font-family:Times New Roman;\"> <b>");
out.print(comp );
out.write("</b></font><br>\r\n");
out.write("\t\t\t\t\t ");
out.print(add1 );
out.write("<br>\r\n");
out.write(" ");
out.print(add2 );
out.print(city );
out.write('-');
out.print(zip );
out.write("<br>\r\n");
out.write("\t\t\t\t\t Ph-No:+91 ");
out.print(phone );
out.write("<br>\r\n");
out.write("\t\t\t\t\t Email: ");
out.print(email );
out.write("<br>\r\n");
out.write("<br><br>\r\n");
out.write("<span style=\"text-align:center; font-size:medium; \"><b>Receipt Voucher</b></span>\r\n");
out.write("</div></div>\r\n");
out.write("\r\n");
out.write("<br>\r\n");
out.write("<div>\r\n");
out.write("<div class=\"row\" > \r\n");
out.write(" <div class=\"col-xs-8\">\r\n");
out.write(" <span style=\"margin-left:15px;\"> No:</span> \r\n");
out.write(" <b>");
out.print(payno );
out.write("</b>\r\n");
out.write(" \r\n");
out.write(" </div> \r\n");
out.write(" <div class=\"col-xs-4 \">\r\n");
out.write(" <span style=\"margin-left:5px;\">Dated:</span> \r\n");
out.write(" <b>");
out.print(paydate );
out.write("</b>\r\n");
out.write(" </div> \r\n");
out.write(" \r\n");
out.write(" </div>\r\n");
out.write(" <div style=\"border-top:1px solid black;\">\r\n");
out.write(" <table class=\"pdftable\" style=\"width:100%;\">\r\n");
out.write(" <thead>\r\n");
out.write(" <tr>\r\n");
out.write(" <th>Particulars : <b>");
out.print(partii );
out.write("</b></th>\r\n");
out.write(" <th style=\"text-align:right;\">Amount</th>\r\n");
out.write(" </tr>\r\n");
out.write(" </thead>\r\n");
out.write(" <tbody>\r\n");
out.write(" \r\n");
out.write(" ");
rs=st.executeQuery("select tb.*,IFNULL((select ledger_name from account_ledger where l_id=tb.particular),'')parti,sum(tb.debit_amt)am from account_voucher_sub tb where voucher_id="+id+" group by particular order by vid");
while(rs.next())
{
out.write("\r\n");
out.write(" \t \r\n");
out.write(" \t \r\n");
out.write(" <tr>\r\n");
out.write(" <td style=\"margin-left:60px;\" valign=\"top\"> \r\n");
out.write(" ");
Statement st1=con.createStatement();
ResultSet rs1=st1.executeQuery("select tb.*,(case when tb.type='B' then (select sales_invoice_no from ip_sales_invoice2 where sinvoice_id=tb.bill_no) else bill_no end )bill from account_voucher_sub tb where voucher_id="+id+" and particular="+rs.getString("particular")+"");
while(rs1.next())
{
out.write("\r\n");
out.write(" <br>\r\n");
out.write(" ");
if(rs1.getString("type").equals("B"))
{
out.write("\r\n");
out.write(" \t Agst Ref: <span>");
out.print(rs1.getString("bill") );
out.write("</span>\r\n");
out.write(" \t <span style=\"margin-left:150px;\">");
out.print(rs1.getString("debit_amt") );
out.write("Cr</span>\r\n");
out.write(" \t ");
}}
out.write("\r\n");
out.write(" </td>\r\n");
out.write(" <td align=\"right\" >");
out.print(rs.getString("am") );
out.write("</td>\r\n");
out.write(" </tr>\r\n");
out.write(" ");
}
out.write("\r\n");
out.write(" <tr>\r\n");
out.write(" <td></td>\r\n");
out.write(" <td ></td>\r\n");
out.write(" </tr>\r\n");
out.write(" </tbody>\r\n");
out.write(" </table>\r\n");
out.write(" </div>\r\n");
out.write(" <footer>\r\n");
out.write(" <table class=\"pdftable\" style=\"width:100%;\">\r\n");
out.write(" <tbody style=\"border-top:1px solid black;\">\r\n");
out.write(" \r\n");
out.write(" <tr>\r\n");
out.write(" <td style=\"vertical-align:bottom;\">\r\n");
out.write(" <b>Through:</b><br><span style=\"margin-left:50px;\">");
out.print(acc );
out.write("</span>\r\n");
out.write(" <br>\r\n");
out.write(" <b>on account of:</b><br><span style=\"margin-left:40px;\">");
out.print(narr );
out.write("</span>\r\n");
out.write(" </td>\r\n");
out.write(" <td style=\"vertical-align:top; \" align=\"right\" >\r\n");
out.write(" <span style=\" border-bottom:1px solid black; padding:5px 0px 5px 0px;\">");
out.print(amt );
out.write("</span>\r\n");
out.write(" </td>\r\n");
out.write(" </tr>\r\n");
out.write(" </tbody>\r\n");
out.write(" </table>\r\n");
out.write(" \r\n");
out.write(" \r\n");
out.write(" <hr>\r\n");
out.write(" <div style=\"padding:30px 0px 0px 0px;\">\r\n");
out.write(" <div class=\"row\" > \r\n");
out.write(" <div class=\"col-xs-8\">\r\n");
out.write(" \r\n");
out.write(" Receivers Signature\r\n");
out.write(" </div> \r\n");
out.write(" <div class=\"col-xs-4 \" style=\"text-align:right;\">\r\n");
out.write(" Authorized Signatory\r\n");
out.write(" </div> \r\n");
out.write(" \r\n");
out.write(" </div>\r\n");
out.write(" </div>\r\n");
out.write(" </footer>\r\n");
out.write("</div>\r\n");
out.write("\r\n");
out.write("</div>\r\n");
out.write("</body>\r\n");
out.write("</html>");
} catch (java.lang.Throwable t) {
if (!(t instanceof javax.servlet.jsp.SkipPageException)){
out = _jspx_out;
if (out != null && out.getBufferSize() != 0)
try {
if (response.isCommitted()) {
out.flush();
} else {
out.clearBuffer();
}
} catch (java.io.IOException e) {}
if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
else throw new ServletException(t);
}
} finally {
_jspxFactory.releasePageContext(_jspx_page_context);
}
}
}