<?php include "dbconfig.php"; ?>
<?php
$id=$_GET['id']; echo $id;
$query = "SELECT * FROM voucher where vno='$id' and session='$session' and code='$code'";
$numresults=mysql_query($query);
$numrows=mysql_num_rows($numresults);
$result = mysql_query($query) or die("Couldn't execute query");
$a_row = mysql_fetch_array( $result );
?>
<!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>Print Voucher No : <?php echo $a_row['vno']; ?> </title>
</head><style>
body{
font-family:"Courier New", Courier, monospace;
}
</style>

<body>
<center><a href="debit_delete.php?vno=<?php echo $a_row['vno']; ?>&&table=voucher" onclick="return confirm('Are you sure you want to Delete Records...?')">Delete</a></center>
<table width="100%"  cellspacing="0" cellpadding="2">
  <tr>
    <td><div align="center">
    <?php
	$queryyo = "SELECT * FROM college_info where code='$code'";
$numresultsyo=mysql_query($queryyo);
$resultyo= mysql_query($queryyo) or die("Couldn't execute query");
$a_rowwo = mysql_fetch_array( $resultyo );
	
	 ?>
    <strong><?php echo $a_rowwo['college_name']; ?></strong><br />
      <?php echo $a_rowwo['address']; ?><br />
      <?php $vtype=$a_row['vtype']; if($vtype=='Debit'){?>
      <?php } if($vtype=='Debit'){?><U>DEBIT VOUCHER</U>
          <?php } if($vtype=='Credit'){?><u>CREDIT VOUCHER</u>
      <?php } ?>
    </div></td>
  </tr>
  <tr>
    <td><table width="100%" border="0" cellspacing="0" cellpadding="2">
        <tr>
          <td width="50%"><strong>Date : <?php echo $a_row['paydate']; ?></strong></td>
          <td width="50%"><div align="right"><strong>Voucher No. : <?php echo $a_row['vno']; ?></strong></div></td>
        </tr>
      </table></td>
  </tr>
  <tr>
    <td ><table width="100%"  cellspacing="0" cellpadding="2">
      <tr >
        <td style="border-bottom:1px #000000 solid; border-top:#000000 1px solid"><div align="center">Particulars</div></td>
        <td style="border-bottom:1px #000000 solid; border-top:#000000 1px solid"><div align="right">Rs.</div></td>
      </tr>
      <tr>
        <td width="86%">
		  <div align="left">
  <?php $party_id=$a_row['partyname'];
	$query66 = "SELECT * FROM party where id='$party_id' and session='$session' and code='$code'";
$numresults66=mysql_query($query66);
 $numrows66=mysql_num_rows($numresults66);
$result66 = mysql_query($query66) or die("Couldn't execute query");

$a_rowup = mysql_fetch_array( $result66 );
	
	?>
		    
  <div align="center">
  <?php echo $a_rowup['name'];  ?><br />Vendor Code : <?php echo $a_rowup['id'];  ?><br />
		    <?php 
		
	$vpppayment_type=$a_row['payment_type'];
	echo $a_row['payment_type'];
	if($vpppayment_type=='Cheque'){
	echo $a_row['bank_name']; ?>
		    / <?php echo $a_row['branch_name']; ?>/
		    <?php echo $a_row['chequeno']; ?>/
		    <?php echo $a_row['chequedate']; ?>/
		   
		    <?php } ?>
		    /
		    
		    
		    <?php echo $a_row['remarks']; ?> </div></td>
        <td width="14%"><div align="right">
          <?php 
	$vpppayment_type=$a_row['payment_type'];
	if($vpppayment_type=='Cheque'){
	echo $a_row['chequeamount']; ?>
          <?php } 
	if($vpppayment_type=='Cash'){?>
          
          <?php  echo $a_row['camount']; } ?>
        </div></td>
      </tr>
      <tr>
        <td colspan="2"><table width="100%"  cellspacing="0" cellpadding="2">
          <tr>
            <td width="50%" style="border-bottom:1px #000000 solid; border-top:#000000 1px solid"><p>Approved By :  <?php echo $a_row['create_by']; ?> </p>
              <p><br />
                Signature ::__________________</p></td>
            <td width="50%" style="border-bottom:1px #000000 solid; border-top:#000000 1px solid"><div align="right">
              <p>Party Name : <?php echo $a_rowup['name'];  ?></p>
              <p><br />
                Receiver's Signature :____________ </p>
            </div></td>
          </tr>
        </table></td>
        </tr>
    </table></td>
  </tr>
</table>
</body>
</html>
