<?php echo $__env->make('dashboard.include.header', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>

  
  <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">Reseller Order</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">Reseller Order</li>
            </ol>
          </div>
        </div>
      </div>
    </div>
   
    <section class="content">
      <div class="container-fluid">

      <div class="row">
                <div class="col-lg-12">
                    <div class="card">
                        <div class="card-body">
                        <form class="form-horizontal" method="POST" action="/resellerorderfilter">
                        <?php echo e(csrf_field()); ?>

                        <div class="row">
                            <div class="col-md-3">
                                <div class="form-group">
                                <label>Date Range</label>
                                <div class="input-group">
                                    <div class="input-group-prepend">
                                    <span class="input-group-text">
                                        <i class="bi bi-calendar-date"></i>
                                    </span>
                                    </div>
                                    <input type="text" class="form-control float-right" id="reservation" value="<?php echo e($date); ?>" name="daterange">
                                </div>
                                </div>
                            </div>
                            <!-- <div class="col-md-3">
                                <div class="form-group">
                                    <label>Select Reseller</label>
                                    <select class="form-control select2" name="reseller" id="reseller" style="width: 100%;" required>
                                        <option value="" selected="selected" disabled>Select</option>
                                            <?php $__currentLoopData = $rese; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $data): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                            <option value="<?php echo e($data->id); ?>"><?php echo e($data->companyname); ?></option>
                                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                    </select>
                                </div>
                            </div>
                            <div class="col-md-3">
                                <div class="form-group">
                                    <label>Order Status</label>
                                    <select class="select2" name="OrderStatus" id="OrderStatus" data-placeholder="Order Status" style="width: 100%;">
                                            <option value="20">Pending</option>
                                            <option value="17">Confirm Orders</option>
                                            <option value="4">Hold Orders</option>
                                            <option value="7" >Return Order</option>
                                            <option value="8" >Dispatched Orders</option>
                                            <option value="9" >Money Received</option>
                                            <option value="10">Cancel</option>
                                            <option value="18">Delivered</option>
                                            <option value="33">Paid to Reseller</option>
                                            <option value="34">Return to Reseller</option>
                                            <option value="35">Refund paid</option>
                                            <option value="36">Refund Reseller</option>
                                            <option value="37">Duplicate Orders</option>
                                    </select>
                                    </div>
                                </div> -->
                            <div class="col-md-1" style="padding-top:30px;">
                                <button type="submit" class="btn btn-primary btn-block">Filter</button>
                            </div>


                        </div>
                        </form>
                        </div>
                    </div>




                    <div class="card">
                        <div class="card-body">
                        <div class="row">
                            <div class="col-md-12">
                                <table id="example12" data-page-length='50' class="table table-bordered" style="width:100%; font-size:11px;">
                                    <thead>
                                        <tr>
                                            <th>Company Name</th>
                                            <th>Dispatch Orders</th>
                                            <th>Return Orders</th>
                                            <th>Deliverd Orders</th>
                                            <th>Success Rate</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                    <?php $__currentLoopData = $maindata; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $data): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <tr>
                                        <td><?php echo e($data['name']); ?></td>
                                        <td><?php echo e($data['dis']); ?></td>
                                        <td><?php echo e($data['ret']); ?></td>
                                        <td><?php echo e($data['mone']); ?></td>
                                        <td><?php echo e(number_format( $data['rate'],2,'.',',')); ?> %</td>
                                    </tr>
                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                    </tbody>

                                </table>
                            </div>
                        </div>
                        </div>
                        </div>
                </div>
            </div>

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




  <?php echo $__env->make('dashboard.include.footer', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>

<script>
$(document).ready(function() {
    $('#example12').DataTable({
        "responsive": true, "lengthChange": true, "autoWidth": false,"order": [[ 6, "asc" ]],
      // "buttons": ["copy", "csv", "excel", "pdf", "print"]
      "buttons": [ {extend: 'copy',footer: true,exportOptions: {columns: [0,1,2,3,4,5,6,7,8]}},   
      {extend: 'csv',footer: true,exportOptions: {columns: [0,1,2,3,4,5,6,7,8]}},
      {extend: 'excel',footer: true,exportOptions: {columns: [0,1,2,3,4,5,6,7,8]}},
      {extend: 'pdf',footer: true,exportOptions: {columns: [0,1,2,3,4,5,6,7,8]}},
      {extend: 'print',footer: true,exportOptions: {columns: [0,1,2,3,4,5,6,7,8]}},      
    ],


    }).buttons().container().appendTo('#example12_wrapper .col-md-6:eq(0)');
} );


    $('#reservation').daterangepicker({
        locale: {
            format: 'YYYY/MM/DD'
        }
    });

    $('.select2').select2()
</script>