<?session_start();
include("../opendb.php");
include("../test.php");
?>
<link rel="stylesheet" href="style.css" type="text/css" />
<style>
body,td{font-family:'arial narrow';letter-spacing:1;font-size:13}
th{background-color:c1d799}
//tr{background-color:c1d799}
.mnu{margin-left:5}
.summ{font-size:13};
</style>
<center>
<h3><?print $branch?> <br>PENDING DAs</H3>
<!--
<form action='<?print $PHP_SELF?>' method=post>
<table bgcolor='silver'>
<tr><td> Date from </td><td>dd<input type=text name='d' size=2 value='1'>
				mm<input type=text name='m' size=2 value='<?print date('m',time())?>'>
				yy<input type=text name='y' size=4 value='<?print date('Y',time())?>'>
			</td></tr>
<tr><td> To </td><td>dd<input type=text name='d1' size=2 value='<?print date('d',time())?>'>
				mm<input type=text name='m1' size=2 value='<?print date('m',time())?>'>
				yy<input type=text name='y1' size=4 value='<?print date('Y',time())?>'>
			</td>
</tr>
<th colspan=2 align=center><input type=submit name='show' value='Show'>
</td></tr>
</table>
</form>
-->

[Printed by <?print $user?> on <?print date("r")?>] <br>&nbsp;
<?
$i=1;
$t=0;

$re1=mysqli_query($db,"select config,count(config) from purorder where purno='-' and brcode='$brcode' and daNO!='DUMMY' group by config");
print "<table border=0 cellspacing=1 cellpadding=3 bgcolor=silver style={font-size:13}>
";
print "<th colspan=2>Summary</th>";
$t1=0;
while($ro=mysqli_fetch_row($re1))
{
 print "<tr><td>$ro[0]</td><td align=right>$ro[1]</td></tr>";
$t1+=$ro[1];
}
print "<tr><td><b>Total</td><td align=right><b>$t1</td></tr>";
?>
</table>
<br>
<table border=0 cellspacing=1 cellpadding=3 bgcolor=silver style={font-size:13}>
<th>No <th>Ord NO. <th>Ord By <th>Order Date <th>DA <th>M Code <th>Config <th>Amount
<?
$re=mysqli_query($db,"select * from purorder where purno='-' and brcode='$brcode' and daNO!='DUMMY' ");
while($row=mysqli_fetch_array($re))
{
 print "<tr bgcolor=white><td>".$i++."</td><td align=center>$row[ordno]</td><td>$row[ordby]</td>";
 print "<td>".datetohtml($row[orddate])."</td><td>$row[dano]</td><td>$row[mcode]</td><td>$row[config]</td><td ALIGN=RIGHT>$row[amount]</td>";
$t+=$row[amount];
}
print "<tr><td colspan=7 align=center>Total </td><td align=right>".putComa($t)."</td></tr>";

?>

