You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2015/02/23 21:52:37 UTC

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

Author: jleroux
Date: Mon Feb 23 20:52:36 2015
New Revision: 1661778

URL: http://svn.apache.org/r1661778
Log:
A patch from Christian Carlow for "Error updating order when item quantity less than 1 but greater than 0 exists" https://issues.apache.org/jira/browse/OFBIZ-6101

This error occurred when I updated a purchase order containing an item with quantity > 0 but less than 1:
"Quantity must be >0, use cancel item to cancel completely!"


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=1661778&r1=1661777&r2=1661778&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 Mon Feb 23 20:52:36 2015
@@ -3726,7 +3726,7 @@ public class OrderServices {
                 return ServiceUtil.returnError(e.getMessage());
             }
 
-            if (groupQty.compareTo(BigDecimal.ONE) < 0) {
+            if (groupQty.compareTo(BigDecimal.ZERO) < 0) {
                 return ServiceUtil.returnError(UtilProperties.getMessage(resource,
                         "OrderItemQtyMustBePositive", locale));
             }