Edit C:\Users\Administrator\Desktop\Back\galaxie - Copy\sales\contrat_\read.jsp
<%@page import="java.util.Hashtable"%> <%@page import="com.edeal.frontline.FrontlineException"%> <%/****************************************************************************** * 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.DataDictionary" %> <%@ page import="com.edeal.frontline.FieldNotInitializedException" %> <%@ page import="com.edeal.frontline.FrontlineException" %> <%@ page import="com.edeal.frontline.custom.Contrat_Bean"%> <%@page import="com.edeal.frontline.helper.Contrat_BaseHelper"%> <%@ page import="com.edeal.frontline.Utils" %> <%@ page import="java.util.Vector" %> <%@taglib uri="http://www.e-deal.com/taglib/fl" prefix="fl" %> <jsp:useBean class="com.edeal.frontline.custom.Contrat_Bean" id="Contrat_" scope="request"/> <link href="<fl:webapp/>/css/smalltabs_css.jsp" rel="stylesheet" type="text/css"> <link rel="stylesheet" type="text/css" href="<fl:webapp/>/css/common_css.jsp"> <% 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; boolean isTaciteRec = false; boolean isLocationEnseigne = false; boolean afficherChampCtrPrincipal = false; boolean afficherChampsContratsAffilies = false; String typeContrat = null; try { id = Contrat_.getID(); } catch (FieldNotInitializedException fnie) {} try { isTaciteRec = Contrat_.isCt_TaciteRecond(); } catch (FieldNotInitializedException fnie) { } String ct_TypeContrat = null; try { ct_TypeContrat = Contrat_.getCt_TypeContrat(); } catch (FieldNotInitializedException e){ } try { isLocationEnseigne = Contrat_.isCt_LocationEnseigne(); } catch (FieldNotInitializedException fnie) { } try { typeContrat = (String)dico.getRefCode("Ct_TypeContrat", Contrat_.getCt_TypeContrat()); } catch (FieldNotInitializedException fnie) { } catch (FrontlineException fle) { } String modeReglement=null; try { modeReglement = dico.getRefIdByCode("Mg_", "Te1", "MS"); } catch (Exception e) { modeReglement = ""; } Contrat_Bean ct = new Contrat_Bean(id, context); String reglement = ""; try{ reglement = ct.getCt_ModeReg(); }catch (FieldNotInitializedException e) { } Boolean isPrestation = false; isPrestation = ((typeContrat != null && "PR".equals(typeContrat)) || (typeContrat != null && "FA".equals(typeContrat)) || (typeContrat != null && "PT".equals(typeContrat))); Contrat_BaseHelper contratHelper = new Contrat_BaseHelper(Contrat_); String valRestrSecondaires = contratHelper.getTypeContrats(context,"S"); String valTpesContratsAffilies = contratHelper.getTypeContratsAffilies(context,"1"); if(ct_TypeContrat != null){ String codeContrat = dico.getRefCode("Ct_TypeContrat", ct_TypeContrat); String[] tabvalRestrSecondaires = valRestrSecondaires.split(";"); String[] tabvalTpesContratsAffilies = valTpesContratsAffilies.split(";"); for(int i=0; i< tabvalRestrSecondaires.length; i++){ if(codeContrat.equals(tabvalRestrSecondaires[i])){ afficherChampCtrPrincipal = true; } } for(int i=0; i< tabvalTpesContratsAffilies.length; i++){ if(codeContrat.equals(tabvalTpesContratsAffilies[i])){ afficherChampsContratsAffilies = true; } } } String encourspros = null; try { encourspros = (String)Contrat_.getCt_Encourspros(); } catch (FieldNotInitializedException e){ encourspros = ""; } String encoursprosOUI = null; try { encoursprosOUI = (String) dico.getRefIdByCode("Ct_Encourspros", "YES"); } catch (Exception e) { encoursprosOUI =""; } %> <script type="text/javascript" language="javascript" src="<fl:webapp/>/js/presentField.js"></script> <script type="text/javascript" language="javascript" src="<fl:webapp/>/js/checkFields.jsp"></script> <script type="text/javascript" language="javascript" src="<fl:webapp/>/js/utils.js"></script> <script type="text/javascript" language="javascript"> function refreshProducts(){ _grid__CONPROD_js_.render(); } function refreshPartenaires() { _grid__CONPART_js_.render(); } function refreshSignataires() { _grid__SIGNATAIRE_js_.render(); } function refreshTodos() { _grid__CORRCON_js_.render(); } function refreshFermJur(){ _grid__FERJUR_EMB_js_.render(); } function deleteMarkedSg_(FerID) { if (confirm('<fl:getMessage code="MF0DB" alt="Etes-vous s�r de vouloir supprimer ce signataire" js="true"/>')) { doAjax('<fl:webapp/>/delete_object_ajax.fl?type=Signataire_&id=' + FerID , waitNrefreshSLSg_); } } function deleteCtrPartenaire_(CpID) { if (confirm('<fl:getMessage code="MF119" alt="Etes-vous s�r de vouloir supprimer ce partenaire" js="true"/>')) { doAjax('<fl:webapp/>/delete_object_ajax.fl?type=ContratPartenaire_&id=' + CpID , waitNrefreshCPart_); } } function waitNrefreshCPart_(arrIndex) { if(eDealXmlhttpArr[arrIndex].readyState == 4) { var rtrn = trimStr(eDealXmlhttpArr[arrIndex].responseText); if (rtrn == '') { _grid__CONPART_js_.render(); } else { hideWaiting(); alert('<fl:getMessage code="MF11A" alt="Impossible de supprimer la ligne de partenaire sel�ctionn�e." js="true"/>'); } } } function deleteMarkedFq_(FerID) { if (confirm('<fl:getMessage code="MF0DA" alt="Etes-vous s�r de vouloir supprimer cette Fermeture Juridique ?" js="true"/>')) { doAjax('<fl:webapp/>/delete_object_ajax.fl?type=FermJurid_&id=' + FerID , waitNrefreshFermJur); } } function waitNrefreshSLSg_(arrIndex) { if(eDealXmlhttpArr[arrIndex].readyState == 4) { var rtrn = trimStr(eDealXmlhttpArr[arrIndex].responseText); if (rtrn == '') { _grid__SIGNATAIRE_js_.render(); } else { hideWaiting(); alert('<fl:getMessage code="MF0DC" alt="Impossible de supprimer la ligne de signataire sel�ctionn�e." js="true"/>'); } } } function addFermJuridique() { var f = window.document.fermeturejuridique; if(f.Fq_Date.value == '') { alert('<fl:getMessage code="MF0D8" alt="Vous devez saisir la date du statut." js="true"/>'); f.Fq_Date.focus(); return; } var args = '&Fq_CtID=<%=id%>'; args += '&Type=FermJurid_'; if (f.Fq_Motif.value != '') { args += '&Fq_Motif=' + encodeURIComponent(f.Fq_Motif.value); } if (f.Fq_Date.value != '') { args += '&Fq_Date=' + encodeURIComponent(f.Fq_Date.value); } if (f.Fq_Statut.value != '') { args += '&Fq_Statut=' + encodeURIComponent(f.Fq_Statut.value); } //var ajaxURL = '<fl:link url="/save_object_ajax.fl?type=OtherGuides_&$$presentFields="/>' + args; var ajaxURL = '<fl:link url="/save_fq_ajax.fl?"/>' + args; f.Fq_Date.value = ''; showWaiting(); $.getJSON(ajaxURL, function(data) { hideWaiting(); var msg =""; var cpt = 0; $.each( data, function( key, val ) { if(cpt == 0) msg = val; else if(cpt == 1) msg += msg == "" ? "" : val + '\n'; else if(cpt == 2) msg += val; else if(cpt == 3) msg += val; else msg += "\n Message d'erreur : \n"+val; cpt ++; }); refreshFermJur(); if(msg != null && msg != undefined && msg.length != 0) alert(msg); }); } function waitNrefreshFermJur(arrIndex) { if(eDealXmlhttpArr[arrIndex].readyState == 4) { var rtrn = trimStr(eDealXmlhttpArr[arrIndex].responseText); if (rtrn == '') { refreshFermJur(); } else { hideWaiting(); alert('<fl:getMessage code="MF0D9" alt="Impossible de supprimer la fermeture sel�ctionn�e." js="true"/>'); } } } function doOnLoad() { <% if(!isPrestation) { %> refreshSignataires(); <%}%> } function Remplacerenseigne(Ct_Id, Cr_Id) { var args = '&initCt_ID=' + Ct_Id; if (Cr_Id != '') { args += '&initCr_ID=' + Cr_Id; } var ajaxURL = '<fl:link url="/remplacer_enseigne.fl?"/>' + args; doAjax(ajaxURL, waitNrefreshSLEnseignes); } function waitNrefreshSLEnseignes(arrIndex) { if(eDealXmlhttpArr[arrIndex].readyState == 4) { var rtrn = trimStr(eDealXmlhttpArr[arrIndex].responseText); if (rtrn == '') { refreshProducts(); window.scrollTo(0,1000); } else { hideWaiting(); alert('<fl:getMessage code="MF0BC" alt="Impossible de supprimer la fermeture sel�ctionn�e." js="true"/>'); } } } function doRefresh() { window.top.location.reload(); } function doTransfertReprise() { window.location = '<fl:link url="<%= \"/transferer_contrat_reprise.fl\" + ( id != null ? \"?id=\" + id : \"\") %>"/>'; } function doTransfertSansReprise() { window.location = '<fl:link url="<%= \"/transferer_contrat_refus.fl\" + ( id != null ? \"?id=\" + id : \"\") %>"/>'; } function editFermJurid(idferm){ window.location = '<fl:link url="/edit_fermjurid_.fl?id='+idferm+'" />'; } </script> <fl:bigTabs objectTitle="<%=Utils.getMessage(session, \"LF015\", \"Contrat\")%>" ou="<%= \"read_contrat_.fl\" + (id != null ? \"?id=\" + id : \"\")%>" > <table class="container" cellpadding="0"> <tr> <td colspan="5" width="100%"> <table> <tr> <td style="width: 100%" class="titreFiche"> <fl:getProperty name="Contrat_" alt="" property="Ct_NumContrat"/> </td> </tr> </table> </td> </tr> <tr class="ligne_separation"><td></td></tr> <tr> <td class="column2"> <table class="data_column" cellpadding="0"> <fl:fieldRead property="Ct_TypeContrat"/> <fl:fieldRead property="Ct_CodeContrat"/> <fl:fieldRead property="Ct_Statut"/> <fl:fieldRead property="Ct_DateSignature"/> <fl:fieldRead property="Ct_DateEffet"/> <fl:fieldRead property="Ct_DateFin"/> <tr class="fieldline"> <td id="CtVoie_label" class="dataLabel"><span style="color:#0000;font-weight: bold;"> </span></td> </tr> <% if(isTaciteRec) { %> <tr class="fieldline"> <td id="Ct_label" class="dataLabel"><fl:getMessage code="FF09E" alt="Tacite reconduction"/></td> <td id="Apercu_value" class="dataValue"><input type="checkbox" disabled="disabled" checked="checked"/></td> </tr> <fl:fieldRead property="Ct_Recurrence"/> <%} else { %> <tr class="fieldline"> <td id="Ct_label" class="dataLabel"><fl:getMessage code="FF09E" alt="Tacite reconduction"/></td> <td id="Apercu_value" class="dataValue"><input type="checkbox" disabled="disabled"/></td> </tr> <%} %> <tr class="fieldline"> <td id="CtVoie_label" class="dataLabel"><span style="color:#0000;font-weight: bold;"> </span></td> </tr> <fl:fieldRead property="Ct_ContratPrincipal" bean="true" href="true" disp="<%= flRequest.computeURL(\"/read_contrat_.fl\") %>"/> <tr class="fieldline"> <td id="CtVoie_label" class="dataLabel"><span style="color:#0000;font-weight: bold;"> </span></td> </tr> <%if(isPrestation){ %> <fl:fieldRead property="Ct_DateAlerteEch"/> <% } %> <fl:fieldRead property="Ct_ModeReg"/> <%if(reglement.equals(modeReglement)){ %> <fl:fieldRead property="Ct_NbMois"/> <fl:fieldRead property="Ct_MoisDebut"/> <% } %> </table> </td> <td class="separation"><div class="separation"></div></td> <td class="column2" > <table class="data_column" cellpadding="0"> <fl:fieldRead property="Ct_InterlocuteurPrivilegie" bean="true" href="true" disp="<%= flRequest.computeURL(\"/read_actor.fl\") %>"/> <fl:fieldRead property="Ct_DateAdhesion"/> <fl:fieldRead property="Ct_ContratHonore" valueCodeIfTrue="L2005" valueCodeIfFalse="L2006"/> <% if(!isPrestation) { %> <fl:fieldRead property="Ct_NombreChambres"/> <fl:fieldRead property="Ct_FrequenceInterface"/> <fl:fieldRead property="Ct_DateDerniereVerif"/> <fl:fieldRead property="Ct_TypeInterface"/> <%-- 29/05/2015 Mantis 26955 --%> <% if(isLocationEnseigne) { %> <tr class="fieldline"> <td id="Ct_label" class="dataLabel"><fl:getMessage code="FF0DB" alt="Pas de location d\'enseigne"/></td> <td id="Apercu_value" class="dataValue"><input type="checkbox" disabled="disabled" checked="checked"/></td> </tr> <% } else { %> <tr class="fieldline"> <td id="Ct_label" class="dataLabel"><fl:getMessage code="FF0DB" alt="Pas de location d\'enseigne"/></td> <td id="Apercu_value" class="dataValue"><input type="checkbox" disabled="disabled"/></td> </tr> <% } %> <fl:fieldRead property="Ct_DateProchAudit"/> <fl:fieldRead property="Ct_Marque" bean="true" href="true" disp="<%= flRequest.computeURL(\"/read_marque_.fl\") %>"/> <fl:fieldRead property="Ct_LoginPrincipal"/> <%} %> <fl:fieldRead property="Ct_LCBSNbPaiment_"/> </table> </td> </tr> <tr class="ligne_separation"><td></td></tr> </table> <table> <fl:fieldRead property="Ct_Commentaires"/> </table> <fl:smallTabs name="Contrat_Tabs"> <%-- <fl:sTab id="DonneesTech" title="<%= Utils.getMessage(session, \"LF060\", \"Donn�es techniques\") %>" visible="<%= isPrestation %>"> --%> <fl:sTab id="DonneesTech" title="<%= Utils.getMessage(session, \"LF060\", \"Donn�es techniques\") %>" > <table class="container" cellpadding="0"> <tr> <td class="column2"> <table class="data_column" cellpadding="0"> <fl:fieldRead property="Ct_TauxCommission"/> <fl:fieldRead property="Ct_NatureContrat"/> <fl:fieldRead property="Ct_DelaiPaiement"/> <fl:fieldRead property="Ct_Garantie" format="#,##0.##" postText=" €"/> <tr class="fieldline"> <td id="CtVoie_label" class="dataLabel"><span style="color:#0000;font-weight: bold;"> </span></td> </tr> </table> </td> <td class="separation"><div class="separation"></div></td> <td class="column2"> <table class="data_column" cellpadding="0"> <fl:fieldRead property="Ct_InterlocuteursTechniques" bean="true" href="true" disp="<%= flRequest.computeURL(\"/read_actor.fl\") %>"/> <fl:fieldRead property="Ct_StatutProcedure"/> <fl:fieldRead property="Ct_Encourspros"/> <%if(encourspros.equalsIgnoreCase(encoursprosOUI) ) {%> <fl:fieldRead property="Ct_DateEnCoursProc"/> <% } %> </table> </td> </tr> </table> </fl:sTab> <fl:sTab id="Signataires" title="<%=Utils.getMessage(session, \"LF066\", \"Signataires\") %>" onselect="refreshSignataires();"> <fl:grid name="SIGNATAIRE" ajaxUrl="<%= \"/embedded_list_ajax.fl?code=SIGNATAIRE&Sg_Contrat=\" + id %>"/> </fl:sTab> <fl:sTab id="Todos" title="<%=Utils.getMessage(session, \"LF011\", \"Todos\") %>" onselect="refreshTodos();"> <fl:grid name="CORRCON" ajaxUrl="<%= \"/embedded_list_ajax.fl?code=CORRCON&IntContratID_=\" + id %>"/> </fl:sTab> <fl:sTab id="Fichiers" title="<%=Utils.getMessage(session, \"L201C\", \"Fichiers\")%>"> <table class="container" cellpadding="0"> <tr class="fieldline"> <td> <fl:attach name="Contrat_" colID="Ct_Fichiers" edit="false"/> </td> </tr> </table> </fl:sTab> <% if(!isPrestation) { %> <fl:sTab id="Produits" title="<%= Utils.getMessage(session, \"LF349\", \"Produits\") %>" onselect="refreshProducts();"> <fl:grid name="CONPROD" ajaxUrl="<%= \"/embedded_list_ajax_ct_.fl?code=CONPROD&Cr_Contrat=\" + id %>"/> </fl:sTab> <%} %> <fl:sTab id="Partenaires" title="<%=Utils.getMessage(session, \"LF067\", \"Partenaires\") %>" onselect="refreshPartenaires();" > <fl:grid name="CONPART" ajaxUrl="<%= \"/embedded_list_ajax.fl?code=CONPART&Cp_Contrat=\" + id %>"/> </fl:sTab> <%-- Juridique --%> <% String entID = null; boolean isValid = false; Vector<Hashtable> signataires = Contrat_.getContrat_Signataires("1"); if(signataires!=null && !signataires.isEmpty()){ for(Hashtable signataire : signataires){ entID = (String)signataire.get("EntID"); String ctr = com.edeal.frontline.helper.custom.Contrat_Helper.getAffiliationCt_ID(context,entID); if(ctr == null){ isValid = false; break; } if(ctr.equals(Contrat_.getCt_ID())) isValid = true; else{ isValid = false; break; } } } %> <fl:sTab id="juridique" title="<%= Utils.getMessage(session, \"LF204\", false, true, \"Juridique\") %>" onselect="refreshFermJur();"> <table class="container" cellpadding="0"> <tr> <td> <table class="container" cellpadding="0"> <tr><td colspan="2" class="titreInterneSmalltabs"><fl:getMessage code="FF23C" alt="Fermeture juridique"/></td></tr> <tr><td colspan="3" class="dataLabel"> </td></tr> </table> <fl:access name="FermJurid_" operation="create"> <%//http://u-project2.umanis.com/view.php?id=38613 isValid = true ; %> <%if(isValid){ %> <form name="fermeturejuridique" class="fieldTable"> <table class="container" cellpadding="0"> <tr> <td> <span class="criteriaLabel"> <fl:getMessage code="FF244" alt="Statut"/> </span> <% try { Vector<Vector<String>> values = dico.getRefList(session, "Stj", "Te1"); %> <select name="Fq_Statut" id="Fq_Statut" style="background-color: #FDCBCC"> <% if (values != null) { for (Vector<String> row : values) { String refID = row.firstElement(); String refDisp = row.elementAt(1); %> <option value="<%= Utils.formatToWeb(refID, true) %>"><%= Utils.formatToWeb(refDisp, false) %></option> <% } } %> </select> <% } catch (FrontlineException fle) { } %> </td> <td width="40%"> <span class="criteriaLabel"> <fl:getMessage code="FF241" alt="Motif"/> </span> <% try { Vector<Vector<String>> values = dico.getRefList(session, "Fjd", "Te1"); %> <select name="Fq_Motif" id="Fq_Motif" style="background-color: #FDCBCC"> <% if (values != null) { for (Vector<String> row : values) { String refID = row.firstElement(); String refDisp = row.elementAt(1); %> <option value="<%= Utils.formatToWeb(refID, true) %>"><%= Utils.formatToWeb(refDisp, false) %></option> <% } } %> </select> <% } catch (FrontlineException fle) { } %> </td> <td> <span class="criteriaLabel"> <fl:getMessage code="F2019" alt="Date"/> </span> <input name="Fq_Date" class="input date chpsTextObligatoire" type="text" onfocus="this.select();" onblur="ctrlDateField(this, '<fl:getMessage code="M202B" alt="Format de date incorrect. Veuillez corriger." js="true"/>');" tabindex="10" size="10" maxlength="10"> <a href="javascript:openCalendar(document.fermeturejuridique.Fq_Date)" onmouseover="window.status = '<fl:getMessage code="A2000" alt="Afficher le calendrier" js="true"/>';" onmouseout="window.status = '';"><img src="<fl:webapp/>/icons/ico/clock_neutre.gif" class="icon"></a> </td> <td class="smallFieldPart"><a href="javascript:addFermJuridique()"> <img src="<fl:webapp/>/icons/ico/save_all_long.gif" id="bt_addEq" title="<fl:getMessage code="A000F" alt="Ajouter"/>"></a> </td> </tr> <tr><td colspan="2" class="dataLabel"> </td></tr> </table> </form> <%} %> </fl:access> <fl:grid name="FERJUR_EMB" ajaxUrl="<%= \"/embedded_list_ajax.fl?code=FERJUR_EMB&Fq_CtID=\" + id %>"/> </td> </tr> </table> </fl:sTab> <fl:sTab id="Historique" title="<%=Utils.getMessage(session, \"L6555\", \"Historique\")%>"> <table class="container" cellpadding="0"> <tr> <fl:fieldRead property="Ct_Encourspros"/> <%if(encourspros.equalsIgnoreCase(encoursprosOUI) ) {%> <fl:fieldRead property="Ct_DateEnCoursProc"/> <% } %> <fl:fieldRead property="Ct_StatutProcedure"/> </tr> </table> </fl:sTab> </fl:smallTabs> </fl:bigTabs>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de