        <!-- TOTAL OVERDUES -->
         <div class="col-md-12 col-lg-12 col-sm-12">
                <div class="card">
                   <div class="card-status bg-teal">
                      </div>
                  <div class="card-header">
                    <h3 class="card-title">Total Overdue</h3>
                  </div>
                  <div class="table-responsive">
                    <table class="table card-table table-vcenter text-nowrap cls_datatable">
                      <thead>
                        <tr>
                          <th class="w-1">Sr #</th>
                          <th>Booking Detail</th>
                          <th>Customer Name</th>
                          <th>Contact</th>
                          <th>Description</th>
                          <th>Balance</th>
                          <th>Due Date</th>
                          <th>Action</th>
                      
                        </tr>
                      </thead>
                      <tbody>
                        @foreach($installment_overdues as $rows)
                        @php($type = 'Installment')

                        @if($rows->booking->status != "Cancel")
                        <tr>

                          <td><span class="text-muted"></span>{{$loop->iteration}}</td>
                          <td>{{$rows->booking->plot->plot_id}} {{$rows->booking->plot->block_name}} ({{$rows->booking->plot->size}} ) </td>
                          <td>
                            {{ucfirst($rows->user->name)}} {{ucfirst($rows->user->fname)}}
                          </td>
                          <td>
                              {{$rows->user->contact}}
                          </td>
                          <td>
                          {{$rows->description}}
                          </td>
                          <td>
                         {{EF::numberFormat($rows->amount - $rows->received_amount)}}
                          </td>
                          <td>{{EF::dateFormat($rows->due_date)}}</td>
                          <td>
                              @if(Auth::user()->hasAnyPermission(['All','Push Sms']))
                            <a style="color: #FFFFFF;" onClick = "pushSms('{{Crypt::encrypt($type)}}','{{Crypt::encrypt($rows->id)}}')" class="btn btn-primary btn-sm">SMS</a>
                            @endif
                          </td>
                        </tr>
                        @endif
                        @endforeach
                       
                      </tbody>
                    </table>
                  </div>
                </div>
              </div>


               <div class="col-md-12 col-lg-12 col-sm-12">

                <div class="card">
                   <div class="card-status bg-teal">
                      </div>
                  <div class="card-header">
                    <h3 class="card-title">Booking Overdue</h3>
                  </div>
                  <div class="table-responsive">
                    <table class="table card-table table-vcenter text-nowrap cls_datatable_due">
                      <thead>
                       
                        <tr>
                          <th class="w-1">Sr #</th>
                          <th>Booking Detail</th>
                          <th>Customer Name</th>
                          <th>Contact</th>
                          <th>Balance</th>
                          <th>Latest DueDate</th>
                          <th>Action</th>
                        
                        </tr>
                      </thead>
                      <tbody>
                        @php(
                        $date = date('Y-m-d'))
                        @php($operator ='<=') 
                         @php($types = 'Booking')

                      @foreach($booking_overdues as $rows)
                        <tr>

                          <td><span class="text-muted"></span>{{$loop->iteration}}</td>
                          <td>{{$rows->booking->plot->plot_id}} {{$rows->booking->plot->block_name}} ({{$rows->booking->plot->size}} ) </td>
                          <td>
                            {{ucfirst($rows->booking->user->name)}} {{ucfirst($rows->booking->user->fname)}}
                          </td>
                          <td>
                            {{ucfirst($rows->booking->user->contact)}} 
                          </td>
                        
                          <td>
                         {{EF::numberFormat($rows->balance)}}
                          </td>
                          <td>{{EF::dateFormat($rows->getLatestDueDate($date,$operator,$rows->booking_id))}}</td>
                          <td>
                              @if(Auth::user()->hasAnyPermission(['All','Push Sms']))
                            <a style="color: #FFFFFF;" onClick = "pushSms('{{Crypt::encrypt($types)}}','{{Crypt::encrypt($rows->booking_id)}}')" class="btn btn-primary btn-sm">SMS</a>
                            @endif
                          </td>
                        </tr>
                        @endforeach
                         
                        
                      </tbody>
                    </table>
                  </div>
                </div>

              </div>