| Current Path : /var/www/html/mmishra/istore/ |
| Current File : /var/www/html/mmishra/istore/instatus.inc |
<h2 align='left'>Indent Status</h2>
<center>
<?php
$tbl = 'indents';
$indent_no = $_REQUEST["indent_no"];
?>
Indent No. <input type='text' name='indent_no' value='<?php echo $indent_no; ?>' size='10'>
<input type='submit' name='submit' value='FIND'>
<?php
echo "<table width='98%' border='1' style='border-collapse: collapse'>
<tr><th>Sr.</th><th>Indent No.</th><th>Dated</th><th>Indentor</th><th>Recommendation</th><th>Purpose</th><th>Status</th></tr>";
$rs = mysql_query("select * from $tbl order by indent_no desc");
/* fetch values */
while ($o = mysql_fetch_object($rs)) {
$i++;
echo "<tr><td>$i</td>";
if ($indent_no == $o->indent_no) {
echo "<td><b style='color: red'>$o->indent_no</b></td>";
} else {
echo "<td>$o->indent_no</td>";
//echo "<td><a href='/?pg=$pg&indent_no=$o->indent_no'>$o->indent_no</a></td>";
}
echo "<td>$o->date_indent</td><td>".employee_detail($o->emp_no)."</td>
<td>$o->recommendation</td><td>$o->purpose</td><td>$o->status</td></tr>";
if ($indent_no == $o->indent_no) {
echo "<tr><td colspan='8' align='center'>
<b align='left'>Items</b>
<table width='90%' border='1' style='border-collapse: collapse'>
<tr><th>Sr</th><th>Particulars</th><th>Demanded Qty</th><th>Approved Qty</th><th>Issued Qty</th><th>Approx Cost</th></tr>";
$sr = mysql_query("select * from indent_items where indent_no=$indent_no order by id");
/* fetch values */
while ($q = mysql_fetch_object($sr)) {
$j++;
echo "<tr><td>$j</td><td>".item_detail($q->item)."</td>
<td>$q->demanded_qty</td><td>$q->approved_qty</td>
<td>$q->issued_qty</td><td>$q->approx_cost</td></tr>";
}
echo "</table></td></tr>";
}
}
echo "</table>";
?>