<table id="example8" class="table table-striped table-bordered " style="width:100%">
    <thead>
        <tr>
            <th>Sr.No</th>
            <th>MRD No </th>
            <th>IPD No </th>
            <th>Surgery Dt. </th>
            <th>Name</th>
            <th>Mobile</th>
            <th>Age</th>
            <th>Site</th>
            <th>Surgery Name </th>
            <th>Ansth</th>
            
            <th>Surgeon</th>
            <th>Remark</th>
            <th>IOL</th>
            <th>Type</th>
            <th>Surgery Charges </th>
            <th>Counselor</th>
            <th>Payment 1 </th>
            <th>Amount 1 </th>
            <th>Payment 2 </th>
            <th>Amount 2 </th>
            <th>Payment 3 </th>
            <th>Amount 3 </th>
            <th>NEFT </th>
            <th>Amount  </th>
            
        </tr>
    </thead>
    <tbody>
        <?php $i=1;
        use App\Http\Controllers\ConsentController;
        foreach($data as $result){
          $SurgeonName = $result->SurgeonName;
          $docname = (new ConsentController)->getSurgeonName($SurgeonName);
          $text = $result->SurgeryName;
          $cleaned = preg_replace('/^.*?::?\s*/', '', $text);

          ?>
        <tr>
           <td><?php echo e($i); ?></td>
           <td><?php echo e($result->MrdNo); ?></td>
           <td><?php echo e($result->IpdNo); ?></td>
           <td><?php echo e(date("d/m/Y", strtotime(str_replace('-', '/',$result->SurgeryDate)))); ?></td>
    
           <td><?php echo e($result->PatientName); ?></td>
           <td><?php echo e($result->Phone); ?></td>
           <td><?php echo e($result->Age); ?></td>
            <td><?php echo e($result->Eye); ?></td>
           <td><?php echo e(strtoupper(strtolower($cleaned))); ?></td>
           <td><?php echo e($result->Anaesthetist); ?></td>
          
           <td><?php echo e($docname); ?></td>
           <td><?php echo e(strtoupper(strtolower($result->Remarks))); ?></td>
           <td><?php echo e($result->Iol); ?></td>
             <td>
    <?php if(!empty($result->payment_type1)): ?> <?php echo e($result->payment_type1); ?><br> <?php endif; ?>
    <?php if(!empty($result->payment_type2)): ?> <?php echo e($result->payment_type2); ?><br> <?php endif; ?>
    <?php if(!empty($result->payment_type3)): ?> <?php echo e($result->payment_type3); ?><br> <?php endif; ?>
    <?php if(!empty($result->payment_type4)): ?> <?php echo e($result->payment_type4); ?> <?php endif; ?>
</td>
           <td><?php echo e($result->SurgeryCharges); ?></td>
           <td><?php echo e($result->CounsellingDoneBy); ?></td>
           <td><?php echo e($result->Payment1); ?></td>
           <td><?php echo e($result->Amount1); ?></td>
           <td><?php echo e($result->Payment2); ?></td>
           <td><?php echo e($result->Amount2); ?></td>
           <td><?php echo e($result->Payment3); ?></td>
           <td><?php echo e($result->Amount3); ?></td>
           <td><?php echo e($result->Payment4); ?></td>
           <td><?php echo e($result->Amount4); ?></td>
           
        </tr>
        <?php $i++;}?>
        
    </tbody>
</table>
<script type="text/javascript">
$(document).ready(function() {
    $('#example8').DataTable({
        "scrollX": true,
        "pageLength":1000,
        dom: 'Bfrtip',
        buttons: [

            'excelHtml5'

        ]
    });
});
</script><?php /**PATH C:\deshmukh_hosp\resources\views//opdreport/view-ot-list.blade.php ENDPATH**/ ?>