<table id="example" class="table table-striped table-bordered" style="width:100%">
    <thead>
        <tr>
            
            <th>#</th>
            <th>Vendor Name</th>
            <th>Bill No</th>
            <th>Bill Date</th>
            <th>Amount</th>
            <th>Payment Mode</th>
            <th>Attach File</th>
            <th>Action</th>
        </tr>
    </thead>
    <tbody>
        <?php $i=1;?>
        @foreach($data as $result)
        <tr>
         
             <td>{{$i}}</td>
             <td>{{$result->VendorName}}</td>
             <td>{{$result->BillNo}}</td>
             
          
             <td>{{date("d/m/Y", strtotime(str_replace('-', '/',$result->BillDate)))}}</td>
            
             <td>&#8377;{{number_format($result->Amount,2)}}</td>
             <td>{{$result->PayMode}} <br>{{$result->ChequeNo}}</td>
             <td><a href="{{ url('download/'.$result->Files) }}">Download</a>&nbsp;&nbsp;
             <a href="javascript:void(0)" onclick="showFile('{{$result->Files}}')">View & Print</a></td>
             <td>
             <a data-id="" href='/editVendorReceipt/{{$result->id}}' data-toggle="tooltip" data-placement="top" title="Edit" data-original-title="Edit"><i class="fas fa-pencil-alt"></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"></i></a>&nbsp;&nbsp;
             <!-- <a href="javascript:void(0)" onclick="printFile('{{$result->Files}}')" data-toggle="tooltip" data-placement="top" title="Print" data-original-title="Print"><i class="fas fa-print"></i></a> -->
            </td>
            
        </tr>
        <?php $i++;?>
        @endforeach
    </tbody>
</table>
<script type="text/javascript">
$(document).ready(function() {
    $('#example').DataTable({
      "scrollX": true,
        dom: 'Bfrtip',
        buttons: [
            
            'excelHtml5'
           
        ]
    });
});
</script>