Current File : /home/obabain/public_html/abc/BankReconciliationById.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">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<link href="css/jquery.datetimepicker.css" rel="stylesheet">
<title>Insert title here</title>
</head>
<body>
<%@include file="master.jsp" %>
<form action="BankReconDA.jsp">
<div class="container">
<div class="row" style="width:110%">
<div class="col-md-10" >
<div class="panel panel-default" >
<div class="panel-heading main-color-bg">
<h3 class="panel-title">Bank Reconciliation</h3>
</div>
<div class="headerbar-item pull-right" style="margin:10px 10px 0px 0px;"><a style="background:#204b58" class="btn btn-info" onclick="goBack()">Back</a></div>
<br><br><div class="panel-body" >
<input type="hidden" value="<%=id %>" name="id">
<table class="table table-hover">
<thead>
<tr>
<th>Date</th>
<th>Vch.No.</th>
<th>Particular</th>
<th>Voucher type</th>
<th>Transaction type</th>
<th>Bank Date</th>
<th style="text-align:right;">Debit</th>
<th style="text-align:right;">Credit</th>
</tr>
</thead>
<tbody>
<%
rs=st.executeQuery("select tb.voucher_no, tb.voucher_id, tb.voucher_date,0 as debit ,tb.credit_amt, voucher_type,'Payment' as vchtype,(case when tb.cash_cheque='cash' then 'Cash' else 'Cheque' end)as cash_cheque,(select ledger_name from account_ledger where l_id=tb.particular)parti from account_voucher_main tb where branch_id="+loginid+" and voucher_type='payment' and account="+id+""
+" union"
+" select tb.voucher_no, tb.voucher_id, tb.voucher_date,tb.credit_amt,0, voucher_type,'Receipt' as vchtype,(case when tb.cash_cheque='cash' then 'Cash' else 'Cheque' end)as cash_cheque,(select ledger_name from account_ledger where l_id=tb.particular)parti from account_voucher_main tb where branch_id="+loginid+" and voucher_type='receipt' and account="+id+" "
+" union"
+" select tb.voucher_no, tb.v_id,tb.voucher_date,0,tb.amount,'contra' as voucher_type,'Contra' as vchtype,'Cheque',(select ledger_name from account_ledger where l_id=tb.particular)parti from contra_voucher tb where branch_id="+loginid+" and account="+id+"");
while(rs.next())
{
%>
<tr>
<td><%=rs.getString("voucher_date") %></td>
<td><a href="editVouchLedgerwise.jsp?Id=<%=rs.getString("voucher_id") %>&type=<%=rs.getString("voucher_type") %>"><%=rs.getString("voucher_no") %></a></td>
<td><%=rs.getString("parti") %></td>
<td><%=rs.getString("vchtype") %></td>
<td><%=rs.getString("cash_cheque") %></td>
<td><a data-toggle="modal" data-target="#myModalledg" onclick="getvalues('<%=rs.getString("voucher_id") %>','<%=rs.getString("voucher_type") %>','<%=rs.getString("voucher_date") %>')">Change</a></td>
<td align="right"><%=rs.getString("debit") %></td>
<td align="right"><%=rs.getString("credit_amt") %></td>
</tr>
<%} %>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<div class="modal fade" id="myModalledg" role="dialog" >
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
</div>
<div class="modal-body">
<div class="panel-body">
<div class="row">
<div class="col-xs-8">
Bank Date
<input type="text" class="form-control" id="datetimepicker" name="bankdate">
<input type="hidden" class="form-control" id="vtype" name="vtype">
<input type="hidden" class="form-control" id="vid" name="vid">
<input type="hidden" class="vdate form-control" id="vidate" name="vidate">
</div>
</div>
</div>
</div>
<div class="modal-footer">
<input type="submit" class="btn btn-primary" value="Save Changes">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
<script src="js/jquery.datetimepicker.full.js"></script>
<script>
jQuery('#datetimepicker').datetimepicker({
timepicker:false,
todayBtn: "linked"
//mask:true, // '9999/19/39 29:59' - digit is the maximum possible for a cell
});
</script>
</div>
</form>
<%@include file="footer.jsp" %>
</body>
<script>
function getvalues(el,ty,dt)
{
var v=document.getElementById("vid");
var vt=document.getElementById("vtype");
var vd=document.getElementById("vidate");
vt.value=ty;
v.value=el;
vd.value=dt;
}
</script>
<script type="text/javascript">
function goBack() {
window.history.back();
};
</script>
</html>