
@php($key_element = "xyz")
<div class="modal fade" id="md_expense_report" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
  {{ Form::open(array('route' => 'report.expense', 'class' => 'cls_form')) }}
  <div class="modal-dialog modal-md" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <h5 class="modal-title" id="exampleModalLabel">Expense Report</h5>
        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true"></span>
        </button>
      </div>
      <div class="modal-body ">
        <div class = "card">
          <div class ="card-body form-fieldset">
                               <div class="row">


          <div class="col-sm-6">
              <label class="label-color">From:</label>
            <small class="form-errors pull-right" value="">{{ $errors->first('date',":message") }}</small>

            <div class="input-group mb-3">
           
              {{Form::Date('from_date', '', ['class' => 'form-control form-control-sm  cls_date', 'aria-label' => 'Default', 'aria-describedby' => 'inputGroup-sizing-default'])}}
            </div>    
          </div>

          <div class="col-sm-6">
            <label class="label-color">To:</label>
            <small class="form-errors pull-right" value="">{{ $errors->first('date',":message") }}</small>

            <div class="input-group mb-3">
           
              {{Form::Date('to_date', '', ['class' => 'form-control form-control-sm  cls_date', 'aria-label' => 'Default', 'aria-describedby' => 'inputGroup-sizing-default'])}}
            </div>    
          </div>

          <div class="col-sm-6">
            <label class="label-color"> Select User Type:</label>
            <small class="form-errors pull-right" value="">{{ $errors->first('head',":message") }}</small>
            
                  <div class="input-group mb-3">
              
              @php($type_list = [Crypt::encrypt('Selected')=>'Select User Type '])

              @foreach(EF::getUserType() as $rows)
                @php($type_list += [Crypt::encrypt($rows)=> $rows])
              @endforeach

             {{Form::select('user_type', $type_list, '' , array('class' => 'form-control form-control-sm cls_required cls_selection','onChange' => 'getUserByDealer(this,"'.$key_element.'")'))}}
             
            </div>
          </div>
          
            <div class="col-sm-6">
            <label class="label-color"> Select User:</label>
            <small class="form-errors pull-right" value="">{{ $errors->first('user',":message") }}</small>
        
            <div class="input-group mb-3">
            <select id="user_{{$key_element}}" name="user" class="form-control form-control-sm ">
                                <option value="{{Crypt::encrypt(0)}}">Select User</option>

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

          
           <div class="col-sm-6">
            <label class="label-color"> Select {{ucwords(str_replace('_',' ',$branch_labels['module']))}}:</label>
            <small class="form-errors pull-right" value="">{{ $errors->first($branch_labels['module'],":message") }}</small>
            <div class="input-group mb-3">
              <select id="branch_{{$key_element}}" onchange="getBookingList(this,'{{$key_element}}','{{Crypt::encrypt(0)}}')" name="{{$branch_labels['module']}}" class="form-control form-control-sm">
                <option value="{{Crypt::encrypt(0)}}">Select {{ucwords($branch_labels['module'])}}</option>
                @foreach($branch_list as $rows)
                  <option value="{{Crypt::encrypt($rows->id)}}">{{ucfirst($rows->name)}}
                  </option>
                @endforeach
              </select>
            </div>
          </div>
          <div class="col-sm-6">
            <label class="label-color"> Select Booking:</label>
            <small class="form-errors pull-right" value="">{{ $errors->first('category',":message") }}</small>
            <div class="input-group mb-3">
              <select id="booking_{{$key_element}}" name="booking" class="form-control form-control-sm">
                <option value="{{Crypt::encrypt(0)}}">Select Booking</option>
               {{-- @foreach($booking_list as $rows)
                  <option value="{{Crypt::encrypt($rows->id)}}">{{ucfirst($rows->plot->plot_id)}} {{ucfirst($rows->plot->block_name)}}
                  </option>
                @endforeach
                --}}
              </select>
            </div>
          </div>
          <div class="col-sm-12">
            <label class="label-color"> Select Format:</label>
            <small class="form-errors pull-right" value="">{{ $errors->first('format',":message") }}</small>
            <div class="input-group mb-3">
              <select name="format" class="form-control form-control-sm">
                <option value="0">PDF</option>
                <option value="1">EXCEL</option>

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

         

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

        
         

      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
        <button type="submit" class="btn btn-primary cls_submit" content="generate expense report">Generate</button>
      </div>
    </div>
  </div>
  {{ Form::close() }}
</div>
