Current File : /home/obabain/anms_obaba_in/StockReportGroupwise.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;
%>
<!DOCTYPE html>
<html>
<head>
<meta charset="ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<%@include file="master.jsp" %>
<form>
<div class="content">
<div class="row" style="width:90%">
<div class="col-md-9" >
<div class="panel panel-default" >
<div class="panel-heading main-color-bg">
<h3 class="panel-title">Inventory Report</h3>
</div>
<div class="modal-footer" id="contact_submit">
<input type="button" value="Back" style="background:#204b58;" class="pull-right btn btn-info" onclick="goBack()"/>
</div>
<div class="panel-body">
<table class="table table-hover">
<thead>
<tr>
<th style="width:10%;">Product Group</th>
<th style="width:10%; text-align:right;">Value</th>
</tr>
<%
rs=st.executeQuery("select IFNULL(sum((qty_pur)*(select product_price from ip_products where product_id=tb.product_id)),0)value,product_grp,IFNULL((select family_name from ip_families where family_id=tb.product_grp),'Other') fname,product_grp from ip_stock_register tb where product_grp=1 or product_grp=2 or product_grp=3 group by product_grp order by product_grp asc");
while(rs.next())
{
%>
<tr>
<td><a href="StockReportGroup_detail.jsp?family=<%=rs.getString("product_grp")%>"><%=rs.getString("fname") %></a></td>
<td align="right"><%=rs.getString("value") %></td>
</tr>
<%} %>
</thead>
</table>
</div>
</div>
</div>
</div>
</div>
</form>
<%@include file="footer.jsp" %>
</body>
<script type="text/javascript">
function goBack() {
window.history.back();
};
</script>
</html>