<!DOCTYPE html>
<html>

<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: 2px solid #a79c9c;
    }

    .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;
    }

    .addrfont {
        font-family: "Poppins Light";
        font-size: 9pt;
        font-style: normal;
        line-height: normal;
        font-weight: normal;
        font-variant: normal;

        color: #000000;
    }

    .tdbrd1 {
        border: 1px solid #ada9a9;
        border-collapse: collapse;
        font-family: Poppins;
        font-size: 11px;
        font-style: normal;
        line-height: normal;
        font-weight: normal;
        font-variant: normal;

        color: #4C4C4C;
    }

    .tophdfnt {
        font-family: "Poppins Medium";
        font-size: 14pt;
        font-style: normal;
        line-height: normal;
        font-weight: normal;
        font-variant: normal;

        color: #000000;
        letter-spacing: 0.3mm;
    }

    .txtdegree {
        border-collapse: collapse;
        font-family: "Poppins Light";
        font-size: 8pt;
        font-style: normal;
        line-height: normal;
        font-weight: normal;
        font-variant: normal;
        color: #424242;
        word-spacing: normal;
    }

    .txtdrname {
        font-family: "Poppins Light";
        font-size: 9pt;
        font-style: normal;
        line-height: normal;
        font-weight: normal;
        font-variant: normal;

        color: #000000;
    }

    .txtnabhlogo {
        font-family: "Poppins Medium";
        font-size: 7pt;
        font-style: normal;
        line-height: normal;
        font-weight: normal;
        font-variant: normal;
        letter-spacing: 0.2mm color: #000000;
        letter-spacing: 0.3mm;
    }
    </style>
</head>
<script type="text/javascript">
window.print();
window.onafterprint = window.close;
</script>
@php $number = $result[0]->Amount;@endphp
<?php
$no = floor($number);
   $point = round($number - $no, 2) * 100;
   $hundred = null;
   $digits_1 = strlen($no);
   $i = 0;
   $str = array();
   $words = array('0' => '', '1' => 'one', '2' => 'two',
    '3' => 'three', '4' => 'four', '5' => 'five', '6' => 'six',
    '7' => 'seven', '8' => 'eight', '9' => 'nine',
    '10' => 'ten', '11' => 'eleven', '12' => 'twelve',
    '13' => 'thirteen', '14' => 'fourteen',
    '15' => 'fifteen', '16' => 'sixteen', '17' => 'seventeen',
    '18' => 'eighteen', '19' =>'nineteen', '20' => 'twenty',
    '30' => 'thirty', '40' => 'forty', '50' => 'fifty',
    '60' => 'sixty', '70' => 'seventy',
    '80' => 'eighty', '90' => 'ninety');
   $digits = array('', 'hundred', 'thousand', 'lakh', 'crore');
   while ($i < $digits_1) {
     $divider = ($i == 2) ? 10 : 100;
     $number = floor($no % $divider);
     $no = floor($no / $divider);
     $i += ($divider == 10) ? 1 : 2;
     if ($number) {
        $plural = (($counter = count($str)) && $number > 9) ? 's' : null;
        $hundred = ($counter == 1 && $str[0]) ? ' and ' : null;
        $str [] = ($number < 21) ? $words[$number] .
            " " . $digits[$counter] . $plural . " " . $hundred
            :
            $words[floor($number / 10) * 10]
            . " " . $words[$number % 10] . " "
            . $digits[$counter] . $plural . " " . $hundred;
     } else $str[] = null;
  }
  $str = array_reverse($str);
  $result2 = implode('', $str);
  $points = ($point) ?
    "." . $words[$point / 10] . " " . 
          $words[$point = $point % 10] : '';
  ?>

<body>
    <table width="700" border="0" cellspacing="0" cellpadding="0">
        <tr>
            <td align="left" valign="top">
                <table width="100%" border="0" cellspacing="0" cellpadding="0" class="tdbrd1">
                    <tr>
                        <td width="13%" rowspan="2" align="center" valign="middle" class="tdbrd1"><img
                                src="{{url('VLOGO2.jpg')}}" width="75" height="86" /></td>
                        <td colspan="2" align="left" valign="top" class="tdbrd1">
                            <table width="99%" border="0" cellspacing="0" cellpadding="0">
                                <tr>
                                    <td width="64%" class="tophdfnt">
                                        <div align="center">Vyawahare Netralaya &amp; Eye Bank, Amravati </div>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="addrfont">
                                        <div align="center">V.M.V Road, Rathi Nagar, Amravati | 0721-2664880 | Mob :
                                            9370109647 </div>
                                    </td>
                                </tr>
                            </table>
                        </td>
                        <td width="17%" rowspan="2" align="center" valign="middle" class="tdbrd1">
                            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                <tr>
                                    <td width="15%" align="center" valign="middle"><img
                                            src="{{url('nabhlogo2.png')}}" /></td>
                                </tr>
                                <tr>
                                    <td align="center" valign="top" class="txtnabhlogo">NABH &amp; ISO CERTIFIED </td>
                                </tr>
                                <tr>
                                    <td align="center" valign="top" class="txtnabhlogo">EYE HOSPITAL </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                    <tr>
                        <td width="36%" align="left" valign="top">
                            <table width="90%" border="0" cellspacing="1" cellpadding="1">
                                <tr>
                                    <td align="center" valign="middle" class="txtdrname"><strong>Dr. Neeta
                                            Vyawahare</strong></td>
                                </tr>
                                <tr>
                                    <td align="center" valign="top" class="txtdegree">MBBS, DO (Opthal) </td>
                                </tr>
                                <tr>
                                    <td align="center" valign="top" class="txtdegree">Regd. No. 070595</td>
                                </tr>
                            </table>
                        </td>
                        <td width="34%" align="center" valign="top">
                            <table width="80%" border="0" cellspacing="1" cellpadding="1">
                                <tr>
                                    <td align="center" valign="middle" class="txtdrname"><strong>Dr. Pravin
                                            Vyawahare</strong> </td>
                                </tr>
                                <tr>
                                    <td align="center" valign="top" class="txtdegree">MBBS, MS (Opthal)</td>
                                </tr>
                                <tr>
                                    <td align="center" valign="top" class="txtdegree"> Regd. No. 65374</td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
    <br>
    <table width="702" border="0" cellspacing="0" cellpadding="2" class="maintblborder">
        <tr>
            <td width="696" align="left" valign="top">
                <table width="100%" border="0" cellspacing="0" cellpadding="3">
                    <tr>
                        <td align="center" valign="top" bgcolor="#CCCCCC"><span class="style40">IPD 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;{{$result[0]->ReceiptNo}}</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;{{date("d/m/Y", strtotime(str_replace('-', '/',$result[0]->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;</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>{{$result[0]->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>{{$ProcedureName}}</strong> </span></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;{{$result[0]->PayMode}}</td>
                                    <td width="11%" align="left" valign="top"><span class="style24">Amount : </span>
                                    </td>
                                    <td width="56%" align="left" valign="top">
                                        &nbsp;&#8377;{{number_format($result[0]->Amount,2)}}</td>
                                </tr>
                                <tr>
                                    <td align="left" valign="top"><span class="style24">Narration</span></td>
                                    <td colspan="3" align="left" valign="top">&nbsp;{{$result[0]->Narration}}</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>
    <p>&nbsp;</p>
</body>

</html>