Author: nmalin Date: Sat Jul 22 10:37:56 2017 New Revision: 1802670 URL: http://svn.apache.org/viewvc?rev=1802670&view=rev Log: Fixed: For service getRateAmount align the level variable on 'rateTypeId' by default and correct name workEffort to workEffortId for more coherence with other. This escape a potential failure on groovy instanciation if the service found a rateList without dedicate service, Thanks Scott for this remark
Modified: ofbiz/ofbiz-framework/trunk/applications/accounting/groovyScripts/rate/RateServices.groovy Modified: ofbiz/ofbiz-framework/trunk/applications/accounting/groovyScripts/rate/RateServices.groovy URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/accounting/groovyScripts/rate/RateServices.groovy?rev=1802670&r1=1802669&r2=1802670&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/applications/accounting/groovyScripts/rate/RateServices.groovy (original) +++ ofbiz/ofbiz-framework/trunk/applications/accounting/groovyScripts/rate/RateServices.groovy Sat Jul 22 10:37:56 2017 @@ -147,10 +147,11 @@ def getRateAmount() { For a easier debugging time, there is a log triggered when no records are found for the input. This log shows up when there are rateAmounts corresponding to the input parameters without the rateCurrencyUomId and the periodTypeId.*/ - String serviceName = null; + String serviceName = null + String level = "rateTypeId" if (parameters.workEffortId && parameters.workEffortId != '_NA_') { // workeffort level - level = 'workEffort' + level = 'workEffortId' serviceName = 'getRatesAmountsFromWorkEffortId' } else if (parameters.partyId && parameters.partyId != '_NA_') { // party level