Your IP : 216.73.216.40


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

<h2 align='left'>Dubious Indents</h2>
<center>

<?php

$rs = mysql_query("select i.*,e.emp_name,e.email from indents as i,employees as e where i.emp_no=e.emp_no and i.date_indent<'2017-01-01' and i.status='Approved' order by i.date_indent,i.emp_no,i.indent_no");
while ($o = mysql_fetch_object($rs)) {
	$i = 0;
	$no++;
	echo "<h3>[ $no ]</h3>
	<table width='90%' border='1' style='border-collapse: collapse'>
	<tr><th>Indent No.: <a href='?pg=inindents&indent_no=$o->indent_no'>$o->indent_no</a> ($o->status)</th>
	<th>Indentor: $o->emp_name ($o->account 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></tr>
	</table>
        <table border='1' width='90%' style='border-collapse: collapse'>
        <tr><th>Sr.</th><th>Particulars</th><th>Demand Qty</th><th>Approve Qty</th><th>Out Qty</th><th>Approx Cost</th></tr>";
        
        $sr = mysql_query("select * from indent_items where indent_no=$o->indent_no order by id");
        while ($q = mysql_fetch_object($sr)) {
                $i++;
                $star = '';
		if (mysql_num_rows(mysql_query("select * from st_items where id=$q->item and qty_in-qty_out>0"))) {
                        if ($q->qty_approve > $q->qty_out) {
				$star = "<font size='+1' color='red'>*</font>";
                       		$z++;
                       	}
		}
                //list indented items
                echo "<tr><td>$i $star</td><td>". item_detail($q->item). "</td><td>". number_format($q->qty_demand,2). " $q->unit</td>
                <td>". number_format($q->qty_approve,2). " $q->unit</td><td>". number_format($q->qty_out,2). " $q->unit</td><td>$q->approx_cost</td></tr>";
        }
        echo "</table>";
}

?>
</center>