<?
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 cshrec where crno='$no' and brcode='$brcode'");
$row=mysqli_fetch_array($re);

$cusre=mysqli_query($db,"select * from customer where cname='$row[partic]' and brcode='$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);
$brname=explode(',',$brrow[brname]);
?>
<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:15}><b><?print "".strtoupper($brname[0])?></TD></TR>

<TR><TD ALIGN=CENTER><font size=2><?print strtoupper($brrow[braddr]).', '.strtoupper($brrow[brcity])?></td></tr>
<tr><td align=center><br><U>C A S H &nbsp;R E C E I P T </U></TD></TR>
</table>
<center>
<?
$type='';
  $cnr=mysqli_query($db,"select crno from cshrec where crno='$no'");
   $cno=mysqli_fetch_row($cnr);
print "<table width=90%><tr><td>NO: ".$cno[0]."</td><td align=right>Date: ".datetohtml($row[date])."</span></td></tr></table>";
 $type='Cash';
?>
<center>
<table width=90%>
<tr><td class=x><hr> RECEIVED with thanks from <u>
<?if ($type=='Cheque')
  {
    print strtoupper($row[fine]).' , A/c. '.$row[cus_ac].', '.$cus_row[addr1].', '.$cus_row[city];
  }
else
  print $row[partic].', '.$cus_row[addr1].', '.$cus_row[city]. ' ';

?> 

</u> sum of Rupees <u><?print word($row[cramt])?></u> Only towards our Invoice No. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Delivery Order No. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; by <? print $type?>

<!-- </u> Only towards our Invoice No. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Delivery Order No. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; by <? print $type?>;
-->

<?
if($type=='Cheque')
 print $row[narr];
?> on <?print datetohtml($row[date])?>.  This cancels the provisional receipt no.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Dt.<?print datetohtml($row[date])?> for Rs.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  issued by</td></tr>
<tr><td align=right> For PSN CONSTRUCTION EQUIPMENTS P LTD <?print $brname[0]?></td></tr>
<tr><td><b>Rs.<?print $row[cramt]?>/-</b><br>&nbsp;</td></tr>
<tr><td align=right>Authorised Signatory</td></tr>
</table>

 
