Thanks David Regards Scott
On 3/09/2009, at 3:42 PM, David E Jones wrote:
Thanks for the comments Scott. I made some changes that will hopefully address these two issues, ie making it more readable and allowing the Product setting to override the ProductStore setting, in SVN rev 810772.-David On Sep 2, 2009, at 7:53 PM, Scott Gray wrote:I saw them but yeah I have read the code wrong, my pseudo code should have an OR instead of an AND: if product requirement is PRODRQM_ATP OR productStore requirement is PRODRQM_ATP then run the rest of the code in the blockshouldn't one setting take priority or override over the other? If different requirements used the same sort of condition you would potentially have products with multiple requirement methods in effect.Regards Scott On 3/09/2009, at 1:31 PM, David E Jones wrote:You're missing the nots... -David On Sep 2, 2009, at 7:28 PM, Scott Gray wrote:Hi DavidI'm not familiar with the code but the condition seems a little strange to me, it used to be this: if product requirement is PRODRQM_ATP then run the rest of the code in the blockNow it looks like this:if product requirement is PRODRQM_ATP AND productStore requirement is also PRODRQM_ATP then run the rest of the code in the blockIs it correct that the rest of the code should only be executed if both the product and the product store have PRODRQM_ATP set?Thanks Scott On 3/09/2009, at 12:55 PM, [email protected] wrote:Author: jonesde Date: Thu Sep 3 00:55:50 2009 New Revision: 810748 URL: http://svn.apache.org/viewvc?rev=810748&view=rev Log:Small fix so that the ProductStore.requirementMethodEnumId works for the PRODRQM_ATP valueModified:ofbiz/trunk/applications/order/src/org/ofbiz/order/requirement/ RequirementServices.javaModified: ofbiz/trunk/applications/order/src/org/ofbiz/order/ requirement/RequirementServices.javaURL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/requirement/RequirementServices.java?rev=810748&r1=810747&r2=810748&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 00:55:50 2009@@ -269,7 +269,8 @@ GenericValue item = (GenericValue) iter.next(); GenericValue product = item.getRelatedOne("Product"); if (product == null) continue;- if (! "PRODRQM_ATP".equals(product.get("requirementMethodEnumId"))) continue;++ if (!"PRODRQM_ATP".equals(product.get("requirementMethodEnumId")) && !"PRODRQM_ATP ".equals(productStore.get("requirementMethodEnumId"))) continue;BigDecimal quantity = item.getBigDecimal("quantity");BigDecimal cancelQuantity = item.getBigDecimal("cancelQuantity");
smime.p7s
Description: S/MIME cryptographic signature
