
@if($plain == false)
	@include('header')
	@include('navegador')
@endif

@if($plain == false)
<div class="container">
	<br />
@endif

@if ($table == 'false')

	<form id="frmCampos" name="frmCampos" method="post" action="/led/led-docs">
		{{csrf_field()}}
		<input name="contraparte" id="contraparte" type="hidden" value="{{$doc->contraparte}}">
		<input name="doc_id" id="doc_id" type="hidden" value="{{$doc->doc_id}}">

	
	@if($plain == false)
	<div class="row">
		<div class="col-md-6 h3">Detalle del documento</div>
		<div class="col-md-6 text-right">
			<button type="submit" class="btn btn-primary btn-fidelitas">Volver a documentos</button>
			<button type="button" class="btn btn-primary btn-fidelitas" onclick="location.href='/led/led-contrapartes'">Volver a contrapartes</button>
		</div>
	</div>

	<div class="row">
		<div class="col-md-12 h3">
			{{$doc->nombre_persona}} ({{$doc->country_name}}) - {{$doc->abreviatura}} {{$doc->numero}}
		</div>
	</div>

	<div class="row">
		<div class="col-md-12 h4">
			{{$doc->nombre_tipo_doc}}
		</div>
	</div>
	@endif

	@if ($doc->estado_doc != 'N')
		<div class="row">
			<div class="col-md-2 form-group">
				<label for="ingresado">Ingresado</label>
				<input name="ingresado" id="ingresado" class="form-control" readonly="readonly" value="{{$doc->ingresado}}">
			</div>

			@if($doc->estado_doc == 'R')
			<div class="col-md-2 form-group">
				<label for="rechazado">Rechazado</label>
				<input name="rechazado" id="rechazado" class="form-control" readonly="readonly" value="{{$doc->rechazado}}">
			</div>
			<div class="col-md-3 form-group">
				<label for="rechazado_por_usuario">Rechazado por</label>
				<input name="rechazado_por_usuario" id="rechazado_por_usuario" class="form-control" readonly="readonly" value="{{$doc->rechazado_por_usuario}}">
			</div>
			@endif

			@if($doc->estado_doc == 'V')
			<div class="col-md-2 form-group">
				<label for="verificado_backend">Verificado</label>
				<input name="verificado_backend" id="verificado_backend" class="form-control" readonly="readonly" value="{{$doc->verificado_backend}}">
			</div>
			<div class="col-md-3 form-group">
				<label for="verificado_backend_por_usuario">Verificado por</label>
				<input name="verificado_backend_por_usuario" id="verificado_backend_por_usuario" class="form-control" readonly="readonly" value="{{$doc->verificado_backend_por_usuario}}">
			</div>
			@endif

			<div class="col-md-2 form-group @if($doc->estado_doc == 'I') col-md-offset-7 @else col-md-offset-3 @endif">
				<label for="">&nbsp;</label>
				<div class="h4 {{$doc->class_estado}}  text-right">
					<i class="fa fa-{{$doc->icon_estado}}"></i> {{$doc->estado_documento}}
				</div>
			</div>
		</div>

		@if($doc->estado_doc == 'R')
		<div class="row">
			<div class="col-md-12 form-group">
				<label for="texto_rechazo">Motivo de rechazo del documento</label>
				<textarea name="texto_rechazo" id="texto_rechazo" class="form-control" readonly="readonly" rows="3">{{$doc->texto_rechazo}}</textarea>
			</div>
		</div>
		@endif


	@else
		<div class="h4 {{$doc->class_estado}} text-right"><i class="fa fa-{{$doc->icon_estado}}"></i> {{$doc->estado_documento}}</div>
	@endif

	@if ($doc->es_balance > 0)

		<div class="row">
			<div class="col-md-2 form-group">
				<label for="inicio_ejercicio">Inicio ejercicio</label>
				<input name="inicio_ejercicio" id="inicio_ejercicio" class="form-control" value="{{$doc->inicio_ejercicio}}" readonly="readonly">
			</div>
			<div class="col-md-2 form-group">
				<label for="fin_ejercicio">Fin ejercicio</label>
				<input name="fin_ejercicio" id="fin_ejercicio" class="form-control" value="{{$doc->fin_ejercicio}}" readonly="readonly">
			</div>
			<div class="col-md-1 form-group">
				<label for="ejercicio">N&deg; ej.</label>
				<input name="ejercicio" id="ejercicio" class="form-control" value="{{$doc->ejercicio}}" readonly="readonly">
			</div>
			<div class="col-md-2 form-group">
				<label for="periodo">Periodicidad</label>
				<input name="periodo" id="periodo" class="form-control" value="{{$doc->periodo}}" readonly="readonly">
			</div>
			<div class="col-md-2 form-group">
				<label for="moneda">Moneda</label>
				<input name="moneda" id="moneda" class="form-control" value="{{$doc->nombre_moneda}}" readonly="readonly">
			</div>
			{{-- <div class="col-md-3 form-group">
				<label for="">&nbsp;</label>
				<div class="h4 {{$doc->class_estado}}">
					<i class="fa fa-{{$doc->icon_estado}}"></i> {{$doc->estado_documento}}
				</div>
			</div> --}}
		</div>

		@if ($doc->estado_doc != 'N' && $file_exists == true)
			<div class="row">
				<div class="col-md-12">
					<object data="{{$file_url}}" type="application/pdf" width="100%" height="400px"></object>
				</div>
			</div>
		@else
			@if ($doc->estado_doc != 'N' && $doc->cliente == env('LED_CLIENTE_DEMO'))
				<div class="row">
					<div class="col-md-12">
						<object data="{{env("RUTA_COMPARTIDO")}}{{env("RUTA_DOCUMENTO_DEMO")}}" type="application/pdf" width="100%" height="400px"></object>
					</div>
				</div>
			@endif

		@endif

	@elseif ($doc->es_foto_perfil > 0)

		<br />
		<div class="row">
			<div class="col-md-3">
				<img src="{{ $foto_perfil_url }}" class="img img-responsive" border="0" />
			</div>
		</div>

	@else

		@foreach($data as $k => $rec)
			
			@if ($k != '')
				<br />
				<h4>{{$k}}</h4>
				@if (null != $secciones[$k]['texto_bajada'])
					<br />
					<span style="font-style: italic;">{{$secciones[$k]['texto_bajada']}}</span>					
				@endif
				
			@endif
	
			@foreach($rec as $j => $fld)
				@if ($fld->nueva_linea > 0 || $loop->first)

					@if (!$loop->first)
						</div>
					@endif

					<div class="row">
				@endif

					<div class="col-md-{{$fld->celdas}} form-group">

						@if ($fld->tipo_campo == 'T')
							<label for="{{$fld->FORM_ID}}">{{$fld->etiqueta}}</label>
							<input id="{{$fld->FORM_ID}}" maxlength="{{$fld->longitud}}" class="form-control" name="{{$fld->FORM_NAME}}" value="{{$fld->valor_texto}}" readonly="yes">

						@elseif ($fld->tipo_campo == 'N')
							<label for="{{$fld->FORM_ID}}">{{$fld->etiqueta}}</label>
							<input id="{{$fld->FORM_ID}}" maxlength="{{$fld->longitud}}" class="form-control" name="{{$fld->FORM_NAME}}" value="{{$fld->valor_numerico}}" readonly="yes">

						@elseif ($fld->tipo_campo == 'D')
							<label>{{$fld->etiqueta}}</label>
							<div id="{{$fld->FORM_ID}}_idd" class="input-group date" data-provide="datepicker" data-autoclose="true" data-date-format="dd/mm/yyyy">
								<input id="{{$fld->FORM_ID}}" type="text" class="form-control" name="{{$fld->FORM_NAME}}" value="{{$fld->valor_fecha_str}}" readonly="yes">
								<span class="input-group-addon"><i class="glyphicon glyphicon-th"></i></span>
							</div>

						@elseif ($fld->tipo_campo == 'B')
							<label>{{$fld->etiqueta}}</label>
							<div class="">
								<label><input type="Radio" name="{{$fld->FORM_NAME}}" disabled value="1" @if($fld->valor_numerico == 1) checked @endif> SI</label>
							</div>
							<div class="">
								<label><input type="Radio" name="{{$fld->FORM_NAME}}" disabled value="0" @if (null !== $fld->valor_numerico) @if($fld->valor_numerico == 0) checked @endif @endif> NO</label>	
							</div>
						
						@elseif ($fld->tipo_campo == 'R')
						<label>{{$fld->etiqueta ?? ''}}</label>
						@if (!empty($fld->opciones[0]) && !empty($fld->opciones[1]))
							@foreach($fld->opciones[0] as $n => $txtopcion)
								<div class="">
									<label>
										<input type="radio" name="{{$fld->FORM_NAME}}" disabled value="{{$fld->opciones[1][$n] ?? ''}}" class="" @if(($fld->valor_texto ?? '') == ($fld->opciones[1][$n] ?? '')) checked @endif> {{$txtopcion}}
									</label>
								</div>
							@endforeach
						@endif
						@elseif ($fld->tipo_campo == 'C')
							@if(trim($fld->etiqueta) != '')
								<label for="{{$fld->FORM_NAME}}">{{$fld->etiqueta}}</label>
								<br>
							@endif
							@if (!empty($fld->opciones[0]) && !empty($fld->opciones[1]))
								@foreach($fld->opciones[0] as $n => $txtopcion)
									@if($n > 0) <br />@endif
									<div style="float:left;">
										<input type="checkbox" id="{{$fld->FORM_NAME}}" name="{{$fld->FORM_NAME}}[]" disabled value="{{$fld->opciones[1][$n] ?? ''}}" class="" @if (false !== strpos($fld->valor_texto ?? '', $fld->opciones[1][$n] ?? '')) checked @endif>
									</div>
									<div style="float:left; margin-top:6px; margin-left: 10px;"><label>{{$txtopcion}}</label></div>
								@endforeach
							@endif
						@elseif ($fld->tipo_campo == 'S')
							<label for="{{$fld->FORM_ID}}">{{$fld->etiqueta}}</label>
							<select name="{{$fld->FORM_NAME}}" id="{{$fld->FORM_ID}}" class="form-control" disabled>
								<option value="">---</option>
								@if (!empty($fld->opciones[0]) && !empty($fld->opciones[1]))
									@foreach($fld->opciones[0] as $n => $txtopcion)
										<option value="{{$fld->opciones[1][$n] ?? ''}}" @if(($fld->opciones[1][$n] ?? '') == ($fld->valor_texto ?? '')) selected @endif>{{$txtopcion}}</option>
									@endforeach
								@endif
							</select>

						@elseif ($fld->tipo_campo == 'M')
							<label for="{{$fld->FORM_ID}}">{{$fld->etiqueta}}</label>
							<textarea name="{{$fld->FORM_NAME}}" id="{{$fld->FORM_ID}}" class="form-control" rows="4" readonly="yes">{{$fld->valor_texto}}</textarea>

						
						@elseif ($fld->tipo_campo == 'F')
							{{-- @if($file_exists == true)								
								<button type="button" class="btn btn-info" onclick="window.open('{{$file_url}}')"><img src="/img/pdf.png" border="0" height="18px"> Abrir archivo</button>
							@endif --}}
						
						@elseif ($fld->tipo_campo == 'L')
							@if (NULL == $fld->pais || $fld->country_code == $fld->pais) {!! str_replace($search_array, $replace_array, str_replace(Chr(13) . Chr(10), '<br />', $fld->opciones)) !!} @endif

						@elseif ($fld->tipo_campo == 'G')
							<h5>{{$fld->etiqueta}}</h5>

							<table class="table table-condensed table-hover table-bordered">
								<thead>
									<tr>
									@if (!empty($fld->headers)) @foreach ($fld->headers as $i => $hdr) <th class="text-center">{{$hdr}}</th> @endforeach @endif
									</tr>	
								</thead>
								<tbody>
								@if( isset($fld->values[$x]) )
									@for($x = 1; $x <= $fld->filas; $x++)
										
										<tr>
											@if ($fld->anual_vencida == 1)
												<td class="text-center">{{substr($fld->values[$x][0]['valor_fecha_str'] , 3)}}</td>
											@endif												
											

											@for($y=1; $y <= $fld->columnas; $y++)
												<td class="text-center" >

												@if ($fld->values[$x][$y]['tipo_campo'] == 'T')
													<input id="{{$fld->FORM_NAME}}_{{$x}}_{{$y}}" maxlength="{{$fld->values[$x][$y]['longitud']}}" class="form-control" name="{{$fld->FORM_NAME}}_{{$x}}_{{$y}}" value="{{$fld->values[$x][$y]['valor_texto']}}" readonly="yes">

												@elseif ($fld->values[$x][$y]['tipo_campo'] == 'N')
													<input id="{{$fld->FORM_NAME}}_{{$x}}_{{$y}}" maxlength="{{$fld->values[$x][$y]['longitud']}}" class="form-control" name="{{$fld->FORM_NAME}}_{{$x}}_{{$y}}" value="{{$fld->values[$x][$y]['valor_numerico']}}" readonly="yes">

												@elseif ($fld->values[$x][$y]['tipo_campo'] == 'D')
													<div id="{{$fld->FORM_NAME}}_{{$x}}_{{$y}}_idd" class="input-group date" data-provide="datepicker" data-autoclose="true" data-date-format="dd/mm/yyyy">
														<input id="{{$fld->FORM_NAME}}_{{$x}}_{{$y}}" type="text" class="form-control" name="{{$fld->FORM_NAME}}_{{$x}}_{{$y}}" value="{{$fld->values[$x][$y]['valor_fecha_str']}}" readonly="yes">
														<span class="input-group-addon"><i class="glyphicon glyphicon-th"></i></span>
													</div>			
												@elseif (!empty($fld->values[$x][$y]['tipo_campo']) && $fld->values[$x][$y]['tipo_campo'] == 'S')
													<select name="{{$fld->FORM_NAME}}_{{$x}}_{{$y}}" id="{{$fld->FORM_NAME}}_{{$x}}_{{$y}}" class="form-control" disabled>
														<option value="">---</option>
														@if (!empty($fld->values[$x][$y]['opciones']['txt']) && !empty($fld->values[$x][$y]['opciones']['val']))
															@foreach ($fld->values[$x][$y]['opciones']['txt'] as $n => $txtopcion)
																<option value="{{$fld->values[$x][$y]['opciones']['val'][$n] ?? ''}}">{{$txtopcion}}</option>
															@endforeach
														@endif
													</select>
												@elseif ($fld->values[$x][$y]['tipo_campo'] == 'B')
													<input type="Radio" value="1" disabled
																name="{{$fld->FORM_NAME}}_{{$x}}_{{$y}}"
																@if($fld->values[$x][$y]['valor_numerico'] == 1) checked @endif>&nbsp;SI&nbsp;&nbsp;&nbsp;
													<input type="Radio" value="0" disabled
																name="{{$fld->FORM_NAME}}_{{$x}}_{{$y}}"
																@if (null !== $fld->values[$x][$y]['valor_numerico']) @if($fld->values[$x][$y]['valor_numerico'] == 0) checked @endif @endif>&nbsp;NO

												@elseif ($fld->values[$x][$y]['tipo_campo'] == 'R')
													@foreach ($fld->values[$x][$y]['opciones']['txt'] as $n => $txtopcion)
														<input type="Radio" value="{{$fld->values[$x][$y]['opciones']['val'][$n]}}" disabled
																name="{{$fld->FORM_NAME}}_{{$x}}_{{$y}}"
																@if($fld->values[$x][$y]['valor_texto'] == $fld->values[$x][$y]['opciones']['val'][$n]) checked @endif>&nbsp;{{$txtopcion}}&nbsp;&nbsp;&nbsp;
													@endforeach												

												@elseif ($fld->values[$x][$y]['tipo_campo'] == 'C')
													@foreach ($fld->values[$x][$y]['opciones']['txt'] as $n => $txtopcion)
														<input type="Checkbox" value="{{$fld->values[$x][$y]['opciones']['val'][$n]}}" disabled
																name="{{$fld->FORM_NAME}}_{{$x}}_{{$y}}"
																@if ( false !== strpos($fld->values[$x][$y]['valor_texto'], $fld->values[$x][$y]['opciones']['val'][$n]) ) checked @endif>&nbsp;{{$txtopcion}}&nbsp;&nbsp;&nbsp;
													@endforeach												

												@elseif ($fld->values[$x][$y]['tipo_campo'] == 'M')
													<textarea name="" rows="3" class="form-control" readonly="yes">{{$fld->values[$x][$y]['valor_texto']}}</textarea>

												@elseif ($fld->values[$x][$y]['tipo_campo'] == 'F')

												@endif

												
												</td>
											@endfor

										</tr>
										
									@endfor
								@endif
								</tbody>
								<tfoot></tfoot>
							</table>

							
						@endif
					</div>
			@endforeach
			</div>

			@if ($k != '')
				@if (null != $secciones[$k]['texto_pie'])
					<br />
					<span style="font-style: italic;">{{$secciones[$k]['texto_pie']}}</span>
				@endif
			@endif


		@endforeach


		@if ($hay_archivo == true && $file_exists)
		<br />
		<div class="row">
			<div class="col-md-3">
				<button type="button" class="btn btn-info" onclick="window.open('{{$file_url}}', 'doc_{{$docid}}', 'top=50,left=50,width=800,height=600,title=no,status=no,resizable=yes,scrollbars=auto');"><img src="/img/pdf.png" border="0" height="18px"> Ver archivo</button>
			</div>
		</div>
		@else
			@if ($doc->estado_doc != 'N' && $doc->cliente == env('LED_CLIENTE_DEMO'))
				<br />
				<div class="row">
					<div class="col-md-3">
						<button type="button" class="btn btn-info" onclick="window.open('{{env("RUTA_COMPARTIDO")}}{{env("RUTA_DOCUMENTO_DEMO")}}?t={{time()}}', 'doc_{{$docid}}', 'top=50,left=50,width=800,height=600,title=no,status=no,resizable=yes,scrollbars=auto');"><img src="/img/pdf.png" border="0" height="18px"> Ver archivo</button>
					</div>
				</div>
			@endif
		@endif


	@endif
	</form>

