<?php
if(!isset($_SESSION)) {
    session_start();
}

require_once($_SERVER['DOCUMENT_ROOT'].'/varios/varios.php');
require_once($_SERVER['DOCUMENT_ROOT'].'/clases/Varios.Class.php');

if( Varios::isActiveSession() 
    && Varios::hasModuleAccess(10)
	&& isset($_SESSION[_SYSTEM_SESIONID.'userId'])
) {
	$id = Varios::decodifica($_SESSION[_SYSTEM_SESIONID.'userId']);


	$rut = '';
	$nombre = '';
	$estadoID = '';
	$tipoOrdenID = '';
	require_once($_SERVER['DOCUMENT_ROOT'].'/clases/Parametro.Class.php');
    $parametro_obj = new Parametro(null);
    $estado_inf = $parametro_obj->informacionParametro( 100000, null, 1, 1);
    $parametro_obj->Close();
	?>
	<link rel="stylesheet" href="/assets/css/checkbox.css?v=0">
    <div class="row ">
		<div class="col-xs-12 col-xl-10">
			<div class="row form-group">
				<label for="" class="col-form-label col-xs-12 col-xl-1">Estado</label>
				<div class="col-xs-12 col-xl-4">
					<select name="cmb_filtroEstado" id="cmb_filtroEstado" class="form-control" >
						<option value="">Seleccione ...</option><?php
						foreach ($estado_inf as $row) {?>
							<option value="<?php echo $row['para_UID'];?>"
                            	<?php Varios::selectVerification('filtroClientesProveedoresTipo', $row['para_UID']);?>><?php echo $row['para_nombre'];?>
                           </option><?php
						}?>
					</select>
				</div>
				<label for="" class="col-form-label col-xs-12 col-xl-1">Tipo</label>
				<div class="col-sm-6">
					<label class="checkboxes">Cliente
						<input id="chb_filtroCliente" name="chb_filtroCliente"
							type="checkbox" <?php if(0 == 1) {?>checked="checked"<?php }?>>
						<span class="checkmark"></span>
					</label>
					<label class="checkboxes">Proveedor Sils
						<input id="chb_filtroProveedorSils" name="chb_filtroProveedorSils"
							type="checkbox" <?php if(0 == 1) {?>checked="checked"<?php  }?>>
						<span class="checkmark"></span>
					</label>                                    
					<label class="checkboxes">Proveedor Cliente
						<input id="chb_filtroProveedorCliente" name="chb_filtroProveedorCliente"
							type="checkbox" <?php if(0 == 1) {?>checked="checked"<?php  }?>>
						<span class="checkmark"></span>
					</label>                                    
				</div>
			</div>
			<div class="form-group row">
				<label for="" class="col-form-label col-xs-12 col-xl-1">Rut</label>
				<div class="col-xs-12 col-xl-4">
					<input class="form-control" placeholder="Rut" type="text"
						id="txt_filtroRut" name="txt_filtroRut" maxlength="20"	<?php Varios::inputVerification('filtroClientesProveedoresRut');?>>
				</div>			
				<label for="" class="col-form-label col-xs-12 col-xl-1">Razón Social</label>
				<div class="col-xs-12 col-xl-6">
					<input class="form-control" placeholder="Razón Social" type="text"
						id="txt_filtroRazonSocial" name="txt_filtroRazonSocial" maxlength="100"	<?php Varios::inputVerification('filtroClientesProveedoresNombre');?>>
				</div>				
			</div>			
		</div>
		<div class="col-xs-12 col-xl-2">
			<div class="col-xs-6" >
				<button type="button" class="btn btn-primary mr-2 mb-2" onclick="aplicarFiltro()">
					<i class="" style="font-size:15px;color:white;"></i>
					Buscar
				</button>
			</div>
			<div class="col-xs-6" >
				<button type="button" class="btn btn-default mr-2 mb-2" onclick="limpiarInformacion()">
					<i class="style="font-size:15px;color:black;"></i>
					Limpiar
				</button>
			</div>
		</div>
	</div>
	<div class="row">
		<div class="col-sm-12" >
			<div id='div_informacion'>

			</div>
		</div>
	</div><?php
}?>