svn commit: r818030 - /ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/order/orderhistory.ftl

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r818030 - /ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/order/orderhistory.ftl

jleroux@apache.org
Author: jleroux
Date: Wed Sep 23 10:01:10 2009
New Revision: 818030

URL: http://svn.apache.org/viewvc?rev=818030&view=rev
Log:
A patch from Aswath Satrasala "orderHistory for completed orders - shows multiple invoices" (https://issues.apache.org/jira/browse/OFBIZ-2946) - OFBIZ-2946
Following are the steps.

    * I order 10-tiny zigmo through ecommerce
    * I did a quick ship entire order in the order manager
    * In the ecommerce, I did 'client-order history'. Then, multiple pdf's are shown.

Modified:
    ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/order/orderhistory.ftl

Modified: ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/order/orderhistory.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/order/orderhistory.ftl?rev=818030&r1=818029&r2=818030&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/order/orderhistory.ftl (original)
+++ ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/order/orderhistory.ftl Wed Sep 23 10:01:10 2009
@@ -42,10 +42,11 @@
               <td>${status.get("description",locale)}</td>
               <#-- invoices -->
               <#assign invoices = delegator.findByAnd("OrderItemBilling", Static["org.ofbiz.base.util.UtilMisc"].toMap("orderId", "${orderHeader.orderId}"), Static["org.ofbiz.base.util.UtilMisc"].toList("invoiceId")) />
-              <#if invoices?has_content>
+              <#assign distinctInvoiceIds = Static["org.ofbiz.entity.util.EntityUtil"].getFieldListFromEntityList(invoices, "invoiceId", true)>
+              <#if distinctInvoiceIds?has_content>
                 <td>
-                  <#list invoices as invoice>
-                    <a href="<@ofbizUrl>invoice.pdf?invoiceId=${invoice.invoiceId}</@ofbizUrl>" class="button">(${invoice.invoiceId} PDF)</a>
+                  <#list distinctInvoiceIds as invoiceId>
+                     <a href="<@ofbizUrl>invoice.pdf?invoiceId=${invoiceId}</@ofbizUrl>" class="buttontext">(${invoiceId} PDF) </a>
                   </#list>
                 </td>
               <#else>