| Current Path : /var/www/html/mmishra/istore/ |
| Current File : /var/www/html/mmishra/istore/insummary.inc |
<h2 align='left'>Indent Summary</h2>
<center>
<?php
$status = $_REQUEST["status"];
$rs = mysql_query("select status,count(indent_no) as no from indents group by status");
while ($o = mysql_fetch_object($rs)) {
if ($status == $o->status) {
echo "<font size=+1>[ $o->status</a> - $o->no ]</font>";
} else {
echo "[ <a href='?pg=$pg&status=$o->status'>$o->status</a> - $o->no ]";
}
}
if ($status) {
$rs = mysql_query("select * from indents where status='$status' order by indent_no desc");
while ($o = mysql_fetch_object($rs)) {
$i++;
$j = 0;
echo "<h3>[ $i ]</h3>
<table width='99%' border='1' style='border-collapse: collapse' bgcolor='white'>
<tr><th>Indent No. : <a href='?pg=inindents&indent_no=$o->indent_no'>$o->indent_no</a></th>
<th>Indentor: ".employee_detail($o->emp_no)."</th>
<th>Account: $o->account</th><th>Dated: $o->date_indent</th></tr>
<tr><td>Location: $o->location</td><td>Purpose: $o->purpose</td>
<td>Recommendor: $o->recommendation</td><td>Status: $o->status</td></tr>
</table>
<table width='99%' border='1' style='border-collapse: collapse' bgcolor='white'>
<tr><th width='5%'>Sr.</th><th width='65%'>Particulars</th><th width='10%'>Qty<br>Demand</th>
<th width='10%'>Qty<br>Approve</th><th>Qty<br>Out</th><th>Approx Cost</th></tr>";
$sr = mysql_query("select * from indent_items where indent_no=$o->indent_no order by item");
while ($q = mysql_fetch_object($sr)) {
$j++;
echo "<tr><td>$j</td><td>".item_detail($q->item)."</td><td>$q->qty_demand $q->unit</td>
<td>$q->qty_approve $q->unit</td><td>$q->qty_out $q->unit</td><td>$q->approx_cost</td></tr>";
}
echo "</table>";
}
}
?>
</center>