Author: hansbak
Date: Sun Sep 9 20:33:13 2007
New Revision: 574124
URL:
http://svn.apache.org/viewvc?rev=574124&view=revLog:
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;