<% /****************************************************************************** * Copyright (c) 2000-2004 e-Deal * * e-Deal S.A. * 55 rue Brillat Savarin * 75013 Paris * France * * T: +33 (0)1 53 80 80 30 * F: +33 (0)1 73 01 69 77 * http://www.e-deal.com * * La diffusion de ce code source sous quelque forme que ce soit sans * l'autorisation de E-DEAL est interdite. * * Vous êtes autorisés à modifier ce code source uniquement pour votre usage * propre et sous réserve que les mentions de copyright demeurent intactes. * * Ce code est fourni en l'état. Aucune garantie d'aucune sorte, explicite ou * implicite n'est donnée. En aucun cas E-DEAL ne pourra être tenu pour * responsable des dommages pouvant résulter de l'utilisation de ce code * source. * * ******************************************************************************/ %><%@page session="true" import="com.edeal.frontline.*,java.text.*,java.util.*"%> <%@ page import="com.edeal.frontline.navigation.FlRequest" %> <%@taglib uri="http://www.e-deal.com/taglib/fl" prefix="fl"%> <% final org.apache.commons.logging.Log logger = org.apache.commons.logging.LogFactory.getLog(getClass()); FlRequest flRequest = new FlRequest(request); FlContext context = flRequest.getContext(); DataDictionary dico = context.getDataDictionary(); String entID = Utils.getRequestParameter(context, request, "EntID"); String perID = Utils.getRequestParameter(context, request, "perID"); String nb = Utils.getRequestParameter(context, request, "nb"); String[] fields = {"OppID", "OppDate", "OppStake", "OppTitle", "OppStoID"}; Vector vQuery = new Vector(); if (entID != null && !"".equals(entID)) { vQuery.addElement(new String[]{"OppEntID = " + Utils.formatToSQL(context, entID)}); } if (perID != null && !"".equals(perID)) { vQuery.addElement(new String[]{"OppPerID = " + Utils.formatToSQL(context, perID)}); } String[][] query = new String[vQuery.size()][]; query =(String[][])vQuery.toArray(query); String[] orderBy = {"OppDate DESC"}; Vector list = new Vector(); boolean all = true; int nbOpp = 5; try { nbOpp = Integer.parseInt(nb); all = false; } catch (NumberFormatException e) { } if (!all) { list = OpportunityBean.listSummary(session, fields, query, orderBy, 0, nbOpp); } else { list = OpportunityBean.listSummary(session, fields, query, orderBy); } DecimalFormat moneyFormat = FlLocale.getInstance(session).getDecimalFormat("#,##0.00"); DecimalFormat intFormat = FlLocale.getInstance(session).getDecimalFormat("#,##0"); %> <% if (list != null && list.size() >0) { %>
<% for (int i=0; i< list.size();i++) { Hashtable opportunity = (Hashtable) list.elementAt(i); String oppID = (String)opportunity.get("OppID"); String oppTitle = (String)opportunity.get("OppTitle"); String oppStoID = (String)opportunity.get("OppStoID"); String status = oppStoID == null ? null : (String)dico.getRefCode("OppStoID", oppStoID); Number oppStake = (Number)opportunity.get("OppStake"); Date oppDate = (Date)opportunity.get("OppDate"); String formatOppDate = Utils.formatToWeb(session,oppDate,false,"MM/yyyy") +" - "; String formatOppStake = intFormat.format(oppStake.doubleValue()) + " €" ; %> <% } %>

> <%= formatOppDate%> <%= Utils.formatToWeb(oppTitle,false)%> - <%= formatOppStake%> - <%= Utils.formatToWeb(status,false)%>
<% } %> <% /****************************************************************************** * CVS Log File - This is no longer maintained! * * Revision 1.1 2007/03/07 17:07 houyam * Initial Revision * *****************************************************************************/ %>