This is an automated email from the ASF dual-hosted git repository.

jleroux pushed a commit to branch release22.01
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git


The following commit(s) were added to refs/heads/release22.01 by this push:
     new 6ce5466c71 Fixed: updateProductAverageCostOnReceiveInventory 
(OFBIZ-12728)
6ce5466c71 is described below

commit 6ce5466c71809a99bcd24af6cc7e23f2b2aa976a
Author: Pierre Smits <pierresm...@apache.org>
AuthorDate: Sun Dec 25 10:08:17 2022 +0100

    Fixed: updateProductAverageCostOnReceiveInventory (OFBIZ-12728)
    
    Due to a typo the updateProductAverageCostOnReceiveInventory function can't 
expire an old ProductAverageCost record of a product on new inventory receipt.
    
    Modified: CostServices.groovy
    fixed typo in function updateProductAverageCostOnReceiveInventory
    
    Thanks: Pierre Smits
---
 applications/product/groovyScripts/product/cost/CostServices.groovy | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/applications/product/groovyScripts/product/cost/CostServices.groovy 
b/applications/product/groovyScripts/product/cost/CostServices.groovy
index d961e33e87..5b91121989 100644
--- a/applications/product/groovyScripts/product/cost/CostServices.groovy
+++ b/applications/product/groovyScripts/product/cost/CostServices.groovy
@@ -448,7 +448,7 @@ def updateProductAverageCostOnReceiveInventory() {
     } else {
         // Expire existing one and calculate average cost
         updateProductAverageCostMap << productAverageCost
-        updateProductAverageCostMap.thurDate = UtilDateTime.nowTimestamp()
+        updateProductAverageCostMap.thruDate = UtilDateTime.nowTimestamp()
         run service: "updateProductAverageCost", with: 
updateProductAverageCostMap
 
         Map serviceInMap = [productId: parameters.productId, facilityId: 
parameters.facilityId]

Reply via email to