<div ng-controller="reporteDatosContratoController">
	<div class="form-group row">
		<div class="col-sm-12">
			<div class="col-sm-1">
				<label class="control-label" for="estudio">Estudio:</label>
			</div>
			<div class="col-sm-3">
				<select id="estudio" ng-model="estudio" ng-change="eligeEstudio()"
					class="form-control-sm w-100">
				</select>
			</div>
			<div class="oculta1">
				<div class="col-sm-1">
					<label class="control-label" for="contratos">Contratos:</label>
				</div>
				<div class="col-sm-3">
					<select id="contratos" class="form-control-sm w-100"
						ng-model="contratos"
						ng-change="eligeContrato()"
						disabled="disabled">
						
					</select>
				</div>
			</div>
			<div class="oculta1">
				<div class="col-sm-1">
					<label class="control-label" for="peliculasSeries">Serie/
					Pelicula:</label>
				</div>
				<div class="col-sm-3">
					<select id="peliculasSeries" class="form-control-sm w-100"
						ng-model="peliculasSeries"
						ng-change="eligeTemporada()"
						disabled="disabled">
						
					</select>
				</div>
			</div>
			<br /> <br /> <br /> 
			<div class="col-sm-1">
				<label class="control-label" for="temporadas">Temporada:</label>
			</div>
			<div class="col-sm-3">
				<select id="temporadas" class="form-control-sm w-100"
					disabled="disabled">
					
				</select>
			</div>
			
			<div class="col-sm-1">
				<label class="control-label" for="mes">Mes:</label>
			</div>
			<div class="col-sm-3">
				<input class="form-control required" id="mes" name="mes" type="text"
					ng-model="fechaConsulta" ng-
					ng-disabled="cbvalue3 == 'NO'">
			</div>
			
		</div>
		
		
		<br /> <br /> <br />
		<br /> <br /> <br />
		<div class="col-sm-12">
			<div class="col-sm-1">
				<label>Datos: </label>
			</div>
			<div class="col-sm-2">  	
			  	<label><input type="checkbox" ng-model="cbvalue4" ng-true-value="'YES'" ng-false-value="'NO'" ng-change="resetTable()">&nbsp;Datos Generales</label>
			</div>
			<div class="col-sm-3">  	
			  	<label><input type="checkbox" ng-model="cbvalue5" ng-true-value="'YES'" ng-false-value="'NO'" ng-change="resetTable()">&nbsp;Términos Comerciales</label>  
			</div>
			<div class="col-sm-2">  	
			  	<label><input type="checkbox" ng-model="cbvalue2"  ng-true-value="'YES'" ng-false-value="'NO'" ng-change="resetTable()">&nbsp;Títulos</label>
			</div>
			<div class="col-sm-2">  	
			  	<label><input type="checkbox" ng-model="cbvalue3" ng-true-value="'YES'" ng-false-value="'NO'" ng-change="activaFecha()">&nbsp;Amortizacion</label>
			</div>
			<div class="col-sm-2">
				<button class="btn btn-success" type="button"
					ng-click="muestraReporte(tipoReporte, fechaConsulta, estudio)" ng-disabled="activaBoton=='NO'">Consultar
					Reporte</button>&nbsp;&nbsp;<img ng-if="mostrarCargando" src="${contextPath}/design/img/loading.gif"/>
			</div>
			<div class="col-sm-2">
				<button ng-if="!reporteZip()"
					ng-disabled="bheader == null || tabla == null"
					id="botonExportar" type="button"
					ng-click="descargaReporte(tipoReporte, fechaConsulta, estudio)">
					<img src="${contextPath}/design/img/common/excel.gif" />
				</button>
			</div>
		</div>
		
	</div>
	<br> <br>
	<div ng-if="bheader != null"
		id="tablaReporteCostoPerView" class="search-table-outter wrapper">
		<div id="areaImpresion">
			<table class="table table-responsive feesT">
				<thead class="">
					<tr>
						<th class="encabezados encabezadoTabla"
							ng-repeat="bvalor in bheader track by $index">{{bvalor}}</th>
					</tr>
					<thead><tbody>
					<tr ng-if="tabla != null"
						ng-style="obtenEstilo(row, null, $index, null, tabla.length)"
						ng-repeat="row in tabla| limitTo:totalDisplayed track by $index ">
						<td ng-if="mostrarColumna($index)"
							ng-style="$index == 0 && $parent.$parent.$index < tabla.length - 1 ? {'text-align': 'left'} : {'text-align': 'right'}"
							ng-repeat="column in row track by $index" class="tdEditable">
							{{ (column) }}
						</td>
					</tr>
					<tr ng-if="tabla == null">
						<td colspan="{{bheader.length + 1}}" align="center">No se
							encontr&oacute; informaci&oacute;n</td>
					</tr>
				
				</tbody>
			</table>
		</div>
	</div>
	<div class="form-group">
		<div class="col-md-12">
			<div class="col-md-4"></div>
			<div class="col-md-6">
				<btn ng-if="tabla != null && totalDisplayed < tabla.length"
					class="btn" ng-click="loadMore()"
					style="color:red; font-weight: bold;">Click para mostrar mas
				informacion ({{tabla.length - totalDisplayed}} restantes)</btn>
			</div>
			<div class="col-md-2"></div>
		</div>
	</div>
</div>