<div class="col-sm-12">
  <div class="card p-2">
      <div class="table-responsive">
          <table class="table table-bordered">
              <thead class="bg-gray-50">
                  <tr>
                      <p>Report of Monthly Generated Bill Collection {{ date('F Y') }}</p>
                      <th scope="col">
                          Manager
                      </th>
                      <th scope="col">
                          Billed Clients
                      </th>
                      <th scope="col">
                          Bill Amount
                      </th>
                      <th scope="col">
                          Received ID
                      </th>

                      <th scope="col">
                          Received Amount
                      </th>
                      <th scope="col">
                          Col. %
                      </th>
                      <th scope="col">
                          Due Clients
                      </th>

                      <th scope="col">
                          Due Amount
                      </th>





                  </tr>
              </thead>
              <tbody class="bg-white divide-y divide-gray-200">
                {{-- {{ dd($popByBillGenerate)}} --}}
                    @foreach ($res_array as $key => $item)

                    {{-- {{ dd($item) }} --}}

                       
                        <tr>
                            <td>{{$resellers->where('id',$key)->first()->name}}</td>

                            <td>
                                @if(isset($item['monthly']))
                                    {{ $item['monthly']['total_bill_id'] }}
                                @endif

                            </td>
                            <td>
                                @if(isset($item['monthly']))
                                    {{ $item['monthly']['bill_amount'] }}
                                @endif
                            </td>
                            <td>
                                @if(isset($item['monthly']))
                                    {{ $item['monthly']['total_paid_id'] }}
                                @endif
                            </td>
                            <td>
                                @if(isset($item['monthly']))
                                    {{ $item['monthly']['bill_paid'] }}
                                @endif
                            </td>
                            <td></td>
                            <td></td>
                            <td></td>
                        </tr>
                    @endforeach
                  

                 

                  <tr>
                      <td class="whitespace-nowrap">Total</td>
                      <td class="whitespace-nowrap"></td>
                      <td class="whitespace-nowrap"></td>
                      <td class="whitespace-nowrap"></td>
                      <td class="whitespace-nowrap"></td>
                      <td class="whitespace-nowrap"></td>
                      <td class="whitespace-nowrap"></td>
                      <td class="whitespace-nowrap"></td>

                  </tr>


                  <!-- More items... -->
              </tbody>
          </table>
      </div>
  </div>
</div>

<div class="col-sm-12">
  <div class="card p-2">
      <div class="table-responsive">
          <table class="table table-bordered">
              <thead class="bg-gray-50">
                  <tr>
                      <p>Report of New Customer, Package & Billing Cycle Change Bill Collection
                          {{ date('F Y') }}</p>
                      <th scope="col">
                          Manager
                      </th>
                      <th scope="col">
                          Bill Amount
                      </th>
                      <th scope="col">
                          Received Amount
                      </th>
                      <th scope="col">
                          Col. %
                      </th>

                      <th scope="col">
                          Due Amount
                      </th>
                  </tr>
              </thead>
              <tbody class="bg-white divide-y divide-gray-200">
                  
                 
                  <tr>

                      
                      <td class="whitespace-nowrap">Total</td>
                      <td class="whitespace-nowrap"></td>
                      <td class="whitespace-nowrap"></td>
                      <td class="whitespace-nowrap">
                         
                      </td>
                      <td class="whitespace-nowrap"></td>
                  </tr>


                  <!-- More items... -->
              </tbody>
          </table>
      </div>
  </div>
</div>