<table id="example3" class="table table-striped table-bordered dt-responsive nowrap" style="width:100%">
    <thead>
        <tr>
            <th>Sr.No</th>
            <th>Date</th>
            <th>Total Receipt</th>
            <th>Receipt Amount</th>
        </tr>
    </thead>
    <tbody>
        @php $i=1;@endphp
        @foreach($data as $result)
        <tr>
            <td>{{$i}}</td>
            <td>{{date("d/m/Y", strtotime(str_replace('-', '/',$result->ReceiptDate)))}}</td>
            <td>{{$result->TotReceipt}}</td>
            <td>&#8377;{{$result->Amount}}</td>
           

        </tr>
        @php $i++;@endphp
        @endforeach
        <tr>
            <td>{{$i}}</td>
            <th>Total </th>
            <th>{{$TotReceipt}}</th>
            <th>&#8377;{{$TotReceiptAmt}}</th>
           

        </tr>
    </tbody>
</table>
<script type="text/javascript">
$(document).ready(function() {
    $('#example3').DataTable({
        "scrollX": true,
        dom: 'Bfrtip',
        "pageLength": 200,
        buttons: [

            'excelHtml5'

        ]
    });
});
</script>