Edit C:\Users\Administrator\Desktop\Back\galaxie - Copy\marketing\invoiceEntry\read.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" import="com.edeal.frontline.*"%><%@page import="java.util.*" %><%@ page import="java.util.Vector" %><%@ page import="com.edeal.frontline.navigation.FlRequest" %><%@ page import="java.text.DecimalFormat" %><%@taglib uri="http://www.e-deal.com/taglib/fl" prefix="fl" %><jsp:useBean class="com.edeal.frontline.InvoiceEntryBean" id="InvoiceEntry" scope="request"/><% final org.apache.commons.logging.Log logger = org.apache.commons.logging.LogFactory.getLog(getClass()); FlRequest flRequest = new FlRequest(request); FlContext context = flRequest.getContext(); String id = null; try { id = InvoiceEntry.getID(); } catch (FieldNotInitializedException fnie) { } InvoiceBean Invoice; SupplierBean Supplier; try { String IneInvId = InvoiceEntry.getIneInvId(); Invoice = new InvoiceBean(IneInvId, context); String IneSupplId = Invoice.getInvSupplID(); Supplier = new SupplierBean(IneSupplId, context); request.setAttribute("Invoice", Invoice); request.setAttribute("Supplier", Supplier); } catch (Exception e) { Invoice = null; Supplier = null; } // Find out how many units are left with this invoice entry int categoriesToGo = 0; try { String[] ctnKeys2 = { "Sum" }; String query = "SELECT SUM(CtnNumUnits) from Categorization where CtnFactLn = " + Utils.formatToSQL(context, id); Vector resp = BasicBean.listSQL(context, ctnKeys2, query); Hashtable hash = (Hashtable) resp.firstElement(); categoriesToGo = ((Number)hash.get("Sum")).intValue(); } catch (Exception e) { } DecimalFormat intFormat = FlLocale.getInstance(session).getDecimalFormat("#,##0;- #,##0"); DecimalFormat floatFormat = FlLocale.getInstance(session).getDecimalFormat("#,##0.##;- #,##0.##"); DecimalFormat moneyFormat = FlLocale.getInstance(session).getDecimalFormat("#,##0.##;- #,##0.##"); moneyFormat.setMaximumFractionDigits(2); moneyFormat.setMinimumFractionDigits(2); int numberUnits = InvoiceEntry.getIneNumUnits(); float prixUnit = InvoiceEntry.getIneUnitPrice(); float amount = numberUnits * prixUnit; float montantTtl = 0; String[] ctnKeys = { "CtnID", "CtnCampID", "CtnStageID", "CtnNumUnits", "CtnCrDt" }; String[][] ctnQuery = { { "CtnFactLn = " + Utils.formatToSQL(context, InvoiceEntry.getIneID()) } }; String[] ctnOrderBy = { "CtnCrDt ASC" }; Vector ctnResult = CategorizationBean.listSummary(context, ctnKeys, ctnQuery, ctnOrderBy); // Calculate the amount categorized for this InvoiceEntry for (int cnt = 0; cnt < ctnResult.size(); ++cnt) { Hashtable row = (Hashtable) ctnResult.elementAt(cnt); Integer quant = (Integer) row.get("CtnNumUnits"); float montant = quant.intValue() * prixUnit; montantTtl += montant; } %> <script language="javascript"> var IneUnitesToGo = <%= (InvoiceEntry.getIneNumUnits() - categoriesToGo) %>; function refreshCtn() { _grid__IneCtn_js_.render() } function deleteCtn(CtnID) { if (confirm('<fl:getMessage code="M2004" alt="Etes-vous sûr de vouloir supprimer?" js="true"/>')) { doAjax('<fl:link url="/delete_categorization_ajax.fl?type=Categorization" />&id=' + CtnID + '&IneID=<%= InvoiceEntry.getID() %>', deleteCtnReturn); } } function addCtn() { if (IneUnitesToGo == 0) { alert('<fl:getMessage code="M60D1" alt="Il ne reste aucune unité à imputer" js="true"/>'); } else { window.location = '<fl:link url="<%= \"/create_categorization.fl?CtnFactLn=\" + id %>"/>'; } } function deleteCtnReturn(arrIndex) { if(eDealXmlhttpArr[arrIndex].readyState == 4) { eval(trimStr(eDealXmlhttpArr[arrIndex].responseText)); refreshCtn(); } } function doSubmit() { f = document.forms[0]; f.$$returnedHtmlHead.value = '<scr' + 'ipt language=\"javascript\">window.location = \'<fl:webapp/>/read_invoice.fl?id=<%= Invoice.getID() %>\';</scr' + 'ipt>'; f.$$returnedHtmlBody.value = '<!-- Nothing to see here -->'; return true; } function returnToInvoice() { window.location = '<fl:link url="<%= \"/read_invoice.fl?id=\" + Invoice.getID() %>"/>'; } </script> <fl:form action="/delete_invoiceEntry.fl" bean="InvoiceEntry"> <input type="hidden" name="$$returnedHtmlHead" value=""> <input type="hidden" name="$$returnedHtmlBody" value=""> <fl:bigTabs ignoreList="true" objectTitle="<%= Utils.getMessage(session, \"L63C1\", false, true, \"Ligne facture\") %>" ou="<%= \"/read_invoiceEntry.fl\" + ( id != null ? \"?id=\" + id : \"\") %>" > <table class="container" cellpadding="0"> <tr> <td class="titreFiche"> <fl:getProperty name="InvoiceEntry" property="IneDescr" alt=" "/> </td> </tr> <tr class="ligne_separation"><td></td></tr> </table> <table class="container" cellpadding="0"> <!-- tr> <td colspan="5" class="titreFiche"><!-- center><span><fl:getMessage code="L6324" alt="Ligne de facture"/> N° <span class="title"><fl:getProperty name="Invoice" property="InvNumInv" alt=" "/></span> de <a href="<fl:link url="<%= \"/read_supplier.fl?id=\" + Supplier.getID() %>"/>"><span class="title"><fl:getProperty name="Supplier" property="SplCode" alt=" "/></span></a></span></center></td> </tr> <tr class="ligne_separation"><td colspan="5"></td></tr--> <tr> <td class="column3"> <table class="container" cellpadding="0"> <fl:fieldRead property="InvNumInv"/> <tr class="fieldline"> <td id="Amount_label" class="dataLabel"> <fl:getMessage code="F6042" alt="Montant"/> </td> <td id="Amount_value" class="dataValue"> <%= moneyFormat.format(amount) %> € </td> </tr> <tr class="fieldline"> <td id="NumberUnits_label" class="dataLabel"> <fl:getMessage code="F60D6" alt="Nombre d'Unités"/> </td> <td id="NumberUnits_value" class="dataValue"> <%= intFormat.format(numberUnits) %> </td> </tr> <fl:fieldRead property="InvEntID"/> </table> </td> <td class="separation"><div class="separation"></div></td> <td class="column3"> <table class="container" cellpadding="0"> <tr class="fieldline"> <td class="dataLabel"><fl:getMessage code="F60DD" alt=""/></td> <td class="dataValue"><a href="<fl:link url="<%= \"/read_supplier.fl?id=\" + Supplier.getID() %>"/>"><fl:getProperty name="Supplier" property="SplCode" alt=" "/></a></td> </tr> <tr class="fieldline"> <td id="IneMontant_label" class="dataLabel"> <fl:getMessage code="F60ED" alt="Montant imputé"/> </td> <td id="IneMontant_value" class="dataValue"> <%= moneyFormat.format(montantTtl) %> € </td> </tr> <tr class="fieldline"> <td id="InePrix_label" class="dataLabel"> <fl:getMessage code="F2043" alt="Prix unitaire"/> </td> <td id="InePrix_value" class="dataValue"> <%= moneyFormat.format(prixUnit) %> € </td> </tr> <fl:fieldRead property="InvPayClass"/> </table> </td> <td class="separation"><div class="separation"></div></td> <td class="column3"> <table class="container" cellpadding="0"> <tr class="fieldline"> <td id="IneEcart_label" class="dataLabel"> <fl:getMessage code="L200A" alt="Ecart"/> </td> <td id="IneEcart_value" class="dataValue"> <%= moneyFormat.format(amount - montantTtl) %> € </td> </tr> <fl:fieldRead property="InvDateInv"/> <fl:fieldRead property="IneExpId" bean="true"/> </table> </td> </tr> <tr class="ligne_separation"><td colspan="5"></td></tr> </table> <link href="<fl:webapp/>/css/smalltabs_css.jsp" rel="stylesheet" type="text/css"> <fl:smallTabs name="IneRead"> <fl:sTab id="NOTES" title="<%= Utils.getMessage(session, \"F2024\", \"Notes\") %>"> <table class="data_column" cellpadding="0"> <tr class="fieldline"> <td id="IneNotes_value" class="dataValue"> <fl:getProperty name="InvoiceEntry" property="IneNotes" alt=""/> </td> </tr> </table> </fl:sTab> <fl:sTab id="IMPUTATIONS" title="<%= Utils.getMessage(session, \"F60DA\", \"Imputations\") %>" onselect="refreshCtn();"> <fl:grid height="100px" name="IneCtn" ajaxUrl="/list_custom_inectn_ajax.fl"/> <!-- <table class="container" cellpadding="0"> <tr> <td class="titreInterneSmalltabs"><fl:getMessage code="F1058" alt="Total"/></td> </tr> <tr class="ligne_separation_couleur"><td colspan="5"></td></tr> </table> <table class="container" cellpadding="1" style="width:50%" align="center"> <tr style="vertical-align: top"> <td style="width: 33%;text-align: center; white-space: nowrap;"> </td> <td class="dataLabel" style="width: 33%;text-align: center; white-space: nowrap;"> <fl:getMessage code="F60DB" alt="Quantité"/> </td> <td class="dataLabel" style="width: 34%;text-align: center; white-space: nowrap;"> <fl:getMessage code="L2009" alt="Budget"/> </td> </tr> <tr style="vertical-align: top"> <td class="dataLabel" style="width: 33%;text-align: center; white-space: nowrap; border-bottom: thin dashed #9EC6D0;"> <fl:getMessage code="F60DA" alt="Imputation"/> </td> <td id="ImpQuant" class="tabSimpleFdBleu dataValue" style="width: 33%;text-align: center; white-space: nowrap;"> </td> <td id="ImpBudg" class="tabSimpleFdBleu dataValue" style="width: 34%;text-align: center; white-space: nowrap;"> </td> </tr> <tr style="vertical-align: top"> <td class="dataLabel" style="width: 33%;text-align: center; white-space: nowrap; border-bottom: thin dashed #9EC6D0;"> <fl:getMessage code="L6339" alt="Reste à Imputer"/> </td> <td id="RestImp" class="tabSimpleFdBleu dataValue" style="width: 33%;text-align: center; white-space: nowrap;"> </td> <td id="RestBudg" class="tabSimpleFdBleu dataValue" style="width: 34%;text-align: center; white-space: nowrap;"> </td> </tr> <tr style="vertical-align: top"> <td class="dataLabel" style="width: 33%;text-align: center; white-space: nowrap;"> <fl:getMessage code="F1052" alt="Avancement"/> </td> <td colspan="2" id="Advance" class="tabSimpleFdBleu dataValue" style="width: 33%;text-align: center; white-space: nowrap;"> </td> </tr> </table> --> </fl:sTab> </fl:smallTabs> </fl:bigTabs> </fl:form>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de