

<?php $__env->startSection('title','Expense Form'); ?>
<?php $__env->startSection('content'); ?>

       <div class="content-wrapper">
      <!-- Content Header (Page header) -->
      <section class="content-header">
        <div class="container-fluid">
          <div class="row mb-2">
            <div class="col-sm-6">
              <h1>Edit Expense</h1>
            </div>
            <div class="col-sm-6">
              <ol class="breadcrumb float-sm-right">
                <li class="breadcrumb-item"><a href="#">Home</a></li>
                <li class="breadcrumb-item active">Edit Expense</li>
              </ol>
            </div>
          </div>
        </div><!-- /.container-fluid -->
      </section>

      <!-- Main content -->
      <section class="content">
        <div class="container-fluid">
          <div class="card card-primary">
            <form action="<?php echo e(route('expense.update',$expense->id)); ?>" method="post" enctype="multipart/form-data">
              <?php echo csrf_field(); ?>
              <?php echo e(method_field('PUT')); ?>

              <div class="card-body row">
                <div class="col-md-4">
                <div class="form-group">
                            <label>Date</label>
                           <input type="date" class="form-control" name="date" id="date"  value="<?php echo e($expense->transaction_date); ?>" autocomplete="off">
                            <?php if($errors->has('date')): ?>
                            <span class="text-danger"><?php echo e($errors->first('date')); ?></span>
                            <?php endif; ?>
                          </div>

                </div>
   
       
                     <div class="col-md-4">
                   <div class="form-group">
                            <label>Expense Category</label>
                           <select class="form-control select2bs4" style="width: 100%;" name="expense_category_id" required="">
                             <option value="">Select </option>
                             <?php $__currentLoopData = $expense_category; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $category): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                              <option value="<?php echo e($category->id); ?>" <?php if($expense->expense_category_id == $category->id) echo 'selected'; ?>><?php echo e($category->name); ?></option>
                              <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            </select>
                           
                          </div>

                </div>
                 <div class="col-md-4">
                   <div class="form-group">
                            <label>Payment Mode</label>
                           <select class="form-control select2bs4" style="width: 100%;" name="payment_mode" required="">
                             <option value="">Select </option>
                              <option value="cash"<?php if($expense->payment_mode == 'cash') echo 'selected'; ?>>Cash</option>
                              <option value="cheque"<?php if($expense->payment_mode == 'cheque') echo 'selected'; ?>>Cheque</option>
                             
                            </select>
                           
                          </div>

                </div>
             
            
       
                
                <div class="col-md-4">
                  <div class="form-group">
                    <label for="exampleInputEmail1">Description</label>
                <textarea class="form-control" id="description" cols="4" rows="4" name="description"  value="<?php echo e($expense->description); ?>"><?php echo e($expense->description); ?></textarea>

                  </div>
                </div>
    <div class="col-md-4">
                  <div class="form-group">
                    <label for="exampleInputEmail1">Amount</label>
                    <input type="number" class="form-control" id="amount" name="amount" step="any"  value="<?php echo e($expense->amount); ?>">
                  </div>
                </div>


              </div>
              <div class="card-footer pt-0 mb-5">
                <button class="btn btn-primary" type="submit">Submit</button>
                <a href="<?php echo e(route('admin.index')); ?>" class="btn btn-danger" >Back</a>
              </div>
            </form>
          </div>
        </div>
        <!-- /.container-fluid -->
      </section>
      <!-- /.content -->


    </div>
      <!-- /.content -->
<?php $__env->stopSection(); ?>



<?php echo $__env->make('layouts.master', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/u943602698/domains/srkdieseltrading.in/public_html/resources/views/edit-expense.blade.php ENDPATH**/ ?>