updateProductAverageCostOnReceiveInventory doesn't work when QOH superior to 
1000
---------------------------------------------------------------------------------

                 Key: OFBIZ-4297
                 URL: https://issues.apache.org/jira/browse/OFBIZ-4297
             Project: OFBiz
          Issue Type: Bug
          Components: product
    Affects Versions: SVN trunk
         Environment: any
            Reporter: Stéphane DUCAS
            Priority: Minor


Line 575 of file CostServices should be:

<set field="oldProductQuantity" value="${quantityOnHandTotal - 
parameters.quantityAccepted}" type="BigDecimal"/>

instead of 

<set field="oldProductQuantity" value="${quantityOnHandTotal - 
parameters.quantityAccepted}"/>

Because when QOH s superior to one thousand the String value is "1 000" and can 
not be coerce by EL engine on the line below.

Here is the patch:

Index: CostServices.xml
===================================================================
--- CostServices.xml    (révision 1126493)
+++ CostServices.xml    (copie de travail)
@@ -572,7 +572,7 @@
                 <result-to-field result-name="quantityOnHandTotal"/> 
             </call-service>
             
-            <set field="oldProductQuantity" value="${quantityOnHandTotal - 
parameters.quantityAccepted}"/>
+            <set field="oldProductQuantity" value="${quantityOnHandTotal - 
parameters.quantityAccepted}" type="BigDecimal"/>
             <set field="productAverageCostMap.averageCost" 
value="${((productAverageCost.averageCost * oldProductQuantity) + 
(inventoryItem.unitCost * parameters.quantityAccepted))/(quantityOnHandTotal)}" 
type="BigDecimal"/>
             <property-to-field resource="arithmetic" 
property="finaccount.decimals" field="roundingDecimals" default="2"/>
             <property-to-field resource="arithmetic" 
property="finaccount.roundingSimpleMethod" field="roundingMode" 
default="HalfUp"/>






--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to