Author: hansbak
Date: Thu Feb 22 22:20:22 2007
New Revision: 510846
URL:
http://svn.apache.org/viewvc?view=rev&rev=510846Log:
if no quantity provided on the requirement service had an NPE, now quantity of 1 assumed
Modified:
ofbiz/trunk/applications/order/src/org/ofbiz/order/requirement/RequirementServices.java
Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/requirement/RequirementServices.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/requirement/RequirementServices.java?view=diff&rev=510846&r1=510845&r2=510846==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/requirement/RequirementServices.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/requirement/RequirementServices.java Thu Feb 22 22:20:22 2007
@@ -156,6 +156,7 @@
}
// keep a running total of distinct products and quantity to order
+ if (requirement.getDouble("quantity") == null) requirement.put("quantity", new Double("1")); // default quantity = 1
quantity += requirement.getDouble("quantity").doubleValue();
products.add(productId);