<?
session_start();
$brcode=$_SESSION['brcode'];
$user=$_SESSION['user'];
if(strlen($user)<=0)
{
  print "<script> alert('Invalid User'); document.location='index.php' </script>";
  return;
}
include("opendb.php");
include("test.php");
$no=$_REQUEST['inno'];




$ad=mysqli_query($db,"select * from branch where brcode='$brcode'");

$brrow=mysqli_fetch_array($ad);
$brname=$brrow[2];

 

  $ch=mysqli_query($db,"select * from  journal2  where brcode='$brcode' and partic!='CASH IN HAND' and tr_no='$no' and j_type='Cr'");
 

$sql="select * from  journal2  where brcode='$brcode' and partic='CASH IN HAND' and tr_no='$no'";


   $row=mysqli_fetch_array($ch);

?>

<!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>Receipt Voucher</title>
<link href="css/print.css" type="text/css" rel="stylesheet" media="print,screen"  />
</head>

<body>



<table width="100%" border="0" cellspacing="0" cellpadding="0" class="printlayout">
  <tr>
    <td width="338" align="left" valign="top" scope="col"><img src="images/logo.jpg" width="318" height="90" alt="<? echo $brname ?>" /></td>
    <td width="123" scope="col">Tel : <br />
      Fax: <br />
      P.O.Box: <br />
      <br />
      </td>
  </tr>
  <tr>
    <td colspan="2"><table width="100%" border="0" cellspacing="0" cellpadding="0" class="title">
      <tr>
        <td width="14%" scope="col">No.&nbsp;&nbsp;&nbsp;<?print $no ?></td>
        <td width="68%" align="center" scope="col"><h2 class="title">Receipt Voucher</h2></td>
        <td width="18%" scope="col">Date:<span class="date">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?print datetoHtml($row[date]) ?></span></td>
        </tr>

   <table width="100%" border="0" cellpadding="0" cellspacing="0" class="total">
        <tr>
          <td>&nbsp;</td>
          <td width="14%" align="left">Amount</td>
          <td width="17%"><span class="total"><?print $row[cramt]?></span></td>
        </tr>
    </td>
      <tr>
        <td colspan="3"><span class="name">Received with thanks from &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?print $row[partic]?> </span></td>
        </tr>
<tr>
        <td colspan="3"><span class="name">The sum of INR : &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?print word($row[cramt])?> </span></td>
        </tr>

<tr>
        <td colspan="3"><span class="name">Cash/Cheque No : &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?print $chq[0]?> </span></td>
        </tr>
<tr>
        <td colspan="3"><span class="name">Being : &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?print $row[narr]?> </span></td>
        </tr>

    </table></td>
  </tr>
     
  <tr>
    <td><span class="signature">Cashier<br />
    </span></td>
    <td><span class="signature">Receivers Signature<br />
    </span></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
</table>

</body>
</html>
