
 
<?php $__env->startSection('content'); ?>

 <style>
     input[type="file"] {
    background-color:transparent;
    padding:0px;
}

 </style>


<!-- Begin Page Content -->
<div class="container-fluid">
 

  <!-- DataTales Example -->
  <div class="card shadow mb-4">
    <div class="card-header py-3">
      <h6 class="m-0 font-weight-bold text-primary"><?php echo e(__('messages.Low_Stock')); ?></h6>
      <?php if(count($errors) > 0): ?>
                  <?php if($errors->any()): ?>
                    <div class="alert alert-primary" role="alert">
                      <?php echo e($errors->first()); ?>

                      <button type="button" class="close" data-dismiss="alert" aria-label="Close">
                        <span aria-hidden="true">×</span>
                      </button>
                    </div>
                  <?php endif; ?>
              <?php endif; ?>
              <form action="<?php echo e(route('searchstock')); ?>" method="post">
        <?php echo e(csrf_field()); ?>

<input type="text" value=""  name="productname" class="form-control" placeholder="Enter Product Name" style="width: 20%; display: inline;">
    <button type="submit" class="btn btn-success btn-md" value="Search" style="margin-top: -5px;"><i class="fa fa-search"></i></button>
</form>
    </div>
    <div class="card-body">
      <div class="table-responsive">
        <table class="table table-bordered" id="example8" width="100%" cellspacing="0">
          <thead>
            <tr>
            <th><?php echo e(__('messages.s_n')); ?></th>
            <th><?php echo e(__('messages.product_Name')); ?></th>
            <th><?php echo e(__('messages.Price')); ?></th>
            <th><?php echo e(__('messages.Stock')); ?></th>
            <th><?php echo e(__('messages.varient_Description')); ?></th>
            <th><?php echo e(__('messages.Update_Stock')); ?></th>
            </tr>
          </thead>
    
          <tbody>
          <?php if(count($product)>0): ?>
                          <?php $i=1; ?>
                          <?php $__currentLoopData = $product; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $products): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <tr>
                            <td><?php echo e($i); ?></td>
                            <td><?php echo e($products->product_name); ?>(<?php echo e($products->quantity); ?><?php echo e($products->unit); ?>)</td>
                            <td><?php echo e($products->price); ?></td>
                            
                            <td><?php echo e($products->stock); ?></td>
                            <td><?php echo e($products->description); ?></td>
                            <td align="center">
                                <form action="<?php echo e(route('update_stock')); ?>" method="post" class="form">   
                                			<?php echo e(csrf_field()); ?>

                        			<div class="modal-body" style="display:flex">
                        				<div class="form-group" style="margin-bottom: 0px;margin-right: 5px;">
                        				    <input type="hidden" value="<?php echo e($products->varient_id); ?>" class="form-control" name="varient_id">
                        				    <input type="text" style="width: 61px;" value="<?php echo e($products->stock); ?>" class="form-control" name="st">
                        				</div>
                        				<button type="submit" class="btn btn-primary">Update</button>
                        			</div>
                        			
                        			</form></td>
                            
                         

                        </tr>
                        <?php $i++; ?>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                      <?php else: ?>
                        <tr>
                          <td>Update_Stock</td>
                        </tr>
                      <?php endif; ?>
                       
          </tbody>
        </table>
        <?php echo $product->links("pagination::bootstrap-4"); ?>

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

</div>
<!-- /.container-fluid -->
</div>
</div>

<?php $__env->stopSection(); ?>
<?php echo $__env->make('vendor.layout.app', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>