<%@include file="/jsp/common/defaultTopLogin.jsp"%>
	<s:form id="idForm" class="form-horizontal  col-md-4" action="#">
			<fieldset>
				<div class="form-group">
					<label for="costo" class=" col-md-offset-8 col-md-2 control-label">Costo total:</label>
					<div  class="col-md-2" >
						<input name="foo" type="text" class="form-control" value="${costoTotal}"  readonly/>
					</div> 
				</div>
			</fieldset>
	</s:form>
	
	<table class="table table-striped table-hover " id="materialesId">
		<thead>
			<tr class="encabezado"> 
				<th>T&iacute;tulo</th>
				<th>Nombre</th>
				<th>Importe</th>
				<th>Fecha entrada</th>
				<th>Ejercicio</th>
				<th>Movimiento</th>
				<th>Unidad</th>
				<th>ISO</th>
				<th>Material antiguo</th>
				<th>Posici&oacute;n</th>
			</tr>
		</thead>
		<tbody></tbody>
		<c:forEach var="m" items="${materiales}">
			<tr>
				<td><c:out value="${m.titulo}" /></td>
				<td><c:out value="${m.nombre}" /></td>
				<td><c:out value="${m.importe}" /></td>
				<td><fmt:formatDate pattern='MM/dd/yyyy'   value='${m.fechaModificacion}'/></td>
				<td><c:out value="${m.ejercicio}" /></td>
				<td><c:out value="${m.movimiento}" /></td>
				<td><c:out value="${m.unidad}" /></td>
				<td><c:out value="${m.iso}" /></td>
				<td><c:out value="${m.materialAntiguo}" /></td>
				<td><c:out value="${m.posicion}" /></td>
			</tr>
		</c:forEach>
		</tbody>
	</table>
	
	
	<script>
	var excel ;
	$().ready(function() {

		 excel = $("#materialesId").excelMapper({
			 action: contextPath+ '/excelTableReport/export.action' ,
		     actionAttribute : "elements",
		     rootRows : "rootElement",
		     data : {
		    	 algo : "infoAdicional"
		     },
		     toJSONConfig : {
		    	 ignoreHiddenRows : false,
		    	 onlyColumns : [1,2,3,4,5,6,7]
		     },
		     onSucces : function (){ alert("exito"); },
		     onError : function (){ alert("error"); }
		}) ;
	});

	
	</script>
	
	<div class="form-group">
       <div class="col-sm-6">
               <a href="../../contrato/listado/irListado?pmn=<%=pmnReturn%>&tipoContrato=${tipoContrato}" class="btn btn-default col-sm-4" roll="button" >Regresar</a>                   
       </div>     
    </div>
	


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