Current File : /home/obabain/autoclutchess_obaba_in/BankReconDA.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;
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">
<title>Insert title here</title>
</head>
<body>
<%
try
{
String vtype=request.getParameter("vtype");
String vid=request.getParameter("vid");
String bankdate=request.getParameter("bankdate");

if(vtype.equals("payment") || vtype.equals("receipt"))
{
	
int i=st.executeUpdate("update account_voucher_main set voucher_date='"+bankdate+"' where voucher_id="+vid+"");
Statement st1=con.createStatement();
int j=st1.executeUpdate("update account_voucher_sub set voucher_date='"+bankdate+"' where voucher_id="+vid+"");
}
else
{
	int k=st.executeUpdate("update contra_voucher set voucher_date='"+bankdate+"' where v_id="+vid+"");
}
response.sendRedirect("BankReconciliationById.jsp?Id="+id+"");
}
catch(Exception el)
{
	
}
%>
</body>
</html>