<table id="example" class="table table-striped table-bordered" style="width:100%">
    <thead>
        <tr>
            <th>Bill No</th>
            <!-- <th>IPD No</th> -->
            <th>Mrd. No</th>
            <th>Patient Name</th>
            <th>Age/Gender</th>
            <th>Bill Date</th>
            <!-- <th>Admission Date</th> -->
            <!-- <th>Discharge Date</th> -->
            <!-- <th>Diagnosis</th> -->
            <!-- <th>Sub Total</th>
            <th>Discount</th>
            <th>Gross Amount</th> -->
            <th>Paid Amount</th>
            <!-- <th>Balance Amount</th> -->
            <!-- <th>Payment Mode</th> -->
            <!-- <th>Narration</th> -->
            <th>Action</th>
           
        </tr>
    </thead>
    <tbody>
        @foreach($data as $result)
        <tr>
            <td>{{$result->BillNo}}</td>
            <!-- <td>{{$result->IpdNo}}</td> -->
            <td>{{$result->MrdNo}}</td>
            <td>{{$result->PatientName}}</td>
            <td>{{$result->AgeGender}}</td>
            <td>{{date("d/m/Y", strtotime(str_replace('-', '/',$result->BillDate)))}}</td>
            <!-- <td>{{date("d/m/Y", strtotime(str_replace('-', '/',$result->AdmissionDate)))}}</td>
            <td>{{date("d/m/Y", strtotime(str_replace('-', '/',$result->DischargeDate)))}}</td> -->
            <!-- <td>{{$result->Diagnosis}}</td> -->
            <!-- <td>&#8377;{{number_format($result->SubTotal,2)}}</td>
            <td>&#8377;{{number_format($result->Discount,2)}}</td>
            <td>&#8377;{{number_format($result->GrossAmt,2)}}</td> -->
            <td>&#8377;{{number_format($result->PaidAmt,2)}}</td>
            <!-- <td>&#8377;{{number_format($result->BalAmt,2)}}</td> -->
            <!-- <td>{{$result->PayMode}}</td> -->
            <!-- <td>{{$result->Narration}}</td> -->
            <td>
            <a href='editBill/{{$result->BillNo}}' data-toggle="tooltip" data-placement="top"
                    title="Delete" data-original-title="Delete" class=""><i
                    class="fas fa-pencil-alt" style="color: rgb(79, 175, 184) !important;"></i></a>&nbsp;&nbsp;
                <!-- <a data-id="{{$result->id}}" href='javascript:void(0)' data-toggle="tooltip" data-placement="top"
                    title="Delete" data-original-title="Delete" class="delete" id="bootbox-confirm"><i
                    class="fas fa-trash" style="color: rgb(79, 175, 184) !important;"></i></a>&nbsp;&nbsp; -->
                    <a href='javascript:void(0)' onclick="printBill({{$result->id}})"><i
            class="fas fa-print" style="color: rgb(79, 175, 184) !important;"></i> </a>
                
            </td>
        </tr>
        @endforeach
    </tbody>
</table>
<script type="text/javascript">
$(document).ready(function() {
    $('#example').DataTable({
        "scrollX": true,
        order: [[0, 'desc']],
        dom: 'Bfrtip',
        buttons: [

            'excelHtml5'

        ]
    });
});
</script>