@include('/led/led_header')

{{--@include('/led/linea_divisoria')--}}

{{-- @include('/led/led_navegador') --}}

<style type="text/css" media="screen">
	.valor-score {
		color: #000000;
		font-size: 15px;
		
	}


	.valor-normal {
		color: #000000;
		font-size: 13px;
		font-weight: normal;
		
	}

</style>

<link href="{{asset('components/datatables/media/css/jquery.dataTables.min.css')}}" rel="stylesheet">

<div class="container" style="width:95%">

	{{-- <div class="row">
		<div class="@if ($tiene_subc > 0) col-md-8 @else col-md-10 @endif h3">@traducir('Panel de Control','Panel de Control')</div>

		@if ($tiene_subc > 0)
		<div class="col-md-2">
			<button type="button" class="btn btn-primary btn-fidelitas form-control panel-subcontratistas"><i class="{{$icon_subc}}"></i> @traducir('Subcontratistas', 'Subcontratistas')</button>
		</div>
		@endif

		@if ($tiene_control_ingreso > 0)
		<div class="col-md-2">
			<button type="button" class="btn btn-primary btn-fidelitas form-control panel-control-ingreso"><i class="fa fa-log-in"></i> @traducir('Control de ingreso', 'Control de ingreso')</button>
		</div>
		@endif

		<div class="col-md-2">
			<button type="button" class="btn btn-success form-control exportar-excel"><i class="fa fa-file-excel"></i> Exportar a Excel</button>
		</div>
	</div> --}}
