Author: apatel
Date: Thu Oct 27 11:51:13 2011
New Revision: 1189710

URL: http://svn.apache.org/viewvc?rev=1189710&view=rev
Log:
[OFBIZ-4521] Code improvement. Thanks Manuela Gruendlinger for contribution.

Modified:
    
ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/OrderView.groovy

Modified: 
ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/OrderView.groovy
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/OrderView.groovy?rev=1189710&r1=1189709&r2=1189710&view=diff
==============================================================================
--- 
ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/OrderView.groovy
 (original)
+++ 
ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/OrderView.groovy
 Thu Oct 27 11:51:13 2011
@@ -170,12 +170,8 @@ if (orderHeader) {
     context.itemIssuancesPerItem = itemIssuancesPerItem;
 
     // get a list of all invoices
-    allInvoices = new HashSet();
     orderBilling = delegator.findByAnd("OrderItemBilling", [orderId : 
orderId], ["invoiceId"]);
-    orderBilling.each { billingGv ->
-        allInvoices.add(billingGv.invoiceId);
-    }
-    context.invoices = allInvoices;
+    context.invoices = orderBilling*.invoiceId.unique();
 
     ecl = EntityCondition.makeCondition([
                                     EntityCondition.makeCondition("orderId", 
EntityOperator.EQUALS, orderId),


Reply via email to