<%@page import="com.edeal.frontline.GeoLocalizable"%> <% /****************************************************************************** * 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.navigation.FlRequest" %> <%@ page import="com.edeal.frontline.FlContext" %> <%@ page import="com.edeal.frontline.Utils" %> <%@ page import="com.edeal.frontline.FieldNotInitializedException" %> <%@ page import="com.edeal.frontline.DataDictionary" %> <%@ page import="com.edeal.frontline.EnterpriseBean" %> <%@ page import="java.util.Date" %> <%@ page import="java.util.Hashtable" %> <%@ page import="com.edeal.frontline.FrontlineException" %> <%@ page import="com.edeal.frontline.LocationBean" %> <%@ page import="java.util.Vector" %> <%@ page import="com.edeal.frontline.PersonEventBean" %> <%@ page import="com.edeal.frontline.FlLocale" %> <%@ page import="com.edeal.frontline.SalesInvestBean" %> <%@ page import="java.text.DateFormat" %> <%@ page import="org.apache.commons.lang.StringUtils" %> <%@ page import="com.edeal.frontline.initializers.PersonReadInitializer" %> <%@ page import="com.edeal.frontline.helper.ContextHelper" %> <%@ taglib uri="http://www.e-deal.com/taglib/fl" prefix="fl" %> <%@ taglib uri="http://www.e-deal.com/taglib/ft" prefix="ft" %> <% 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 = Person.getID(); } catch (FieldNotInitializedException e) { } String Ad1 = null; try { Ad1 = Person.getPerAd1(); } catch(FieldNotInitializedException e) { } String oppType = null; try{ oppType = dico.getRefIdByCode("OppStoID", "ORD"); }catch(FrontlineException e){ oppType = ""; } String Ad2 = null; try { Ad2 = Person.getPerAd2(); } catch(FieldNotInitializedException e) { } String Ad3 = null; try { Ad3 = Person.getPerAd3(); } catch(FieldNotInitializedException e) { } String PerZip = null; try { PerZip = Person.getPerZip(); } catch(FieldNotInitializedException e) { } String PerCity = null; try { PerCity = Person.getPerCity(); } catch(FieldNotInitializedException e) { } boolean defaut = false; try { defaut = Person.isPerPersonalAddressDefault(); } catch (FieldNotInitializedException e) { } //paramètres de config String salesModel = context.getContextParameter("SalesModel"); String personAddress = context.getContextParameter("PersonAddress"); String personScoring = context.getContextParameter("PersonScoring"); StringBuffer fullName = new StringBuffer(); if (id != null) { String val; try { val = Person.getPerCivID(); fullName.append(dico.getRefDisp(session, "PerCivID", val) + " "); } catch (FieldNotInitializedException e) { } try { val = Person.getPerFstName(); fullName.append(val + " "); } catch (FieldNotInitializedException e) { } try { val = Person.getPerName(); fullName.append(val + " "); } catch (FieldNotInitializedException e) { } } String fullNameFormatted = Utils.formatToJavascript(fullName.toString()).trim(); boolean hasEnterprise = false; if (!"B2C".equalsIgnoreCase(salesModel)) { try { EnterpriseBean enterprise = Person.getPerEnterprise(); hasEnterprise = true; pageContext.setAttribute("Enterprise", enterprise); } catch (FieldNotInitializedException e) { } } boolean hasPersonalAddress = (Ad1 != null)||(Ad2 != null)||(Ad3 != null); String defaultString = "
(" + Utils.getMessage(session, "L207A", "Par défaut") + ")"; boolean haveBothAddys = hasEnterprise && hasPersonalAddress; if (!hasEnterprise && !hasPersonalAddress) { if ("NO".equalsIgnoreCase(personAddress)) hasEnterprise = true; else hasPersonalAddress = true; } Vector vectPeh = (Vector) request.getAttribute("vectPeh"); if (vectPeh == null) { vectPeh = new Vector(); } String entLink = null; if (hasEnterprise) { EnterpriseBean ent = Person.getPerEnterprise(); StringBuffer buf = new StringBuffer(); buf.append(" - "); buf.append("" + ent.getEntCorpName() + ""); entLink = buf.toString(); } String SfwID = flRequest.getRequestParameterOrAttribute("SfwID"); if (SfwID == null) { SfwID = ""; } String perMailStatusStr = (String)request.getAttribute(PersonReadInitializer.PER_MAIL_STATUS_STR); String perFaxStatusStr = (String)request.getAttribute(PersonReadInitializer.PER_FAX_STATUS_STR); String perFstName = null; try { perFstName = Person.getPerFstName(); } catch (FieldNotInitializedException e) { } String perName = null; try { perName = Person.getPerName(); } catch (FieldNotInitializedException e) { } String nameKey = ""; nameKey = perFstName != null ? perFstName + "+" + perName : perName; Vector nameVect = null, urlVect = null, iconVect = null, accountVect = null; try { nameVect = dico.getRefList("Mrp", "Te1"); urlVect = dico.getRefList("Mrp", "Te2"); iconVect = dico.getRefList("Mrp", "Te3"); accountVect = dico.getRefList("Mrp", "Nu1"); } catch (FrontlineException fe){ } String perFctParentID = null; if (ContextHelper.hasMultifunction(context)) { try { perFctParentID = Person.getPerFctParentID(); } catch (FieldNotInitializedException e){ } } //Geolocalize enterprise address boolean isEnterpriseGeoLocalized = false; EnterpriseBean geoLocalizableEnterprise = null; if (hasEnterprise) { geoLocalizableEnterprise = Person.getPerEnterprise(); try { geoLocalizableEnterprise.getEntGeoCodeStatusID(); isEnterpriseGeoLocalized = true; } catch (FieldNotInitializedException e) { } } //Geolocalize person address boolean isPersonGeoLocalized = true; try { Person.getPerGeoCodeStatusID(); } catch (FieldNotInitializedException e) { isPersonGeoLocalized = false; } //Geolocalize location address boolean isLocationGeoLocalized = false; LocationBean geoLocalizableLocation = null; String perLocID = null; try { perLocID = Person.getPerLocID(); try { geoLocalizableLocation = new LocationBean(perLocID, context); geoLocalizableLocation.getLocGeoCodeStatusID(); isEnterpriseGeoLocalized = true; } catch (FieldNotInitializedException e) { } catch (Exception e) { logger.error("Exception when getting location ", e); } } catch (FieldNotInitializedException e) { } String perTitle = null; try { perTitle = Person.getPerTitle(); } catch (FieldNotInitializedException e) { } String perFctID = null; try { perFctID = Person.getPerFctID(); } catch (FieldNotInitializedException e) { } // l'id de la fonction "guest" String guestFctID; try { guestFctID = dico.getRefIdByCode("PerFctID", "GST"); } catch (FieldNotInitializedException e) { guestFctID = ""; } %> " objectTitle="<%= Utils.getMessage(session, \"F002E\", false, true, \"Personne\") %>" ou="/read_person.fl">
<%-- <% if (ContextHelper.hasMultifunction(context)) { %> <% } %> --%>
<%= fullName.toString() %> <%@include file="/sales/person/socialNetWorkLinkList.jsp" %>
<% if (ContextHelper.hasMultifunction(context)) { if (perTitle != null) { %> "/> <% } else if (perFctID != null) { %> "/> <% } } else { if (perTitle != null) { %> "/> <% } else if (perFctID != null) { %> "/> <% } } %> <%-- depuis le --%> <%-- jusqu'au --%>
" nbPix="32"> " onselect="refreshFcts();"> " /> " onselect="refreshCorrs();"> "> <%--
" target="DIALOG" url='emailing_reactions.fl' options='{"id":"emailReactionLinkDialog", "title":"", "parameters":{"id": "<%= id %>"}, "width":"600", "height":"300", "resizable": false, "draggable": true, "modal": false }' >  /  " target="DIALOG" url='list_log_web.fl' options='{"id":"webSiteVisitLinkDialog", "title":"", "parameters":{"id": "<%= id %>"}, "width":"600", "height":"300", "resizable": false, "draggable": true, "modal": false }' >
--%>
<%if( !guestFctID.equalsIgnoreCase(perFctID)) { %> " onselect="refreshContrs();"> "/> <%} %> " onselect="refreshOpps();"> "/> <%if( guestFctID.equalsIgnoreCase(perFctID)) { %> " onselect="refreshCmdccs();"> "> <% } %> " onselect="refreshReservs();"> " /> " onselect="refreshCards();refreshChqs();refreshTrans();">
"/>
"/>
"/>
" onselect="refreshSols();"> "/>