 <div class="table-responsive">
    <table id="example" class="table table-bordered align-middle" style="width:100%">
        <thead class="table-light">
            <tr>
                <th class="thbutton">Sl No</th>
                <!-- <th>Order ID</th> -->
                <th>License No</th>
                <th>Customer Details</th>
                <th>Service Details</th>
            </tr>
        </thead>
        <tbody>
            @php $i=1;@endphp
            @if(count($data)>0)
                @foreach($data as $key=> $list)
                    <tr>
                        <td class="text-center">{{$key + 1}}</td>
                        <!-- <td>{!! $list->id !!}</td> -->
                        <td><a href="{!! route('license-registered-details', $list->id) !!}"><strong>{!! $list->license_no !!}</strong></a><br>
                            {!! formatedDate($list->license_date) !!}<br />
                            Order date: {!! formatedDate($list->order_date) !!}<br />
                            Project: {!! @$list->project->code !!}<br />
                        </td>
                        <td>
                            <strong>{!! @$list->bill_to->name !!}</strong><br />
                            @if ($list->bill_to->account_contact->email != '')
                            <a href="mailto:{!! @$list->bill_to->account_contact->email !!}"><i class="bi bi-envelope"></i> {!! @$list->bill_to->account_contact->email !!}</a><br />
                            @endif
                            @if ($list->bill_to->account_contact->phone_no != '')
                            <a href="tel:{!! @$list->bill_to->account_contact->phone_no !!}"><i class="bi bi-telephone-fill"></i> {!! @$list->bill_to->account_contact->phone_no !!}</a><br />
                            @endif
                            @if ($list->bill_to->account_contact->whatsapp_no != '')
                            <a href="https://wa.me/{!! @$list->bill_to->account_contact->phone_no !!}"><i class="bi bi-whatsapp"></i> {!! @$list->bill_to->account_contact->whatsapp_no !!}</a><br />
                            @endif
                        </td>
                        <?php
                            if (isset($list->license_detail->license_activation_history)) {
                            $expiryDate = \Carbon\Carbon::parse($list->license_detail->license_activation_history->expiry_date);
                            $currentDate = \Carbon\Carbon::now();
                            $remainingDays = $currentDate->diffInDays($expiryDate);
                            }
                        ?>
                        <!-- <td>
                            {!! formatedDate(@$list->license_detail->license_activation_history->expiry_date) !!}
                            @if (isset($list->license_detail->license_activation_history))
                            ({!! $remainingDays !!} Days)
                            @endif
                        </td> -->
                        <td>{!! @$list->services !!}</td>
                    </tr>
                    @php $i++; @endphp
                @endforeach
            @else
            <tr>
                <td colspan="13">No Data Found</td>
            </tr>
            @endif
        </tbody>
    </table>
</div>
<nav class="row align-items-center mt-3">
    <div class="col-md-6">
    </div>
    <div class="col-md-6" style="text-align: right;">
        <div class="btn-group mb-0">
            <a class="btn btn-outline-primary" href="{!! route('client.report.export', ['type' => request()->route('type')]) !!}" target="_blank"><i class="bx bx-download"></i> Export</a>
        </div>
    </div>
</nav>
</div>

