svn commit: r1064954 - /ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java

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

svn commit: r1064954 - /ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java

mor-2
Author: mor
Date: Sat Jan 29 05:36:58 2011
New Revision: 1064954

URL: http://svn.apache.org/viewvc?rev=1064954&view=rev
Log:
Bug fix - Under the order items on Order Detail Page the Quantity Returned wasn't correct 'cause system is also adding up the quantities from a corresponding canceled return.

Modified:
    ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java

Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java?rev=1064954&r1=1064953&r2=1064954&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java Sat Jan 29 05:36:58 2011
@@ -1743,8 +1743,10 @@ public class OrderReadHelper {
        Map<String, BigDecimal> returnMap = FastMap.newInstance();
        for (Iterator<GenericValue> iter = this.getValidOrderItems().iterator(); iter.hasNext();) {
            GenericValue orderItem = iter.next();
-           List<GenericValue> group = EntityUtil.filterByAnd(returnItems,
-                   UtilMisc.toMap("orderId", orderItem.get("orderId"), "orderItemSeqId", orderItem.get("orderItemSeqId")));
+           List<GenericValue> group = EntityUtil.filterByAnd(returnItems, UtilMisc.toList(
+                                              EntityCondition.makeCondition("orderId", orderItem.get("orderId")),
+                                              EntityCondition.makeCondition("orderItemSeqId", orderItem.get("orderItemSeqId")),
+                                              EntityCondition.makeCondition("statusId", EntityOperator.NOT_EQUAL, "RETURN_CANCELLED")));
 
            // add up the returned quantities for this group TODO: received quantity should be used eventually
            BigDecimal returned = BigDecimal.ZERO;