@else
	<!-- modo tabla facon -->

	<h4>{{$doc->nombre_persona}} ({{$doc->country_name}})</h4>
	<h4>({{$doc->abreviatura}} {{$doc->numero}})</h4>

	@if ($doc->es_balance > 0)

		<br />
		<table width="100%" style="background-color: #000000;" cellpadding="6" cellspacing="6" border="1">
		<tr style="background-color: #FFFFFF; color: #000000;">
			<td text-align="left" width="50%">Inicio ejercicio</td>
			<td text-align="left">{{$doc->inicio_ejercicio}}</td>
		</tr>
		<tr style="background-color: #FFFFFF; color: #000000;">
			<td text-align="left" width="50%">Fin ejercicio</td>
			<td text-align="left">{{$doc->fin_ejercicio}}</td>
		</tr>
		<tr style="background-color: #FFFFFF; color: #000000;">
			<td text-align="left" width="50%">N&deg; ejercicio</td>
			<td text-align="left">{{$doc->ejercicio}}</td>
		</tr>
		<tr style="background-color: #FFFFFF; color: #000000;">
			<td text-align="left" width="50%">Periodicidad</td>
			<td text-align="left">{{$doc->periodo}}</td>
		</tr>
		<tr style="background-color: #FFFFFF; color: #000000;">
			<td text-align="left" width="50%">Inicio ejercicio</td>
			<td text-align="left">{{$doc->inicio_ejercicio}}</td>
		</tr>
		<tr style="background-color: #FFFFFF; color: #000000;">
			<td text-align="left" width="50%">Moneda</td>
			<td text-align="left">{{$doc->nombre_moneda}} ({{$doc->moneda}})</td>
		</tr>
		</table>

	@else
		@if (!empty($data))							
			@foreach($data as $k => $rec)
				
				@if ($k != '')
					<br />
					<h5>{{$k}}</h5>
					@if (null != $secciones[$k]['texto_bajada'])
						<br />
						<span style="font-style: italic;">{{$secciones[$k]['texto_bajada']}}</span>					
					@endif
					
				@endif



				@foreach($rec as $j => $fld)
					@if ($fld->nueva_linea > 0 || $loop->first)

						@if (!$loop->first)
							</table>
						@endif

					@endif

						@if ($fld->tipo_campo != 'G')

							@if ($fld->tipo_campo != 'L' && $fld->tipo_campo != 'M')

								<table width="100%" style="background-color: #000000;" cellpadding="2" cellspacing="2" border="1">
								<tr style="background-color: #FFFFFF; color: #000000;">
									<td text-align="left" width="50%">{{$fld->etiqueta}}</td>
									<td text-align="left">
										@if ($fld->tipo_campo == 'T') {{$fld->valor_texto}}
										@elseif ($fld->tipo_campo == 'N') {{$fld->valor_numerico}}
										@elseif ($fld->tipo_campo == 'D') {{$fld->valor_fecha_str}}
										@elseif ($fld->tipo_campo == 'B') @if($fld->valor_numerico == 1) SI @else NO @endif
										@elseif ($fld->tipo_campo == 'R')
											@foreach($fld->opciones[0] as $n => $txtopcion)
												@if($fld->valor_texto == $fld->opciones[1][$n]) {{$txtopcion}} @endif
											@endforeach 
										@elseif ($fld->tipo_campo == 'C')
											@foreach($fld->opciones[0] as $n => $txtopcion)
												@if ( false !== strpos($fld->valor_texto, $fld->opciones[1][$n]) ) {{$txtopcion}} @endif
											@endforeach
										@elseif ($fld->tipo_campo == 'S')
											@foreach($fld->opciones[0] as $n => $txtopcion)
												@if($fld->opciones[1][$n] == $fld->valor_texto) {{$txtopcion}} @endif
											@endforeach
										@elseif ($fld->tipo_campo == 'M') {{$fld->valor_texto}}

										@endif
									</td>
								</tr>
								</table>

							@else

								@if ($fld->tipo_campo != 'M')
									@if (NULL == $fld->pais || $fld->country_code == $fld->pais) 
										<br />
										<div style="width:100%"> {!! str_replace($search_array, $replace_array, str_replace(Chr(13) . Chr(10), '<br />', $fld->opciones)) !!} </div>
									@endif
								@else
									<br />
									<div style="width:100%; border: 1px solid;"><span style="padding: 20px, 20px, 20px, 20px"> {{$fld->valor_texto}} </span></div>
								@endif

							@endif

						@else

							<h5>{{$fld->etiqueta}}</h5>
							<table width="100%" style="background-color: #000000;" cellpadding="2" cellspacing="2" border="1">
							<tr>
								@foreach ($fld->headers as $i => $hdr)
								<th class="text-center"><span style="font-weight: bold; color: #FFFFFF">{{$hdr}}</span></th>
								@endforeach
							</tr>	

						@for($x = 1; $x <= $fld->filas; $x++)
							@if(isset($fld->values[$x]))
								<tr style="background-color: #FFFFFF; color: #000000;">
									@if ($fld->anual_vencida == 1)
										<td class="text-center">{{substr($fld->values[$x][0]['valor_fecha_str'] , 3)}}</td>
									@endif												
									

									@for($y=1; $y <= $fld->columnas; $y++)
										<td class="text-center" >

										@if ($fld->values[$x][$y]['tipo_campo'] == 'T') {{$fld->values[$x][$y]['valor_texto']}}

										@elseif ($fld->values[$x][$y]['tipo_campo'] == 'N') {{$fld->values[$x][$y]['valor_numerico']}}

										@elseif ($fld->values[$x][$y]['tipo_campo'] == 'D') {{$fld->values[$x][$y]['valor_fecha_str']}}

										@elseif (!empty($fld->values[$x][$y]['tipo_campo']) && $fld->values[$x][$y]['tipo_campo'] == 'S')
											@if (!empty($fld->values[$x][$y]['opciones']['txt']) && !empty($fld->opciones[1]))
												@foreach ($fld->values[$x][$y]['opciones']['txt'] as $n => $txtopcion)
													@if(!empty($fld->opciones[1][$n]) && $fld->opciones[1][$n] == $fld->values[$x][$y]['valor_texto'])
														{{$txtopcion}}
													@endif
												@endforeach
											@endif
										@elseif ($fld->values[$x][$y]['tipo_campo'] == 'B')
											@if($fld->values[$x][$y]['valor_numerico'] == 1) SI @else NO @endif

										@elseif ($fld->values[$x][$y]['tipo_campo'] == 'R')
											@foreach ($fld->values[$x][$y]['opciones']['txt'] as $n => $txtopcion)
												@if($fld->values[$x][$y]['valor_texto'] == $fld->values[$x][$y]['opciones']['val'][$n]) {{$txtopcion}} @endif
											@endforeach												

										@elseif ($fld->values[$x][$y]['tipo_campo'] == 'C')
											@foreach ($fld->values[$x][$y]['opciones']['txt'] as $n => $txtopcion)
												@if ( false !== strpos($fld->values[$x][$y]['valor_texto'], $fld->values[$x][$y]['opciones']['val'][$n]) ) {{$txtopcion}} @endif
											@endforeach												

										@elseif ($fld->values[$x][$y]['tipo_campo'] == 'M') {{$fld->values[$x][$y]['valor_texto']}}
										@endif
										
										</td>
									@endfor

								</tr>
							@endif		
						@endfor

							</table>

						@endif 

				@endforeach
				</div>

				@if ($k != '')
					@if (null != $secciones[$k]['texto_pie'])
						<br />
						<span style="font-style: italic;">{{$secciones[$k]['texto_pie']}}</span>
					@endif
				@endif


			@endforeach
		@endif							
	@endif



@endif

@if($plain == false)
</div>
@endif

<script type="text/javascript">
	$(document).ready(function() {

	});
</script>

@if($plain == false)
	@include('footer')
@endif