<div class="hidden" id="state_save" data-state-save="{{$state_save}}"></div>

	<div class="sidebar-excel-div">
		<button type="button" class="btn btn-success form-control exportar-excel" title="Exportar a Excel"><i class="fa fa-file-excel"></i></button>
	</div>
	<div class="sidebar-menu">
		<div class="sidebar-menu-div">

						<div id="btn_filtros"><i class="fas fa-angle-right fa-2x" id="icon_filtros"></i></div>
						<div id="filtros_panel_control" style="display:none;">
							<form class="form" id="frmFilter" method="post" action="/led/led-panel-control">
								{{csrf_field()}}

								<div class="row"><div class="col-md-12">&nbsp;</div></div>

								<h5 style="padding-left:12px">@traducir('Visualizar','Visualizar')</h5>
								<div class="col-md-12 form-group text-left">

									@foreach($productos as $cc => $prod)									
									<div class="text-left">
											{{-- @if ($cc > 0)  @endif --}}
											
											<input type="checkbox" name="hider" value="{{$cc}}" class="hider" data-cols="child_col_{{$cc}}" checked>
											{{$prod['etiqueta']}}

									</div>
									@endforeach
								</div>

								<div class="row">
									<div class="col-md-6 h5"><span style="padding-left:12px">@traducir('Filtrar','Filtrar')</span></div>
								</div>

								<div class="col-md-12  text-left">
									<div class="row">
										<div class="col-md-12">
											<input type="checkbox" name="country_code_chk" class="chk-country" @if($filter_cc > 0) checked @endif> @traducir('País','País')
										</div>
										<div class="col-md-12 dnone" id="select-country">
											<select name="country_code" id="country_code" class="select-filter" size="5" multiple="multiple">
												{{-- <option value="" @if (null == $filtro_pais) selected @endif>-- Todos --</option> --}}
												@foreach ($paises as $pais) 
													<option value="flag-icon-{{strtolower($pais->country_code)}}" @if ($pais->country_code == $filtro_pais) selected @endif >{{$pais->country_name}}</option>
												@endforeach
											</select>
										</div>
									</div>
								</div>

								<div class="col-md-12  text-left">
									<div class="row">
										<div class="col-md-12">
											<input type="checkbox" name="familia_chk" class="chk-familia" @if($filter_fam > 0) checked @endif> @traducir('Familia','Familia')
										</div>
										<div class="col-md-12 dnone" id="select-familia">
											<select name="familia" id="familia" class="select-filter" size="5" multiple="multiple">
												{{-- <option value="" @if (null == $filtro_familia) selected @endif>-- @traducir('Todos','Todos') --</option> --}}
												@foreach ($familias as $familia) 
													<option value="{{$familia->familia}}" @if ($familia->familia == $filtro_familia) selected @endif>{{$familia->nombre_familia}}</option>
												@endforeach
											</select>
										</div>
									</div>
								</div>




								@foreach($productos as $cc => $prod)								

									@if ( sizeof($prodind[$cc]) > 0 )

										<div class="col-md-12  text-left">

										@foreach($prodind[$cc] as $id => $nombre)

											@if ($id == 'SCORE_IC' OR $id == 'CUMPL_DOC' OR $id == 'SCORE_DOC' OR $id == 'SCORE_FINAL' OR $id == 'SCORE_BAL' OR $id == 'VALORACION_BAL')
												@if ($nombre['tipo_dato'] == 'I' OR $nombre['tipo_dato'] == 'F' OR $nombre['tipo_dato'] == 'S')
												<div class="row">
													<div class="col-md-12">
														<input type="checkbox" name="filtro" value="{{$id}}" class="filtro">

														{{$prod['etiqueta']}} @if( sizeof($prodind[$cc]) > 1 ) - {{$nombre['etiqueta']}} @endif

													</div>
													<div class="col-md-12 dnone" id="select_{{$id}}">
														<select name="filtro_{{$id}}" size="5" multiple="multiple" class="@if($nombre['tipo_dato'] != 'S') fselect @else tselect @endif" id="filtro_{{$id}}">
															
															@if($nombre['tipo_dato'] == 'I' OR $nombre['tipo_dato'] == 'F')
																<option value="20">0-20</option>
																<option value="40">21-40</option>
																<option value="60">41-60</option>
																<option value="80">61-80</option>
																<option value="100">81-100</option>
																@if ($id == 'SCORE_DOC' OR $id == 'SCORE_FINAL')
																<option value="-100">N/A</option>
																@endif
															@else

																@foreach($nombre['opciones']['text'] as $n => $texto)
																	<option value="{{$nombre['opciones']['values'][$n]}}">{{$texto}}</option>
																@endforeach

															@endif
														</select>
													</div>
												</div>
												@endif
											@endif

										@endforeach
										</div>
									@endif
								@endforeach

								<div class="row"><div class="col-md-12">&nbsp;</div></div>

						</form>
					</div>
		</div>
	</div>

	<table class="table table-striped table-condensed" id="tablaDashboard">
		<thead>
			<tr>
				<th class="text-center" rowspan="2">@traducir('País','País')</th>
				<th class="text-left" rowspan="2">@traducir('Familia','Familia')</th>
				<th class="text-left" rowspan="2">@traducir('Razón Social','Razón Social')</th>
				<th rowspan="2" style="display: none;" class="no-sort">ID</th>

				@foreach($productos as $cc => $prod)					
					<th style="vertical-align: top;" class="text-center child_col_{{$cc}}" colspan="{{sizeof($prodind[$cc])}}" @if( sizeof($prodind[$cc]) == 1 ) @foreach($prodind[$cc] as $id => $nombre) id="ind_{{$id}}" @endforeach rowspan="2" @endif nowrap="nowrap">@traducirVar($cc,$prod['etiqueta'])</th>

					<th rowspan="2" class="no-sort" style="width: 1px; padding: 2px 2px 2px 2px"></th>
				@endforeach
			</tr>

			@if(!empty($productos))
			<tr>				
				@foreach($productos as $cc => $prod)

					@if ( sizeof($prodind[$cc]) > 1 )

						@foreach($prodind[$cc] as $id => $nombre)
							@if($nombre['etiqueta'] == 'Ult. Nov.')
							<th class="text-center child_col_{{$cc}} child_col_ult_nov" nowrap="nowrap" id="ind_{{$id}}">{{$nombre['etiqueta']}}</th>

							@else
							<th class="text-center child_col_{{$cc}}" nowrap="nowrap" id="ind_{{$id}}">{{$nombre['etiqueta']}}</th>
							@endif
						
						@endforeach

					@endif
				@endforeach		
			</tr>
			@endif

		</thead>
		<tbody>

			@foreach ($contrap as $prov)

			<tr style="cursor:pointer;">
				<td class="text-center celda-panel" data-id="{{$prov->contraparte}}"><span class="hidden">flag-icon-{{strtolower($prov->country_code)}}</span><span class="flag-icon flag-icon-background flag-icon-{{strtolower($prov->country_code)}}"></span></td>
				<td class="text-left celda-panel col-md-2" data-id="{{$prov->contraparte}}">{{$prov->nombre_familia}}</td>
				<td class="text-left celda-panel col-md-3" style="vertical-align: middle;" title="{{$prov->nombre_persona}}" valign="middle" data-id="{{$prov->contraparte}}">{{str_limit($prov->nombre_persona, $limit = 30, $end = '...')}}</td>
				<td style="display:none;">{{$prov->contraparte}}</td>

				@foreach($prodind as $producto => $indicadores)

					@foreach($indicadores as $id => $nombre)

						@if (isset($valores[$prov->contraparte]))

							@if (isset($valores[$prov->contraparte][$producto]))


								@if( isset($valores[$prov->contraparte][$producto][$id][0]) )

									<!-- 
										producto - 0 : valor
										producto - 1 : color
										producto - 2 : punto (0-1)
										producto - 3 : svg
										producto - 4 : caption								

									-->

									<!-- homologacion -->
									@if ($id == 'CTRL_CALIDAD')
										<td class="text-center celda-panel" data-id="{{$prov->contraparte}}" nowrap="nowrap">
											@if (null != $valores[$prov->contraparte][$producto][$id][0])
												{!! $valores[$prov->contraparte][$producto][$id][3] !!}
											@endif											
										</td>

									@elseif ($id == 'CTRL_ETICO')
										<td class="text-center celda-panel" data-id="{{$prov->contraparte}}" nowrap="nowrap">
											@if (null != $valores[$prov->contraparte][$producto][$id][0])
												{!! $valores[$prov->contraparte][$producto][$id][3] !!}
											@endif											
										</td>

									@elseif ($id == 'CTRL_COMERCIAL')
										<td class="text-center celda-panel" data-id="{{$prov->contraparte}}" nowrap="nowrap">
											@if (null != $valores[$prov->contraparte][$producto][$id][0])
												{!! $valores[$prov->contraparte][$producto][$id][3] !!}
											@endif											
										</td>

									@elseif ($id == 'EXCEPCION')
										<td class="text-center celda-panel" data-id="{{$prov->contraparte}}" nowrap="nowrap" @if (null != $valores[$prov->contraparte][$producto][$id][0]) title="{{$valores[$prov->contraparte][$producto][$id][4]}}" @endif>
											@if (null != $valores[$prov->contraparte][$producto][$id][0])
												{!! $valores[$prov->contraparte][$producto][$id][3] !!}
											@endif
										</td>

									@elseif ($id == 'HOMOLOG')
										<td class="text-center celda-panel" data-id="{{$prov->contraparte}}" nowrap="nowrap">											
											@if (null != $valores[$prov->contraparte][$producto][$id][0])
												{!! $valores[$prov->contraparte][$producto][$id][3] !!}
											@endif
										</td>

									<!-- Subcontratistas -->
									@elseif ($id == 'SUBCONT')
										<td class="text-center celda-panel" data-id="{{$prov->contraparte}}" nowrap="nowrap">
											@if(null != $valores[$prov->contraparte][$producto][$id][0])
												<span class="valor-normal">{{$valores[$prov->contraparte][$producto][$id][0]}}</span>
											@endif
										</td>

									<!-- documentos -->
									@elseif ($id ==  'CUMPL_DOC')
										<td class="text-right celda-panel" nowrap="nowrap" data-id="{{$prov->contraparte}}" @if($valores[$prov->contraparte][$producto][$id][2] > 0) title="Posee documentos pendientes de verificar" @else style="padding-right: 16px;" @endif>
											@if(null != $valores[$prov->contraparte][$producto][$id][0])
												<span class="valor-score">{{$valores[$prov->contraparte][$producto][$id][0]}}</span>
												{!! $valores[$prov->contraparte][$producto][$id][3] !!}

												<!-- punto -->
												@if($valores[$prov->contraparte][$producto][$id][2] > 0)
													<svg height="8" width="8" style="margin-bottom:4px"><circle cx="4" cy="4" r="3" stroke="black" stroke-width="0" fill="#000000" /></svg>
												@endif
											@endif
										</td>

									@elseif ($id == 'SCORE_DOC')
										<td class="text-right celda-panel" nowrap="nowrap" data-id="{{$prov->contraparte}}" style="padding-right:8px;">
											@if(null != $valores[$prov->contraparte][$producto][$id][0])
												@if ($valores[$prov->contraparte][$producto][$id][0] != -100)
													<span class="valor-score">{{$valores[$prov->contraparte][$producto][$id][0]}}</span>
													{!! $valores[$prov->contraparte][$producto][$id][3] !!}
												@else
													<span style="color: #A72B2A; font-weight: bold" class="valor-score">N/A</span> <!-- Killer -->
												@endif
											@endif										
										</td>

									<!-- Balances -->
									@elseif ($id == 'SCORE_BAL')
										<td class="text-right celda-panel" nowrap="nowrap" data-id="{{$prov->contraparte}}" style="padding-right: 16px;">
											@if(null != $valores[$prov->contraparte][$producto][$id][0])
												<span class="valor-score">{{$valores[$prov->contraparte][$producto][$id][0]}}</span>
												{!! $valores[$prov->contraparte][$producto][$id][3] !!}

												{{-- <!-- punto / ANULADO -->
												@if($valores[$prov->contraparte][$producto][$id][2] > 0)
													<svg height="8" width="8" style="margin-bottom:4px"><circle cx="4" cy="4" r="3" stroke="black" stroke-width="0" fill="#000000" /></svg>
												@endif --}}
											@endif
										</td>

									@elseif ($id == 'LIQUIDEZ_CORRIENTE' OR $id == 'LIQUIDEZ_SECA' OR $id == 'ENDEUDAMIENTO_CORRIENTE' OR $id == 'ENDEUDAMIENTO_ACTIVO_FIJO' OR $id == 'SOLVENCIA' OR $id == 'SOLVENCIA_PATRIMONIAL' OR $id == 'CAPITAL_TRABAJO' OR 
												$id == 'CAPITAL_PROPIO' OR $id == 'INVERSIONES_BIENES_USO' OR $id == 'INMOBILIZACION_ACTIVOS' OR $id == 'INMOBILIZACION_PATRIMONIO_NETO' OR $id == 'UTILIDAD_BRUTA' OR $id == 'UTILIDAD_NETA' OR $id == 'RETORNO_PATRIMONIO' OR 
												$id == 'ROTACION_VENTAS' OR $id == 'ROTACION_VENTAS_DIAS' OR $id == 'ROTACION_ACTIVO_FIJO' OR $id == 'ROTACION_ACTIVO_FIJO_DIAS' OR $id == 'RENTABILIDAD_SOBRE_ACTIVO' OR $id == 'EBITDA_PASIVO' OR $id == 'ROTACION_CREDITOS' OR 
												$id == 'ROTACION_CREDITOS_DIAS' OR $id == 'ROTACION_INVENTARIOS' OR $id == 'ROTACION_INVENTARIOS_DIAS' OR $id == 'PRESTAMOS_PATRIMONIO_NETO' OR $id == 'PRESTAMOS_VENTAS' OR $id == 'CAPITAL_TRABAJO_ACTIVO' OR $id == 'RENTABILIDAD_BRUTA')
										<td class="text-right celda-panel" nowrap="nowrap" data-id="{{$prov->contraparte}}" style="padding-right: 16px;">
											@if(null != $valores[$prov->contraparte][$producto][$id][0])
												<span class="valor-score">{{$valores[$prov->contraparte][$producto][$id][0]}}</span>
											@endif
										</td>

									@elseif ($id == 'VALORACION_BAL')
										<td class="text-center celda-panel" nowrap="nowrap" data-id="{{$prov->contraparte}}"  @if(null != $valores[$prov->contraparte][$producto][$id][0]) title="{{$valores[$prov->contraparte][$producto][$id][4]}}" @endif>
											@if(null != $valores[$prov->contraparte][$producto][$id][0])
												{!! $valores[$prov->contraparte][$producto][$id][3] !!}
											@endif
										</td>

									<!-- informe comercial -->
									@elseif ($id == 'SCORE_IC')
										<td class="text-right celda-panel" nowrap="nowrap" data-id="{{$prov->contraparte}}" style="padding-right:8px;">
											@if(null != $valores[$prov->contraparte][$producto][$id][0])
												<span class="valor-score">{{$valores[$prov->contraparte][$producto][$id][0]}}</span>
												{!! $valores[$prov->contraparte][$producto][$id][3] !!}
											@endif										
										</td>
										
									@elseif ($id == 'SCORE_FINAL')
										<td class="text-right celda-panel" nowrap="nowrap" data-id="{{$prov->contraparte}}" style="padding-right:8px;">
											@if(null != $valores[$prov->contraparte][$producto][$id][0])
												@if ($valores[$prov->contraparte][$producto][$id][0] != -100)
													<span class="valor-score">{{$valores[$prov->contraparte][$producto][$id][0]}}</span>
													{!! $valores[$prov->contraparte][$producto][$id][3] !!}
												@else
													<span style="color: #A72B2A; font-weight: bold" class="valor-score">N/A</span> <!-- Killer -->
												@endif
											@endif										
										</td>

									@elseif ($id == 'ULTIMA_NOVEDAD')
										<td class="text-center celda-panel" data-id="{{$prov->contraparte}}" @if($valores[$prov->contraparte][$producto][$id][2] > 0) title="@traducir('Hay novedad','Hay novedad')" @endif>
											<span class="valor-normal">{{$valores[$prov->contraparte][$producto][$id][0]}}</span>
											@if($valores[$prov->contraparte][$producto][$id][2] > 0)
												<svg height="8" width="8" style="padding-bottom:1px"><circle cx="4" cy="4" r="3" stroke="black" stroke-width="0" fill="#000000" /></svg>
											@endif
										</td>

									<!-- Dossier -->
									@elseif ($id == 'SCORE_DOSSIER')
										<td class="text-right celda-panel" nowrap="nowrap" data-id="{{$prov->contraparte}}" style="padding-right:8px;">
											@if(null != $valores[$prov->contraparte][$producto][$id][0])
												<span class="valor-score">{{$valores[$prov->contraparte][$producto][$id][0]}}</span>
												{!! $valores[$prov->contraparte][$producto][$id][3] !!}
											@endif										
										</td>

									@elseif ($id == 'NIVEL_RIESGO')
										<td class="text-center celda-panel" data-id="{{$prov->contraparte}}" @if(null != $valores[$prov->contraparte][$producto][$id][0]) title="{{$valores[$prov->contraparte][$producto][$id][4]}}" @endif>
											@if(null != $valores[$prov->contraparte][$producto][$id][0])
												{!! $valores[$prov->contraparte][$producto][$id][3] !!}
											@endif
										</td>

									@elseif ($id == 'DEP_ECON' OR $id == 'DEP_ECON_CALC')
										<td class="text-right celda-panel" nowrap="nowrap" data-id="{{$prov->contraparte}}" style="padding-right:8px;">
											@if(null != $valores[$prov->contraparte][$producto][$id][0])
												<span class="valor-score">{{$valores[$prov->contraparte][$producto][$id][0]}}%</span>
												{!! $valores[$prov->contraparte][$producto][$id][3] !!}
											@endif
										</td>

									<!-- Fidecheck -->
									@elseif ($id == 'FIDECHECK')
										<td class="text-center celda-panel" nowrap="nowrap" data-id="{{$prov->contraparte}}" @if(null != $valores[$prov->contraparte][$producto][$id][0]) title="{{$valores[$prov->contraparte][$producto][$id][4]}}" @endif>
											@if(null != $valores[$prov->contraparte][$producto][$id][0])
												<span class="hidden">@if($valores[$prov->contraparte][$producto][$id][0] == 'N') 0 @elseif($valores[$prov->contraparte][$producto][$id][0] == 'R') 1 @else 2 @endif</span>
												{!! $valores[$prov->contraparte][$producto][$id][3] !!}
											@endif
										</td>


									<!-- Alertas BCRA -->
									@elseif ($id == 'SITUACION_CD')
										<td class="text-center celda-panel" nowrap="nowrap" data-id="{{$prov->contraparte}}" @if(null != $valores[$prov->contraparte][$producto][$id][0]) title="{{$valores[$prov->contraparte][$producto][$id][4]}}" @endif>
											@if(null != $valores[$prov->contraparte][$producto][$id][0])
												<span class="hidden">{{$valores[$prov->contraparte][$producto][$id][0]}}</span>
												{!! $valores[$prov->contraparte][$producto][$id][3] !!}
											@endif
										</td>


									@elseif ($id == 'CHEQUES_RECH')
										<td class="text-center celda-panel" nowrap="nowrap" data-id="{{$prov->contraparte}}">
											<span class="valor-score">{{$valores[$prov->contraparte][$producto][$id][0]}}</span>
										</td>

									<!-- INDICADORES LIMITE DE CREDITO -->
									@elseif ($id == 'LC_RECOMENDADO')
										<td class="text-right celda-panel" nowrap="nowrap" data-id="{{$prov->contraparte}}">
											<span class="valor-score">{{ $valores[$prov->contraparte][$producto][$id][0] }}</span>
										</td>

									@elseif ($id == 'LC_RECOMENDADO_FECHA')
										<td class="text-center celda-panel" nowrap="nowrap" data-id="{{$prov->contraparte}}">
											<span class="valor-score">{{ $valores[$prov->contraparte][$producto][$id][0] }}</span>
										</td>

									@elseif ($id == 'LC_APROBADO' OR $id == 'LC_APROBADO_USD')
										<td class="text-right celda-panel" nowrap="nowrap" data-id="{{$prov->contraparte}}">
											<span class="valor-score">{{ $valores[$prov->contraparte][$producto][$id][0] }}</span>
										</td>

									@elseif ($id == 'LC_APROBADO_FECHA' OR $id == 'LC_APROBADO_USD_FECHA')
										<td class="text-center celda-panel" nowrap="nowrap" data-id="{{$prov->contraparte}}">
											<span class="valor-score">{{ $valores[$prov->contraparte][$producto][$id][0] }}</span>
										</td>

									@elseif ($id == 'LC_VENTAS')
										<td class="text-right celda-panel" nowrap="nowrap" data-id="{{$prov->contraparte}}">
											<span class="valor-score">{{ $valores[$prov->contraparte][$producto][$id][0] }}</span>
										</td>

									@elseif ($id == 'LC_VENTAS_FECHA')
										<td class="text-center celda-panel" nowrap="nowrap" data-id="{{$prov->contraparte}}">
											<span class="valor-score">{{ $valores[$prov->contraparte][$producto][$id][0] }}</span>
										</td>

									@elseif ($id == 'LC_DIAS_VENTAS')
										<td class="text-right celda-panel" nowrap="nowrap" data-id="{{$prov->contraparte}}">
											<span class="valor-score">{{ $valores[$prov->contraparte][$producto][$id][0] }}</span>
											{!! $valores[$prov->contraparte][$producto][$id][3] !!}
										</td>

									@elseif ($id == 'LC_RENTABILIDAD')
										<td class="text-right celda-panel" nowrap="nowrap" data-id="{{$prov->contraparte}}">
											<span class="valor-score">{{ $valores[$prov->contraparte][$producto][$id][0] }} @if(NULL != $valores[$prov->contraparte][$producto][$id][0]) % @endif</span>
										</td>
									@elseif ($id == 'LC_RENTABILIDAD_FECHA')
										<td class="text-center celda-panel" nowrap="nowrap" data-id="{{$prov->contraparte}}">
											<span class="valor-score">{{ $valores[$prov->contraparte][$producto][$id][0] }}</span>
										</td>


									@else
										<td class="text-center celda-panel" nowrap="nowrap" data-id="{{$prov->contraparte}}"></td>
									@endif

								@else
									<td class="text-center celda-panel" nowrap="nowrap" data-id="{{$prov->contraparte}}"></td>
								@endif


								

								{{-- <!-- @if($nombre['tipo_dato'] == 'I' OR $nombre['tipo_dato'] == 'F')

								<td class="@if ($id != 'SUBCONT') text-right @else text-center @endif celda-panel" data-id="{{$prov->contraparte}}" @if(isset($valores[$prov->contraparte][$producto][$id])) @if($valores[$prov->contraparte][$producto][$id][2] > 0) @if($id == 'CUMPL_DOC') title="@traducir('Posee documentos pendientes de verificar','Posee documentos pendientes de verificar')" @elseif ($id == 'SCORE_BAL') title="@traducir('Provisto por Fidelitas','Provisto por Fidelitas')" @endif @else style="padding-right: 16px;" @endif @endif>

									@if( isset($valores[$prov->contraparte][$producto][$id][0]) )
										
										@if ($id == 'SCORE_IC' OR $id == 'CUMPL_DOC' OR $id == 'SCORE_DOC' OR $id == 'SCORE_BAL' OR $id == 'SCORE_FINAL' OR $id == 'DEP_ECON')
											<span class="valor-score">
										@else
											<span class="valor-normal">
										@endif
										
										{{$valores[$prov->contraparte][$producto][$id][0]}}

										@if($id == 'CUMPL_DOC' OR $id == 'DEP_ECON')% @endif
										</span>
										
										@if ($id == 'SCORE_IC' OR $id == 'CUMPL_DOC' OR $id == 'SCORE_DOC' OR $id == 'SCORE_BAL' OR $id == 'SCORE_FINAL' OR $id == 'DEP_ECON')
											<svg width="7" height="20"><rect width="7" height="20" style="fill:#{{$valores[$prov->contraparte][$producto][$id][1]}};" /></svg> 
										@endif

									@endif

									@if (isset($valores[$prov->contraparte][$producto][$id]))
										@if($valores[$prov->contraparte][$producto][$id][2] > 0)
											<svg height="8" width="8" style="padding-bottom:6px"><circle cx="4" cy="4" r="3" stroke="black" stroke-width="0" fill="#000000" /></svg>
										@endif
									@endif

								</td>

								@elseif ($nombre['tipo_dato'] == 'S')

									@if ($id == "VALORACION_BAL" OR $id == "NIVEL_RIESGO")
										@if (!empty( $valores[$prov->contraparte][$producto][$id] ))									
								
											<td class="text-center celda-panel" data-id="{{$prov->contraparte}}" @if($valores[$prov->contraparte][$producto][$id][4] != '') title="{{$valores[$prov->contraparte][$producto][$id][4]}}" @endif>
												<span class="hidden">{{$valores[$prov->contraparte][$producto][$id][0]}}</span>{!! $valores[$prov->contraparte][$producto][$id][3] !!}
											</td>

										@else
											<td class="text-center celda-panel" data-id="{{$prov->contraparte}}"></td>
										@endif
									@else
										<td class="text-center celda-panel" data-id="{{$prov->contraparte}}"></td>
									@endif							

								@elseif ($nombre['tipo_dato'] == 'D' )	
									@if ($id == "ULTIMA_NOVEDAD")
										@if (!empty( $valores[$prov->contraparte][$producto][$id] ))
											<td class="text-center celda-panel" data-id="{{$prov->contraparte}}" @if($valores[$prov->contraparte][$producto][$id][2] > 0) title="@traducir('Hay novedad','Hay novedad')" @endif>
												<span class="valor-normal">{{$valores[$prov->contraparte][$producto][$id][0]}}</span>
												@if($valores[$prov->contraparte][$producto][$id][2] > 0)
													<svg height="8" width="8" style="padding-bottom:1px"><circle cx="4" cy="4" r="3" stroke="black" stroke-width="0" fill="#000000" /></svg>
												@endif
											</td>
										@else
											<td class="text-center celda-panel" data-id="{{$prov->contraparte}}"></td>
										@endif
									@else
										<td class="text-center celda-panel" data-id="{{$prov->contraparte}}"></td>
									@endif
								@endif --> --}}

							@else
								<td class="text-center celda-panel" data-id="{{$prov->contraparte}}"></td>
							@endif

						@else
							<td class="text-center celda-panel" data-id="{{$prov->contraparte}}"></td>
						@endif	
					@endforeach

					<td  style="width: 1px; padding: 2px 2px 2px 2px"></td>
				@endforeach
			</tr>

			@endforeach
			
		</tbody>
	</table>
</div>

<form name="frmContraparte" id="frmContraparte" method="post" action="/led/led-contraparte">
	{{csrf_field()}}
	<input name="contraparte" type="hidden" value="" id="_contraparte">
</form>

<form name="frmIds" id="frmIds" method="post" action="/led/led-panel-control-excel">
	{{csrf_field()}}
	<input name="ids" type="hidden" value="" id="ids">
</form>
<script type="text/javascript" src="{{ URL::asset('components/datatables/media/js/jquery.dataTables.min.js') }}"> </script>
<script type="text/javascript" src="{{ URL::asset('/js/absolute.js') }}"> </script>

<script type="text/javascript" src="{{ URL::asset('/js/led/panel_control.js') }}"> </script>

@include('footer')
