Author: ashish
Date: Tue Nov  2 12:30:17 2010
New Revision: 1030016

URL: http://svn.apache.org/viewvc?rev=1030016&view=rev
Log:
Bug fix. Order adjustment was not showing in an email content. As it was not 
passed from Body Parameter. 

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

Modified: 
ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java?rev=1030016&r1=1030015&r2=1030016&view=diff
==============================================================================
--- 
ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java
 (original)
+++ 
ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java
 Tue Nov  2 12:30:17 2010
@@ -209,8 +209,12 @@ public class OrderReturnServices {
 
         // get the return items
         List returnItems = null;
+        List<GenericValue> returnAdjustments = FastList.newInstance();
         try {
             returnItems = returnHeader.getRelated("ReturnItem");
+            returnAdjustments = delegator.findList("ReturnAdjustment", 
EntityCondition.makeCondition(
+                                EntityCondition.makeCondition("returnId", 
EntityOperator.EQUALS, returnId), EntityOperator.AND,
+                                
EntityCondition.makeCondition("returnItemSeqId", EntityOperator.EQUALS, 
"_NA_")), null, UtilMisc.toList("returnAdjustmentTypeId"), null, true);
         } catch (GenericEntityException e) {
             Debug.logError(e, module);
             return 
ServiceUtil.returnError(UtilProperties.getMessage(resource_error, 
"OrderErrorUnableToGetReturnItemRecordsFromReturnHeader", locale));
@@ -260,7 +264,7 @@ public class OrderReturnServices {
                 uiLabelMap.addBottomResourceBundle("OrderUiLabels");
                 uiLabelMap.addBottomResourceBundle("CommonUiLabels");
 
-                Map bodyParameters = UtilMisc.toMap("returnHeader", 
returnHeader, "returnItems", returnItems, "uiLabelMap", uiLabelMap, "locale", 
locale, "userLogin", userLogin);
+                Map bodyParameters = UtilMisc.toMap("returnHeader", 
returnHeader, "returnItems", returnItems, "returnAdjustments", 
returnAdjustments, "uiLabelMap", uiLabelMap, "locale", locale, "userLogin", 
userLogin);
                 sendMap.put("bodyParameters", bodyParameters);
 
                 sendMap.put("subject", productStoreEmail.getString("subject"));


Reply via email to