<html>
 <head>
<?
session_start();
include("test.php");
include("opendb.php");
include("includes/function.php");
if(strlen($user)<=0)
{
  print "<script> alert('Invalid User'); document.location='ind.php' </script>";
  return;
}
$company=mysqli_query($db,"select * from company_master  where brcode='$brcode'")or die(mysqli_error($db));
$company1=mysqli_fetch_row($company);

$add =explode(",", $company1[4]);
$add1=$company1[5];
$cont='Tel:'.$company1[7].",".'Fax:'.$company1[8];
$add2=$company1[6];

$tran=mysqli_query($db,"select * from bnkrec  where brcode='$brcode' and brno='$brno' and type='Cr'")or die(mysqli_error($db));
$tran1=mysqli_fetch_row($tran);

 $amount=explode('.', $tran1[5]);

 

?>
<script type="text/javascript" src="number_to_word.js"></script>
 <style>
  .conts{

   border:0px solid black;
   margin-left:0px
   margin-right:0px;
  vertical-align:bottom;
   }  
 .conts1{
 
   border:0px solid black;
   border-bottom:1px solid black;
   border-style:dotted;
   margin-left:0px
   margin-right:0px;
   vertical-align:bottom;
   min-width:600px;
  }

  .cshtot table, td,th {
  width :90px;
  height:30px;
  bordre:1px solid black;
  border-collapse:collapse;
  }
 p{

  margin:0px;
  padding:0px;
 }
#add_td{
font-size:12px;
height:15px;
}
#add_td br{
margin:0px;
padding:0px;
}
</style>

</head>
<body onload='window.print();'>
<br>
<center>
<table border='0' width='100%'>
	<tr>
	<td align='left' width='60%' id='add_td'> 
<?
$qry1=mysqli_query($db,"select * from company_master where brcode='$brcode'");
	$row1=mysqli_fetch_array($qry1);
	 print "<font size='2'><b>".$row1[2]."</b></font><p >".$row1[4].", ".$row1[5].",".$row1[6];
	if(($row1[7]>0)&&($row1[7]!=''))
   		 print "</p><p>Tel: ".$row1[7];
 	if(($row1[8]>0)&&($row1[8]!=''))
  		 print " Fax: ".$row1[8];
	print "</p><p>Email: ".$row1[10];
	if($row1[11]!='')
		print ",".$row1[11]."<br>Web: ".$row1[12];
	else
		print "</p><p>Web: ".$row1[12];
?>
</td>

 <td align='center' valign='bottom' style="width:40%";><h3><u>Bank Receipt Voucher</u></h3></td>
 <td align='right' style="width:30%";>
        <img src='images/logo.gif' width='70' height=70/>
   </td>





<table  border=0 align=center>
 

   <tr>
     <td><b>No:<?echo $brno; ?></td>
     <td align=right colspan=2><b>Date:<u style='border-bottom: 1px dashed #000; text-decoration: none;' ><? echo month_alph($tran1[0]); ?></u></TD>
   </TR>    
   <tr>

     <td colspan=3>
  

  
   <table border=1 id='main' align='center'  style='border-collapse:collapse;' width=100%>
   <tr>
      <td class='conts' ><i>Received&nbsp;From&nbsp;Mr/Messrs</i></td><td class='conts1' ><? echo $tran1[3]; ?></td><td class='conts' ></td>

   </tr>
    <tr>
      <td class='conts' ><i>The&nbsp;Sum&nbsp;Of</i></td><td class='conts1'><? print "<script>document.write(toWords($tran1[5]));</script> only"; ?></td><td class='conts' ></td>

   </tr>
      <tr>
      <td class='conts' ><i>For</i></td><td class='conts1' ><? echo $tran1[6]; ?></td><td class='conts' ></td>

   </tr>
      <tr>
      <td class='conts' ><i>By&nbsp;Cash/Cheque</i></td><td class='conts1' >Cash</td><td class='conts' ></td>

   </tr>
      <tr>
      <td class='conts1' colspan=3></td>

   </tr>
  <tr>
     <td colspan=3 align='right' class='conts' style="height:120px;">
     
        <table class='cshtot' border=1 style="border-collapse:collapse; height:90px;" >
          <tr>
              <tH colspan=2>Total</th>
          </tr>

         <tr>
             <td><? echo $amount[0]; ?></td>
             <td>
              <? 
   
                  echo $amount[1];

              ?>
             </td>

         </tr>

   

        </table>

   <tr>
       <td colspan=3 class='conts' >

          <table border=1 style='border-collapse:collapse;' width=100%> 
            <tr>
              <td valign='middle' align='center' style='height:120px;'>General Manager<br>...................</td>

       	<td valign='middle' align='center' >Accountant<br>...................</td>

      	       <td valign='middle' align='center' >Receiver<br>...................</td>
          </tr>

       </table>

 </tr>

 </table>
 </td>
 </tr>
</table>

</body>
</html>
  

     

  

