<div class="panel panel-default">
    <div class="panel-heading">
      <div class="panel-btns">
        <a href="#" class="minimize">-</a>
      </div>
      <h4 class="panel-title">Filtros</h4>
    </div>
    <div class="panel-body">
      <div class="row">
        <div class="col-sm-2">
          <div class="form-group">
            <label class="col-sm-12 control-label">Fecha Desde</label>
            <input type="text" readonly="readonly"  value="" class="form-control" placeholder="dd/mm/aaaa" id="fecha_desde">
            <input type="hidden" value="" id="fecha_desde_hidden">
          </div>
        </div><!-- col-sm-6 -->
        <div class="col-sm-2">
          <div class="form-group">
            <label class="col-sm-12 control-label">Fecha Hasta</label>
            <input type="text" readonly="readonly" value="" class="form-control" placeholder="dd/mm/aaaa" id="fecha_hasta">
            <input type="hidden" value="" id="fecha_hasta_hidden">
          </div>
        </div><!-- col-sm-6 -->
        <div class="col-sm-4">
          <div class="form-group">
            <label class="col-sm-9 control-label">Número de Dispositivo Móvil</label>
            <select id="numero_dispositivo_movil" class="form-control chosen-select" data-placeholder="- Todos -">
                <!--<option selected value="-1">- Todos -</option>-->
            <?php
                foreach ($dispositivos_moviles_array as &$v_dispositivos_moviles) {?>
                   <option value="<?php echo $v_dispositivos_moviles["NroDispositivoMovil"]; ?>"><?php echo $v_dispositivos_moviles["NroDispositivoMovil"]; ?></option>
             <?php } ?>
            </select>  
          </div>
        </div><!-- col-sm-6 -->
        <div class="col-sm-4">
          <div class="form-group">
            <label class="col-sm-9 control-label">Operador Móvil</label>
            <select id="numero_operador_movil" class="form-control chosen-select" data-placeholder="- Todos -">
                <option selected value="-1">- Todos -</option>
            <?php
                foreach ($operadores_moviles_array as &$v_operadores_moviles) {?>
                   <option value="<?php echo $v_operadores_moviles["NroOperadorMovil"]; ?>"><?php echo $v_operadores_moviles["NombreApellido"] ?></option>
             <?php } ?>
            </select>  
          </div>
        </div><!-- col-sm-6 -->
      </div><!-- row -->
	  
	  <div class="row">
        <div class="col-sm-4">
          <div class="form-group">
            <label class="col-sm-9 control-label">Clientes</label>
            <select id="clientes" class="form-control chosen-select" data-placeholder="- Todos -">
                <option selected value="-1">- Todos -</option>
            <?php
                foreach ($clientes_array as &$v_cliente) {?>
                   <option value="<?php echo $v_cliente["CodigoCliente"]; ?>"><?php echo $v_cliente["CodigoCliente"]." - ".$v_cliente["RazonSocial"]; ?></option>
             <?php } ?>
            </select>  
          </div>
        </div><!-- col-sm-6 -->
        <div class="col-sm-4">
          <div class="form-group">
            <label class="col-sm-9 control-label">Ruta</label>
            <select id="rutas" class="form-control chosen-select">
                <option selected value="-1">- Todos -</option>
                <option value="1">Lunes</option>
                <option value="2">Martes</option>
                <option value="3">Miércoles</option>
                <option value="4">Jueves</option>
                <option value="5">Viernes</option>
                <option value="6">Sábado</option>
            </select>  
          </div>
        </div><!-- col-sm-6 -->
      </div><!-- row -->
      
      <div class="row">
        <div class="col-sm-3">
          <div class="form-group">
            <label class="col-sm-8 control-label">Tipo de Visita</label>
            <select id="tipo_visita" class="form-control" required>
                <option value="-1">- Todos -</option>
                <option value="1">No Visitado</option>
                <option value="2">Visitados con Ventas</option>
                <option value="3">Visitados sin Ventas</option>
            </select>   
          </div>
        </div><!-- col-sm-6 -->
      
		<?php if($trabaja_sucursales == 1) {?>
        <div class="col-sm-3">
          <div class="form-group">
            <label class="col-sm-6 control-label">Sucursales</label><br>
            <select onclick="distritos();" id="sucursales" name="flowers" title="Please select at least 2 flowers" class="form-control" size="5" multiple="multiple" required>
             <?php
                foreach ($sucursales_array as &$v_sucursales) {?>
                    <?php if(in_array($v_sucursales["LocalizacionJerarquicaID"], $sucursales_asociadas_array)) {?>
                    <option selected="selected" value="<?php echo $v_sucursales["LocalizacionJerarquicaID"]; ?>"><?php echo $v_sucursales["Descripcion"] ?></option>
                    <?php } ?>
             <?php } ?>
            </select>
            <label class="error" for="fruits"></label>
          </div>
        </div><!-- col-sm-6 -->
        <?php } ?>
		<?php if($trabaja_distritos == 1) {?>
        <div class="col-sm-3">
          <div id="distritos_form" class="form-group">
            <label id="distritos_label" class="col-sm-12 control-label">Distritos</label><br>
            <select onclick="zonas();" id="distritos" class="form-control" size="5" multiple="multiple" required></select>
          </div>
        </div><!-- col-sm-6 -->
        <?php } ?>
		<?php if($trabaja_zonas == 1) {?>
        <div class="col-sm-3">
          <div id="zonas_form" class="form-group">
            <label id="zonas_label" class="col-sm-12 control-label">Zonas</label><br>
            <select id="zonas"  class="form-control" size="5" multiple="multiple" required></select>
          </div>
        </div><!-- col-sm-6 -->
        <?php } ?>
      </div><!-- row -->
    <div class="panel-footer">
      <button id="filtrarBtn_controles_visitas" class="btn btn-primary">Filtrar</button>
      <div id="loader" class="well well-sm hide">
        <img style="margin-right:10px;" src="../Web_Tools/images/loaders/loader6.gif" alt="">Procesando
      </div>
    </div>
    </div><!-- panel-body -->

  </div>
