You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by "Paul Foxworthy (JIRA)" <ji...@apache.org> on 2013/06/02 10:20:19 UTC
[jira] [Commented] (OFBIZ-5205) method-name="deleteRateAmount"
used for delete rate amount but method definiton is wrong because this
method definition is used for create rateamount
[ https://issues.apache.org/jira/browse/OFBIZ-5205?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13672341#comment-13672341 ]
Paul Foxworthy commented on OFBIZ-5205:
---------------------------------------
But Dhiraj,
deleteEmplPositionTypeRate is doing exactly the same thing, expiring an EmplPositionTypeRate by setting its thruDate. See the code at
https://fisheye6.atlassian.com/browse/ofbiz/trunk/applications/humanres/script/org/ofbiz/humanres/HumanResServices.xml?hb=true#to631
The code you pasted above changed a store-value to a remove-value. I still think OFBiz is doing the right thing and all that is needed is to expire the two entities.
This line in updateEmplPositionTypeRate
https://fisheye6.atlassian.com/browse/ofbiz/trunk/applications/humanres/script/org/ofbiz/humanres/HumanResServices.xml?hb=true#to620
*does* create a new EmplPositionTypeRate.
Hope that helps.
Paul Foxworthy
> method-name="deleteRateAmount" used for delete rate amount but method definiton is wrong because this method definition is used for create rateamount
> ----------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: OFBIZ-5205
> URL: https://issues.apache.org/jira/browse/OFBIZ-5205
> Project: OFBiz
> Issue Type: Test
> Components: accounting, humanres
> Affects Versions: Release 10.04, Release Branch 11.04, SVN trunk, Release 11.04.01, Release Branch 12.04
> Reporter: Dhiraj Gupta
>
> Hi all,
> The deleteRateAmount service is used for update/create a rate amount value
> not for delete rate amount please fix this bug.
> <service name="deleteRateAmount" default-entity-name="RateAmount" engine="simple" auth="true"
> location="component://accounting/script/org/ofbiz/accounting/rate/RateServices.xml" invoke="deleteRateAmount">
> <description>Delete (expire) Rate Amount</description>
> <auto-attributes include="pk" mode="IN" optional="true"/>
> <override name="rateTypeId" optional="false"/>
> <override name="fromDate" optional="false"/>
> </service>
> <simple-method method-name="deleteRateAmount" short-description="update/create a rate amount value">
> <set value="_CREATE" field="securityAction"/>
> <check-permission permission="ACCOUNTING" action="${securityAction}"><fail-property resource="AccountingUiLabels" property="AccountingPermissionError"/></check-permission>
> <check-errors/>
> <!-- set defaults -->
> <if-empty field="parameters.rateCurrencyUomId">
> <property-to-field resource="general.properties" property="currency.uom.id.default" field="parameters.rateCurrencyUomId"/>
> </if-empty>
> <if-empty field="parameters.periodTypeId">
> <set field="parameters.periodTypeId" value="RATE_HOUR"/>
> </if-empty>
> <if-empty field="parameters.emplPositionTypeId">
> <set field="parameters.emplPositionTypeId" value="_NA_"/>
> </if-empty>
> <if-empty field="parameters.partyId">
> <set field="parameters.partyId" value="_NA_"/>
> </if-empty>
> <if-empty field="parameters.workEffortId">
> <set field="parameters.workEffortId" value="_NA_"/>
> </if-empty>
> <entity-one entity-name="RateAmount" value-field="rateAmount"/>
> <if-not-empty field="rateAmount">
> <now-timestamp field="rateAmount.thruDate"/>
> <store-value value-field="rateAmount"/>
> <else>
> <add-error><fail-message message="could not find record to be deleted"/></add-error>
> </else>
> </if-not-empty>
> </simple-method>
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira