svn commit: r563544 - /ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java

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

svn commit: r563544 - /ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java

jacopoc
Author: jacopoc
Date: Tue Aug  7 09:16:35 2007
New Revision: 563544

URL: http://svn.apache.org/viewvc?view=rev&rev=563544
Log:
Needed to set the workEffortId during order entry (forgot to commit in my previous commit).

Modified:
    ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java

Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java?view=diff&rev=563544&r1=563543&r2=563544
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartEvents.java Tue Aug  7 09:16:35 2007
@@ -1450,6 +1450,7 @@
 
         String agreementId = request.getParameter("agreementId");
         String currencyUomId = request.getParameter("currencyUomId");
+        String workEffortId = request.getParameter("workEffortId");
         String shipBeforeDateStr = request.getParameter("shipBeforeDate");
         String shipAfterDateStr = request.getParameter("shipAfterDate");
         String orderName = request.getParameter("orderName");
@@ -1457,7 +1458,7 @@
         Map result = null;
 
         // set the agreement if specified otherwise set the currency
-        if (agreementId != null && agreementId.length() > 0) {
+        if (UtilValidate.isNotEmpty(agreementId)) {
             result = cartHelper.selectAgreement(agreementId);
         } else {
             result = cartHelper.setCurrency(currencyUomId);
@@ -1466,6 +1467,9 @@
             request.setAttribute("_ERROR_MESSAGE_", ServiceUtil.getErrorMessage(result));
             return "error";
         }
+
+        // set the work effort id
+        cart.setWorkEffortId(workEffortId);
 
         // set the order name
         cart.setOrderName(orderName);