Author: jonesde
Date: Thu Sep 3 03:41:21 2009
New Revision: 810772
URL:
http://svn.apache.org/viewvc?rev=810772&view=revLog:
Small changes to logic about Product and ProductStore requirementMethodEnumId fields for the PRODRQM_ATP setting; this should maybe be more centralized logic than split in a service for each value, but on the other hand being split out means more flexibility so it's probably good; these address Scott's comments on the mailing list to make the logic more readable, and also to handle the case where a Product may have a setting that overrides the ProductStore setting, which is not what it was doing before
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?rev=810772&r1=810771&r2=810772&view=diff==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/requirement/RequirementServices.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/requirement/RequirementServices.java Thu Sep 3 03:41:21 2009
@@ -270,7 +270,8 @@
GenericValue product = item.getRelatedOne("Product");
if (product == null) continue;
- if (!"PRODRQM_ATP".equals(product.get("requirementMethodEnumId")) && !"PRODRQM_ATP".equals(productStore.get("requirementMethodEnumId"))) continue;
+ if (!("PRODRQM_ATP".equals(product.get("requirementMethodEnumId")) ||
+ ("PRODRQM_ATP".equals(productStore.get("requirementMethodEnumId")) && product.get("requirementMethodEnumId") == null))) continue;
BigDecimal quantity = item.getBigDecimal("quantity");
BigDecimal cancelQuantity = item.getBigDecimal("cancelQuantity");