svn commit: r574124 - /ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java

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

svn commit: r574124 - /ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java

hansbak-2
Author: hansbak
Date: Sun Sep  9 20:33:13 2007
New Revision: 574124

URL: http://svn.apache.org/viewvc?rev=574124&view=rev
Log:
avoid a division by zero exception

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

Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java?rev=574124&r1=574123&r2=574124&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java Sun Sep  9 20:33:13 2007
@@ -1947,7 +1947,7 @@
             GenericValue orderItem = (GenericValue) orderItems.next();
 
             BigDecimal itemQuantityDbl = orderItem.getBigDecimal("quantity");
-            if (itemQuantityDbl == null) {
+            if (itemQuantityDbl == null || itemQuantityDbl.compareTo(ZERO) == 0) {
                 continue;
             }
             BigDecimal itemQuantity = itemQuantityDbl;