<% /****************************************************************************** * 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.FieldNotInitializedException" %> <%@ page import="com.edeal.frontline.Utils" %> <%@ page import="com.edeal.frontline.DataDictionary" %> <%@ page import="java.text.DecimalFormat" %> <%@ page import="com.edeal.frontline.FlLocale" %> <%@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(); String SfwID = flRequest.getRequestParameterOrAttribute("SfwID"); DataDictionary dico = context.getDataDictionary(); String id = null; try { id = Stage.getID(); } catch (FieldNotInitializedException fnie) { } //intilisation int nbContactEst = 0; int nbContactReal = 0; int nbContactDiffN = 0; //récupération des attributs try { nbContactEst = Stage.getStgContactEst(); } catch(FieldNotInitializedException e) { e.printStackTrace(System.err); } try { nbContactReal = Stage.getStgContactReal(); } catch(FieldNotInitializedException e) { } //calcul de la différebce nbContactDiffN = nbContactReal - nbContactEst; DecimalFormat intFormat = FlLocale.getInstance(session).getDecimalFormat("#,##0;- #,##0"); DecimalFormat floatFormat = FlLocale.getInstance(session).getDecimalFormat("#,##0.00;- #,##0.00"); %> " listTitle="<%= Utils.getMessage(session, \"L65C7\", \"Fiche etape\") %>" ou="<%= \"/read_stage.fl\" + (id != null ? \"?id=\" + id : \"\") %>">

"/>
" nbPix="30">
">
" />
 
<%= intFormat.format(nbContactEst).trim() %>  <%= intFormat.format(nbContactReal).trim() %>  <%= intFormat.format(nbContactDiffN).trim() %> 
" visible="<%= context.getAutoDisplayManager().hasEntry(\"Stage\", \"Etape 1\") %>"> "> <% float fixedCostEst = 0; float fixedCostReal = 0; float fixedCostDiffN = 0; double fixedCostDiffP = 0; try { fixedCostEst = Stage.getStgFixedCostEst(); } catch(FieldNotInitializedException e) { } try { fixedCostReal = Stage.getStgFixedCostReal(); } catch(FieldNotInitializedException e) { } fixedCostDiffN = fixedCostReal - fixedCostEst; if (fixedCostEst != 0) { fixedCostDiffP = ((double)fixedCostDiffN / (double)fixedCostEst) * 100; } %> <% float contactCostEst = 0; float contactCostReal = 0; float contactCostDiffN = 0; double contactCostDiffP = 0; try { contactCostEst = Stage.getStgContactCostEst(); } catch(FieldNotInitializedException e) { } try { contactCostReal = Stage.getStgContactCostReal(); } catch(FieldNotInitializedException e) { } contactCostDiffN = contactCostReal - contactCostEst; if (contactCostEst != 0) { contactCostDiffP = ((double)contactCostDiffN / (double)contactCostEst) * 100; } %> <% float totalCostEst = fixedCostEst + (contactCostEst * nbContactEst); float totalCostReal = fixedCostReal + (contactCostReal * nbContactReal); float totalCostDiffN = totalCostReal - totalCostEst; double totalCostDiffP = 0; if (totalCostEst!=0) { totalCostDiffP = ((double)totalCostDiffN / (double)totalCostEst) * 100; } %>
<%= floatFormat.format(fixedCostEst).trim() %> €  <%= floatFormat.format(fixedCostReal).trim() %> €  <%= floatFormat.format(fixedCostDiffN).trim() %> € : <%= floatFormat.format(fixedCostDiffP).trim() %> % 
<%= floatFormat.format(contactCostEst).trim() %> €  <%= floatFormat.format(contactCostReal).trim() %> €  <%= floatFormat.format(contactCostDiffN).trim() %> € : <%= floatFormat.format(contactCostDiffP).trim() %> % 
<%= floatFormat.format(totalCostEst).trim() %> €  <%= floatFormat.format(totalCostReal).trim() %> €  <%= floatFormat.format(totalCostDiffN).trim() %> € : <%= floatFormat.format(totalCostDiffP).trim() %> % 
"> <% float est = 0; float reel = 0; float diffN = 0; double diffP = 0; try { est = Stage.getStgIndicEst1(); } catch(FieldNotInitializedException e) { } try { reel = Stage.getStgIndicReal1(); } catch(FieldNotInitializedException e) { } diffN = reel - est; if (est != 0) { diffP = ((double)diffN / (double)est) * 100; } String unit1 = ""; try { String tmpUnit = (String)dico.getRefDisp(session, "StgIndicUnit1", Stage.getStgIndicUnit1()); if (tmpUnit != null) { unit1 = " " + tmpUnit; } else { logger.error("StgIndicUnit1 is not specified"); } } catch (FieldNotInitializedException e) { } %> <% est = 0; reel = 0; diffN = 0; diffP = 0; try { est = Stage.getStgIndicEst2(); } catch(FieldNotInitializedException e) { } try { reel = Stage.getStgIndicReal2(); } catch(FieldNotInitializedException e) { } diffN = reel - est; if (est != 0) { diffP = ((double)diffN / (double)est) * 100; } String unit2 = ""; try { String tmpUnit = (String)dico.getRefDisp(session, "StgIndicUnit2", Stage.getStgIndicUnit2()); if (tmpUnit != null) { unit2 = " " + tmpUnit; } else { logger.error("StgIndicUnit2 is not specified"); } } catch (FieldNotInitializedException e) { } %> <% est = 0; reel = 0; diffN = 0; diffP = 0; try { est = Stage.getStgIndicEst3(); } catch(FieldNotInitializedException e) { } try { reel = Stage.getStgIndicReal3(); } catch(FieldNotInitializedException e) { } diffN = reel - est; if (est != 0) { diffP = ((double)diffN / (double)est) * 100; } String unit3 = ""; try { String tmpUnit = (String)dico.getRefDisp(session, "StgIndicUnit3", Stage.getStgIndicUnit3()); if (tmpUnit != null) { unit3 = " " + tmpUnit; } else { logger.error("StgIndicUnit3 is not specified"); } } catch (FieldNotInitializedException e) { } %> <% est = 0; reel = 0; diffN = 0; diffP = 0; try { est = Stage.getStgIndicEst4(); } catch(FieldNotInitializedException e) { } try { reel = Stage.getStgIndicReal4(); } catch(FieldNotInitializedException e) { } diffN = reel - est; if (est != 0) { diffP = ((double)diffN / (double)est) * 100; } String unit4 = ""; try { String tmpUnit = (String)dico.getRefDisp(session, "StgIndicUnit4", Stage.getStgIndicUnit4()); if (tmpUnit != null) { unit4 = " " + tmpUnit; } else { logger.error("StgIndicUnit4 is not specified"); } } catch (FieldNotInitializedException e) { } %> <% est = 0; reel = 0; diffN = 0; diffP = 0; try { est = Stage.getStgIndicEst5(); } catch(FieldNotInitializedException e) { } try { reel = Stage.getStgIndicReal5(); } catch(FieldNotInitializedException e) { } diffN = reel - est; if (est != 0) { diffP = ((double)diffN / (double)est) * 100; } String unit5 = ""; try { String tmpUnit = (String)dico.getRefDisp(session, "StgIndicUnit5", Stage.getStgIndicUnit5()); if (tmpUnit != null) { unit5 = " " + tmpUnit; } else { logger.error("StgIndicUnit5 is not specified"); } } catch (FieldNotInitializedException e) { } %>
<%= floatFormat.format(est).trim() %><%= unit1 %>  <%= floatFormat.format(reel).trim() %><%= unit1 %>  <%= floatFormat.format(diffN).trim() %><%= unit1 %> : <%= floatFormat.format(diffP).trim() %>% 
<%= floatFormat.format(est).trim() %><%= unit2 %>  <%= floatFormat.format(reel).trim() %><%= unit2 %>  <%= floatFormat.format(diffN).trim() %><%= unit2 %> : <%= floatFormat.format(diffP).trim() %>% 
<%= floatFormat.format(est).trim() %><%= unit3 %>  <%= floatFormat.format(reel).trim() %><%= unit3 %>  <%= floatFormat.format(diffN).trim() %><%= unit3 %> : <%= floatFormat.format(diffP).trim() %>% 
<%= floatFormat.format(est).trim() %><%= unit4 %>  <%= floatFormat.format(reel).trim() %><%= unit4 %>  <%= floatFormat.format(diffN).trim() %><%= unit4 %> : <%= floatFormat.format(diffP).trim() %>% 
<%= floatFormat.format(est).trim() %><%= unit5 %>  <%= floatFormat.format(reel).trim() %><%= unit5 %>  <%= floatFormat.format(diffN).trim() %><%= unit5 %> : <%= floatFormat.format(diffP).trim() %>% 
">