[ 
https://issues.apache.org/jira/browse/OFBIZ-4297?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13048505#comment-13048505
 ] 

Jacques Le Roux commented on OFBIZ-4297:
----------------------------------------

R10.04 r1135067
R11.04 r1135068.

> 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
>            Assignee: Scott Gray
>            Priority: Minor
>             Fix For: SVN trunk
>
>
> 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