<div id="" class="table-responsive" style="">
    <div class="float-right mt-2 mb-2">
        <span class="border border-primary px-2">Total Row: {{ $list_count }}</span>
        <span class="border border-primary px-2">Total Due Amount : {{ $total_due_amount }}</span>
        <span class="border border-primary px-2">Total Sub Due Amount : {{ $total_sub_due_amount }}</span>
        <span class="border border-primary px-2">Total Package Amount : {{ $total_package_amount }}</span>
        <span class="border border-primary px-2">Total Sub Package Amount : {{ $total_sub_package_amount }}</span>
    </div>
    <table id="dataTable" class="table table-bordered" style="">
        <thead>
            <tr class="bg-black">
                <th>ID</th>
                <th>Created Date</th>
                <th>User name</th>
                <th>Reseller Name</th>
                <th>Pop Name</th>
                <th>Package ID</th>
                <th>Package Name</th>
                <th>Sub Package ID</th>
                <th>Sub Package Name</th>
                <th>Total Day</th>
                <th>Manager Amount</th>
                <th>Sub Manager Amount</th>
                <th>Package Price</th>
                <th>Sub Package Price</th>
            </tr>
        </thead>
        <tbody>
            @foreach ($list as $r)
                <tr>
                    <td>{{ $r->id }}</td>
                    <td>{{ $r->created_at->format('d-M-Y H:i:s') }}</td>
                    <td>{{ $r->client->userid }}</td>
                    {{-- @dd($r) --}}
                    <td>{{ $r->reseller->name }}</td>
                    <td>{{ $r->pop->popname }}</td>
                    <td>{{ $r->package_id }}</td>
                    <td>{{ $r->package_name }}</td>
                    <td>{{ $r->sub_package_id ?? '' }}</td>
                    <td>{{ $r->sub_package_name ?? '' }}</td>
                    <td>{{ $r->total_days }}</td>
                    <td>{{ $r->due_amount }}</td>
                    <td>{{ $r->sub_due_amount ?? '' }}</td>
                    <td>{{ $r->package_amount }}</td>
                    <td>{{ $r->sub_package_amount ?? '' }}</td>
                </tr>
                @endforeach
        </tbody>
    </table>
</div>
