Author: jacopoc
Date: Fri Jun 15 02:51:18 2007 New Revision: 547595 URL: http://svn.apache.org/viewvc?view=rev&rev=547595 Log: Misc enhancements to the service that bulk creates requirements: suppressed annoying messages and cleared up a variable. Also added an optional input parameter for the default requirement method. Modified: ofbiz/trunk/applications/order/script/org/ofbiz/order/order/OrderServices.xml ofbiz/trunk/applications/order/servicedef/services_requirement.xml Modified: ofbiz/trunk/applications/order/script/org/ofbiz/order/order/OrderServices.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/script/org/ofbiz/order/order/OrderServices.xml?view=diff&rev=547595&r1=547594&r2=547595 ============================================================================== --- ofbiz/trunk/applications/order/script/org/ofbiz/order/order/OrderServices.xml (original) +++ ofbiz/trunk/applications/order/script/org/ofbiz/order/order/OrderServices.xml Fri Jun 15 02:51:18 2007 @@ -164,7 +164,9 @@ </simple-method> <simple-method method-name="getProductRequirementMethod" short-description="finds the requirement method for the product"> - <entity-one entity-name="OrderHeader" auto-field-map="true" value-name="order"/> + <if-not-empty field-name="parameters.orderId"> + <entity-one entity-name="OrderHeader" auto-field-map="true" value-name="order"/> + </if-not-empty> <entity-one entity-name="Product" auto-field-map="true" value-name="product"/> <set from-field="product.requirementMethodEnumId" field="requirementMethodId"/> <if-empty field-name="requirementMethodId"> @@ -174,6 +176,7 @@ <if-compare field-name="product.productTypeId" operator="not-equals" value="MARKETING_PKG_AUTO"/> <if-compare field-name="product.productTypeId" operator="not-equals" value="MARKETING_PKG_PICK"/> <if-compare field-name="product.productTypeId" operator="not-equals" value="DIGITAL_GOOD"/> + <not><if-empty field-name="order"/></not> </and> </condition> <then> @@ -356,7 +359,11 @@ <iterate list-name="products" entry-name="productFacility"> <set from-field="productFacility.productId" field="parameters.productId"/> + <clear-field field-name="requirementMethodId"/> <call-simple-method method-name="getProductRequirementMethod"/> + <if-empty field-name="requirementMethodId"> + <set field="requirementMethodId" from-field="parameters.defaultRequirementMethodId"/> + </if-empty> <if> <condition> <or> @@ -365,6 +372,7 @@ </or> </condition> <then> + <!-- get QOH, ATP and find ProductFacility which has the minimum stock --> <if-not-empty field-name="productFacility.minimumStock"> @@ -798,6 +806,6 @@ </call-service> <field-to-result field-name="parameters.orderPaymentPreferenceId" result-name="orderPaymentPreferenceId"/> </simple-method> - + </simple-methods> Modified: ofbiz/trunk/applications/order/servicedef/services_requirement.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/servicedef/services_requirement.xml?view=diff&rev=547595&r1=547594&r2=547595 ============================================================================== --- ofbiz/trunk/applications/order/servicedef/services_requirement.xml (original) +++ ofbiz/trunk/applications/order/servicedef/services_requirement.xml Fri Jun 15 02:51:18 2007 @@ -99,9 +99,7 @@ <attribute mode="IN" name="partyId" type="String" optional="true"/> <attribute mode="IN" name="unassignedRequirements" type="String" optional="true"/> <attribute mode="IN" name="currencyUomId" type="String" optional="true"/> - <attribute mode="IN" name="statusIds" type="List" optional="true"> - <description>By default, this service looks for approved requirements. To override this, pass in a list of requirement statusIds to search.</description> - </attribute> + <attribute mode="IN" name="statusIds" type="List" optional="true"/> <!-- By default, this service looks for approved requirements. To override this, pass in a list of requirement statusIds to search. --> <attribute mode="OUT" name="requirementsForSupplier" type="java.util.List" optional="true"/> <attribute mode="OUT" name="distinctProductCount" type="Integer" optional="true"/> <attribute mode="OUT" name="quantityTotal" type="Double" optional="true"/> @@ -152,10 +150,12 @@ <attribute name="quantity" type="Double" mode="IN" optional="true"/> <attribute name="requirementId" type="String" mode="OUT" optional="true"/> </service> + <service name="checkCreateProductRequirementForFacility" engine="simple" auth="true" location="org/ofbiz/order/order/OrderServices.xml" invoke="checkCreateProductRequirementForFacility"> <description>Create Requirements for all the products in a facility with QOH under the minimum stock level</description> <attribute name="facilityId" type="String" mode="IN" optional="false"/> + <attribute name="defaultRequirementMethodId" type="String" mode="IN" optional="true"/> </service> <service name="approveRequirement" engine="java" |
Free forum by Nabble | Edit this page |