<?
session_start();
if(strlen($brcode)<=0)
{
 print "<script> alert('Session timed out'); parent.document.location='../ind.php'; </script>";
 return;
}
include("../opendb.php");
include("../test.php");
//$re=mysqli_query($db,"select * from profinv where invno='$invno' and brcode='$brcode'");
/*print $recno;
print $invno;
print $brcode;
*/
$re=mysqli_query($db,"select * from profinv join profreceipt on profinv.invno=profreceipt.profno where invno='$invno'  and brcode='$brcode'");
$row=mysqli_fetch_array($re);
//and recno='$recno'
//print $row[0];

$ad=mysqli_query($db,"select * from branch");
$brrow=mysqli_fetch_array($ad);
?>
<style>
td,body{font-family:sans;letter-spacing:1;}
.x{line-height:3}
</style>
<table width=90%>
<tr><td align=center><p style={letter-spacing:1;font-size:16}><b><?print strtoupper($branch)?></TD></TR>
<TR><TD ALIGN=CENTER><font size=2>AUTHORISED DEALER FOR EICHER VEHICLES <br>
Regd.Off. 35/189, NH 47, PALARIVATTOM, KOCHIN, PIN.682 025</td></TR>
<TR><TD ALIGN=CENTER><font size=2><?print strtoupper($brrow[braddr]).', '.strtoupper($brrow[brcity])?></td></tr>
<tr><td align=center><br><U>R E C E I P T </U></TD></TR>
<tr><td align=right>Date: <?print datetohtml($row[recdt])?></td></tr>
<tr><td><blockquote>Receipt NO: 
<?/*
$no=$row[invno]+10;
if($no%2==0)
 $no++;
print ($no);*/
print $row[recno];
?>
</td></tr>
</table>

<center>
<table width=90%>
<tr><td class=x><hr> Received with thanks from 
<?
  print $row[cust].' '.$row[addr];

?> 
<? 
if ($row[fin]!=NULL)
{
print '('.$row[fin].')' ;
//(print $row[fin]);
}

?>


</u> sum of  <?print word($row[recamt])?></u> Only towards our  &nbsp;
 Order Form No.<?print $row[order_no]?> &nbsp;&nbsp; by <? print $type?>

<!-- </u> Only towards our &nbsp;&nbsp;
 Order form No.<?print $row[order_no]?> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; by <? print $type?>;
-->

<?
if($row[ptype]=='Cheque')
 print $row[ptype].' No:'.$row[chqno].'  Dated  '.datetohtml($row[chqdt]).' of '.$row[bank].' .';
else if($row[ptype]=='RTGS')
print "RTGS.";
else print "Cash.";
?> </td></tr>
<tr><td> <br></td></tr>
<tr><td><br></td></tr>
<tr><td></td></tr>

<tr><td align=right> For <?print $branch?></td></tr>
<tr><td><b>Rs.<?print $row[recamt]?>/-</b><br><?if($row[ptype]!='Cash')
  print"(sub. to realisation)";?></td></tr>
<tr><td><br></td></tr>

<tr><td align=right>Authorised Signatory</td></tr>
</table>

 
