Author: jacopoc
Date: Sat Apr 28 09:46:04 2007
New Revision: 533388
URL:
http://svn.apache.org/viewvc?view=rev&rev=533388Log:
Fixed npe for non-product items.
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?view=diff&rev=533388&r1=533387&r2=533388==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java Sat Apr 28 09:46:04 2007
@@ -403,7 +403,7 @@
), EntityOperator.AND);
EntityConditionList havingConditions = new EntityConditionList(UtilMisc.toList(
new EntityExpr("quantityIssued", EntityOperator.GREATER_THAN, new Double(0))
- ), EntityOperator.AND);
+ ), EntityOperator.AND);
List orderItemQuantitiesIssued = null;
try {
orderItemQuantitiesIssued = delegator.findByCondition("OrderItemQuantityReportGroupByItem", whereConditions, havingConditions, UtilMisc.toList("orderId", "orderItemSeqId"), UtilMisc.toList("orderItemSeqId"), null);
@@ -455,7 +455,7 @@
}
if (product != null) {
itemTypeKey = product.getString("productTypeId");
- } else if (item != null) {
+ } else if (item != null && item.getString("orderItemTypeId") != null) {
itemTypeKey = item.getString("orderItemTypeId");
}
returnInfo.put("itemTypeKey", itemTypeKey);