



@extends('layouts.master')

@section('title','Due Payment Bills')

@section('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>Due Payment Bills</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">Due Payment Bills</li>
              </ol>
            </div>
          </div>
        </div><!-- /.container-fluid -->
      </section>

      <!-- Main content -->
      <section class="content">
        <div class="container-fluid">
        <div class="card card-primary">
            @if(session()->has('success'))
            <div class="alert alert-success">
                {{ session()->get('success') }}
            </div>
        @endif
         
              <div class="card-body row pb-0">
                  @if (auth()->user()->role == 'admin' || auth()->user()->role == 'users')
                  <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>
                                  @foreach($company_listing as $company_list)
                                  <option value="{{$company_list->id}}">{{ $company_list->company_name }}</option>
                                  @endforeach
                                </select>
                              </div>
                    </div>
                  @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'); @endphp" >-->
                  <!--</div>-->
                <!--       <div class="input-group date datepicker" id="datepicker">-->
                <!--    <input type="text" class="form-control" id="datefrom" value="@php echo date('m/d/Y'); @endphp">-->
                <!--    <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'); @endphp">-->
                  <!--  <input type="date" class="form-control" id="dateto"  value="@php echo date('Y-m-d'); @endphp"> -->
                    
                  <!--</div>-->
      <!--             <div class="input-group date datepicker" id="datepicker">-->
      <!--  <input type="text" class="form-control" id="dateto" value="@php echo date('m/d/Y'); @endphp">-->
      <!--  <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="due_bill_report();">Search</button>
                  <button class="btn btn-success" onclick="export_due_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>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>Total</th>
                    <th>Balance Due</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>
             
              </tr>
              </tfoot>
              </table>
              </div>
            </div>
            <!-- /.card-body -->
          </div>
        </div>
      
      </section>
      <!-- /.content -->
    </div>



@endsection
@section('script')
<script src="{{ asset('js/payment.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>

@endsection
