<?
session_start();
if(strlen($brcode)<=0)
{
 print "<script> alert('Session timed out'); parent.document.location='../index.html'; </script>";
 return;
}
include("../../opendb.php");
include("../../test.php");
?>
<style>

	td,th,body{font-size:15;font-family:'arial narrow';letter-spacing:1}
	th{background-color:silver}
</style>
<center>
<?
$tbl="spareinvwar".$br;
print getbrname($br)." Warranty pending data";
$sq="select * from $tbl where psnqty>0 and trans='n'";
$re1=mysqli_query($db,$sq)or die('err'.mysqli_error($db));
print "<table border=1> <th>Warno <th>Date <th>Part code <th>Part Name <th>Qty <th>Rate<th>Amount";
while($re1row=mysqli_fetch_array($re1))
{
 print "<tr><td>$re1row[warno]</td><td>".datetohtml($re1row[date])."</td><td>$re1row[partcode]</td><td>$re1row[partname]</td>";
 $amt=($re1row[price]*$re1row[psnqty]);
 print "<td align=right>$re1row[psnqty]</td><td align=right>$re1row[price]</td>";
 print "<td align=right>".putComa($amt)."</td></tr>";
 $tamt+=$amt;
}
print "<tr><td colspan=6><center>Total</td><td align=right>".putcoma($tamt)."</td></tr>";

?>

</table>
