<?php require('../db/db.php'); 
$transid=$_GET['transid'];
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
table.bottomBorder { border-collapse:collapse; }
table.bottomBorder td, table.bottomBorder th { border-bottom:1px dotted black;padding:5px; font-size:12px;
	font-family:Arial, Helvetica, sans-serif;}
h2{
	font-family:Arial, Helvetica, sans-serif;}
</style>
<style>
@media print
{    
    .no-print, .no-print *
    {
        display: none !important;
    }
}
</style>
</head>
<body>

<table width="100%" border="0" class="bottomBorder">
<p align="right">
<SCRIPT LANGUAGE="JavaScript"> 
if (window.print) {
document.write('<form class="no-print"><input type=button name=print value="Print" onClick="window.print()"></form>');
}
</script></p>
<h2>Transaction Details</h2>
<?php
$raw_results= mysqli_query($con,"SELECT * FROM transactions WHERE transact_id='$transid'");
while($row = mysqli_fetch_array($raw_results))
{ 
?>
<tr>
<td width="42%" valign="top">Transaction Date:</td>
<td width="58%"><?php echo date( 'd-m-Y' ,strtotime($row['transact_time']));?></td>
</tr>
<tr>
<td width="42%" valign="top">Transaction Time:</td>
<td width="58%"><?php echo date( 'h:i A' ,strtotime($row['transact_time']));?></td>
</tr>
<tr>
<td valign="top">Account Head:</td>
<td><?php echo $row['acchead_id']; ?></td>
</tr>
<tr>
<td valign="top">Account Name:</td>
<td><?php echo $row['account_id']; ?></td>
</tr>
<tr>
<td valign="top">Transaction Type:</td>
<td><?php echo $row['transact_type']; ?></td>
</tr>
<tr>
<td width="42%" valign="top">Visit Date:</td>
<td width="58%"><?php echo $row['visit_id']; ?> </td>
</tr>
<tr>
<td width="42%" valign="top">Patient ID:</td>
<td width="58%"><?php echo $row['patient_id']; ?> </td>
</tr>
<tr>
<td width="42%" valign="top">Patient Name:</td>
<td width="58%"><?php echo $row['patient_id']; ?> </td>
</tr>
<tr>
<td width="42%" valign="top">Doctor Name:</td>
<td width="58%"><?php echo $row['doctor_id']; ?> </td>
</tr>
<tr>
<td>Description:</td>
<td><?php echo $row['description']; ?></td>
</tr>
<tr>
<td width="42%" valign="top">Amount Payable:</td>
<td width="58%"><?php echo $row['amount_payable']; ?> </td>
</tr>
<tr>
<td width="42%" valign="top">Amount Paid:</td>
<td width="58%"><?php echo $row['payment']; ?> </td>
</tr>
<tr>
<td valign="top">Balance: </td>
<td align="left"><?php echo $row['balance']; ?></td>
</tr>
<?php }?>
</table>
</body>
</html>