You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by as...@apache.org on 2014/11/15 06:15:19 UTC

svn commit: r1639833 - /ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java

Author: ashish
Date: Sat Nov 15 05:15:17 2014
New Revision: 1639833

URL: http://svn.apache.org/r1639833
Log:
Applied bug fix from jira issue OFBIZ-5854 - Order On Hold Auto Approves When Edited.
Thanks Vikas for creating the issue and thanks Akash for verification. 

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

Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java?rev=1639833&r1=1639832&r2=1639833&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java Sat Nov 15 05:15:17 2014
@@ -2014,6 +2014,10 @@ public class OrderServices {
 
                 if (changeToApprove) {
                     newStatus = "ORDER_APPROVED";
+                    if ("ORDER_HOLD".equals(orderHeaderStatusId)) {
+                        // Don't let the system to auto approve order if the order was put on hold.
+                        return ServiceUtil.returnSuccess();
+                    }
                 }
             }