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


$sql="select date,jvno,sum(dramt)-sum(cramt),brcode from journal2  group by jvno,brcode order by brcode";
$re=mysqli_query($db,$sql)or die(mysqli_error());
print "<table border=1>";
while($row=mysqli_fetch_array($re))
{
 if($row[2]!=0)
 {
    print "<tr><td><a href='../multientry/viewtrans.php?code=$row[1]'>$row[0]</a></td><td>$row[1]</td><td>".putComa($row[2])."</td><td>$row[brcode]</td></tr>";
 }
}
print "</table>";
?>
