



<?php $__env->startSection('title', 'Edit Order'); ?>


<?php $__env->startSection('content'); ?>
    <!-- Main content -->
    <section class="py-0">
      <div class="container-fluid">
        <div class="card card-primary">
          <div class="card-header">
            <h3 class="card-title">Edit Order</h3>
          </div>
          <!-- /.card-header --> 
          
      <form method="POST" action="<?php echo e(route('admin.orders.update', $order)); ?>" enctype="multipart/form-data">
            <?php echo method_field('put'); ?>
          
          <?php echo csrf_field(); ?>

                                                        <?php if(session()->has('failure')): ?>
                                                            <div class="alert alert-danger">
                                                                <?php echo e(session()->get('failure')); ?>

                                                            </div>
                                                        <?php endif; ?>

                                                        <?php if(session()->has('success')): ?>
                                                            <div class="alert alert-success">
                                                                <?php echo e(session()->get('success')); ?>

                                                            </div>
                                                        <?php endif; ?> 
          <div class="card-body">

            <div class="row">
                   <div class="col-6">
                        <div class="form-group">
                          <label class="col-form-label" for="name">Order No.</label>
                          <input type="text" class="form-control" id="order_no" name="order_no" value="<?php echo e(!empty($order->order_no)? $order->order_no : ""); ?>" placeholder="Name" readOnly>
                      </div>
                   </div>

                   <div class="col-6">
                        <div class="form-group">
                          <label class="col-form-label" for="name">Transaction</label>
                          <input type="text" class="form-control" id="transaction" name="transaction" value="<?php echo e(!empty($order->transaction)? $order->transaction : ""); ?>" placeholder="Name" readOnly>
                      </div>
                   </div>
            </div>

            <div class="row">
                   <div class="col-6">
                        <div class="form-group">
                          <label class="col-form-label" for="name">Total Amount</label>
                          <input type="text" class="form-control" id="amount" name="amount" value="<?php echo e(!empty($order->amount)? $order->amount : ""); ?>" placeholder="Name" readOnly>
                      </div>
                   </div>

            </div>

            <div class="row">
                   <div class="col-6">
                        <div class="form-group">
                          <label class="col-form-label" for="name">Payment Status</label>
                           <select class="form-control" name="payment_status">
                              <option value="Paid" <?php if($order->status == 'Paid'): ?> selected <?php endif; ?>>Paid</option>
                              <option value="UnPaid" <?php if($order->status == 'UnPaid'): ?> selected <?php endif; ?>>UnPaid</option>
                              <option value="COD" <?php if($order->status == 'COD'): ?> selected <?php endif; ?>>COD</option>
                              <option value="FAILED" <?php if($order->status == 'FAILED'): ?> selected <?php endif; ?>>Failed</option>

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

                   <div class="col-6">
                        <div class="form-group">
                          <label class="col-form-label" for="name">Order Status</label>
                           <select class="form-control" name="order_status">
                              <option value="0" <?php if($order->order_status == 0): ?> selected <?php endif; ?>>Pending</option>
                              <option value="1" <?php if($order->order_status == 1): ?> selected <?php endif; ?>>Confirm</option>
                              <option value="2" <?php if($order->order_status == 2): ?> selected <?php endif; ?>>Dispatch</option>
                              <option value="3" <?php if($order->order_status == 3): ?> selected <?php endif; ?>>Delivered</option>
                              <option value="9" <?php if($order->order_status == 9): ?> selected <?php endif; ?>>Cancelled</option>
                           </select>
                      </div>
                   </div>
            </div>
            

            

            

          </div>
          <!-- /.card-body -->
          <div class="card-footer">
            <button type="submit" class="btn btn-primary">Update Order</button>
          </div>
          <!-- /.card-footer -->
          </form>
        </div>
      </div>
    </section>
    <!-- /.content -->
<?php $__env->stopSection(); ?>
<?php echo $__env->make('admin.layouts.dashboard', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\xampp\htdocs\chittar\resources\views/admin/order/edit_order.blade.php ENDPATH**/ ?>