[OFBiz] SVN: r7840 - trunk/applications/product/script/org/ofbiz/product/inventory
jacopo@svn.ofbiz.org
jacopo at svn.ofbiz.org
Wed Jun 21 16:31:12 CDT 2006
Author: jacopo
Date: 2006-06-21 16:31:07 -0500 (Wed, 21 Jun 2006)
New Revision: 7840
Modified:
trunk/applications/product/script/org/ofbiz/product/inventory/InventoryServices.xml
Log:
Added code in getProductInventoryAvailable to manage correctly new marketing packages (productType="MARKETING_PKG_AUTO").
Modified: trunk/applications/product/script/org/ofbiz/product/inventory/InventoryServices.xml
===================================================================
--- trunk/applications/product/script/org/ofbiz/product/inventory/InventoryServices.xml 2006-06-21 21:15:37 UTC (rev 7839)
+++ trunk/applications/product/script/org/ofbiz/product/inventory/InventoryServices.xml 2006-06-21 21:31:07 UTC (rev 7840)
@@ -429,6 +429,23 @@
</call-service>
<return response-code="success"/> <!-- all done -->
</if-not-empty>
+ <!-- see if the product is of type MARKETING_PKG_AUTO, this is another type of marketing package -->
+ <entity-one entity-name="Product" value-name="product"/>
+ <set from-field="parameters.productId" field="lookupMktgPkgParams.productId"/>
+ <set value="MANUF_COMPONENT" field="lookupMktgPkgParams.type"/>
+ <call-service service-name="getAssociatedProducts" in-map-name="lookupMktgPkgParams">
+ <result-to-field result-name="assocProducts"/>
+ </call-service>
+ <!-- if there are any MANUF_COMPONENT components, then the ATP and QOH are based on the quantities of those component
+ products and found with another service -->
+ <if-not-empty field-name="assocProducts">
+ <set from-field="assocProducts" field="inventoryByAssocProductsParams.assocProducts"/>
+ <call-service service-name="getProductInventoryAvailablefromAssocProducts" in-map-name="inventoryByAssocProductsParams">
+ <result-to-result result-name="quantityOnHandTotal"/>
+ <result-to-result result-name="availableToPromiseTotal"/>
+ </call-service>
+ <return response-code="success"/> <!-- all done -->
+ </if-not-empty>
</if-not-empty>
<set field="parameters.availableToPromiseTotal" value="0" type="Double"/>
More information about the Svn
mailing list