@include('header')
@include('navegador')
@if($consumos['error'] == 0)
<div class="content general-margin ">
@if(
\Session::get('usuario')->cliente[env('ID_INFORME_COMERCIAL')]->client_id  == 5967702 || 
\Session::get('usuario')->cliente[env('ID_INFORME_COMERCIAL')]->client_id  == 528397 || 
\Session::get('usuario')->cliente[env('ID_INFORME_COMERCIAL')]->client_id  == 5546348 || 
\Session::get('usuario')->cliente[env('ID_INFORME_COMERCIAL')]->client_id  == 2254875 || 
\Session::get('usuario')->cliente[env('ID_INFORME_COMERCIAL')]->client_id  == 1853132042 || 
\Session::get('usuario')->cliente[env('ID_INFORME_COMERCIAL')]->client_id  == 639839799 || 
\Session::get('usuario')->cliente[env('ID_INFORME_COMERCIAL')]->client_id  == 691776602 || 
\Session::get('usuario')->cliente[env('ID_INFORME_COMERCIAL')]->client_id  == 1661455192 || 
\Session::get('usuario')->cliente[env('ID_INFORME_COMERCIAL')]->client_id  == 882192574 || 
\Session::get('usuario')->cliente[env('ID_INFORME_COMERCIAL')]->client_id  == 1313127297 || 
\Session::get('usuario')->cliente[env('ID_INFORME_COMERCIAL')]->client_id  == 121926175 || 
\Session::get('usuario')->cliente[env('ID_INFORME_COMERCIAL')]->client_id  == 1204731811 || 
\Session::get('usuario')->cliente[env('ID_INFORME_COMERCIAL')]->client_id  == 1702664090 || 
\Session::get('usuario')->cliente[env('ID_INFORME_COMERCIAL')]->client_id  == 640648496 || 
\Session::get('usuario')->cliente[env('ID_INFORME_COMERCIAL')]->client_id  == 1226057645 || 
\Session::get('usuario')->cliente[env('ID_INFORME_COMERCIAL')]->client_id  == 138677190
)
	<div class="col-md-12 text-right">
	<form action="{{ENV('FIDELITAS_URL_LOGIN')}}" method="POST" target="_blank">
	 <input type="hidden" class="form-control" name="UN" id="UN" value="{{Session::get('usuario')->username}}">
  	<input type="hidden" class="form-control" name="login_username" id="login_username" value="{{Session::get('usuario')->username}}">
  	<input type="hidden" class="form-control" name="usuario" id="usuario" placeholder="Usuario" value="{{Session::get('usuario')->username}}">
		<input class="btn btn-danger btn-lg" value="Acceder al sistema anterior" type="submit">
	</form>
	</div>
@endif
	@if(isset(Session::get('usuario')->cliente[ENV('ID_INFORME_COMERCIAL')]))
		<div class="col-md-8 col-md-offset-2 text-center">
			<h3>Consulta de Personas/Empresas<legend></legend></h3>
			<h4><p>Escriba en el campo correspondiente y a continuación Seleccione de la lista la persona/empresa que desea consultar.</p></h4>
		</div>
	<form action="post" id="search_people">
	  <input type="hidden" name="_token" id="token" value="{{ csrf_token() }}">
		<div class="col-md-8 col-md-offset-2 text-center">
			<div class="col-md-5 text-center col-sm-12">
				<label class="label_buscador">Razón Social /Apellido y Nombres</label>
				<input type="text" name="razon_social" class="form-control" id="razon_social" value="{{ $nombre or '' }}" style="text-transform:uppercase"> 
			</div>
			<div class="col-md-4 col-sm-12">
				<label class="label_buscador">Código de identificación Tributaria</label>
				<input type="text" name="cuit" class="form-control" id="cuit"> 	  	
			</div>
			<div class="col-md-3 col-sm-12">
				<label class="label_buscador">D.N.I.</label>
				<input type="text" name="dni" class="form-control" id="dni">
			</div>
		</div>
		<!--<div class="col-md-8 col-md-offset-2 text-center">
			<legend></legend>
			<button class="btn btn-info btn-fidelitas" id="btn_search_people">Buscar</button>
		</div>-->
	</form>
	@include('loading')
		<div id="padron" class="col-md-8 col-md-offset-2"  style="display: none;margin-top:3%">		
			<table class="table table-hover table-responsive">
			 	<thead>
			  	<tr class="btn-fidelitas">
			    	<th class="text-center">Nombre</th>
			    	<th colspan="2" class="text-center">Identificación</th>
			    	<th class="text-center">Acción</th>
					<tr>
				</thead>
				<tbody>
					<tr>
						<td class="text-center"><label name="nombre_persona" id="nombre_persona"></label></td>
						<td  class="text-center"><label name="identificador" id="identificador"></label></td>
						<td  class="text-center"><span name="pre_clave" id="pre_clave"></span><span name="cuerpo_clave" id="cuerpo_clave"></span><span name="suf_clave" id="suf_clave"></span></td>
						<td  class="text-center"> <form action="compacto" method="post">
							<input type="hidden" name="_token" value="{{ csrf_token() }}">
							<input type="hidden" name="idp" id="idp" value="">
							<input type="hidden" name="cuit" id="fcuit" value="">
							<input type="hidden" name="nc" id="nc" value="">
							<input type="hidden" name="rs" id="rs" value="">
							<button type="submit" class="btn btn-info btn-fidelitas">Ver</button>
						</form>
						</td>
					</tr>
				</tbody>
			</table>
		</div>
	<script type="text/javascript" src="{{ URL::asset('js/reports.js') }}"> </script>
	@else

@endif
	@else
		<div class="container">
		<div class="alert alert-danger text-center col-md-12">{{$consumos['mensaje']}}</div>
		</div>
	@endif
</div>
@include('footer')