Edit C:\Users\Administrator\Desktop\Back\galaxie - Copy\marketing\contribution\read.jsp
<%/****************************************************************************** * Copyright (c) 2000-2005 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"%> <%@ page import="com.edeal.frontline.navigation.FlRequest" %> <%@ page import="com.edeal.frontline.FlContext" %> <%@ page import="com.edeal.frontline.FlLocale" %> <%@ page import="com.edeal.frontline.Utils" %> <%@ page import="com.edeal.frontline.FieldNotInitializedException" %> <%@ page import="java.util.Vector" %> <%@ page import="java.util.Hashtable" %> <%@ page import="java.text.DecimalFormat" %> <%@ page import="com.edeal.frontline.CampaignBean" %> <%@ page import="com.edeal.frontline.DataDictionary" %> <%@taglib uri="http://www.e-deal.com/taglib/fl" prefix="fl" %> <link href="<fl:webapp/>/css/smalltabs_css.jsp" rel="stylesheet" type="text/css"> <jsp:useBean class="com.edeal.frontline.ContributionBean" id="Contribution" scope="request"/> <jsp:useBean class="com.edeal.frontline.ExpenseCategoryBean" id="ExpenseCategory" scope="request"/> <jsp:useBean class="com.edeal.frontline.CampaignBean" id="CampaignBean" scope="request"/> <% 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 id = null; try { id = Contribution.getID(); } catch (FieldNotInitializedException fnie) { } CampaignBean cBean = null; String cpgId = null; try { cpgId = Contribution.getCtbCampID(); cBean = new CampaignBean(cpgId, context); request.setAttribute("Campaign", cBean); } catch (FieldNotInitializedException fnie) { } Vector refList = dico.getRefList(session, "Ctt", "Te1"); float costUnit = 0; int unitNo = 0; try { unitNo = (new Integer(cBean.getCpgUnitNo())).intValue(); costUnit = (new Float(cBean.getCpgCost())).floatValue();; } catch (Exception e) { } // Figure out our total budget float excBudget = 0; String[] excKeys = { "ExcQuant", "ExcUnitP" }; String[][] excQuery = { { "ExcCampID = " + Utils.formatToSQL(context, cpgId) } }; Vector excResult = ExpenseCategory.listSummary(context, excKeys, excQuery); for (int cnt = 0; cnt < excResult.size(); ++cnt) { Hashtable row = (Hashtable) excResult.elementAt(cnt); Integer quant = (Integer) row.get("ExcQuant"); Float unitP = (Float) row.get("ExcUnitP"); if (quant == null || unitP == null) { continue; } excBudget += quant.intValue() * unitP.floatValue(); } float CtbNumUnits = 0; try { CtbNumUnits = Contribution.getCtbNumUnits(); } catch (Exception e) { } int CtbType = 0; try { CtbType = Integer.parseInt(Utils.getRequestParameter(context, request, "TypeSelected")); } catch (Exception e) { try { CtbType = Contribution.getCtbType(); } catch (Exception e2) { } } DecimalFormat intFormat = FlLocale.getInstance(session).getDecimalFormat("#,##0;- #,##0"); DecimalFormat floatFormat = FlLocale.getInstance(session).getDecimalFormat("#,##0.##;- #,##0.##"); DecimalFormat moneyFormat = FlLocale.getInstance(session).getDecimalFormat("#,##0.##;- #,##0.##"); moneyFormat.setMaximumFractionDigits(2); moneyFormat.setMinimumFractionDigits(2); int cpgUnitNos = 0; try { cpgUnitNos = cBean.getCpgUnitNo(); } catch (FieldNotInitializedException fnie) { } String sfwId = request.getParameter("SfwID"); String url = "read_campaign.fl?SfwID=" + sfwId; %> <script type="text/javascript" language="javascript"> </script> <fl:bigTabs objectTitle="<%= Utils.getMessage(session, \"L6356\", false, true, \"Contribution\")%>" ou="<%= \"/edit_contribution.fl\" + (id != null ? \"?id=\" + id : \"\")%>"> <table class="container" cellpadding="0"> <tr class="fieldline"> <td colspan="3"> <table class="container" cellpadding="0"> <tr class="fieldline"> <td class="labelTitreFiche"> <fl:getProperty name="Contribution" property="CtbDeptID" alt="" bean="true" href="true" disp="<%= flRequest.computeURL(\"/read_department.fl\",true,false,false) %>"/> </td> </tr> </table> </td> </tr> <tr class="ligne_separation"><td colspan="3"></td></tr> <tr> <td class="column2"> <table class="data_column" cellpadding="0"> <fl:fieldRead property="CtbCampID" bean="true" href="true" disp="<%= url%>"/> <% if (CtbType == 0) { %> <tr class="fieldline"> <td class="dataLabel"><fl:getMessage code="F60D6" alt="Nombre d\'Unités"/></td> <td class="dataValue"> <%= intFormat.format(CtbNumUnits) %> <fl:getMessage code="L6010" alt="sur"/> <%= intFormat.format(cpgUnitNos) %></td> </tr> <% } if (CtbType == 1) { %> <tr class="fieldline"> <td class="dataLabel"><fl:getMessage code="F610B" alt="Pourcent"/></td> <td class="dataValue"> <%= floatFormat.format(CtbNumUnits) %> %</td> </tr> <% } if (CtbType == 2) { %> <tr class="fieldline"> <td class="dataLabel"><fl:getMessage code="L2009" alt="Budget"/></td> <td class="dataValue"> <%= moneyFormat.format(CtbNumUnits) %> € <fl:getMessage code="L6010" alt="sur"/> <%= moneyFormat.format(excBudget) %> €</td> </tr> <% } %> </table> </td> <td class="separation"><div class="separation"></div></td> <td class="column2"> <table class="data_column" cellpadding="0"> <fl:fieldRead name="Campaign" property="CpgDept" bean="true" href="true" disp="<%= flRequest.computeURL(\"/read_department.fl\",true,false,false) %>"/> <fl:fieldRead name="Campaign" property="CpgEnt"/> </table> </td> </tr> <tr class="ligne_separation"><td colspan="3"></td></tr> </table> <fl:notes name="EntNotes" title="<%= Utils.getMessage(session, \"F2024\", \"Notes\") %>" nbPix="30"><fl:getProperty name="Contribution" property="CtbNotes" alt=""/></fl:notes> </fl:bigTabs> <% /****************************************************************************** * * * m.ichahane@e-deal.ma : 2006/08/29 10:11:25 : Mustapha * * *****************************************************************************/ %>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de