<?php 
session_start();
require_once 'config.php';
?>
<!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=iso-8859-1" />
<title></title>
<link href="css/opdheading.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
.style22 {font-family: Roboto; font-size: 12px; font-style: normal; font-weight: bold; font-variant: normal; color: #333333; letter-spacing: .5mm; }
.style22 {font-family: Roboto;
	font-size: 12px;
}
.style24 {
	font-family: Roboto;
	font-size: 14px;
}
.commontxtfont {	font-family: Roboto;
	font-size: 12px;
	font-style: normal;
	font-weight: normal;
	font-variant: normal;
	color: #333333;
	letter-spacing: 1px;
}
.maintblborder {	border: 1px solid #CCCCCC;
}
.singlelinedottedtop {	border-top-width: thin;
	border-top-style: dotted;
	border-top-color: #CCCCCC;
}
.style40 {	font-size: 14px;
	font-family: Roboto;
	font-weight: bold;
}
.style42 {font-size: 12px}
.style46 {	border-left-width: .50px;
	border-left-style: solid;
	border-left-color: #CCCCCC;
	font-family: Roboto;
	font-size: 12px;
}
.style60 {	border-top-width: thin;
	border-top-style: dotted;
	border-top-color: #CCCCCC;
	font-family: Roboto;
	font-size: 12px;
	color: #333333;
}
.style61 {	border-top-width: thin;
	border-top-style: dotted;
	border-top-color: #CCCCCC;
	font-family: Roboto;
	font-size: 14px;
	font-weight: bold;
}
.style62 {font-family: Roboto; font-size: 12px; font-style: normal; font-weight: bold; font-variant: normal; color: #333333; letter-spacing: 1px; }
.tblewithborder {	border: thin solid #CCCCCC;
}


@media print{ 
  @page {
    margin-top: 30px;
    margin-bottom: 30px;
  }
}
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
-->
</style>
</head>
<script type="text/javascript">
  //window.print();
</script>
     <?php 
$id = $_GET['id'];
$sql7 = "SELECT top.*,tp.RefBy FROM tbl_opd_receipts top LEFT JOIN tbl_patients tp ON tp.MrdNo=top.MrdNo WHERE top.id='$id'";
$row7 = getRecord($sql7);
 $Procedures = $row7['Procedures'];
       $sql2 = "SELECT GROUP_CONCAT(Name) As ProcedureName FROM tbl_procedures WHERE id IN($Procedures)";
      $row2 = getRecord($sql2);
$number = $row7['Amount'];
      include 'incconvertrupees.php';
  ?>
<body>
<table width="700" border="0" cellspacing="0" cellpadding="2" class="maintblborder">
  <tr>
    <td align="left" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="2">
      <tr>
        <td width="32%" align="left" valign="top"><img src="logonewfinal.jpg" width="167" height="93" /><br /></td>
        <td width="68%" align="right" valign="top"><table width="80%" border="0" cellspacing="2" cellpadding="2">
          <tr>
            <td align="left" valign="top">&nbsp;</td>
            <td align="left" valign="top">&nbsp;</td>
          </tr>
          <tr>
            <td width="51%" align="left" valign="top"><span class="style22">Dr. Neeta Vyawahare</span></td>
            <td width="49%" align="left" valign="top"><span class="style22">Dr. Pravin Vyawahare </span></td>
          </tr>
          <tr>
            <td align="left" valign="top"><span class="style22">MBBS, DO (Ophth ) </span></td>
            <td align="left" valign="top"><span class="style22">MBBS, MS (Ophth) </span></td>
          </tr>
          <tr>
            <td align="left" valign="top"><span class="style22">Regd. No 070595 </span></td>
            <td align="left" valign="top"><span class="style22">Regd. No 65374 </span></td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td colspan="2" align="left" valign="top" class="style61">NABH &amp; ISO CERTIFIED </td>
      </tr>
      <tr>
        <td colspan="2" align="left" valign="top" class="style60">V.M.V Road, Rathi Nagar, Amravati. Ph.: 0721-2664880. Mob : 9370109617 </td>
      </tr>
    </table>
        <table width="100%" border="0" cellspacing="0" cellpadding="3">
          <tr>
            <td align="center" valign="top" bgcolor="#CCCCCC"><span class="style40">OPD RECEIPT</span></td>
          </tr>
          <tr>
            <td><table width="100%" border="0" cellspacing="0" cellpadding="4">
                <tr>
                  <td width="15%" align="left" valign="top" class="style62">RECEIPT NO </td>
                  <td width="3%" align="center" valign="top" class="commontxtfont"><span class="style42">:</span></td>
                  <td width="46%" align="left" valign="middle" class="commontxtfont">&nbsp;<?php echo $row7['id'];?></td>
                  <td width="16%" align="left" valign="top" class="style46"><span class="style62">DATE </span></td>
                  <td width="2%" align="center" valign="top" >:</td>
                  <td width="18%" align="left" valign="middle" class="commontxtfont" >&nbsp;<?php echo date("d/m/Y", strtotime(str_replace('-', '/',$row7['CreatedDate']))); ?></td>
                </tr>

            </table></td>
          </tr>
          <tr>
            <td align="center" valign="top"><table width="100%" border="0" cellspacing="3" cellpadding="4">
                <tr>
                  <td width="22%" align="left" valign="top"><span class="style24">Referred by  : </span></td>
                  <td width="78%" align="left" valign="top">&nbsp;<?php echo $row7['RefBy']; ?></td>
                </tr>
              </table>
                <table width="100%" border="0">
                  <tr>
                    <td width="0" height="0" class="singlelinedottedtop"></td>
                  </tr>
                </table>
              <table width="100%" border="0" cellspacing="3" cellpadding="4">
                  <tr>
                    <td align="left" valign="top"><span class="style24">Received with thanks from  <strong><?php echo $row7['PatientName'];?></strong> </span></td>
                  </tr>
                  <tr>
                    <td align="left" valign="top"><span class="style24">The sum of Rupees <strong><?php echo $result2 . "Rupees  " . $points . " Paise";?></strong> </span></td>
                  </tr>
                  <tr>
                    <td align="left" valign="top"><span class="style24">For <strong><?php echo $row2['ProcedureName']; ?></strong> </span></td>
                  </tr>
                </table>
              <table width="100%" border="0">
                  <tr>
                    <td width="0" height="0" class="singlelinedottedtop"></td>
                  </tr>
                </table>
              <table width="100%" border="0" cellspacing="3" cellpadding="4">
                  <tr>
                    <td width="12%" align="left" valign="top"><span class="style24">Pay Mode : </span></td>
                    <td width="21%" align="left" valign="top">&nbsp;<?php echo $row7['PayMode']; ?></td>
                    <td width="11%" align="left" valign="top"><span class="style24">Amount : </span></td>
                    <td width="56%" align="left" valign="top">&nbsp;&#8377;<?php echo number_format($row7['Amount'],2); ?></td>
                  </tr>
                  <tr>
                    <td align="left" valign="top"><span class="style24">Narration</span></td>
                    <td colspan="3" align="left" valign="top">&nbsp;<?php echo $row7['Narration']; ?></td>
                  </tr>
                </table>
              <table width="100%" border="0">
                  <tr>
                    <td width="0" height="0" class="singlelinedottedtop"></td>
                  </tr>
                </table>            </td>
          </tr>
          
          <tr>
            <td align="right" valign="top" class="style62">For Vyawahare Netralaya </td>
          </tr>
          <tr>
            <td align="right" valign="top" class="commontxtfont">&nbsp;</td>
          </tr>
      </table></td>
  </tr>
</table>
</body>
</html>
