[ 
https://issues.apache.org/jira/browse/OFBIZ-2037?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Hans Bakker updated OFBIZ-2037:
-------------------------------

    Attachment: rateChange.diff

Rate re-factoring now implemented. Attached is the diff file for review.

What has been changed:
1. all rates for worked time can be now defined with a period and currency
2. Rate amounts will never be deleted but always expired with a thrudate to be 
sure history is kept fo accounting purposes.
3. if not provided they default to "rate per hour" and the system default 
currency (as currently is the case)

and are at several levels:
1. work effort level
2. party level
3. default level

The new entity RateAmount is also used as an extension to the EmployeeTypeRate 
entity where salaries  can now be specified with a currency.

The general service to obtain rates is the service "getRateAmount" will take 
the rateAmount from the appropriate level and will report which level was taken.

System changes:
1. all "rate" services, entities and views moved to the accounting component.

Database changes:
1. New entity: Rate amount where rate amounts can be specified by period and 
currency.
2. RateType: field "amount" is dropped and is moved to the new entity: 
RateAmount
3. WorkEffortAssignmentRate is dropped and replaced by RateAmount
4. PartyRate, moved from workeffort to accounting component: currency is moved 
to the rateAmount entity
5. EmplPositionTypeRate: the rateTypeId is moved into the key to be consistent 
with the other rate tables and the periodId is moved to the rateAmount entity.

Upgrading: It is at the moment assumed that this part of the system is rarely 
used, however if you have much data in these entities you can unload and reload 
the tables below, but the general advice is to re-enter the info by hand.
1. Unload (with webtools) the rateType, EmplPositionTypeRate and PartyRate 
entities
2. drop the EmplPositionTypeRate and PartyRate entities with the sql command 
"drop table xxxx"
3. stop the system and apply the upgrade from SVN
4. reload the system seed data: ./ant run-install-seed 
5. start the ofbiz system.
6. reload the entities from webtools if required.


> Re-organize RateType, rateAmount and rateCurrency organization in ofbiz.  
> --------------------------------------------------------------------------
>
>                 Key: OFBIZ-2037
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-2037
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: accounting, humanres, specialpurpose/projectmgr, 
> workeffort
>    Affects Versions: SVN trunk
>         Environment: any
>            Reporter: Hans Bakker
>            Assignee: Hans Bakker
>            Priority: Minor
>             Fix For: SVN trunk
>
>         Attachments: rateChange.diff
>
>
> the rateAmount in ofbiz is defined by the rate type and then by the following 
> criteria when defined:
> from most specific to most general:
> 1. for a partyId (partyRate)
> 2. for a workEffort/timeentry (workEffortAssignmentRate)
> 3. for a employee position (EmplPositionTypeRate)
> 4. for a the default rateTypeId (RateType)
> The currency is defined in level 1,4 but not in the others. It should also be 
> possible to specify the currency at any level.
> What is proposed:
> ===========
> 1. remove currencyUomId and (normal)rate(amount) in the partyRate and 
> rateType (level 1,4) entities
> 2. remove rate(amount) from the workEffortAssignmentRate and employee 
> position (level 2,3) entities
> 3. create a new entity: RateAmount with the following fields:
>       primary key:
>               rateTypeId
>               rateCurrencyUomId
>               workEffortId
>               partyId
>               emplPositionTypeId
>               periodTypeId (from the PeriodType entity: per 
> hour/day/week/month/quarter)
>               fromDate
>       non-key fields:
>               thruDate
>               rateAmount
> 4. create a service "getRateAmount" which will retrieve the applicable rate 
> amount for the data provided searching from most specific to most general
> 5. depreciate the getPartyRate service.
> 6. create the createRateAmount and deleteRateAmount(expire) service to update 
> the new entity
> 7. update existing services and forms.
> QUESTION:
> should the accounting organization partyId be in the key of the new 
> RateAmount entity?
> Regards,
> Hans

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to