<%@page import="net.sourceforge.fenixedu.domain.accounting.events.MicroPaymentEvent"%> <%@page import="pt.utl.ist.fenix.tools.resources.IMessageResourceProvider"%> <%@page import="java.util.Properties"%> <%@page import="net.sourceforge.fenixedu.presentationTier.renderers.LabelFormatterRenderer"%> <%@page import="net.sourceforge.fenixedu.presentationTier.renderers.util.RendererMessageResourceProvider"%> <%@page import="net.sourceforge.fenixedu.util.Money"%> <%@page import="java.util.ArrayList"%> <%@page import="java.util.Collections"%> <%@page import="java.util.List"%> <%@page import="net.sourceforge.fenixedu.domain.accounting.Event"%> <%@page import="java.util.Set"%> <%@ page language="java"%> <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%> <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%> <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%> <%@ taglib uri="/WEB-INF/fenix-renderers.tld" prefix="fr"%> <% final List events = new ArrayList(person.getEvents()); Collections.sort(events, Event.COMPARATOR_BY_DATE); Money total = Money.ZERO; Money totalPayed = Money.ZERO; Money totalToPay = Money.ZERO; for (final Event event : events) { if (event instanceof MicroPaymentEvent) { continue; } final Money amountToPay = event.getAmountToPay(); %> class="<% if (!amountToPay.isZero()) { %>debtRow<% } %>" > <%= event.getWhenOccured().toString("yyyy-MM-dd HH:mm") %> "> <% final Properties properties = new Properties(); properties.put("enum", "ENUMERATION_RESOURCES"); properties.put("application", "APPLICATION_RESOURCES"); properties.put("default", "APPLICATION_RESOURCES"); final IMessageResourceProvider provider = new RendererMessageResourceProvider(properties); %> <%= event.getDescription().toString(provider) %> <% total = total.add(event.getOriginalAmountToPay()); %> <%= event.getOriginalAmountToPay().toString() %> <% totalPayed = totalPayed.add(event.getPayedAmount()); %> <%= event.getPayedAmount().toString() %> <% totalToPay = totalToPay.add(amountToPay); %> <%= amountToPay.toString() %> <% } %> : <%= total.toString() %> <%= totalPayed.toString() %> text-align: right; <% if (!totalToPay.isZero()) { %>font-weight: bold;<% } %> <%= totalToPay.toString() %>