finish the service conversion : getRateAmount, getRatesAmountsFromWorkEffortId, getRatesAmountsFromPartyId, getRatesAmountsFromEmplPositionTypeId and filterRateAmountList
I create a generic groovy function getRateAmoutForm to remove duplicate code and refactoring the filterRateAmount for simplicity
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1800245 13f79535-47bb-0310-9956-ffa450edef68
With service rate minilang conversion to groovy, I renamed deleteRateAmount and deletePartyRate to expireRateAmount and expirePartyRate for more coherence between the service process and the name. The previous service naming have been kept to set them as deprecated
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1799252 13f79535-47bb-0310-9956-ffa450edef68
related to task OFBIZ-9350 Deprecate Mini Lang, convert service updateRateAmount, deleteRateAmount updatePartyRate and deletePartyRate from mini-ang to groovyDSL
Thanks to Deepak for the review
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1796428 13f79535-47bb-0310-9956-ffa450edef68
- facility
- marketting
- return
- entitysync
Also moved the permission check from implementation level to service defination level
(OFBIZ-8673)(OFBIZ-8673)(OFBIZ-8674)(OFBIZ-8739)(OFBIZ-8823)(OFBIZ-8825)(OFBIZ-8827)(OFBIZ-8850)(OFBIZ-8876)(OFBIZ-8875)(OFBIZ-8824)(OFBIZ-8826)(OFBIZ-8851)
Thanks Nameet Jain for your contribution
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1768188 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-8289) (OFBIZ-8307)(OFBIZ-8440)(OFBIZ-8728)(OFBIZ-8775)(OFBIZ-8776)(OFBIZ-8777)(OFBIZ-8778)(OFBIZ-8779)(OFBIZ-8780)(OFBIZ-8781)(OFBIZ-8782)(OFBIZ-8783)(OFBIZ-8784)(OFBIZ-8787)(OFBIZ-8964)
Thanks: Rahul Singh, Chinmay Patidar, Amit Gadaley and Rishi Solanki for the contribution.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1768184 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-8052)
When you create a RateAmount, you can determine for which WorkEffort it should apply. But when this RateAmount is retrieved for a specific WorkEffort, it fails to find the good RateAmount.
The problem comes from the check done to retrieve the RateAmount at a WorkEffort level. This is the used check :
<entity-and entity-name="RateAmount" list="amounts" filter-by-date="true">
<field-map field-name="rateTypeId" from-field="parameters.rateTypeId"/>
<field-map field-name="partyId" from-field="parameters.partyId"/>
<field-map field-name="workEffortId" from-field="parameters.workEffortId"/>
<field-map field-name="periodTypeId" from-field="parameters.periodTypeId"/>
<field-map field-name="rateCurrencyUomId" from-field="parameters.rateCurrencyUomId"/>
</entity-and>
<if-empty field="amounts">
In this 'entity-and', the partyId is set as a constraint. But it is possible to enable a special RateAmount only for a WorkEffort without regarding the partyId.
This makes the retrieving more accurate by checking first the WorkEffort, then from the retrieved list, check if the partyId matches and finally from this second retrieval, check if the emplPositionTypeId match.
The getRateAmount service searches for the applicable rate from most specific to most general in the RateAmount entity
Defaults for periodTypeId is per hour and default currency is the currency in general.properties
The order is:
1. for specific rateTypeId, workEffortId (workEffort)
2. for specific rateTypeId, partyId (party)
3. for specific rateTypeId, emplPositionTypeId (emplPositionType)
4. for specific rateTypeId (rateType)
Then, the results are filtered to improve the result. If you pass a workEffortId and a partyId,
the service will first search the list of all the rateAmount with the specified workEffortId. Then, if
there is at least one rateAmount with same partyId than the one in the parameter in the list, the list will
be reduced to those entries.
At the end, the first record of the list is chosen.
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.
jleroux: in only fixed few typos in the comment above which comes from the The getRateAmount service description
Thanks: Florian Montalbano
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1761179 13f79535-47bb-0310-9956-ffa450edef68
I removed duplicate paths were componentname was uselessly repeated after component://componentname/script/org/ofbiz (projectmngr was the only one using there project instead)
I had few typos, easily fixed thanks to the tests. There could be still typos but they are unexpected and anyway no-brainer to fix
I'm still wondering about specialpurpose/example/minilang/README.txt.
I changed its content to
"The minilang directory is for static resources that are interpreted at run time rather than being compiled. This goes on the classpath, but does not get built or put into a JAR file."
not sure it makes any sense, I don't see how this relates to the classpath.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1747712 13f79535-47bb-0310-9956-ffa450edef68
[ \t]+$ => "" (empty)
Should be easier to review when committing changes with trailing spaces removed automatically by anyedit or such tool (please refer to http://docs.ofbiz.org/x/mg)
Of course this effort to remove trailing spaces has no functional implications.
Actually, I was doing a 1st commit and as it's long to upload, I got conflicts with r763135
In the meantime I did some refactoring also in *.java and *.groovy files :
){ => ) {
if( => if (
while( => while (
}else => } else
else{ => else {
switch( => switch (
try{ => try {
}catch => } catch
catch( => catch (
}finally{ => } finally {
So these changes are also in this commit, should not be a problem anyway.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@763175 13f79535-47bb-0310-9956-ffa450edef68
Following best practice.
Changed location="org/ofbiz/......... to location="component:// in the service location attribute.
I used <service name=(.*)engine="simple"(.*)\R(.*)location="org/ofbiz => <service name=$1engine="simple"$2\R$3location="component://accounting/script/org/ofbiz
More to follow... (component by component)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@755925 13f79535-47bb-0310-9956-ffa450edef68