<%--
Cotisation Association:

<% depTotal=0; for (Entry> entry : mapCotQuestionResponse.entrySet()) { String lfqID = entry.getKey(); Vector cotResps = entry.getValue(); String filProID2 = null; String depProID = null; int proQuantity = 0; ProductOpportunityBean filpro = null; String ProMontantTva_ = ""; String ProPrdTva_Val = ""; String ProRemise_ = ""; if(cotResps != null && cotResps.size()>0 && !cotResps.isEmpty()){ QuestionResponseBean qrs = null; if(cotResps.elementAt(0) != null){ qrs = new QuestionResponseBean(cotResps.elementAt(0),context); try{ filProID2 = qrs.getQrsText(); }catch(FieldNotInitializedException e){ } } if(cotResps.size() > 1 && cotResps.elementAt(1) != null){ qrs = new QuestionResponseBean(cotResps.elementAt(1),context); try{ depProID = qrs.getQrsText(); }catch(FieldNotInitializedException e){ } } if(cotResps.size() > 2 && cotResps.elementAt(2) != null){ qrs = new QuestionResponseBean(cotResps.elementAt(2),context); try{ String quantity = qrs.getQrsText(); Integer temp=0; try{ temp = Integer.valueOf(quantity); }catch(Exception e){ logger.error(e.getMessage()); } proQuantity = (quantity != null && !quantity.isEmpty()) ? temp : 0; }catch(FieldNotInitializedException e){ } } if(depProID != null && depProID.length()==16){ String prdCode=null; try { filpro = new ProductOpportunityBean(depProID, context); prdCode = (String)ProductOpportunityBean.lookup(context, "ProPrdID:PrdCode", depProID); } catch (Exception e1) { e1.printStackTrace(); } Integer maxquantity = null; try{ maxquantity = (Integer)ProductOpportunityBean.lookup(context, "ProPrdID:PrdMaxQt_", depProID); }catch(Exception e){ } Integer tmp = null; try{ tmp = (Integer)ProductOpportunityBean.lookup(context, "ProPrdID:PrdOrderQst_", depProID); }catch(Exception e){ } String SortingOrder = null; if(tmp==null) SortingOrder = "0"; else{ SortingOrder = tmp.toString(); if(tmp>maxOrder) maxOrder = tmp; } try{ Double x = (Double)ProductOpportunityBean.lookup(context, "ProMontantTva_", depProID); Integer y = (Integer)ProductOpportunityBean.lookup(context, "ProQuantity", depProID); ProMontantTva_ = ""+(x/y); if(ProMontantTva_.contains("NaN"))ProMontantTva_ = "0.0"; }catch(Exception e){ logger.warn(e.getMessage()); ProMontantTva_ = "0.0"; } try{ ProPrdTva_Val = ""+ProductOpportunityBean.lookup(context, "ProPrdTva_:Val", depProID); ProRemise_ = ""+ProductOpportunityBean.lookup(context, "ProRemise_", depProID); } catch (FrontlineException e) { } Double ProRemise_Nu1 = (double) 0; try{ ProRemise_Nu1 = (Double)dico.getRefDisp("Od_", "Nu1", ProRemise_); } catch (FrontlineException e) { } Double ProUnitHTrem_ = (Double)ProductOpportunityBean.lookup(context, "ProUnitHTrem_", depProID); Double ProMontantHTrem_ = (Double)ProductOpportunityBean.lookup(context, "ProMontantHTrem_", depProID); Double ProMontantTva_2 = (Double)ProductOpportunityBean.lookup(context, "ProMontantTva_", depProID); String prdLabel = null; if(ids != "") ids += "," + prdCode; else ids += prdCode; String prdID = (String)ProductOpportunityBean.lookup(context, "ProPrdID", depProID); String prdName = (String)ProductOpportunityBean.lookup(context, "ProPrdID:PrdName", depProID); try{ String prdnamelng_ = (String)ProductOpportunityBean.lookup(context, "ProPrdID:PrdNamelng_", depProID); try{ String[] fields = {"RelTe1"}; String[][] query = {{"RelRefID = '" + prdnamelng_ + "'" , "RelLngID = '" + languageID + "'" }}; String[] orderBy = {"RelTe1 ASC"}; Vector list = RefLocaleBean.listSummary(context, fields, query, orderBy ); if(list != null && list.size() > 0){ Hashtable line = (Hashtable)list.elementAt(0); prdLabel = (String)line.get("RelTe1"); } }catch(Exception e){ } }catch(Exception e ){ logger.warn(e.getMessage()); } if(!prdCode.contains("COTROO") && !prdCode.contains("COTCOM")) proQuantity = (Integer)ProductOpportunityBean.lookup(context, "ProQuantity", depProID); depOppID = (String)ProductOpportunityBean.lookup(context, "ProOppID", depProID); double filProttc = 0; try{ filProttc = (Double)ProductOpportunityBean.lookup(context, "ProPrice", depProID); }catch(FrontlineException e){} double priUnit = 0; try{ ///Avoir priUnit = (Double)ProductOpportunityBean.lookup(context, "ProUnitPrice", depProID); }catch(FrontlineException e){} String proPrdTva_ = (String)ProductOpportunityBean.lookup(context, "ProPrdTva_", depProID); proPrdTva_ = dico.getRefCode("ProPrdTva_", proPrdTva_); if("T0".equalsIgnoreCase(proPrdTva_)) proPrdTva_ = "TVA INTRACOM"; double depProttc = 0; if(depProID != null) { try{ depProttc = proQuantity * priUnit; depTotal += depProttc; depOppID = (String)ProductOpportunityBean.lookup(context, "ProOppID", depProID); }catch(FrontlineException e){} } %> " id="<%=prdCode %>" value="<%= depProID != null ? depProID : "" %>"/> <% } } } depTotal = (new BigDecimal(depTotal)).setScale(2, java.math.RoundingMode.UP).doubleValue(); %>
<%=Utils.getMessage(context, lngCode, "F203F", "D�signation") %> <%=Utils.getMessage(context, lngCode, "F3023", "P. U. HT") %> <%=Utils.getMessage(context, lngCode, "LF18A", "Quantit� factur�e") %> <%=Utils.getMessage(context, lngCode, "F3025", "Remise sur P.U") %> <%=Utils.getMessage(context, lngCode, "FF132", "P. U. HT Apr�s Remise") %> <%=Utils.getMessage(context, lngCode, "FF134", "Montant HT") %> <%=Utils.getMessage(context, lngCode, "FF130","TVA � appliquer") %> <%=Utils.getMessage(context, lngCode, "FF140", "Montant TVA") %> <%=Utils.getMessage(context, lngCode, "F3026", "Prix net") %>
<%=(prdLabel != null ? prdLabel : Utils.formatToWeb(prdName, false)) + " (" + proPrdTva_ + " ) " %> <% if(prdCode!=null && (prdCode.contains("COTCOM") || prdCode.contains("COTROO"))){ out.print("
"+Utils.getMessage(context, lngCode, "MF101", true,true,"*Plafonn� � XX h�bergements.").replace("XX", maxquantity+"")+""); } %>
<%=Utils.formatToWeb(priUnit, false)%> €" value="<%= priUnit %>"/> " name="<%= "2qu_" + prdCode%>" value="<%= proQuantity %>" disabled="disabled" /> <%=ProRemise_Nu1.intValue()+"%"%>" value="<%= ProRemise_Nu1.intValue() %>"/> <%=ProUnitHTrem_%> €" value="<%=ProUnitHTrem_%>" /> "><%=ProMontantHTrem_%> € <%=ProPrdTva_Val%>" value="<%= ProPrdTva_Val.substring(0,ProPrdTva_Val.length()-1).replace(",",".") %>"/> "><%=ProMontantTva_2%> € " disabled="disabled" value="<%= filProttc %>"/> € " value="<%=((double)(ProRemise_Nu1*priUnit)/100) %>"/> " value="<%=ProMontantTva_%>"/> " disabled="disabled" value="<%= depProttc %> €"/> " value="<%= depProttc %>"/>
    <%=Utils.getMessage(context, lngCode, "LF18B", "Total HT") %>   <%=Utils.getMessage(context, lngCode, "LF18C", "Total TVA") %> <%=Utils.getMessage(context, lngCode, "LF18D", "Total TTC") %>
  <%=Utils.getMessage(context, lngCode, "F1058", "Total")%>         €
--%>