<?
session_start();
$brcode=$_SESSION['brcode'];
$user=$_SESSION['user'];
if(strlen($brcode)<=0)
{
 print "<script> alert('Session timed out'); parent.document.location='../ind.php'; </script>";
 return;
}
include("../opendb.php");
include("../test.php");
$no=$_REQUEST['no'];
$re=mysqli_query($db,"select * from bnkpay where bpno='$no' and type='Cr' and brcode='$brcode'");
$row=mysqli_fetch_array($re);

$cusre=mysqli_query($db,"select * from cust_master where custname='$row[partic]' and branch='$brcode'")or die(mysqli_error());
 $cus_row=mysqli_fetch_array($cusre);

$ad=mysqli_query($db,"select * from branch where brcode='$brcode'");
$brrow=mysqli_fetch_array($ad);
?>
<style>
td,body{font-family:sans;letter-spacing:1;}
.x{line-height:3}
</style>

<table width=90%>
<?
 $brname=explode(',',$branch);
?>
<tr><td align=center><p style={letter-spacing:9;font-size:15}><b><?print strtoupper($brname[0])?></TD></TR>
<?if($brcode<>'PSN672')
{
?>
<TR><TD ALIGN=CENTER><font size=2>AUTHORISED DEALER FOR EICHER VEHICLES</td></TR>
<?
}
else
{
?>

<?
}
?>
<TR><TD ALIGN=CENTER><font size=2><?print strtoupper($brrow[braddr]).', '.strtoupper($brrow[brcity])?></td></tr>
<tr><td align=center><br><U>P A Y M E N T </U></TD></TR>
</table>
<center>
<?
  $cnr=mysqli_query($db,"select * from bnkrec where brno='$no' and type='Cr'")or die(mysqli_error());
   $cno=mysqli_fetch_row($cnr) or die("Error - Enter receipt No.".mysqli_error());
print "<table width=90%><tr><td>NO: ".$cno[1]."</td><td align=right>Date: ".datetohtml($row[date])."</span></td></tr></table>";
?>
<center>
<table width=90%>
<tr><td class=x><hr><u>
<?
    print strtoupper($row[narr]).'('.$row[no].') '.$row[cus_ac].', '.$cus_row[addr1].', '.$cus_row[city];

?> 

</u> sum of <u><?print word($row[cramt])?></u> Only &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 

<!-- </u> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
-->

<?

?> 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td></tr>
<tr><td align=right> Issued by</td></tr>
<tr><td align=right> For <?print $brname[0]?></td></tr>
<tr><td><b>Rs.<?print $row[cramt]?>/-</b><br>(subject to realisation)&nbsp;</td></tr>
<tr><td align=right>Authorised Signatory</td></tr>
</table>

 
