<%@page import="com.edeal.frontline.EventBean"%> <%@page import="com.edeal.frontline.OpportunityBean"%> <%@page import="com.edeal.frontline.PersonEventBean"%> <%@page import="com.edeal.frontline.helper.InteractionBaseHelper"%> <%@page import="com.edeal.frontline.helper.InteractionBaseHelper.ContextObjectInformation"%> <%@page import="java.util.HashMap"%> <%@page import="com.edeal.frontline.ObjectsBean"%> <%@page import="com.edeal.frontline.AttachmentBean"%> <% /****************************************************************************** * Copyright (c) 2000-2013 E-DEAL * * E-DEAL S.A. * 41, rue Périer * 92120 Montrouge * France * * T: +33 (0)1 73 03 29 80 * 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.MessagesBean" %> <%@ page import="com.edeal.frontline.FrontlineException" %> <%@ page import="com.edeal.frontline.navigation.FlRequest" %> <%@ page import="com.edeal.frontline.FlContext" %> <%@ page import="com.edeal.frontline.Utils" %> <%@ page import="com.edeal.frontline.FieldNotInitializedException" %> <%@ page import="java.util.Date" %> <%@ page import="java.util.Vector" %> <%@ page import="java.util.Iterator" %> <%@ page import="java.util.Hashtable" %> <%@ page import="com.edeal.frontline.SalesInvestBean" %> <%@ page import="com.edeal.frontline.FlLocale" %> <%@ page import="com.edeal.frontline.DataDictionary" %> <%@ page import="com.edeal.frontline.grid.functions.InteractionSyntaxActions" %> <%@ page import="com.edeal.frontline.helper.ContextHelper" %> <%@ taglib uri="http://www.e-deal.com/taglib/fl" prefix="fl" %> <% EventBean event = (EventBean) request.getAttribute("event"); EventBean eventFromPersonEvent = (EventBean) request.getAttribute("eventFromPersonEvent"); OpportunityBean opportunity = (OpportunityBean) request.getAttribute("opportunity"); PersonEventBean personEvent = (PersonEventBean) request.getAttribute("personEvent"); 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(); InteractionBaseHelper ibh = new InteractionBaseHelper(Interaction); HashMap contextObjectInformation = ibh.getContextObjectInformation(); String typeInterID = ""; String typeInteraction = ""; String titreFen = ""; String codetitreFen = ""; Vector reservationsIDs = null; String resaIDs = ""; Vector todosIDs = null; String tdIDs = ""; Vector correspondancesIDs = null; String corrIDs = ""; try{ reservationsIDs = (Vector)Interaction.getCustomProperty("IntReserv_"); resaIDs = Utils.implodeList(reservationsIDs, ";"); } catch (FieldNotInitializedException e){ } try{ typeInterID = (String)Interaction.getCustomProperty("IntType_"); }catch(FieldNotInitializedException e){ typeInterID = ""; } if(typeInterID.equals(dico.getRefIdByCode("IntType_", "ACT"))){ titreFen = "Todo"; codetitreFen ="FF072"; typeInteraction = "TODO"; try{ correspondancesIDs = (Vector)Interaction.getCustomProperty("IntCorr_"); corrIDs = Utils.implodeList(correspondancesIDs, ";"); } catch (FieldNotInitializedException e){ } } else if (typeInterID.equals(dico.getRefIdByCode("IntType_", "COR"))){ titreFen = "Correspondance"; codetitreFen ="FF09A"; typeInteraction = "CORR"; try{ todosIDs = (Vector)Interaction.getCustomProperty("IntTodo_"); tdIDs = Utils.implodeList(todosIDs, ";"); } catch (FieldNotInitializedException e){ } } else { titreFen = "Interaction"; codetitreFen ="L30B2"; } String id = null; try { id = Interaction.getID(); } catch (FieldNotInitializedException fnie) { } FlLocale locale = FlLocale.getInstance(session); boolean has5columns = Interaction.hasPlaceDisplay() || Interaction.hasOperationDisplay(); Date today = new Date(); long retard = 0; Date dateInt = null; try { dateInt = Interaction.getIntDate(); retard = (today.getTime() - dateInt.getTime()) / 86400000; } catch (FieldNotInitializedException ex) { } long dureeH = 0; long dureeM = 0; Date begHour = null; Date endHour = null; try { begHour = Interaction.getIntTimeBeg(); } catch (FieldNotInitializedException ex) { } try { endHour = Interaction.getIntTimeEnd(); } catch (FieldNotInitializedException ex) { } long dureeMin = 0; if(begHour != null && endHour != null) { dureeMin = (endHour.getTime() - begHour.getTime()) / 60000; dureeH = dureeMin / 60; dureeM = dureeMin % 60; } String statusId = null; try { statusId = Interaction.getIntStiID(); } catch (FieldNotInitializedException ex) { } String status = ""; try { status = dico.getRefCode("IntStiID", statusId); } catch (FrontlineException ex) { logger.error("Error occurred during int status recovering with int status id '"+statusId+"'",ex); } //category code String catCode = null; try{ catCode = (String) dico.getRefDisp("Acv", "Te2", Interaction.getIntAtvID()); } catch (FrontlineException e){ } //category code String subCatCode = null; try{ subCatCode = (String) dico.getRefCode("Acv", null, Interaction.getIntAtvID()); } catch (FrontlineException e){ } boolean isIntExceptionalCostActive = SalesInvestBean.isIntExceptionalCostActive(context); String activite = null; try { activite = Interaction.getIntAtvID(); } catch (FieldNotInitializedException fnie) { } String cpgID = null; try { cpgID = Interaction.getIntCpgID(); } catch (FieldNotInitializedException fnie) { } String intPlace = null; try { intPlace = Interaction.getIntPlace(); } catch (FieldNotInitializedException fnie) { } Vector corresList = null; try { corresList = Interaction.getIntCorID(); } catch (FieldNotInitializedException fnie) { } String intReport = null; try { intReport = Interaction.getIntReport(); } catch (FieldNotInitializedException fnie) { } intReport = intReport == null ? "" : intReport; boolean isGeoLocalized = true; try { Interaction.getIntGeoCodeStatusID(); } catch (FieldNotInitializedException e) { isGeoLocalized = false; } %> "> " nbPix="32"> <%---------------------- Seulement si c'est une TODO------------------------%> <% if(typeInteraction.equals("TODO")){%> " /> <%}%> <%---------------------- Seulement si c'est une Correspondance------------------------%> <% if(typeInteraction.equals("CORR")){%> " /> <%}%> " > <%---------------------- Seulement si c'est une Correspondance------------------------%> <% if(typeInteraction.equals("CORR")){%> " /> <%}%> <%---------------------- Seulement si c'est une Correspondance------------------------%>
<%} else { if(typeInteraction.equals("CORR")){%> <%}%> <% } %> <%---------------------- Tester s'il faut afficher la liste des correspondants en dehors du cas d'une TODO------------------------%> <% String correspondents = ""; if(typeInteraction.equals("CORR")){ correspondents = InteractionSyntaxActions.getIntCorrespondentHtml(session,context,id); %> "/> <%} %> <%---------------------- Seulement si c'est une TODO------------------------%> <% if(typeInteraction.equals("TODO")){%> <%}%> <%---------------------- Seulement si c'est une TODO------------------------%>
<% if (Interaction.hasTimePeriodDisplay()) { String begHourS = Utils.formatToWebTime(session, begHour, true); String endHourS = Utils.formatToWebTime(session, endHour, true); boolean isMorning = false; boolean isAfternoon = false; boolean isAllDay = false; if ("08:30:00".equals(begHourS) && "12:00:00".equals(endHourS)) { isMorning = true; } else if ("14:00:00".equals(begHourS) && "17:30:00".equals(endHourS)) { isAfternoon = true; } else if ("08:30:00".equals(begHourS) && "17:30:00".equals(endHourS)) { isAllDay = true; } if (isMorning) { %> <% } else if (isAfternoon) { %> <% } else if (isAllDay) { %> <% } %>
<%=correspondents%>
"/>