Edit C:\Users\Administrator\Desktop\Back\galaxie - Copy\sales\expenseFile\read_action.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.AccessControlManager" %><%@ page import="com.edeal.frontline.PersonBean" %><%@ page import="com.edeal.frontline.LocationBean" %><%@ page import="com.edeal.frontline.InteractionBean" %><%@ page import="com.edeal.frontline.OpportunityBean" %><%@ page import="java.lang.reflect.Method" %><%@ page import="com.edeal.frontline.DataDictionary" %><%@ page import="com.edeal.frontline.ActorBean" %><%@ page import="com.edeal.frontline.AccessDeniedException" %><%@ page import="java.util.Date" %><%@ page import="com.edeal.frontline.FieldNotInitializedException" %><%@ page import="com.edeal.frontline.FlContext" %><%@ page import="com.edeal.frontline.Utils" %><%@taglib uri="http://www.e-deal.com/taglib/fl" prefix="fl" %> <jsp:useBean class="com.edeal.frontline.ExpenseFileBean" id="ExpenseFile" scope="request"/> <% String id; try { id = ExpenseFile.getID(); } catch (Exception e) { id = null; } 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 customPackage = context.getContextParameter("CustomPackage"); String redact = dico.getRefIdByCode("ExfEfsID", "REDACT"); String valact = dico.getRefIdByCode("ExfEfsID", "VALACT"); String valman = dico.getRefIdByCode("ExfEfsID", "VALMAN"); String valcom = dico.getRefIdByCode("ExfEfsID", "VALCOM"); String actID = (String) session.getAttribute("actorID"); ActorBean actor = null; try { actor = new ActorBean(actID, session); } catch (AccessDeniedException ade) { } String exfActID = null; String actManager = null; try { exfActID = ExpenseFile.getExfActID(); ActorBean creator = null; creator = new ActorBean(exfActID, session); actManager = creator.getActManager(); } catch (Exception ade) { } String exfEfsID = null; Date exfEmitDate = null; Date exfMangerDate = null; Date exfAccountDate = null; try { exfEfsID = ExpenseFile.getExfEfsID(); exfEmitDate = ExpenseFile.getExfEmitDate(); exfMangerDate = ExpenseFile.getExfMangerDate(); exfAccountDate = ExpenseFile.getExfAccountDate(); } catch (FieldNotInitializedException fnie) { } String exfEmitDateWeb = ""; String exfMangerDateWeb = ""; String exfAccountDateWeb = ""; if (exfEmitDate != null) { exfEmitDateWeb = Utils.formatToWebDate(session, exfEmitDate, false); } if (exfMangerDate != null) { exfMangerDateWeb = Utils.formatToWebDate(session, exfMangerDate, false); } if (exfAccountDate != null) { exfAccountDateWeb = Utils.formatToWebDate(session, exfAccountDate, false); } boolean isAccountant; try { isAccountant = ((Boolean)flRequest.getAttribute("isAccountant")).booleanValue(); } catch (Exception e) { isAccountant = false; } isAccountant = true; boolean isAdmin; try { isAdmin = ((Boolean)flRequest.getAttribute("isAdmin")).booleanValue(); } catch (Exception e) { isAdmin = false; } boolean isManager = actID.equals(actManager) ? true : false; String today = Utils.formatToWebDate(session, new Date(), false); %> <script type="text/javascript" language="javascript"> function doDelete() { if (window.confirm('<fl:getMessage code="M2004" alt="Etes-vous sûr de vouloir supprimer?" js="true"/>') == true) { window.location = '<fl:link url="<%= \"/delete_expenseFile.fl\" + ( id != null ? \"?id=\" + id : \"\") %>"/>'; } } function doValidate(exfEfsID) { mf = document.forms[0]; mf.ExfEfsID.value = exfEfsID; if (exfEfsID == '<%= valact %>') { mf.ExfEmitDate.value = '<%= today %>'; } if (exfEfsID == '<%= valman %>') { mf.ExfMangerDate.value = '<%= today %>'; } if (exfEfsID == '<%= valcom %>') { mf.ExfAccountDate.value = '<%= today %>'; } mf.submit(); } function doRefuse(exfEfsID) { mf = document.forms[0]; mf.ExfMangerDate.value = ''; mf.ExfAccountDate.value = ''; if (exfEfsID == '<%= valact %>') { mf.ExfEfsID.value = '<%= redact %>'; mf.ExfEmitDate.value = ''; } else { mf.ExfEfsID.value = '<%= valact %>'; } mf.submit(); } function doPrint(exfEfsID) { window.open('<fl:webapp/>/marketing/document/pop_up.jsp?idObj=<%= id %>&object=ExpenseFile','WordPP','menubar=no,status=no,toolbar=no,scrollbars=yes,resizable=yes,width=640,height=480'); } </script> <form method="post" action="<fl:link url="<%= \"/save_expenseFile.fl?type=ExpenseFile&id=\" + id %>" />"> <input type="hidden" name="$$presentFields"> <input type="hidden" name="ExfEfsID" value=""> <input type="hidden" name="ExfEmitDate" value="<%= exfEmitDateWeb %>"> <input type="hidden" name="ExfMangerDate" value="<%= exfMangerDateWeb %>"> <input type="hidden" name="ExfAccountDate" value="<%= exfAccountDateWeb %>"> </form> <% if ((actID.equals(exfActID) && redact.equals(exfEfsID)) || (isManager && valact.equals(exfEfsID)) || (isAccountant && valman.equals(exfEfsID)) || isAdmin) { %> <fl:access name="ExpenseFile" operation="edit"> <tr> <td class="actions_cell_left"></td> <td> <div class="actions_tablecell_1"> <a href="<fl:link list="true" url="<%= \"/edit_expenseFile.fl\" + ( id != null ? \"?id=\" + id : \"\") %>"/>"> <p class="actions_tabletext"><fl:getMessage code="A0008" alt="Modifier"/></p> </a> </div> </td> <td class="actions_cell_right"></td> </tr> </fl:access> <% } %> <% if (redact.equals(exfEfsID) || valcom.equals(exfEfsID)) { if ((actID.equals(exfActID) && redact.equals(exfEfsID)) || isAdmin) { %> <fl:access name="ExpenseFile" operation="delete"> <tr> <td class="actions_cell_left"></td> <td class="actions_tablecell_seperator"></td> <td class="actions_cell_right"></td> </tr> <tr> <td class="actions_cell_left"></td> <td> <div class="actions_tablecell_1"> <a href="javascript:doDelete()"> <p class="actions_tabletext"><fl:getMessage code="A0007" alt="Supprimer"/></p> </a> </div> </td> <td class="actions_cell_right"></td> </tr> </fl:access> <% } } %> <% if (!actID.equals(exfActID) && valman.equals(exfEfsID) && isAccountant) { %> <fl:access name="ExpenseFile" operation="edit"> <tr> <td class="actions_cell_left"></td> <td class="actions_tablecell_seperator"></td> <td class="actions_cell_right"></td> </tr> <tr> <td class="actions_cell_left"></td> <td> <div class="actions_tablecell_1"> <a href="javascript:doValidate('<%= valcom %>');"> <p class="actions_tabletext"><fl:getMessage code="A2001" alt="Valider"/></p> </a> </div> </td> <td class="actions_cell_right"></td> </tr> </fl:access> <% } %> <% if (!actID.equals(exfActID) && valact.equals(exfEfsID) && isManager) { %> <fl:access name="ExpenseFile" operation="edit"> <tr> <td class="actions_cell_left"></td> <td class="actions_tablecell_seperator"></td> <td class="actions_cell_right"></td> </tr> <tr> <td class="actions_cell_left"></td> <td> <div class="actions_tablecell_1"> <a href="javascript:doValidate('<%= valman %>');"> <p class="actions_tabletext"><fl:getMessage code="A2001" alt="Valider"/></p> </a> </div> </td> <td class="actions_cell_right"></td> </tr> </fl:access> <% } %> <% if (actID.equals(exfActID) && redact.equals(exfEfsID)) { %> <fl:access name="ExpenseFile" operation="edit"> <tr> <td class="actions_cell_left"></td> <td class="actions_tablecell_seperator"></td> <td class="actions_cell_right"></td> </tr> <tr> <td class="actions_cell_left"></td> <td> <div class="actions_tablecell_1"> <a href="javascript:doValidate('<%= valact %>');"> <p class="actions_tabletext"><fl:getMessage code="A2001" alt="Valider"/></p> </a> </div> </td> <td class="actions_cell_right"></td> </tr> </fl:access> <% } %> <% if (!actID.equals(exfActID) && ((valact.equals(exfEfsID) && isManager) || (valman.equals(exfEfsID) && isAccountant))) { if (!isManager || !valact.equals(exfEfsID)) { %> <fl:access name="ExpenseFile" operation="edit"> <tr> <td class="actions_cell_left"></td> <td class="actions_tablecell_seperator"></td> <td class="actions_cell_right"></td> </tr> <tr> <td class="actions_cell_left"></td> <td> <div class="actions_tablecell_1"> <a href="javascript:doRefuse('<%= exfEfsID %>');" title="<fl:getMessage code="L6156" alt="Refus et précédent"/>"> <p class="actions_tabletext"><fl:getMessage code="L6156" alt="Refus et précédent"/></p> </a> </div> </td> <td class="actions_cell_right"></td> </tr> </fl:access> <% } %> <fl:access name="ExpenseFile" operation="edit"> <tr> <td class="actions_cell_left"></td> <td class="actions_tablecell_seperator"></td> <td class="actions_cell_right"></td> </tr> <tr> <td class="actions_cell_left"></td> <td> <div class="actions_tablecell_1"> <a href="javascript:doRefuse('<%= valact %>');" title="<fl:getMessage code="L6157" alt="Refus et émetteur"/>"> <p class="actions_tabletext"><fl:getMessage code="L6157" alt="Refus et émetteur"/></p> </a> </div> </td> <td class="actions_cell_right"></td> </tr> </fl:access> <% } %> <% if (!actID.equals(exfActID) && isAccountant) { %> <tr> <td class="actions_cell_left"></td> <td class="actions_tablecell_seperator"></td> <td class="actions_cell_right"></td> </tr> <tr> <td class="actions_cell_left"></td> <td> <div class="actions_tablecell_1"> <a href="javascript:doRefuse('<%= valact %>');" title="<fl:getMessage code="L6157" alt="Refus et émetteur"/>"> <p class="actions_tabletext"><fl:getMessage code="L6157" alt="Refus et émetteur"/></p> </a> </div> </td> <td class="actions_cell_right"></td> </tr> <% } %>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de