Author: nmalin Date: Sat Jul 22 09:46:47 2017 New Revision: 1802666 URL: http://svn.apache.org/viewvc?rev=1802666&view=rev Log: Fixed: For service getRateAmount move the periodTypeId default value from groovy to service definition, Thans Scott for this remark
Modified: ofbiz/ofbiz-framework/trunk/applications/accounting/groovyScripts/rate/RateServices.groovy ofbiz/ofbiz-framework/trunk/applications/accounting/servicedef/services_rate.xml 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=1802666&r1=1802665&r2=1802666&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 09:46:47 2017 @@ -150,9 +150,6 @@ def getRateAmount() { if (!parameters.rateCurrencyUomId) { parameters.rateCurrencyUomId = UtilProperties.getPropertyValue('general.properties', 'currency.uom.id.default', 'USD') } - if (!parameters.periodTypeId) { - parameters.periodTypeId = 'RATE_HOUR' - } String serviceName = null; if (parameters.workEffortId && parameters.workEffortId != '_NA_') { // workeffort level Modified: ofbiz/ofbiz-framework/trunk/applications/accounting/servicedef/services_rate.xml URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/accounting/servicedef/services_rate.xml?rev=1802666&r1=1802665&r2=1802666&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/applications/accounting/servicedef/services_rate.xml (original) +++ ofbiz/ofbiz-framework/trunk/applications/accounting/servicedef/services_rate.xml Sat Jul 22 09:46:47 2017 @@ -63,7 +63,7 @@ under the License. <auto-attributes include="pk" mode="IN" optional="true"/> <attribute name="level" type="String" mode="OUT" optional="true"/><!-- the level the amount was retrieved from(specific -> general): workEffort, party, emplPositionType, rateType or 'null' if not found--> <attribute name="rateAmount" type="BigDecimal" mode="OUT" optional="true"/> - <attribute name="periodTypeId" type="String" mode="INOUT" optional="true"/> + <attribute name="periodTypeId" type="String" mode="INOUT" optional="true" default-value="RATE_HOUR"/> <attribute name="rateCurrencyUomId" type="String" mode="INOUT" optional="true"/> <attribute name="fromDate" type="Timestamp" mode="OUT" optional="true"/> <override name="rateTypeId" optional="false"/>