Your IP : 216.73.216.40


Current Path : /var/www/html/mmishra/istore/
Upload File :
Current File : /var/www/html/mmishra/istore/ststockinout.inc

<h3>Stock In-Out</h3>
<center>

<?php
$item = $_REQUEST['item'];
$inout = $_REQUEST['inout'];

if ($inout == 1) {
	echo "<h4>Receipts of ".item_inventory($item)."</h4>";
	$rs = mysql_query("select item,ChallanBillNo,concat(qty_in,' ',unit) as qty,rate,dateCreation as dated from st_stockin where item=$item order by dateCreation");
} else {
	echo "<h4>Distribution of ".item_inventory($item)."</h4>";
	$rs = mysql_query("select s.indent_no,e.emp_name as indentor,concat(s.qty_out,' ',s.unit) as qty,gem,s.dateCreation as dated from st_stockout as s,indents as i, employees as e where s.indent_no=i.indent_no and i.emp_no=e.emp_no and item=$item order by s.dateCreation");
}
if (mysql_num_rows($rs)) {
        $colHeads = mysql_num_fields($rs);

        echo "<table border='1' width='50%' style='border-collapse: collapse'>
		<tr><th>No.</th>";
        for ($i=0; $i < $colHeads; $i++) { // Header
                echo "<th>".ucwords(str_replace("_"," ",mysql_field_name($rs, $i)))."</th>";
        }
        echo "</tr>";

        $no++;
        while ($row = mysql_fetch_row($rs)) { //data
                $j++;
                if ($j % 2 == 0)
                        echo "<tr bgcolor='lightpink'><td>$j</td><td>".implode($row,'</td><td>')."</td></tr>";
                else
                        echo "<tr><td>$j</td><td>".implode($row,'</td><td>')."</td></tr>\n";
        }
        echo "</table>";
} else {
        echo "---";
}

?>

</center>