| Current Path : /var/www/html/mmishra/irp/istore/ |
| Current File : /var/www/html/mmishra/irp/istore/innodues.inc |
<h2 align='left'>Certify Nodues</h2>
<?php
$tbl = 'indents';
$employee = $_REQUEST["employee"];
if ($_POST["submit"] == 'NODUES') {
$id = $_POST['id'];
mysql_query("update $tbl set status='Settled',dated=now() where employee='$employee'");
$indentno = 0;
}
echo "<center>
Select employee".employee_list($employee)."<input type='submit' name='submit' value='OK'>
<table width='90%' border='1' style='border-collapse: collapse'>
<tr><th>No.</th><th>Indent No.</th><th>Dated</th><th>Recommendation</th><th>Action</th></tr>";
$rs = mysql_query("select * from $tbl where employee='$employee' and status='Issued' order by indent_no");
/* fetch values */
while ($o = mysql_fetch_object($rs)) {
$i++;
echo "<tr><td>$i</td>";
if ($indentno == $o->indent_no) {
echo "<td><b style='color: red'>$o->indent_no</b> <input type='hidden' name='indent_no' value='$o->indent_no'></td>";
} else {
echo "<td><a href='?pg=$pg&indent_no=$o->indent_no'>$o->indent_no</a></td>";
}
echo "<td>$o->indent_date</td><td>$o->recommendation</td><td><a href='?pg=$pg&status=Settled&indent_no=$o->indent_no'>Return</a></td></tr>";
echo "<tr><td colspan='6' align='center'>
<font color='red' size=+1>Particulars</font>
<table width='90%' border='1' style='border-collapse: collapse'>
<tr><th>No.</th><th>Indent Items</th><th>Qty Demand</th><th>Qty Out</th><th>Qty Approved</th><th>Approx Cost</th></tr>";
$sr = mysql_query("select * from indent_items where indent_no=$o->indent_no order by item");
/* fetch values */
while ($q = mysql_fetch_object($sr)) {
$j++;
echo "<tr><td>$j <input type='hidden' name='item[]' value='$q->item'></td>
<td>".item_detail($q->item)."</td><td>$q->qty_demand</td><td>$q->qty_out</td>
<td>$q->qty_approved</td><td>$q->approx_cost <input type='hidden' name='id[]' value='$q->id'></td></tr>";
}
echo "</table></td></tr>";
}
if ($i) echo "<tr><th colspan='5'><input type='submit' name='submit' value='NODUES'></th></tr>";
?>
</table>
</center>