while($row = $db->fetchRow($result)){
            $trantype = $row['tranType'];  
            if ($row['amount'] < 0) {
                $amt = "-$".number_format(-1*$row['amount'],2);
            } else {