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

<?php $__env->startSection('content'); ?>
<style>
    .md-5{
        margin-bottom:10px;
    }
</style>
 <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>Reports</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">Reports</li>
              </ol>
            </div>
          </div>
        </div><!-- /.container-fluid -->
      </section>

      <!-- Main content -->
      <section class="content">
        <div class="container-fluid">
        <div class="card card-primary">
            <?php if(session()->has('success')): ?>
            <div class="alert alert-success">
                <?php echo e(session()->get('success')); ?>

            </div>
        <?php endif; ?>
         
              <div class="card-body row pb-0">
                  <?php if(auth()->user()->role == 'admin' || auth()->user()->role == 'users' || auth()->user()->role == 'driver'): ?>
                  <div class="col-md-4">
                    <div class="form-group mb-1">
                                <label>Company Name</label>
                                <select class="form-control select2bs4" style="width: 100%;" id="company_id">
                                  <option value="">All</option>
                                  <?php $__currentLoopData = $company_listing; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $company_list): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                  <option value="<?php echo e($company_list->id); ?>"><?php echo e($company_list->company_name); ?></option>
                                  <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                </select>
                              </div>
                    </div>
                  <?php endif; ?>

                <div class="col-md-4">
                  <div class="form-group mb-1">
                    <label for="exampleInputEmail1">Date From</label>
        
                  <!--  <input type="date" class="form-control" id="datefrom"  value="<?php echo date('Y-m-d'); ?>" >-->
                  <!--</div>-->
                       <div class="input-group date datepicker" id="datepicker">
                    <input type="text" class="form-control" id="datefrom" value="<?php echo date('m/d/Y'); ?>">
                    <span class="input-group-append">
                      <span class="input-group-text bg-light d-block">
                        <i class="fa fa-calendar"></i>
                      </span>
                    </span>
                  </div>
                  </div>
               </div>
                <div class="col-md-4">
                  <!--<div class="form-group mb-1">-->
                    <label for="exampleInputEmail1">Date To</label>
                     <!--<input type="input" class="form-control inputDate" id="dateto" value="<?php echo date('d-m-Y'); ?>">-->
                  <!--  <input type="date" class="form-control" id="dateto"  value="<?php echo date('Y-m-d'); ?>"> -->
                    
                  <!--</div>-->
                   <div class="input-group date datepicker" id="datepicker">
        <input type="text" class="form-control" id="dateto" value="<?php echo date('m/d/Y'); ?>">
        <span class="input-group-append">
          <span class="input-group-text bg-light d-block">
            <i class="fa fa-calendar"></i>
          </span>
        </span>
      </div>
                </div>
                 
                  <div class="col-md-4">
                    <div class="form-group mb-1">
                                <label>ledger </label>
                                <select class="form-control select2bs4" style="width: 100%;" id="ledger_id">
                                  <option value="">All</option>
                                 <option value="CashMemo">Cash Memo</option>
                                  <option value="DoNo">D.O No.</option>
                                </select>
                              </div>
                    </div>
              </div>
              <div class="card-footer">
                <button class="btn btn-primary" onclick="report();">Search</button>
                  <button class="btn btn-success" onclick="export_pdf();">Export to PDF</button>
              </div>
      
          </div>
          <div class="card">

            <!-- /.card-header -->
            <div class="card-body ">
              <!-- END -->
              <div class="table-responsive">
              <table id="report-table" class="table table-bordered table-striped  w-100">
                <thead>
                  <tr>
                    <th >Sl.no</th>
                    <th >Payment Status</th>
                    <th>Payment Mode</th>
                    <th>Company Name</th>
                    <th>Date</th>
                    <th>Ledger</th>
                    <th>Invoice No</th>
                    <th>Vehicle Number</th>
                    <th>Driver Number</th>
                    <th>Kilometer</th>
                    <th>Quantity</th>
                    <th>Quantity Liter</th>
                      <th>Quantity Liter Price</th>
                    <th>Total</th>
                    <th>Balance Due</th>
                    <th style="width: 473px !important;">Actions</th>
                  </tr>
                </thead>
                <tbody>
               </tbody>
                    <tfoot>

              <tr class="bg-gray font-17  footer-total">
              <td  ><strong>Total:</strong></td>
              <td></td>
              <td></td>
              <td></td>
              <td></td>
              <td></td>
              <td></td>
              <td></td>
              <td></td>
              <td></td>
                 <td></td>
              <td></td>
              <td></td>
                <td></td>
               <td></td>
                <td></td>
              </tr>
              </tfoot>
              </table>
              </div>
            </div>
            <!-- /.card-body -->
          </div>
        </div>
        <!-- /.container-fluid -->
        <div class="modal fade" id="payment_modal">
                    <div class="modal-dialog modal-lg">
                      <div class="modal-content">
                        <div class="modal-body">
                            <div class="modal-header modal-heading">
                              <h4>Pay Now</h4>
                                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                                  <span aria-hidden="true"><i class="las la-times" style="color: #007be8;"></i></span>
                                </button>
                              </div>
                            <section class="content">
                                <div class="container-fluid">
                                  
                                  <div class="card card-primary" style="box-shadow: none;">
                                      <form id="payment_form" method="post">
                                        <?php echo csrf_field(); ?>
                                        <div class="card-body row">
                                        <div class="col-md-4">
                                                <div class="form-group">
                                                    <label for="exampleInputEmail1">Balance Amount</label>
                                                    <input type="text" class="form-control" id="balance_amount"  readonly="">
                                                         <input type="hidden" class="form-control" id="balance_amount1"  >
                                                  </div>
                                            </div>
                                            <div class="col-md-4">
                                                <div class="form-group">
                                                    <label for="exampleInputEmail1">Date</label>
                                                    <input type="date" class="form-control" name="transaction_date" placeholder="Date" required="">
                                                  </div>
                                            </div>
                                            <input type="hidden" name="customer_id" id="customer_id">
                                            <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" required="" onchange="getvalue(this.value)">
                                                  </div>
                                            </div>
                                                            <div class="col-md-4">
                                                <div class="form-group">
                                                    <label for="exampleInputEmail1">Discount Amount</label>
                                                    <input type="number" class="form-control" id="discount_amnt" name="discount_amnt" step="any" >
                                                  </div>
                                            </div>
                                                 <div class="col-md-4">
                <div class="form-group">
                            <label>Payment Mode</label>
                       
                            <select class="form-control" style="width: 100%;" id="payment_type" name="payment_type" required="">
                              <option value="cash" >CASH</option>
                              <option value="cheque">CHEQUE</option>
                            </select>
                             <?php if($errors->has('payment_type')): ?>
                            <span class="text-danger"><?php echo e($errors->first('payment_type')); ?></span>
                            <?php endif; ?>
                          </div>

                </div>
                                            </div>

                                        <div class="card-footer">
                                          <button  id="pay_button"class="btn btn-primary">Submit</button>
                                          <button data-dismiss="modal" aria-label="Close" type="submit" class="btn btn-danger">Cancel</button>
                                        </div>
                                      </form>
                                    </div>
                                </div>
                                <!-- /.container-fluid -->
                              </section>
                        </div>
                      </div>
                      <!-- /.modal-content -->
                    </div>
                    <!-- /.modal-dialog -->
                  </div>
      </section>
      <!-- /.content -->
    </div>



<?php $__env->stopSection(); ?>
<?php $__env->startSection('script'); ?>
<script src="<?php echo e(asset('js/table.js')); ?>"></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.9.0/js/bootstrap-datepicker.min.js'></script>
<script>
    $(function(){
  $('.datepicker').datepicker();
});

</script>
<script>
    $(document).ready(function() {
      $("#sale").addClass('menu-open');
      $("#manage-sale").addClass('active');
    });
  </script>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.master', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/mc25vp7ttt60/public_html/srkdiesel-trading.in/resources/views/manage-register.blade.php ENDPATH**/ ?>