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

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


The following commit(s) were added to refs/heads/trunk by this push:
     new 5a07f9d  Fixed: Error while calculating cost for a product 
(OFBIZ-12265)
5a07f9d is described below

commit 5a07f9d197431627315e70559a23bcaf9585b1fd
Author: Jacques Le Roux <jacques.le.r...@les7arts.com>
AuthorDate: Sat Jun 26 11:50:25 2021 +0200

    Fixed: Error while calculating cost for a product (OFBIZ-12265)
    
    Step
    
        Login to the Catalog application and search for any product. Navigate 
to Costs tab.
        eg:
        
https://demo-trunk.ofbiz.apache.org/catalog/control/EditProductCosts?productId=PROD_MANUF
        Scroll down to Auto-Calculate Costs section.
        Select currency say EURO and submit button.
    
    Expected
    A new record under the Costs tab.
    
    Actual
    Error with no new records.
    
    Thanks: Nameet Jain
---
 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 53a9b4f..d961e33 100644
--- a/applications/product/groovyScripts/product/cost/CostServices.groovy
+++ b/applications/product/groovyScripts/product/cost/CostServices.groovy
@@ -140,7 +140,7 @@ def getProductCost() {
         if (productCost == (BigDecimal) 0) {
             costsAndMap = [productId: parameters.productId]
             priceCosts = 
from("SupplierProduct").where(costsAndMap).orderBy(orderByList).queryList()
-            priceCosts = EntityUtil.filterByDate(priceCosts, 
UtilDateTime.nowTimestamp(), "avalableFromDate", "availableThruDate", true)
+            priceCosts = EntityUtil.filterByDate(priceCosts, 
UtilDateTime.nowTimestamp(), "availableFromDate", "availableThruDate", true)
             if (priceCosts) {
                 GenericValue priceCost = priceCosts.get(0)
                 if (priceCost.lastPrice) {

Reply via email to