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

}

if(
	true
) {	
		require_once($_SERVER['DOCUMENT_ROOT'].'/clases/ClienteProveedor.Class.php');
		$persona_obj = new ClienteProveedor(null);
		$persona_inf = $persona_obj -> informacionPersona(NULL, 1, 1);
		$persona_obj->Close();
		
		$titulo = "Buscar un cliente y/o proveedor";
		$boton	= 'Continuar';
	?>
	  
    <script src="/dist/js/select2.js?version=3.3"></script>
    
	<form name="frm_reservaBuscarCliente" id="frm_reservaBuscarCliente" method="post">
		<div class="modal-header">
			<h5 class="modal-title" id="md_modal_titulo"><?php echo $titulo;?></h5>
			<button aria-label="Close" class="close" data-dismiss="modal" type="button"><span aria-hidden="true"> &times;</span></button>
		</div>	
		<div class="modal-body" id="md_modal_empresa_content">
			<div class="form-group row">					
					<div class="col-sm-12">
						<select name="cmb_clienteProveedor" id="cmb_clienteProveedor" class="form-control select2" multiple="false" style="width: 100%"><?php
						foreach($persona_inf as $row ) {?>						
							<option value="<?php echo $row['pers_UID'];?>"><?php echo $row['pers_razon_social'];?></option><?php							
						}?>

						</select>
					</div>
			</div>
			<div class="form-group row">
					<label class="col-form-label col-sm-12">
						<span>Si desea ingresar un cliente y no un prospecto, haga click en <b>Nuevo</b></span>
					</label>
			</div>
			<div class="modal-footer">
				<button class="btn btn-primary" type="button" 
					onclick="buscarClienteContinuar()"
					id="btn_guardar" name="btn_guardar"> <?php echo $boton;?></button>
				<button class="btn btn-secondary" data-dismiss="modal" type="button"><i class="picons-thin-icon-thin-0153_delete_exit_remove_close"></i> Cerrar</button>
			</div>					
		</div>
		
	</form>
	
	<!-- <script type="text/javascript" src="/js/gestionReservas/gestionReservasBuscarClienteRecuperar.js"></script>		 -->
	
	<?php

	
	
} else{		

	echo 'Los parámetros recibidos NO son válidos';
	
}
?>