<%@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-sm-4"></div>
   		         <label id="labelBuscando" class="col-sm-2 text-danger" for="porcentaje" style="display:none">Procesando Información....</label>
    	  </div>
    	  
		  <div id="divElemetos" class="row" >
		  
			  <div class="col-sm-1" >        	
		        	<label>Nombre</label>        
		      </div>
			  
			  <div class="col-sm-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-sm-1" >        	
		        	<label>Tipo </label>        
		      </div>
		      		  
			  <div class="col-sm-2">
				  <c:choose>
					    <c:when test="${param.idApartado != 'null'}">
					        <select id="amortizableSelect" name="amortizableSelect" class="form-control-sm">						         
						       <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-sm">	  
						       <option value="Amortizable"> Amortizable </option>
						       <option value="No Amortizable"> No Amortizable </option>	   
						    </select>
					    </c:otherwise>
				  </c:choose>				  
			  </div>			  
			  <div class="col-sm-4"/>			  		 
		  </div>
		  		  
		  <br/><br/><br/><br/><br/>
		  
		  <div id="divBotones" class="row">
		  	
			<div class="col-sm-2">
			   	<a href="${contextPath}/catalogos/bolsas/index?pmn=<%=pmn%>" class="btn btn-default" roll="button" >Regresar</a>    	
			</div>        
			<div class="col-sm-2"></div>
			<div class="col-sm-2">
			   	
			</div>
			<div class="col-sm-2">
			   	<button id="btnGuardar" class="btn btn-success" type="button" >Notificar SAP</button>
			</div>
		</div>
	</form>
	
	<div id="notiSap" class="modal" role="dialog">
	  <div class="modal-dialog">
	
	    <!-- Modal content-->
	    <div class="modal-content">
	      <div class="modal-header">
	        <h4 class="modal-title">Notificación SAP</h4>
	        <button type="button" class="btn-close" data-bs-dismiss="modal"></button>
	      </div>
	      <div class="modal-body">	        
	      </div>
	      <div class="modal-footer">
	        <button type="button" class="btn btn-default" data-bs-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"%>
