@include('dashboard.include.header')
@if(Auth::user()->type == "User")
<script>
    document.location.href = '/resellerdash'
</script>
@endif
  
  <div class="content-wrapper">
    <div class="content-header">
      <div class="container-fluid">
        <div class="row mb-2">
          <div class="col-sm-6">
            <h1 class="m-0">Received COD</h1>
          </div>
          <div class="col-sm-6">
            <ol class="breadcrumb float-sm-right">
              <li class="breadcrumb-item"><a href="/home">Home</a></li>
              <li class="breadcrumb-item active">Received COD</li>
            </ol>
          </div>
        </div>
      </div>
    </div>
   
    <section class="content">
      <div class="container-fluid">
      <div class="card">
        <div class="card-body">
            <div class="col-md-12">
                <table id="example2" class="table table-bordered" style="width:100%; font-size: 11px;">
                    <thead>
                        <tr>
                            <th>Payment ID</th>
                            <th>Collected COD</th>
                            <th>Delivery Charge</th>
                            <th>Service Charge</th>
                            <th>Product Charge</th>
                            <th>Commision</th>
                            <th>Advance</th>
                            <th>Paid Amount</th>
                            <th>Status</th>
                            <th>Paid Date</th>
                            <th>Action</th>
                        </tr>
                        <tbody>
                            @foreach($repay as $data)
                            <tr>
                                <td>{{$data->id}}</td>
                                <td>{{$data->collectedcod}}</td>
                                <td>{{$data->deliverycharge}}</td>
                                <td>{{$data->servicecharge}}</td>
                                <td>{{$data->productscharge}}</td>
                                <td>{{$data->commision}}</td>
                                <td>{{$data->advance}}</td>
                                <td>{{$data->paidamount}}</td>
                                <td>
                                @if($data->status == 0)
                                <span class="badge badge-warning">Not Paid</span>
                                @else
                                <span class="badge badge-success">Paid</span>
                                @endif
                                </td>
                                <td>{{$data->paiddate}}</td>
                                <td>
                                <a data-id="{{$data->id}}" target="_blank" class="btn btn-primary btn-xs" href="receivedcodsummeryorders/{{$data->id}}">View</a></td>
                            </tr>
                            @endforeach
                        </tbody>
                    </thead>
                </table>
            </div>
        </div>
        </div>
      

     

      </div>
    </section>
  </div>




  @include('dashboard.include.footer');

<script>
$('#reservationdate').datetimepicker({
    format: 'YYYY/MM/DD'
    });


  $(document).ready(function() {
    $('#example2').DataTable();
} );

</script>