Author: sichen
Date: Wed Aug 1 10:38:27 2007
New Revision: 561883
URL:
http://svn.apache.org/viewvc?view=rev&rev=561883Log:
Fix a problem where processSubscription and extend subscription by order services were returning error for orders which did not have the End User Customer role created. The more logical thing to do is just to return failure, so that orders which have nothing to do with subscriptions and no end users could still go on
Modified:
ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementServices.java
ofbiz/trunk/applications/product/src/org/ofbiz/product/subscription/SubscriptionServices.java
Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementServices.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementServices.java?view=diff&rev=561883&r1=561882&r2=561883==============================================================================
--- ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementServices.java (original)
+++ ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementServices.java Wed Aug 1 10:38:27 2007
@@ -1585,14 +1585,12 @@
context.put("partyId", partyId);
} else {
String msg = "No OrderRole found for orderId:" + orderId;
- Debug.logError(msg, module);
- return ServiceUtil.returnError(msg);
+ return ServiceUtil.returnFailure(msg);
}
orderHeader = delegator.findByPrimaryKeyCache("OrderHeader", UtilMisc.toMap("orderId", orderId));
if (orderHeader == null) {
String msg = "No OrderHeader found for orderId:" + orderId;
- Debug.logError(msg, module);
return ServiceUtil.returnError(msg);
}
Timestamp orderCreatedDate = (Timestamp) orderHeader.get("orderDate");
Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/subscription/SubscriptionServices.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/subscription/SubscriptionServices.java?view=diff&rev=561883&r1=561882&r2=561883==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/product/subscription/SubscriptionServices.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/product/subscription/SubscriptionServices.java Wed Aug 1 10:38:27 2007
@@ -228,13 +228,11 @@
context.put("partyId", partyId);
} else {
String msg = "No OrderRole found for orderId:" + orderId;
- Debug.logError(msg, module);
- return ServiceUtil.returnError(msg);
+ return ServiceUtil.returnFailure(msg);
}
orderHeader = delegator.findByPrimaryKeyCache("OrderHeader", UtilMisc.toMap("orderId", orderId));
if (orderHeader == null) {
String msg = "No OrderHeader found for orderId:" + orderId;
- Debug.logError(msg, module);
return ServiceUtil.returnError(msg);
}
Timestamp orderCreatedDate = (Timestamp) orderHeader.get("orderDate");