<%@include file="/jsp/common/defaultTopLogin.jsp"%>
<%@include file="/jsp/dda/contrato/transaccion/comun/scripts.jsp"%>

<style type="text/css">
thead {
	background: #cb2c25
}

th {
	color: white;
}
</style>

<script src="${contextPath}/js/common/perfil/perfilService.js?v=${versionJS}"></script>
<script src="${contextPath}/js/common/perfil/perfilController.js?v=${versionJS}"></script>
<script>
	$().ready(function() {
		var perfilController = new PerfilController();
		perfilController.ejecutarPerfil('206');
	});
</script>

<div ng-app="${contextPath}">
	<div  ng-controller="tipoCambioAddOnController">
		
		<div class="form-group">
			<div class="col-sm-1">
				<label class="control-label" for="forAnnios">A&ntilde;o:</label>
			</div>
			<div class="col-sm-2">
				<select class="form-control-sm" id="myannio" ng-model="myannio" ng-options="annio for annio in annios"  ng-change="limpiar()"></select>
			</div>
			
			<div class="col-sm-1"></div>
			
			<div class="col-sm-1">
				<label class="control-label" for="forPaises">Estudio:</label>
			</div>
			<div class="col-sm-2">
				<select class="form-control-sm" id="mystdio" ng-model="mystdio" ng-options="estudio.nombre for estudio in estudios track by estudio.idEstudio"  ng-change="limpiar()"></select>
			</div>
			<div class="col-sm-1 centrar-elemento">
				<button id="botonConsultar" class="btn btn-primary" type="button" ng-click="consultar()">Consultar</button>
				
			</div>
		
			<div class="col-sm-1">
				<button id="bSubir" class="btn btn-primary" type="button" ng-click="openCargarDocumento();">Subir Archivo</button>
			</div>
		
			<div class="col-sm-1 centrar-elemento">
				<button id="botonGuardar" class="btn btn-success" type="button" ng-click="guardarCambio()">Guardar cambios</button>
			</div>
			
		</div>
		
		</br>
		<div class="form-group">	
	    	<table class="table">
	    		<thead>
	    			<tr>
		    			<th class="text-center" ng-repeat="nt in nombreTipos">
		    				{{nt.descripcion}}
		    			</th>
		    		</tr>
	    		</thead>
	    		<tfoot>
	    			<tr ng-repeat="mes in mesesTipos">
		    			<td>
		    				{{mes.nombre}}
		    			</td>
		    			<td ng-repeat="tipo in mes.tipos">
		    				<input class="form-control text-right" ng-model="tipo.valor" ng-blur="valida('{{tipo.valor}}', tipo.valor)" >
		    			</td>
		    		</tr>
	    		</tfoot>
	    	</table>
	    </div>
	 	<jsp:include page="/jsp/dda/admin/catalogos/tipoCambioAddOns/cargaForm.jsp" />
	</div>
</div>

<script type="text/javascript" language="javascript" src="${contextPath}/js/dda/admin/catalogos/tipoCambioAddOns/tipoCambioAddOnService.js"></script>
<script type="text/javascript" language="javascript" src="${contextPath}/js/dda/admin/catalogos/tipoCambioAddOns/tipoCambioAddOnController.js"></script>
<script type="text/javascript" language="javascript" src="${contextPath}/js/dda/admin/catalogos/tipoCambioAddOns/TipoCambioAddOnUpload.js?v=${versionJS}"></script>


<%@include file="/jsp/common/defaultBottomLogin.jsp"%>
