<%@include file="/jsp/common/defaultTopLogin.jsp"%>
<%@include file="/jsp/dda/contrato/transaccion/comun/scripts.jsp"%>
	<script src="${contextPath}/js/dda/reporte/amortizacion/reporteAmortPptoController.js?v=${versionJS}"></script>
	<script src="${contextPath}/js/dda/reporte/amortizacion/repAmortPptoService.js?v=${versionJS}"></script>
	<!-- script src="${contextPath}/js/common/alerts/dist/sweetalert.min.js"></script>
    <link rel="stylesheet" type="text/css" href="${contextPath}/js/common/alerts/dist/sweetalert.css" -->
    <script src="${contextPath}/js/common/printThis-master/printThis.js"></script>
	<style type="text/css">
		.totalContratoRowClass { background-color: #ffffcc; background-image: none; }
        .ocultaRowClass { width: 51px; }
        .printable {page-break-after: auto;}
    </style>
	
	<input type="hidden" id="pmn" name="pmn" value="${pmn}" />
	<input type="hidden" id="pmnReturn" name="pmnReturn" value="${pmnReturn}" />
	
 <div ng-app="${contextPath}" ng-controller="reporteAmortPptoController">	
	<div class="form-group">
	
		<div class="col-xs-1">
			<label class="control-label" for="peiodo">Periodo:</label>
		</div>
	
		<!-- div class="col-xs-2">
			<input class="form-control datepicker required hidden-calendar" id="campoFechaInicio" name="campoFechaInicio" type="text" value="${fechaInicio}">
		</div -->
		<div class="col-xs-2">								    																																			
					<input class="form-control required" id="fecha" name="fecha" type="text">									
		</div>
	
		<div class="col-xs-1 centrar-elemento">
			<label class="control-label" for="">  </label>
		</div>
	
	
		<div class="col-xs-1">
			<button id="botonConsultar" class="btn btn-info" type="button" ng-click="reporteAmortizacion()">Consultar</button>
		</div>
	
		<div class="col-xs-1"></div>
	    <!-- a href="javascript:imprSelec('reporteTableDiv')" >Imprimir_____</a-->
		<div class="col-xs-2 centrar-elemento">
		    <!-- button id="botonExportar" type="button" onclick="javascript:imprSelec('reporteTableDiv')">
			<img src="${contextPath}/design/img/common/print.png"/ -->
			</button>
			 <button id="imp" type="button" ng-click="printReport()"> <!-- onclick="printReport()" -->
			<img src="${contextPath}/design/img/common/print.png"/>
			
			</button>
			 <button id="botonExportar" type="button" ng-click="exportarReporte()">
					<img src="${contextPath}/design/img/common/excel.gif"/>
			 </button>
		</div>
		
	</div>
	
	</br>
	</br>
	
	<div id="reporteTableDiv" class="form-group printable">
	        <div id="imgPrint" class="col-xs-1" style="display:none; "> 
			           <h3 style="font-weight:bold;"><img style="padding-right: 50px;" src="${contextPath}/design/img/common/Clarovideo.png"/>REPORTE DE SEGUIMIENTO AL PRESUPUESTO {{annio}}</h3>
		    </div>
			<table id="reporteTable" class="table">
			          <thead>
			                   <tr>
			                   </tr>
			                   <tr class="encabezado" role="row">
			                          <th class="text-center myborder">ESTUDIO</th>
			                          <th id="ene">Ene - {{annio}}</th>
			                          <th id="feb">Feb - {{annio}}</th>
			                          <th id="mar">Mar - {{annio}}</th>
			                          <th id="abr">Abr - {{annio}}</th>
			                          <th id="may">May - {{annio}}</th>
			                          <th id="jun">Jun - {{annio}}</th>
			                          <th id="jul">Jul - {{annio}}</th>
			                          <th id="ago">Ago - {{annio}}</th>
			                          <th id="sep">Sep - {{annio}}</th>
			                          <th id="oct">Oct - {{annio}}</th>
			                          <th id="nov">Nov - {{annio}}</th>
			                          <th id="dic">Dic - {{annio}}</th>
			                          <th class="text-center myborder">EJERCIDO</th>
			                          <th class="text-center myborder">PRESUPUESTO</th>
			                          <th class="text-center myborder">POR EJERCER</th>
			                          <th class="text-center myborder">% UTILIZADO</th>
			                   </tr>

			          </thead>
			          <body>
			                <tr ng-repeat="rep in reporte">
			                         <td>
			                                 <div class="text-right myborder" ng-if="rep.estudio == 'Total General'" style="font-weight:bold;">Total General</div>
			                                 <div class="text-right myborder" ng-if="rep.estudio == 'Total SAP'">Total SAP</div>
			                                 <div class="text-right myborder" ng-if="rep.estudio == 'Diferencia'">Diferencia</div>
			                                 <div class="text-right myborder" ng-if="rep.estudio == '% Diferencia'">% Diferencia</div>
			                                 <div class="text-left myborder" ng-if="rep.estudio != 'Total General' && rep.estudio != 'Total SAP' && rep.estudio != 'Diferencia' && rep.estudio != '% Diferencia'">{{rep.estudio}}</div>
			                         </td>
			                         <td id="ene{{$index}}" class="text-right myborder">
			                              <div ng-if="rep.mes_1 != 'NaN %'">
			                                   <div class="text-center myborder"	 ng-if="rep.estudio == '% Diferencia'">{{rep.mes_1}}</div>
				         				       <div ng-if="rep.estudio != '% Ejercido' && rep.estudio != 'Total General'">{{rep.mes_1 | number:1}}</div>
				         				       <div ng-if="rep.estudio == 'Total General'" style="font-weight:bold;">{{rep.mes_1 | number:1}}</div>
				         				   </div>
			                         </td>
			                         <td id="feb{{$index}}" class="text-right myborder">
			                             <div ng-if="rep.mes_2 != 'NaN %'">
			                                <div class="text-center myborder" ng-if="rep.estudio == '% Diferencia'">{{rep.mes_2}}</div>
				         				    <div ng-if="rep.estudio != '% Ejercido' && rep.estudio != 'Total General'">{{rep.mes_2 | number:1}}</div>
				         				    <div ng-if="rep.estudio == 'Total General'" style="font-weight:bold;">{{rep.mes_2 | number:1}}</div>
				         				 </div>
			                         </td>
			                         <td id="mar{{$index}}" class="text-right myborder">
			                             <div ng-if="rep.mes_3 != 'NaN %'">
			                                <div class="text-center myborder" ng-if="rep.estudio == '% Diferencia'">{{rep.mes_3}}</div>
				         				    <div ng-if="rep.estudio != '% Ejercido' && rep.estudio != 'Total General'">{{rep.mes_3 | number:1}}</div>
				         				    <div ng-if="rep.estudio == 'Total General'" style="font-weight:bold;">{{rep.mes_3 | number:1}}</div>
				         				 </div>   
			                         </td>
			                         <td id="abr{{$index}}" class="text-right myborder">
			                             <div ng-if="rep.mes_4 != 'NaN %'">
			                                <div class="text-center myborder" ng-if="rep.estudio == '% Diferencia'">{{rep.mes_4}}</div>
				         				    <div ng-if="rep.estudio != '% Ejercido' && rep.estudio != 'Total General'">{{rep.mes_4 | number:1}}</div>
				         				       <div ng-if="rep.estudio == 'Total General'" style="font-weight:bold;">{{rep.mes_4 | number:1}}</div>
				         				 </div>
			                         </td>
			                         <td id="may{{$index}}" class="text-right myborder">
			                             <div ng-if="rep.mes_5 != 'NaN %'">
			                                <div class="text-center myborder" ng-if="rep.estudio == '% Diferencia'">{{rep.mes_5}}</div>
				         				 
				         				    <div ng-if="rep.estudio != '% Ejercido' && rep.estudio != 'Total General'">{{rep.mes_5 | number:1}}</div>
				         				    <div ng-if="rep.estudio == 'Total General'" style="font-weight:bold;">{{rep.mes_5 | number:1}}</div>
				         				 </div>
			                         </td>
			                         <td id="jun{{$index}}" class="text-right myborder">
			                             <div ng-if="rep.mes_6 != 'NaN %'">
			                                <div class="text-center myborder" ng-if="rep.estudio == '% Diferencia'">{{rep.mes_6}}</div>
				         	
				         				    <div ng-if="rep.estudio != '% Ejercido' && rep.estudio != 'Total General'">{{rep.mes_6 | number:1}}</div>
				         				       <div ng-if="rep.estudio == 'Total General'" style="font-weight:bold;">{{rep.mes_6 | number:1}}</div>
				         				 </div>
			                         </td>
			                         <td id="jul{{$index}}" class="text-right myborder">
			                              <div ng-if="rep.mes_7 != 'NaN %'">
			                                     <div class="text-center myborder" ng-if="rep.estudio == '% Diferencia'">{{rep.mes_7}}</div>
				         				       
				         				         <div ng-if="rep.estudio != '% Ejercido' && rep.estudio != 'Total General'">{{rep.mes_7 | number:1}}</div>
				         				       <div ng-if="rep.estudio == 'Total General'" style="font-weight:bold;">{{rep.mes_7 | number:1}}</div>
			                              </div>
			                                
			                         </td>
			                         <td id="ago{{$index}}" class="text-right myborder">
			                                <div ng-if="rep.mes_8 != 'NaN %'">
			                                     <div class="text-center myborder" ng-if="rep.estudio == '% Diferencia'">{{rep.mes_8}}</div>
				         			
				         				         <div ng-if="rep.estudio != '% Ejercido' && rep.estudio != 'Total General'">{{rep.mes_8 | number:1}}</div>
				         				       <div ng-if="rep.estudio == 'Total General'" style="font-weight:bold;">{{rep.mes_8 | number:1}}</div>
			                              </div>
			                         </td>
			                         <td id="sep{{$index}}" class="text-right myborder">
			                                <div ng-if="rep.mes_9 != 'NaN %'">
			                                     <div class="text-center myborder" ng-if="rep.estudio == '% Diferencia'">{{rep.mes_9}}</div>
				         		
				         				         <div ng-if="rep.estudio != '% Ejercido' && rep.estudio != 'Total General'">{{rep.mes_9 | number:1}}</div>
				         				       <div ng-if="rep.estudio == 'Total General'" style="font-weight:bold;">{{rep.mes_9 | number:1}}</div>
			                                </div>
			                         </td>
			                         <td id="oct{{$index}}" class="text-right myborder">
			                                  <div ng-if="rep.mes_10 != 'NaN %'">
			                                     <div class="text-center myborder" ng-if="rep.estudio == '% Diferencia'">{{rep.mes_10}}</div>
				         				         
				         				         <div ng-if="rep.estudio != '% Ejercido' && rep.estudio != 'Total General'">{{rep.mes_10 | number:1}}</div>
				         				       <div ng-if="rep.estudio == 'Total General'" style="font-weight:bold;">{{rep.mes_10 | number:1}}</div>
			                                  </div>
			                         </td>
			                         <td id="nov{{$index}}" class="text-right myborder">
			                                 <div ng-if="rep.mes_11 != 'NaN %'">
			                                     <div class="text-center myborder" ng-if="rep.estudio == '% Diferencia'">{{rep.mes_11}}</div>
				         				         
				         				         <div ng-if="rep.estudio != '% Ejercido' && rep.estudio != 'Total General'">{{rep.mes_11 | number:1}}</div>
				         				       <div ng-if="rep.estudio == 'Total General'" style="font-weight:bold;">{{rep.mes_11 | number:1}}</div>
			                              	</div>
			                         </td>
			                         <td id="dic{{$index}}" class="text-right myborder">
			                                  <div ng-if="rep.mes_12 != 'NaN %'">
			                                     <div class="text-center myborder" ng-if="rep.estudio == '% Diferencia'">{{rep.mes_12}}</div>
			                                     <div ng-if="rep.estudio != '% Ejercido' && rep.estudio != 'Total General'">{{rep.mes_12 | number:1}}</div>
				         				       <div ng-if="rep.estudio == 'Total General'" style="font-weight:bold;">{{rep.mes_12 | number:1}}</div>
				         				         <!--  div ng-if="rep.estudio != '% Ejercido'">{{rep.mes_12 | number:1}}</div -->
			                              	   </div>
			                         </td>
			                         <td class="text-right myborder">
			                                  <div ng-if="rep.ejercido != 'NaN %'">
			                         			<div class="text-center myborder" ng-if="rep.estudio == '% Diferencia'">{{rep.ejercido}}</div>
				         				    	<!-- div ng-if="rep.estudio != '% Ejercido'">{{rep.ejercido | number:1}}</div -->
				         
				         				    	<div ng-if="rep.estudio != '% Ejercido' && rep.estudio != 'Total General'">{{rep.ejercido | number:1}}</div>
				         				        <div ng-if="rep.estudio == 'Total General'" style="font-weight:bold;">{{rep.ejercido | number:1}}</div>
				         				      </div>	
			                         </td>
			                         <td class="text-right myborder">
			                                    <div ng-if="rep.estudio != 'Total General'">{{rep.ppto_anual | number:1}}</div>
				         				        <div ng-if="rep.estudio == 'Total General'" style="font-weight:bold;">{{rep.ppto_anual | number:1}}</div>
			                         </td>
			                         <td class="text-right myborder">
			                                 <div ng-if="rep.estudio != 'Total General'">{{rep.por_ejercer | number:1}}</div>
				         				     <div ng-if="rep.estudio == 'Total General'" style="font-weight:bold;">{{rep.por_ejercer | number:1}}</div>
			                         </td>
			                         <td class="text-center myborder">
			                                <div ng-if="rep.p_utilizado != null && rep.estudio != 'Total General'">{{rep.p_utilizado}}</div>
			                                <div ng-if="rep.p_utilizado != null && rep.estudio == 'Total General'" style="font-weight:bold;">{{rep.p_utilizado}}</div>
			                         </td>
			                </tr>
			          </body>
			</table>	
	</div>
  </div> 
  
        <!--  script>
        window.jQuery 
        </script>
        <script src="${contextPath}/js/jQuery.print.js"></script -->
        
<%@include file="/jsp/common/defaultBottomLogin.jsp"%>