@extends('layouts.master')
@section('title','Payment Voucher')
@section('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>Payment Voucher</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">Payment Voucher</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')
                  <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"  >-->
                                   <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="date" class="form-control" id="dateto"  >-->
                                                   <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>
              </div>
              <div class="card-footer">
                <button class="btn btn-primary" onclick="payment_voucher();">Search</button>
              </div>
      
          </div>
          <div class="card">

            <!-- /.card-header -->
            <div class="card-body ">
              <!-- END -->
              <div class="table-responsive">
              <table id="payment-voucher" class="table table-bordered table-striped  w-100">
                <thead>
                  <tr>
                    <th >Sl.no</th>
                    <th>Date</th>
                    <th>Customer Name</th>
                    <th>Ledger</th>
                    <th>Invoice no</th>
              
                    <th>paid Amount</th>
                <th>payment type</th>
                    <th>payment Voucher</th>
                  </tr>
                </thead>
                <tbody>
               </tbody>
                        <tfoot>

              <tr class="bg-gray font-17  footer-total">
              <td  colspan="5"><strong>Total:</strong></td>
              <td></td>
              <td></td>
         <td></td>
            
              </tr>
              </tfoot>
              </table>
              </div>
            </div>
            <!-- /.card-body -->
          </div>
        </div>
        <!-- /.container-fluid -->
      </section>
      <!-- /.content -->
    </div>



@endsection
@section('script')
<script src="{{ asset('js/report.js') }}"></script>
@endsection
