

<?php $__env->startSection('title','Customer List'); ?>
<?php $__env->startSection('page-title','Customer List'); ?>

<?php $__env->startSection('content'); ?>
<div class="card">
   <div class="card-header d-flex justify-content-between align-items-center">
       <h5 class="mb-0">Customer List</h5>
       
   </div>

   <div class="card-body">
       <!-- Filter Form -->
       <form method="GET" class="row g-2 mb-3">
           <div class="col-md-5">
               <input type="text" name="search" class="form-control"
                  value="<?php echo e(request('search')); ?>" placeholder="Search">
           </div>
           <div class="col-md-4">
               <select name="status" class="form-control">
                 <option value="">Status</option>
              
                 <option value="1" <?php echo e(request('status')=='1' ? 'selected' : ''); ?>>
                     Active
                 </option>
              
                 <option value="0" <?php echo e(request('status')=='0' ? 'selected' : ''); ?>>
                     Un-Active
                 </option>
              
                 
               </select>
           </div>
           
           
           <div class="col-md-3">
               <button class="btn btn-secondary w-100">Filter</button>
           </div>
       </form>

       <!-- Products Table -->
       <div class="table-responsive">
           <table class="table table-bordered align-middle">
               <thead class="table-light">
                   <tr>
                       <th width="30"><input type="checkbox" class="check-all"></th>
                        <th>Customer</th>
                        <th>Phone</th>
                        <th>Address</th>
                        <th>Previous Balance</th>
                        <th>Joined</th>
                        <th width="120">Action</th>
                   </tr>
               </thead>
               <tbody>
                 <?php $__currentLoopData = $customers; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $customer): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <tr>
                       <td><input type="checkbox" class="check-one" value="<?php echo e($customer->id); ?>"></td>
                       
                       <td>
                           <strong>  <?php echo e($customer->name); ?> </strong><br>
                           <small><?php echo e($customer->urdu_name); ?></small>
                       </td>

                       <td>
                           <strong> <?php echo e($customer->phone ?? '-'); ?><br>
                                    <?php echo e($customer->phone2 ?? '-'); ?></strong>
                       </td>

                       <td><?php echo e($customer->address ?? '-'); ?><br>
                            <small><?php echo e($customer->urdu_address ?? '-'); ?></small></td>
                            
                       <td> Rs <?php echo e(number_format($customer->opening_balance ?? '0.00',2)); ?></td>
                       <td> <?php echo e($customer->created_at->format('d M Y')); ?> </td>

                      

                       <td class="text-end">

                            <a href="<?php echo e(route('admin.customers.update',$customer->id)); ?>"
                               class="btn btn-sm btn-outline-primary">
                                <i class="las la-edit">update</i>
                            </a>

                            <a href="<?php echo e(route('admin.customers.bills',$customer->id)); ?>"
                               class="btn btn-sm btn-outline-success">
                                <i class="las la-receipt">Bills</i>
                            </a>
                          
                        </td>
                   </tr>

                  <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                 
               </tbody>
           </table>
       </div>

       <!-- Pagination -->
       <div class="mt-3">
         <div class="pagination-sm">
           <?php echo e($customers->links()); ?>

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


<?php $__env->stopSection(); ?>
<?php echo $__env->make('Admin.layout.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH C:\wamp64\www\alifoods\resources\views/Admin/partials/customer_list.blade.php ENDPATH**/ ?>