<%@page import="javax.servlet.jsp.tagext.TryCatchFinally"%>
<%@include file="/jsp/common/defaultTopLogin.jsp"%>

  <form>	  	  			 	  	  	  
	  	  <input type="hidden" id="idApartado" name="idApartado" value="${param.idApartado}"/>	  
  	  	  <input type="hidden" id="idSAP" name="idSAP" value="${param.idSAP}"/>
  	  	  <input type="hidden" id="amortizable" name="amortizable" value="${param.amortizable}"/>
  	  	  
  	  	  <div class ="row">
                 <div class ="col-xs-4"></div>
   		         <label id="labelBuscando" class="col-xs-2 text-danger" for="porcentaje" style="display:none">Procesando Información....</label>
    	  </div>
    	  
		  <div id="divElemetos" class="row" >
		  
			  <div class="col-xs-1" >        	
		        	<label>Nombre</label>        
		      </div>
			  
			  <div class="col-xs-5" >
				<c:choose>
				    <c:when test="${param.idApartado != 'null'}">
				        <input id="des" name="des" type="text" class="form-control" value="${param.descripcion}"/>
				    </c:when>    
				    <c:otherwise>
				        <input id="des" name="des" type="text" class="form-control"/>
				    </c:otherwise>
			    </c:choose>			  			  			 		        	       
		      </div>		      		   			  			  		 
		  </div>		  		  		  		  		  
    		  		  		  		
		  <div id="divElemetos" class="row" >
		  			   
		      <div class="col-xs-1" >        	
		        	<label>Tipo </label>        
		      </div>
		      		  
			  <div class="col-xs-2">
				  <c:choose>
					    <c:when test="${param.idApartado != 'null'}">
					        <select id="amortizableSelect" name="amortizableSelect" class="form-control">						         
						       <option <%=(request.getParameter("amortizable").equals("Amortizable")?"selected":"")%> value="Amortizable"> Amortizable </option>
						       <option <%=(request.getParameter("amortizable").equals("Amortizable")?"":"selected")%> value="No Amortizable"> No Amortizable </option>	   
						    </select>
					    </c:when>    
					    <c:otherwise>
					        <select id="amortizableSelect" name="amortizableSelect" class="form-control">	  
						       <option value="Amortizable"> Amortizable </option>
						       <option value="No Amortizable"> No Amortizable </option>	   
						    </select>
					    </c:otherwise>
				  </c:choose>				  
			  </div>			  
			  <div class="col-xs-4"/>			  		 
		  </div>
		  		  
		  <br/><br/><br/><br/><br/>
		  
		  <div id="divBotones" class="row">
		  	
			<div class="col-xs-2">
			   	<a href="${contextPath}/catalogos/bolsas/index?pmn=<%=pmn%>" class="btn btn-default" roll="button" >Regresar</a>    	
			</div>        
			<div class="col-xs-2"></div>
			<div class="col-xs-2">
			   	
			</div>
			<div class="col-xs-2">
			   	<button id="btnGuardar" class="btn btn-success" type="button" >Notificar SAP</button>
			</div>
		</div>
	</form>
	
	<div id="notiSap" class="modal fade" role="dialog">
	  <div class="modal-dialog">
	
	    <!-- Modal content-->
	    <div class="modal-content">
	      <div class="modal-header">
	        <button type="button" class="close" data-dismiss="modal">&times;</button>
	        <h4 class="modal-title">Notificación SAP</h4>
	      </div>
	      <div class="modal-body">	        
	      </div>
	      <div class="modal-footer">
	        <button type="button" class="btn btn-default" data-dismiss="modal">Cerrar</button>
	        <button type="button" id="btnAceptar" class="btn btn-default" >Aceptar</button>
	      </div>
	    </div>
	
	  </div>
	</div>	
	
	<script src="${contextPath}/js/dda/admin/catalogos/apartados/generarApartado.js?v=${versionJS}"></script>     			
<%@include file="/jsp/common/defaultBottomLogin.jsp"%>
