You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2016/09/17 10:49:29 UTC

svn commit: r1761188 [1/2] - in /ofbiz/branches: release13.07/ release13.07/applications/accounting/script/org/ofbiz/accounting/rate/ release13.07/applications/accounting/servicedef/ release14.12/ release14.12/applications/accounting/script/org/ofbiz/a...

Author: jleroux
Date: Sat Sep 17 10:49:28 2016
New Revision: 1761188

URL: http://svn.apache.org/viewvc?rev=1761188&view=rev
Log:
"Applied fix from trunk for revision: 1761179"  (conflict handled by hand)
------------------------------------------------------------------------
r1761179 | jleroux | 2016-09-17 12:31:05 +0200 (sam. 17 sept. 2016) | 40 lignes

Fixes: RateAmount is not found when the level is 'WorkEffort'
(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 
------------------------------------------------------------------------

Modified:
    ofbiz/branches/release13.07/   (props changed)
    ofbiz/branches/release13.07/applications/accounting/script/org/ofbiz/accounting/rate/RateServices.xml
    ofbiz/branches/release13.07/applications/accounting/servicedef/services_rate.xml
    ofbiz/branches/release14.12/   (props changed)
    ofbiz/branches/release14.12/applications/accounting/script/org/ofbiz/accounting/rate/RateServices.xml
    ofbiz/branches/release14.12/applications/accounting/servicedef/services_rate.xml
    ofbiz/branches/release15.12/   (props changed)
    ofbiz/branches/release15.12/applications/accounting/script/org/ofbiz/accounting/rate/RateServices.xml
    ofbiz/branches/release15.12/applications/accounting/servicedef/services_rate.xml

Propchange: ofbiz/branches/release13.07/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Sep 17 10:49:28 2016
@@ -6,4 +6,4 @@
 /ofbiz/branches/multitenant20100310:921280-927264
 /ofbiz/branches/release12.04:1557118
 /ofbiz/branches/release15.12:1745714
-/ofbiz/trunk:1506269,1506499,1506504,1506828,1509164,1510042,1511279,1512376,1512573,1516094,1517629,1517702,1517780,1517947,1518336,1518950,1519245,1519999,1520319,1520321,1520326,1524361,1524676,1524704,1524769,1524835,1524950,1525523,1526276,1526387,1526463,1527212,1527254,1527609,1527626,1527810,1528144,1528146,1528149,1528298,1529412,1529418,1529588,1530273,1530634,1530876,1530972,1530976,1531848,1532342,1532366,1533542,1533839,1534062,1535961,1536170,1536656,1537023,1537086,1537179,1537996,1538096,1539147,1539156,1539781,1542264,1542388,1542442,1543744,1543766,1543781,1543994,1544444,1547548,1548143,1549015,1550255,1550258,1550515,1551585,1551744,1552149,1552290,1552500,1552901,1552908,1554064,1554242,1554265,1554290,1554373,1554536,1554681,1554685,1554706,1554764,1554787,1555142,1557409-1557410,1557427,1557440,1557443,1557447,1557456-1557457,1557462,1557593,1558145,1558241,1558373,1558774,1559814,1560048,1560056,1560176,1560203,1560205,1560699,1561286,1561290,1561305,1561311,
 1561327,1561467,1562767,1563238,1563683,1563958,1564111,1564113,1564463,1564473,1564493,1566096,1566273,1569078,1569743,1570611,1570622,1570639-1570640,1571207,1571219,1571247,1573161,1573498,1573639,1574019,1574201,1574404,1575508,1576259,1576331,1576378,1576506,1576511,1576757,1576839,1577268,1577744,1579155,1579161,1579277,1579309,1580455,1580850,1581386,1581972,1581997,1582762,1583040,1583427-1583428,1583551,1583674,1583681,1583689,1583696,1584873,1585033,1585574,1585958-1585959,1586987,1587841,1587843,1588733,1589589,1589602,1589606,1589612,1589625,1589669,1592530,1592588,1592745,1592977,1593902,1593908,1593952,1597239,1597464,1598113,1598327,1598475,1598544,1598913,1603439,1603732,1603739,1604357,1604363,1604522,1604554,1605029,1605269,1605348,1605354,1605707,1607457,1608355,1608495,1608526,1608698,1609047,1609065,1609076,1609087,1609149,1609155,1609167,1609184,1609389,1609394,1609398,1609406,1609418,1609885,1609889,1610355,1610420,1610425,1610685,1610918,1610925,1611321,16121
 90,1612202,1613121,1614019,1614025,1614280,1614355,1614366,1614556,1615296-1615297,1616272,1616684,1616940,1617229,1617473,1617480,1617936,1617938,1618395,1618397,1618570,1618831,1619087,1619098,1619300,1621335,1621363,1621413,1621436,1621438-1621439,1621442,1621599,1621683,1622050,1622170,1622672,1623370,1624538,1624767,1624809,1624817,1626425,1626797,1627230,1627763,1628096,1628130,1628937,1628940,1629382,1629391,1629426,1631203,1631299-1631300,1632764,1632793,1633100,1633188,1633550,1636864,1637883,1639606,1639835,1639840-1639841,1639846,1639863,1639887,1640288,1640299,1640515,1640717,1641066,1641131,1641165,1641548,1641804,1642423,1643341,1644904,1645950,1646204,1646935,1646977,1646984,1647266,1647338,1647559,1647606,1648668,1649239,1649393,1650240,1650583,1650642,1650678,1650882,1650938,1651593,1652361,1652725,1652731,1652739,1653456,1654175,1654273,1655046,1655795,1656983,1660389,1660444,1661358,1661612,1661778,1661853,1661873,1661940,1661951,1661977,1662361,1662500,1663912,16
 63979,1664602,1664604,1666633,1666836,1666939,1666949,1667055,1667253,1668214,1668246,1668258,1668265,1668314,1669317,1672862,1672873,1673764,1674447,1674491,1674496,1674908,1676674,1677123,1677597,1677769-1677770,1678294,1678882,1678911,1679689,1679697,1680155,1680304,1680672,1680733,1680840,1680873,1680881,1682272,1682415,1683998,1686566,1686569,1686574,1686583,1686635,1686651,1687427,1690086,1692458,1693579,1696018,1696234,1697993,1701164,1702704,1703121,1703586,1703965,1703977,1703981,1704000,1704018,1704043,1704052,1704082,1704140,1704230,1705004,1706316,1706561,1706591,1706694,1707837,1708341,1708742,1710178,1710348,1711513,1714244,1714410,1714571,1714657,1715477,1715501,1717058,1717180,1717682,1717760,1718023,1718109,1719094,1720883,1721067,1721625,1722712,1724402,1724916,1724918,1724925,1724943,1724946,1724978,1726828,1729609,1729809,1730735,1730882,1731359,1732721,1733951,1733956,1734246,1734269,1734912,1734918,1735244,1735385,1735569,1735731,1735734,1735773,1736083,1736272
 ,1736434,1736851,1736854,1738235,1738303,1740008,1740629,1741146,1741563,1741684,1742737,1742741,1743025,1743027,1743230,1743411-1743412,1743937,1744117,1744198,1744662,1744667,1744838,1744911,1745111,1745264,1745428,1746228,1746459,1746524,1746676,1746755,1746804,1746832,1747223,1747401,1747646,1747650,1747661,1747959,1748206,1748223,1748260,1748357,1748394,1748401,1748907,1748925,1748944,1749083,1749282,1749519,1749704,1750045,1750166,1750336,1750555,1750624,1751030,1751042,1751423,1752928,1752933,1752941,1752947,1752966,1753834,1758089,1758143,1759678,1759941,1761127,1761170
+/ofbiz/trunk:1506269,1506499,1506504,1506828,1509164,1510042,1511279,1512376,1512573,1516094,1517629,1517702,1517780,1517947,1518336,1518950,1519245,1519999,1520319,1520321,1520326,1524361,1524676,1524704,1524769,1524835,1524950,1525523,1526276,1526387,1526463,1527212,1527254,1527609,1527626,1527810,1528144,1528146,1528149,1528298,1529412,1529418,1529588,1530273,1530634,1530876,1530972,1530976,1531848,1532342,1532366,1533542,1533839,1534062,1535961,1536170,1536656,1537023,1537086,1537179,1537996,1538096,1539147,1539156,1539781,1542264,1542388,1542442,1543744,1543766,1543781,1543994,1544444,1547548,1548143,1549015,1550255,1550258,1550515,1551585,1551744,1552149,1552290,1552500,1552901,1552908,1554064,1554242,1554265,1554290,1554373,1554536,1554681,1554685,1554706,1554764,1554787,1555142,1557409-1557410,1557427,1557440,1557443,1557447,1557456-1557457,1557462,1557593,1558145,1558241,1558373,1558774,1559814,1560048,1560056,1560176,1560203,1560205,1560699,1561286,1561290,1561305,1561311,
 1561327,1561467,1562767,1563238,1563683,1563958,1564111,1564113,1564463,1564473,1564493,1566096,1566273,1569078,1569743,1570611,1570622,1570639-1570640,1571207,1571219,1571247,1573161,1573498,1573639,1574019,1574201,1574404,1575508,1576259,1576331,1576378,1576506,1576511,1576757,1576839,1577268,1577744,1579155,1579161,1579277,1579309,1580455,1580850,1581386,1581972,1581997,1582762,1583040,1583427-1583428,1583551,1583674,1583681,1583689,1583696,1584873,1585033,1585574,1585958-1585959,1586987,1587841,1587843,1588733,1589589,1589602,1589606,1589612,1589625,1589669,1592530,1592588,1592745,1592977,1593902,1593908,1593952,1597239,1597464,1598113,1598327,1598475,1598544,1598913,1603439,1603732,1603739,1604357,1604363,1604522,1604554,1605029,1605269,1605348,1605354,1605707,1607457,1608355,1608495,1608526,1608698,1609047,1609065,1609076,1609087,1609149,1609155,1609167,1609184,1609389,1609394,1609398,1609406,1609418,1609885,1609889,1610355,1610420,1610425,1610685,1610918,1610925,1611321,16121
 90,1612202,1613121,1614019,1614025,1614280,1614355,1614366,1614556,1615296-1615297,1616272,1616684,1616940,1617229,1617473,1617480,1617936,1617938,1618395,1618397,1618570,1618831,1619087,1619098,1619300,1621335,1621363,1621413,1621436,1621438-1621439,1621442,1621599,1621683,1622050,1622170,1622672,1623370,1624538,1624767,1624809,1624817,1626425,1626797,1627230,1627763,1628096,1628130,1628937,1628940,1629382,1629391,1629426,1631203,1631299-1631300,1632764,1632793,1633100,1633188,1633550,1636864,1637883,1639606,1639835,1639840-1639841,1639846,1639863,1639887,1640288,1640299,1640515,1640717,1641066,1641131,1641165,1641548,1641804,1642423,1643341,1644904,1645950,1646204,1646935,1646977,1646984,1647266,1647338,1647559,1647606,1648668,1649239,1649393,1650240,1650583,1650642,1650678,1650882,1650938,1651593,1652361,1652725,1652731,1652739,1653456,1654175,1654273,1655046,1655795,1656983,1660389,1660444,1661358,1661612,1661778,1661853,1661873,1661940,1661951,1661977,1662361,1662500,1663912,16
 63979,1664602,1664604,1666633,1666836,1666939,1666949,1667055,1667253,1668214,1668246,1668258,1668265,1668314,1669317,1672862,1672873,1673764,1674447,1674491,1674496,1674908,1676674,1677123,1677597,1677769-1677770,1678294,1678882,1678911,1679689,1679697,1680155,1680304,1680672,1680733,1680840,1680873,1680881,1682272,1682415,1683998,1686566,1686569,1686574,1686583,1686635,1686651,1687427,1690086,1692458,1693579,1696018,1696234,1697993,1701164,1702704,1703121,1703586,1703965,1703977,1703981,1704000,1704018,1704043,1704052,1704082,1704140,1704230,1705004,1706316,1706561,1706591,1706694,1707837,1708341,1708742,1710178,1710348,1711513,1714244,1714410,1714571,1714657,1715477,1715501,1717058,1717180,1717682,1717760,1718023,1718109,1719094,1720883,1721067,1721625,1722712,1724402,1724916,1724918,1724925,1724943,1724946,1724978,1726828,1729609,1729809,1730735,1730882,1731359,1732721,1733951,1733956,1734246,1734269,1734912,1734918,1735244,1735385,1735569,1735731,1735734,1735773,1736083,1736272
 ,1736434,1736851,1736854,1738235,1738303,1740008,1740629,1741146,1741563,1741684,1742737,1742741,1743025,1743027,1743230,1743411-1743412,1743937,1744117,1744198,1744662,1744667,1744838,1744911,1745111,1745264,1745428,1746228,1746459,1746524,1746676,1746755,1746804,1746832,1747223,1747401,1747646,1747650,1747661,1747959,1748206,1748223,1748260,1748357,1748394,1748401,1748907,1748925,1748944,1749083,1749282,1749519,1749704,1750045,1750166,1750336,1750555,1750624,1751030,1751042,1751423,1752928,1752933,1752941,1752947,1752966,1753834,1758089,1758143,1759678,1759941,1761127,1761170,1761179

Modified: ofbiz/branches/release13.07/applications/accounting/script/org/ofbiz/accounting/rate/RateServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/release13.07/applications/accounting/script/org/ofbiz/accounting/rate/RateServices.xml?rev=1761188&r1=1761187&r2=1761188&view=diff
==============================================================================
--- ofbiz/branches/release13.07/applications/accounting/script/org/ofbiz/accounting/rate/RateServices.xml (original)
+++ ofbiz/branches/release13.07/applications/accounting/script/org/ofbiz/accounting/rate/RateServices.xml Sat Sep 17 10:49:28 2016
@@ -127,7 +127,15 @@ under the License.
                3. for specific rateTypeId, emplPositionTypeId (emplPositionType)
                4. for specific rateTypeId (rateType)
 
-               Then will be checked if the requested periodTypeId and currency can be found, if not isue an error message
+               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.
         -->
         <if-empty field="parameters.rateCurrencyUomId">
             <property-to-field resource="general.properties" property="currency.uom.id.default" field="parameters.rateCurrencyUomId"/>
@@ -144,150 +152,67 @@ under the License.
                 </and>
             </condition>
             <then>
-                <entity-and entity-name="RateAmount" list="amounts" filter-by-date="true">
-                    <field-map field-name="rateTypeId" from-field="parameters.rateTypeId"/>
-                    <field-map field-name="workEffortId" from-field="parameters.workEffortId"/>
-                </entity-and>
-                <if-not-empty field="amounts">
-                    <first-from-list entry="amount" list="amounts"/>
-                    <if-not-empty field="amount.rateAmount">
-                        <set field="level" value="workEffort"/>
-                    </if-not-empty>
-                </if-not-empty>
+                <set field="level" value="workEffort"/>
+                <call-service service-name="getRatesAmountsFromWorkEffortId" in-map-name="parameters">
+                    <result-to-field result-name="ratesList" field="parameters.ratesList"/>
+                </call-service>
+                <call-service service-name="filterRateAmountList" in-map-name="parameters">
+                    <result-to-field result-name="filteredRatesList" field="parameters.ratesList"/>
+                </call-service>
             </then>
-        </if>
-
-        <if><!-- party level -->
+        <else-if> <!-- party level -->
             <condition>
                 <and>
-                    <if-empty field="level"/>
                     <not><if-empty field="parameters.partyId"/></not>
                     <if-compare field="parameters.partyId" value="_NA_" operator="not-equals"/>
                 </and>
             </condition>
             <then>
-                <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"/>
-                </entity-and>
-                <if-not-empty field="amounts">
-                    <first-from-list entry="amount" list="amounts"/>
-                    <if-not-empty field="amount.rateAmount">
-                        <set field="level" value="party"/>
-                    </if-not-empty>
-                </if-not-empty>
+                <set field="level" value="partyId"/>
+                <call-service service-name="getRatesAmountsFromPartyId" in-map-name="parameters">
+                    <result-to-field result-name="ratesList" field="parameters.ratesList"/>
+                </call-service>
+                <call-service service-name="filterRateAmountList" in-map-name="parameters">
+                    <result-to-field result-name="filteredRatesList" field="parameters.ratesList"/>
+                </call-service>
             </then>
-        </if>
-
-        <if><!-- emplPositionType level -->
+        </else-if>
+        <else-if> <!-- emplPositionType level -->
             <condition>
                 <and>
-                    <if-empty field="level"/>
                     <not><if-empty field="parameters.emplPositionTypeId"/></not>
                     <if-compare field="parameters.emplPositionTypeId" value="_NA_" operator="not-equals"/>
                 </and>
             </condition>
             <then>
-                <entity-and entity-name="RateAmount" list="amounts" filter-by-date="true">
-                    <field-map field-name="rateTypeId" from-field="parameters.rateTypeId"/>
-                    <field-map field-name="emplPositionTypeId" from-field="parameters.emplPositionTypeId"/>
-                </entity-and>
-                <if-not-empty field="amounts">
-                    <first-from-list entry="amount" list="amounts"/>
-                    <if-not-empty field="amount.rateAmount">
-                        <set field="level" value="emplPositionType"/>
-                    </if-not-empty>
-                </if-not-empty>
+                <set field="level" value="emplPositionType"/>
+                <call-service service-name="getRatesAmountsFromEmplPositionTypeId" in-map-name="parameters">
+                    <result-to-field result-name="ratesList" field="parameters.ratesList"/>
+                </call-service>
+                <call-service service-name="filterRateAmountList" in-map-name="parameters">
+                    <result-to-field result-name="filteredRatesList" field="parameters.ratesList"/>
+                </call-service>
             </then>
+        </else-if>
         </if>
 
-        <if-empty field="level">
-            <entity-and entity-name="RateAmount" list="amounts" filter-by-date="true">
+        <if-empty field="parameters.ratesList">
+            <entity-and entity-name="RateAmount" list="ratesList" filter-by-date="true">
                 <field-map field-name="rateTypeId" from-field="parameters.rateTypeId"/>
             </entity-and>
-            <set field="level" value="rateType"/>
+            <call-service service-name="filterRateAmountList" in-map-name="parameters">
+                <result-to-field result-name="filteredRatesList" field="parameters.ratesList"/>
+            </call-service>
         </if-empty>
 
-        <if-empty field="amounts">
+        <if-empty field="parameters.ratesList">
             <entity-one entity-name="RateType" value-field="rateType"/>
             <log level="error" message="A valid rate amount could not be found for rateType: ${rateType.description}"/>
         </if-empty>
-        <if-compare field="level" value="workEffort" operator="equals">
-            <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">
-                <entity-one entity-name="Uom" value-field="currencyUomId">
-                    <field-map field-name="uomId" from-field="parameters.rateCurrencyUomId"/>
-                </entity-one>
-                <entity-one entity-name="PeriodType" value-field="periodType"/>
-                <entity-one entity-name="RateType" value-field="rateType"/>
-                <entity-one entity-name="WorkEffort" value-field="workEffort"/>
-                <entity-one entity-name="PartyNameView" value-field="partyNameView"/>
-                <log level="error" message="A valid rate entry could be found for rateType: ${rateType.description}, workEffort: ${workEffort.workEffortName}, party: ${partyNameView.lastName} ${partyNameView.middleName} ${partyNameView.firstName}${partyNameView.groupName} However.....not for the period: ${period.description} and currency: ${currencyUomId.description}"/>
-            </if-empty>
-        </if-compare>
 
-        <if-compare field="level" value="party" operator="equals">
-            <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="periodTypeId" from-field="parameters.periodTypeId"/>
-                <field-map field-name="rateCurrencyUomId" from-field="parameters.rateCurrencyUomId"/>
-            </entity-and>
-            <if-empty field="amounts">
-                <entity-one entity-name="Uom" value-field="currencyUomId">
-                    <field-map field-name="uomId" from-field="parameters.rateCurrencyUomId"/>
-                </entity-one>
-                <entity-one entity-name="PeriodType" value-field="periodType"/>
-                <entity-one entity-name="RateType" value-field="rateType"/>
-                <entity-one entity-name="PartyNameView" value-field="partyNameView"/>
-                <log level="error" message="A valid rate entry could be found for rateType: ${rateType.description}, party: ${partyNameView.lastName} ${partyNameView.middleName} ${partyNameView.firstName}${partyNameView.groupName} However..... NOT   for the period: ${period.description} and currency: ${currencyUomId.description}"/>
-            </if-empty>
-        </if-compare>
-
-        <if-compare field="level" value="emplPositionType" operator="equals">
-            <entity-and entity-name="RateAmount" list="amounts" filter-by-date="true">
-                <field-map field-name="rateTypeId" from-field="parameters.rateTypeId"/>
-                <field-map field-name="emplPositionTypeId" from-field="parameters.emplPositionTypeId"/>
-                <field-map field-name="periodTypeId" from-field="parameters.periodTypeId"/>
-                <field-map field-name="rateCurrencyUomId" from-field="parameters.rateCurrencyUomId"/>
-            </entity-and>
-            <if-empty field="amounts">
-                <entity-one entity-name="Uom" value-field="currencyUomId">
-                    <field-map field-name="uomId" from-field="parameters.rateCurrencyUomId"/>
-                </entity-one>
-                <entity-one entity-name="PeriodType" value-field="periodType"/>
-                <entity-one entity-name="RateType" value-field="rateType"/>
-                <entity-one entity-name="EmplPositionType" value-field="emplPositionType"/>
-                <log level="error" message="A valid rate entry could be found for rateType: ${rateType.description}, emplPositionType: ${emplPositionType.description}.... However.....NOT for the period: ${period.description} and currency: ${currencyUomId.description}"/>
-                <check-errors/>
-            </if-empty>
-        </if-compare>
-
-        <if-compare field="level" value="rateType" operator="equals">
-            <entity-and entity-name="RateAmount" list="amounts" filter-by-date="true">
-                <field-map field-name="rateTypeId" from-field="parameters.rateTypeId"/>
-                <field-map field-name="periodTypeId" from-field="parameters.periodTypeId"/>
-                <field-map field-name="rateCurrencyUomId" from-field="parameters.rateCurrencyUomId"/>
-            </entity-and>
-            <if-empty field="amounts">
-                <entity-one entity-name="Uom" value-field="currencyUomId">
-                    <field-map field-name="uomId" from-field="parameters.rateCurrencyUomId"/>
-                </entity-one>
-                <entity-one entity-name="PeriodType" value-field="periodType"/>
-                <entity-one entity-name="RateType" value-field="rateType"/>
-                <entity-one entity-name="PartyNameView" value-field="partyNameView"/>
-                <log level="error" message="A valid rate entry could be found for rateType: ${rateType.description}, However.....NOT for the period: ${period.description} and currency: ${currencyUomId.description}"/>
-                <check-errors/>
-            </if-empty>
-        </if-compare>
-        <if-not-empty field="amounts">
-            <first-from-list entry="amount" list="amounts"/>
+        <!-- We narrowed as much as we could the result, now returning the first record of the list -->
+        <if-not-empty field="parameters.ratesList">
+            <first-from-list entry="amount" list="parameters.ratesList"/>
             <if-empty field="amount.rateAmount">
                 <set field="amount.rateAmount" value="0" type="BigDecimal"/>
             </if-empty>
@@ -297,7 +222,150 @@ under the License.
             <field-to-result field="level"/>
             <field-to-result field="amount.fromDate" result-name="fromDate"/>
         </if-not-empty>
+    </simple-method>
+
+    <simple-method method-name="getRatesAmountsFromWorkEffortId" short-description="Get all the rateAmount for a given workEffortId">
+        <set value="_READ" field="securityAction"/>
+        <check-permission permission="ACCOUNTING" action="${securityAction}">
+            <fail-property resource="AccountingUiLabels" property="AccountingPermissionError"/>
+        </check-permission>
+        <check-errors/>
+
+        <entity-and entity-name="RateAmount" list="amounts" filter-by-date="true">
+            <field-map field-name="rateTypeId" from-field="parameters.rateTypeId"/>
+            <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">
+            <entity-one entity-name="Uom" value-field="currencyUomId">
+                <field-map field-name="uomId" from-field="parameters.rateCurrencyUomId"/>
+            </entity-one>
+            <entity-one entity-name="PeriodType" value-field="periodType"/>
+            <entity-one entity-name="RateType" value-field="rateType"/>
+            <entity-one entity-name="WorkEffort" value-field="workEffort"/>
+            <entity-one entity-name="PartyNameView" value-field="partyNameView"/>
+            <log level="error" message="A valid rate entry could be found for rateType: ${rateType.description}, workEffort: ${workEffort.workEffortName}, party: ${partyNameView.lastName} ${partyNameView.middleName} ${partyNameView.firstName}${partyNameView.groupName} However.....not for the period: ${period.description} and currency: ${currencyUomId.description}"/>
+        </if-empty>
+
+        <field-to-result field="amounts" result-name="ratesList"/>
+        <field-to-result field="level"/>
+    </simple-method>
+
+    <simple-method method-name="getRatesAmountsFromPartyId" short-description="Get all the rateAmount for a given partyId">
+        <set value="_READ" field="securityAction"/>
+        <check-permission permission="ACCOUNTING" action="${securityAction}">
+            <fail-property resource="AccountingUiLabels" property="AccountingPermissionError"/>
+        </check-permission>
+        <check-errors/>
+
+        <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="periodTypeId" from-field="parameters.periodTypeId"/>
+            <field-map field-name="rateCurrencyUomId" from-field="parameters.rateCurrencyUomId"/>
+        </entity-and>
+
+        <if-empty field="amounts">
+            <entity-one entity-name="Uom" value-field="currencyUomId">
+                <field-map field-name="uomId" from-field="parameters.rateCurrencyUomId"/>
+            </entity-one>
+            <entity-one entity-name="PeriodType" value-field="periodType"/>
+            <entity-one entity-name="RateType" value-field="rateType"/>
+            <entity-one entity-name="PartyNameView" value-field="partyNameView"/>
+            <log level="error" message="A valid rate entry could be found for rateType: ${rateType.description}, party: ${partyNameView.lastName} ${partyNameView.middleName} ${partyNameView.firstName}${partyNameView.groupName} However..... NOT   for the period: ${period.description} and currency: ${currencyUomId.description}"/>
+        </if-empty>
+
+        <field-to-result field="amounts" result-name="ratesList"/>
+        <field-to-result field="level"/>
+    </simple-method>
+
+    <simple-method method-name="getRatesAmountsFromEmplPositionTypeId" short-description="Get all the rateAmount for a given emplPositionTypeId">
+        <set value="_READ" field="securityAction"/>
+        <check-permission permission="ACCOUNTING" action="${securityAction}">
+            <fail-property resource="AccountingUiLabels" property="AccountingPermissionError"/>
+        </check-permission>
+        <check-errors/>
+
+        <entity-and entity-name="RateAmount" list="amounts" filter-by-date="true">
+            <field-map field-name="rateTypeId" from-field="parameters.rateTypeId"/>
+            <field-map field-name="emplPositionTypeId" from-field="parameters.emplPositionTypeId"/>
+            <field-map field-name="periodTypeId" from-field="parameters.periodTypeId"/>
+            <field-map field-name="rateCurrencyUomId" from-field="parameters.rateCurrencyUomId"/>
+        </entity-and>
+
+        <if-empty field="amounts">
+            <entity-one entity-name="Uom" value-field="currencyUomId">
+                <field-map field-name="uomId" from-field="parameters.rateCurrencyUomId"/>
+            </entity-one>
+            <entity-one entity-name="PeriodType" value-field="periodType"/>
+            <entity-one entity-name="RateType" value-field="rateType"/>
+            <entity-one entity-name="EmplPositionType" value-field="emplPositionType"/>
+            <log level="error" message="A valid rate entry could be found for rateType: ${rateType.description}, emplPositionType: ${emplPositionType.description}.... However.....NOT for the period: ${period.description} and currency: ${currencyUomId.description}"/>
+        </if-empty>
+
+        <field-to-result field="amounts" result-name="ratesList"/>
+        <field-to-result field="level"/>
+    </simple-method>
+
+    <simple-method method-name="filterRateAmountList" short-description="Filter a list of rateAmount. The result is the
+        most heavily-filtered non-empty list">
+        <if-empty field="parameters.ratesList">
+            <log level="warning" message="The list parameters.ratesList was empty, not processing any further"/>
+            <return/>
+        </if-empty>
+        <!-- Check if there is a more specific rate -->
+        <set field="filterMap"/>
+        <!-- First : if there are rates from the list with the workEffortId from the parameter -->
+        <if-not-empty field="parameters.workEffortId">
+            <set field="filterMap.workEffortId" from-field="parameters.workEffortId"/>
+            <filter-list-by-and list="parameters.ratesList" map="filterMap" to-list="tempRatesFilteredList"/>
+            <if-not-empty field="tempRatesFilteredList">
+                <set field="parameters.ratesList" from-field="tempRatesFilteredList"/>
+            </if-not-empty>
+
+            <clear-field field="filterMap"/>
+            <clear-field field="tempRatesFilteredList"/>
+        </if-not-empty>
+
+        <!-- Then : if there are rates from the list with the partyId from the parameter -->
+        <if-not-empty field="parameters.partyId">
+            <set field="filterMap.partyId" from-field="parameters.partyId"/>
+            <filter-list-by-and list="parameters.ratesList" map="filterMap" to-list="tempRatesFilteredList"/>
+            <if-not-empty field="tempRatesFilteredList">
+                <set field="parameters.ratesList" from-field="tempRatesFilteredList"/>
+            </if-not-empty>
+
+            <clear-field field="filterMap"/>
+            <clear-field field="tempRatesFilteredList"/>
+        </if-not-empty>
+
+        <!-- Then : if there are rates from the list with the emplPositionTypeId from the parameter -->
+        <if-not-empty field="parameters.emplPositionTypeId">
+            <set field="filterMap.emplPositionTypeId" from-field="parameters.emplPositionTypeId"/>
+            <filter-list-by-and list="parameters.ratesList" map="filterMap" to-list="tempRatesFilteredList"/>
+            <if-not-empty field="tempRatesFilteredList">
+                <set field="parameters.ratesList" from-field="tempRatesFilteredList"/>
+            </if-not-empty>
+
+            <clear-field field="filterMap"/>
+            <clear-field field="tempRatesFilteredList"/>
+        </if-not-empty>
+
+        <!-- Finally : if there are rates from the list with the rateTypeId from the parameter -->
+        <if-not-empty field="parameters.rateTypeId">
+            <set field="filterMap.rateTypeId" from-field="parameters.rateTypeId"/>
+            <filter-list-by-and list="parameters.ratesList" map="filterMap" to-list="tempRatesFilteredList"/>
+            <if-not-empty field="tempRatesFilteredList">
+                <set field="parameters.ratesList" from-field="tempRatesFilteredList"/>
+            </if-not-empty>
+            <clear-field field="filterMap"/>
+            <clear-field field="tempRatesFilteredList"/>
+        </if-not-empty>
 
+        <!-- Return the list -->
+        <field-to-result field="parameters.ratesList" result-name="filteredRatesList"/>
     </simple-method>
 
     <!-- party rate services -->

Modified: ofbiz/branches/release13.07/applications/accounting/servicedef/services_rate.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/release13.07/applications/accounting/servicedef/services_rate.xml?rev=1761188&r1=1761187&r2=1761188&view=diff
==============================================================================
--- ofbiz/branches/release13.07/applications/accounting/servicedef/services_rate.xml (original)
+++ ofbiz/branches/release13.07/applications/accounting/servicedef/services_rate.xml Sat Sep 17 10:49:28 2016
@@ -49,6 +49,45 @@ under the License.
         <attribute name="fromDate" type="Timestamp" mode="OUT" optional="true"/>
         <override name="rateTypeId" optional="false"/>
     </service>
+    <service name="getRatesAmountsFromWorkEffortId" default-entity-name="RateAmount" engine="simple" auth="true"
+             location="component://accounting/minilang/rate/RateServices.xml" invoke="getRatesAmountsFromWorkEffortId">
+        <description>Get all Rates Amounts for a given workEffortId</description>
+        <auto-attributes include="pk" mode="IN" optional="true"/>
+        <attribute name="periodTypeId" type="String" mode="INOUT" optional="true"/>
+        <attribute name="rateCurrencyUomId" type="String" mode="INOUT" optional="true"/>
+        <attribute name="fromDate" type="Timestamp" mode="OUT" optional="true"/>
+        <attribute name="ratesList" type="List" mode="OUT" optional="true"/>
+        <override name="workEffortId" optional="false"/>
+    </service>
+    <service name="getRatesAmountsFromPartyId" default-entity-name="RateAmount" engine="simple" auth="true"
+             location="component://accounting/minilang/rate/RateServices.xml" invoke="getRatesAmountsFromPartyId">
+        <description>Get all Rates Amounts for a given partyId</description>
+        <auto-attributes include="pk" mode="IN" optional="true"/>
+        <attribute name="periodTypeId" type="String" mode="INOUT" optional="true"/>
+        <attribute name="rateCurrencyUomId" type="String" mode="INOUT" optional="true"/>
+        <attribute name="fromDate" type="Timestamp" mode="OUT" optional="true"/>
+        <attribute name="ratesList" type="List" mode="OUT" optional="true"/>
+        <override name="partyId" optional="false"/>
+    </service>
+    <service name="getRatesAmountsFromEmplPositionTypeId" default-entity-name="RateAmount" engine="simple" auth="true"
+             location="component://accounting/minilang/rate/RateServices.xml" invoke="getRatesAmountsFromEmplPositionTypeId">
+        <description>Get all Rates Amounts for a given emplPositionTypeId</description>
+        <auto-attributes include="pk" mode="IN" optional="true"/>
+        <attribute name="periodTypeId" type="String" mode="INOUT" optional="true"/>
+        <attribute name="rateCurrencyUomId" type="String" mode="INOUT" optional="true"/>
+        <attribute name="fromDate" type="Timestamp" mode="OUT" optional="true"/>
+        <attribute name="ratesList" type="List" mode="OUT" optional="true"/>
+        <override name="emplPositionTypeId" optional="false"/>
+    </service>
+    <service name="filterRateAmountList" default-entity-name="RateAmount" engine="simple" auth="true"
+             location="component://accounting/minilang/rate/RateServices.xml" invoke="filterRateAmountList">
+        <description>Get the most specific non-empty Rate Amount list from a list of Rate Amount, given the input parameters :
+        workEffortId, partyId, emplPositionTypeId and rateTypeId</description>
+        <auto-attributes include="pk" mode="IN" optional="true"/>
+        <auto-attributes include="nonpk" mode="IN" optional="true"/>
+        <attribute name="ratesList" type="List" mode="IN" optional="true"/>
+        <attribute name="filteredRatesList" type="List" mode="OUT" optional="true"/>
+    </service>
 
     <!-- PartyRate Services -->
     <service name="updatePartyRate" default-entity-name="PartyRate" engine="simple" auth="true"

Propchange: ofbiz/branches/release14.12/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Sep 17 10:49:28 2016
@@ -9,4 +9,4 @@
 /ofbiz/branches/multitenant20100310:921280-927264
 /ofbiz/branches/release13.07:1547657
 /ofbiz/branches/release15.12:1745714,1746426,1757966,1758998,1759028
-/ofbiz/trunk:1649072,1649083-1649084,1649086,1649090,1649096,1649230,1649238-1649239,1649248,1649272,1649275,1649280-1649281,1649283,1649285-1649286,1649291,1649329,1649331,1649384,1649393,1649666,1649742,1650240,1650348,1650357,1650583,1650642,1650678,1650821,1650882,1650887,1650938,1651593,1652312,1652361,1652638,1652641,1652672,1652688,1652706,1652725,1652731,1652739,1652852,1653248,1653296,1653456,1653597,1653614,1654175,1654273,1654509,1654670,1654672-1654673,1654683-1654684,1654824,1655046,1655668,1655979,1656014,1656185,1656198,1656445,1656983,1657323,1657506-1657507,1657514,1657714,1657790,1657848,1658364,1658662,1658882,1659224,1659965,1660031,1660053,1660389,1660444,1660579,1661303,1661328,1661760,1661778,1661853,1661862,1661873,1661940,1661951,1661977,1662119-1662120,1662361,1662500,1662812,1662919,1663202,1663912,1663979,1664602,1664604,1664696,1665154,1665162,1665535,1666404,1666511,1666633,1666836,1666939,1666949,1666958,1667055,1667253,1667483,1667492,1667774,1668207,
 1668214,1668236,1668246,1668258,1668263,1668265,1668270,1668277,1668314,1668657,1669317,1669588,1672427,1672430,1672846,1672853,1672856,1672862,1672873,1673764,1674447,1674464,1674491,1674496,1674908,1676674,1677123,1677597,1677769-1677770,1678294,1678882,1678911,1679689,1679697,1679709,1679720,1679728,1679732,1679957,1680155,1680288,1680304,1680671,1680675,1680733,1680840,1680881,1682272,1682295,1682415,1682633,1683998,1684094,1686360,1686536,1686545,1686566,1686569,1686574,1686583,1686635,1686651,1686970,1687427,1688772,1690086,1690581,1692357,1692458,1692600,1692604,1693393,1693579,1695017,1696018,1696234,1697590,1697647,1697993,1698259,1698261,1698263,1701164,1701441,1701819,1701825,1701936,1702002,1702548,1702704,1703121,1703586,1703945,1703954,1703965,1703971,1703976-1703977,1703981,1704000,1704014,1704018,1704036,1704043,1704052,1704082,1704140,1704230,1705004,1705329,1705405,1705412,1705417,1705427,1705532,1706159,1706162,1706316,1706531,1706549,1706553,1706561,1706569,17065
 77,1706589,1706591,1706593,1706694,1707837,1707857,1708274,1708341,1708742,1708930,1709117,1710178,1710348,1711513,1712971,1714244,1714410,1714415,1714571,1714657,1715477-1715478,1715485,1715501,1716319,1717058,1717180,1717682,1717710,1717760,1718023,1718109,1719094,1719872,1720883,1721067,1721093,1721625,1722712,1723007,1723248,1724402,1724566,1724763,1724916,1724918,1724925,1724930,1724940,1724943,1724946,1724951,1724957,1724978,1725217,1725257,1725561,1725574,1726388,1726493,1726828,1727894,1728398,1729005,1729609,1729809,1730035,1730456,1730735-1730736,1730882,1730889,1731359,1731382,1731396,1732721,1733951,1733956,1734246,1734269,1734276,1734912,1734918,1735244,1735385,1735569,1735731,1735734,1735750,1735773,1736083,1736087,1736272,1736434,1736851,1736854,1737156,1737440,1738235,1738303,1738902,1740008,1740442,1740629,1741146,1741563,1741684,1741925,1741930,1741960,1742097,1742103,1742737,1742741,1743025,1743027,1743230,1743411-1743412,1743656,1743937,1744117,1744198,1744396,17
 44662,1744768,1744773,1744838,1744873,1744911,1745111,1745264,1745428,1745438,1745573,1745592,1746228,1746422,1746459,1746524,1746527,1746536,1746676,1746755,1746804,1746832,1746890,1747223,1747349,1747402,1747498,1747639,1747642,1747646,1747650,1747661,1747956,1747959,1747963,1748121,1748206,1748223,1748260,1748357,1748394,1748401,1748543,1748689,1748693,1748703,1748837,1748907,1748925,1748944,1748972,1749026,1749083,1749092,1749111,1749282,1749519,1749543,1749546,1749552,1749704,1750045,1750166,1750336,1750555,1750624,1750651,1750922,1750925,1750940,1750964,1751030,1751042,1751357,1751362,1751423,1752928,1752933,1752941,1752947,1752954,1752956,1752966,1753834,1757963,1757968,1757992,1758017,1758089,1758143,1758280,1759005,1759014,1759024,1759678,1759941,1761127,1761170
+/ofbiz/trunk:1649072,1649083-1649084,1649086,1649090,1649096,1649230,1649238-1649239,1649248,1649272,1649275,1649280-1649281,1649283,1649285-1649286,1649291,1649329,1649331,1649384,1649393,1649666,1649742,1650240,1650348,1650357,1650583,1650642,1650678,1650821,1650882,1650887,1650938,1651593,1652312,1652361,1652638,1652641,1652672,1652688,1652706,1652725,1652731,1652739,1652852,1653248,1653296,1653456,1653597,1653614,1654175,1654273,1654509,1654670,1654672-1654673,1654683-1654684,1654824,1655046,1655668,1655979,1656014,1656185,1656198,1656445,1656983,1657323,1657506-1657507,1657514,1657714,1657790,1657848,1658364,1658662,1658882,1659224,1659965,1660031,1660053,1660389,1660444,1660579,1661303,1661328,1661760,1661778,1661853,1661862,1661873,1661940,1661951,1661977,1662119-1662120,1662361,1662500,1662812,1662919,1663202,1663912,1663979,1664602,1664604,1664696,1665154,1665162,1665535,1666404,1666511,1666633,1666836,1666939,1666949,1666958,1667055,1667253,1667483,1667492,1667774,1668207,
 1668214,1668236,1668246,1668258,1668263,1668265,1668270,1668277,1668314,1668657,1669317,1669588,1672427,1672430,1672846,1672853,1672856,1672862,1672873,1673764,1674447,1674464,1674491,1674496,1674908,1676674,1677123,1677597,1677769-1677770,1678294,1678882,1678911,1679689,1679697,1679709,1679720,1679728,1679732,1679957,1680155,1680288,1680304,1680671,1680675,1680733,1680840,1680881,1682272,1682295,1682415,1682633,1683998,1684094,1686360,1686536,1686545,1686566,1686569,1686574,1686583,1686635,1686651,1686970,1687427,1688772,1690086,1690581,1692357,1692458,1692600,1692604,1693393,1693579,1695017,1696018,1696234,1697590,1697647,1697993,1698259,1698261,1698263,1701164,1701441,1701819,1701825,1701936,1702002,1702548,1702704,1703121,1703586,1703945,1703954,1703965,1703971,1703976-1703977,1703981,1704000,1704014,1704018,1704036,1704043,1704052,1704082,1704140,1704230,1705004,1705329,1705405,1705412,1705417,1705427,1705532,1706159,1706162,1706316,1706531,1706549,1706553,1706561,1706569,17065
 77,1706589,1706591,1706593,1706694,1707837,1707857,1708274,1708341,1708742,1708930,1709117,1710178,1710348,1711513,1712971,1714244,1714410,1714415,1714571,1714657,1715477-1715478,1715485,1715501,1716319,1717058,1717180,1717682,1717710,1717760,1718023,1718109,1719094,1719872,1720883,1721067,1721093,1721625,1722712,1723007,1723248,1724402,1724566,1724763,1724916,1724918,1724925,1724930,1724940,1724943,1724946,1724951,1724957,1724978,1725217,1725257,1725561,1725574,1726388,1726493,1726828,1727894,1728398,1729005,1729609,1729809,1730035,1730456,1730735-1730736,1730882,1730889,1731359,1731382,1731396,1732721,1733951,1733956,1734246,1734269,1734276,1734912,1734918,1735244,1735385,1735569,1735731,1735734,1735750,1735773,1736083,1736087,1736272,1736434,1736851,1736854,1737156,1737440,1738235,1738303,1738902,1740008,1740442,1740629,1741146,1741563,1741684,1741925,1741930,1741960,1742097,1742103,1742737,1742741,1743025,1743027,1743230,1743411-1743412,1743656,1743937,1744117,1744198,1744396,17
 44662,1744768,1744773,1744838,1744873,1744911,1745111,1745264,1745428,1745438,1745573,1745592,1746228,1746422,1746459,1746524,1746527,1746536,1746676,1746755,1746804,1746832,1746890,1747223,1747349,1747402,1747498,1747639,1747642,1747646,1747650,1747661,1747956,1747959,1747963,1748121,1748206,1748223,1748260,1748357,1748394,1748401,1748543,1748689,1748693,1748703,1748837,1748907,1748925,1748944,1748972,1749026,1749083,1749092,1749111,1749282,1749519,1749543,1749546,1749552,1749704,1750045,1750166,1750336,1750555,1750624,1750651,1750922,1750925,1750940,1750964,1751030,1751042,1751357,1751362,1751423,1752928,1752933,1752941,1752947,1752954,1752956,1752966,1753834,1757963,1757968,1757992,1758017,1758089,1758143,1758280,1759005,1759014,1759024,1759678,1759941,1761127,1761170,1761179

Modified: ofbiz/branches/release14.12/applications/accounting/script/org/ofbiz/accounting/rate/RateServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/release14.12/applications/accounting/script/org/ofbiz/accounting/rate/RateServices.xml?rev=1761188&r1=1761187&r2=1761188&view=diff
==============================================================================
--- ofbiz/branches/release14.12/applications/accounting/script/org/ofbiz/accounting/rate/RateServices.xml (original)
+++ ofbiz/branches/release14.12/applications/accounting/script/org/ofbiz/accounting/rate/RateServices.xml Sat Sep 17 10:49:28 2016
@@ -127,7 +127,15 @@ under the License.
                3. for specific rateTypeId, emplPositionTypeId (emplPositionType)
                4. for specific rateTypeId (rateType)
 
-               Then will be checked if the requested periodTypeId and currency can be found, if not isue an error message
+               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.
         -->
         <if-empty field="parameters.rateCurrencyUomId">
             <property-to-field resource="general.properties" property="currency.uom.id.default" field="parameters.rateCurrencyUomId"/>
@@ -144,150 +152,67 @@ under the License.
                 </and>
             </condition>
             <then>
-                <entity-and entity-name="RateAmount" list="amounts" filter-by-date="true">
-                    <field-map field-name="rateTypeId" from-field="parameters.rateTypeId"/>
-                    <field-map field-name="workEffortId" from-field="parameters.workEffortId"/>
-                </entity-and>
-                <if-not-empty field="amounts">
-                    <first-from-list entry="amount" list="amounts"/>
-                    <if-not-empty field="amount.rateAmount">
-                        <set field="level" value="workEffort"/>
-                    </if-not-empty>
-                </if-not-empty>
+                <set field="level" value="workEffort"/>
+                <call-service service-name="getRatesAmountsFromWorkEffortId" in-map-name="parameters">
+                    <result-to-field result-name="ratesList" field="parameters.ratesList"/>
+                </call-service>
+                <call-service service-name="filterRateAmountList" in-map-name="parameters">
+                    <result-to-field result-name="filteredRatesList" field="parameters.ratesList"/>
+                </call-service>
             </then>
-        </if>
-
-        <if><!-- party level -->
+        <else-if> <!-- party level -->
             <condition>
                 <and>
-                    <if-empty field="level"/>
                     <not><if-empty field="parameters.partyId"/></not>
                     <if-compare field="parameters.partyId" value="_NA_" operator="not-equals"/>
                 </and>
             </condition>
             <then>
-                <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"/>
-                </entity-and>
-                <if-not-empty field="amounts">
-                    <first-from-list entry="amount" list="amounts"/>
-                    <if-not-empty field="amount.rateAmount">
-                        <set field="level" value="party"/>
-                    </if-not-empty>
-                </if-not-empty>
+                <set field="level" value="partyId"/>
+                <call-service service-name="getRatesAmountsFromPartyId" in-map-name="parameters">
+                    <result-to-field result-name="ratesList" field="parameters.ratesList"/>
+                </call-service>
+                <call-service service-name="filterRateAmountList" in-map-name="parameters">
+                    <result-to-field result-name="filteredRatesList" field="parameters.ratesList"/>
+                </call-service>
             </then>
-        </if>
-
-        <if><!-- emplPositionType level -->
+        </else-if>
+        <else-if> <!-- emplPositionType level -->
             <condition>
                 <and>
-                    <if-empty field="level"/>
                     <not><if-empty field="parameters.emplPositionTypeId"/></not>
                     <if-compare field="parameters.emplPositionTypeId" value="_NA_" operator="not-equals"/>
                 </and>
             </condition>
             <then>
-                <entity-and entity-name="RateAmount" list="amounts" filter-by-date="true">
-                    <field-map field-name="rateTypeId" from-field="parameters.rateTypeId"/>
-                    <field-map field-name="emplPositionTypeId" from-field="parameters.emplPositionTypeId"/>
-                </entity-and>
-                <if-not-empty field="amounts">
-                    <first-from-list entry="amount" list="amounts"/>
-                    <if-not-empty field="amount.rateAmount">
-                        <set field="level" value="emplPositionType"/>
-                    </if-not-empty>
-                </if-not-empty>
+                <set field="level" value="emplPositionType"/>
+                <call-service service-name="getRatesAmountsFromEmplPositionTypeId" in-map-name="parameters">
+                    <result-to-field result-name="ratesList" field="parameters.ratesList"/>
+                </call-service>
+                <call-service service-name="filterRateAmountList" in-map-name="parameters">
+                    <result-to-field result-name="filteredRatesList" field="parameters.ratesList"/>
+                </call-service>
             </then>
+        </else-if>
         </if>
 
-        <if-empty field="level">
-            <entity-and entity-name="RateAmount" list="amounts" filter-by-date="true">
+        <if-empty field="parameters.ratesList">
+            <entity-and entity-name="RateAmount" list="ratesList" filter-by-date="true">
                 <field-map field-name="rateTypeId" from-field="parameters.rateTypeId"/>
             </entity-and>
-            <set field="level" value="rateType"/>
+            <call-service service-name="filterRateAmountList" in-map-name="parameters">
+                <result-to-field result-name="filteredRatesList" field="parameters.ratesList"/>
+            </call-service>
         </if-empty>
 
-        <if-empty field="amounts">
+        <if-empty field="parameters.ratesList">
             <entity-one entity-name="RateType" value-field="rateType"/>
             <log level="error" message="A valid rate amount could not be found for rateType: ${rateType.description}"/>
         </if-empty>
-        <if-compare field="level" value="workEffort" operator="equals">
-            <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">
-                <entity-one entity-name="Uom" value-field="currencyUomId">
-                    <field-map field-name="uomId" from-field="parameters.rateCurrencyUomId"/>
-                </entity-one>
-                <entity-one entity-name="PeriodType" value-field="periodType"/>
-                <entity-one entity-name="RateType" value-field="rateType"/>
-                <entity-one entity-name="WorkEffort" value-field="workEffort"/>
-                <entity-one entity-name="PartyNameView" value-field="partyNameView"/>
-                <log level="error" message="A valid rate entry could be found for rateType: ${rateType.description}, workEffort: ${workEffort.workEffortName}, party: ${partyNameView.lastName} ${partyNameView.middleName} ${partyNameView.firstName}${partyNameView.groupName} However.....not for the period: ${period.description} and currency: ${currencyUomId.description}"/>
-            </if-empty>
-        </if-compare>
 
-        <if-compare field="level" value="party" operator="equals">
-            <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="periodTypeId" from-field="parameters.periodTypeId"/>
-                <field-map field-name="rateCurrencyUomId" from-field="parameters.rateCurrencyUomId"/>
-            </entity-and>
-            <if-empty field="amounts">
-                <entity-one entity-name="Uom" value-field="currencyUomId">
-                    <field-map field-name="uomId" from-field="parameters.rateCurrencyUomId"/>
-                </entity-one>
-                <entity-one entity-name="PeriodType" value-field="periodType"/>
-                <entity-one entity-name="RateType" value-field="rateType"/>
-                <entity-one entity-name="PartyNameView" value-field="partyNameView"/>
-                <log level="error" message="A valid rate entry could be found for rateType: ${rateType.description}, party: ${partyNameView.lastName} ${partyNameView.middleName} ${partyNameView.firstName}${partyNameView.groupName} However..... NOT   for the period: ${period.description} and currency: ${currencyUomId.description}"/>
-            </if-empty>
-        </if-compare>
-
-        <if-compare field="level" value="emplPositionType" operator="equals">
-            <entity-and entity-name="RateAmount" list="amounts" filter-by-date="true">
-                <field-map field-name="rateTypeId" from-field="parameters.rateTypeId"/>
-                <field-map field-name="emplPositionTypeId" from-field="parameters.emplPositionTypeId"/>
-                <field-map field-name="periodTypeId" from-field="parameters.periodTypeId"/>
-                <field-map field-name="rateCurrencyUomId" from-field="parameters.rateCurrencyUomId"/>
-            </entity-and>
-            <if-empty field="amounts">
-                <entity-one entity-name="Uom" value-field="currencyUomId">
-                    <field-map field-name="uomId" from-field="parameters.rateCurrencyUomId"/>
-                </entity-one>
-                <entity-one entity-name="PeriodType" value-field="periodType"/>
-                <entity-one entity-name="RateType" value-field="rateType"/>
-                <entity-one entity-name="EmplPositionType" value-field="emplPositionType"/>
-                <log level="error" message="A valid rate entry could be found for rateType: ${rateType.description}, emplPositionType: ${emplPositionType.description}.... However.....NOT for the period: ${period.description} and currency: ${currencyUomId.description}"/>
-                <check-errors/>
-            </if-empty>
-        </if-compare>
-
-        <if-compare field="level" value="rateType" operator="equals">
-            <entity-and entity-name="RateAmount" list="amounts" filter-by-date="true">
-                <field-map field-name="rateTypeId" from-field="parameters.rateTypeId"/>
-                <field-map field-name="periodTypeId" from-field="parameters.periodTypeId"/>
-                <field-map field-name="rateCurrencyUomId" from-field="parameters.rateCurrencyUomId"/>
-            </entity-and>
-            <if-empty field="amounts">
-                <entity-one entity-name="Uom" value-field="currencyUomId">
-                    <field-map field-name="uomId" from-field="parameters.rateCurrencyUomId"/>
-                </entity-one>
-                <entity-one entity-name="PeriodType" value-field="periodType"/>
-                <entity-one entity-name="RateType" value-field="rateType"/>
-                <entity-one entity-name="PartyNameView" value-field="partyNameView"/>
-                <log level="error" message="A valid rate entry could be found for rateType: ${rateType.description}, However.....NOT for the period: ${period.description} and currency: ${currencyUomId.description}"/>
-                <check-errors/>
-            </if-empty>
-        </if-compare>
-        <if-not-empty field="amounts">
-            <first-from-list entry="amount" list="amounts"/>
+        <!-- We narrowed as much as we could the result, now returning the first record of the list -->
+        <if-not-empty field="parameters.ratesList">
+            <first-from-list entry="amount" list="parameters.ratesList"/>
             <if-empty field="amount.rateAmount">
                 <set field="amount.rateAmount" value="0" type="BigDecimal"/>
             </if-empty>
@@ -297,7 +222,150 @@ under the License.
             <field-to-result field="level"/>
             <field-to-result field="amount.fromDate" result-name="fromDate"/>
         </if-not-empty>
+    </simple-method>
+
+    <simple-method method-name="getRatesAmountsFromWorkEffortId" short-description="Get all the rateAmount for a given workEffortId">
+        <set value="_READ" field="securityAction"/>
+        <check-permission permission="ACCOUNTING" action="${securityAction}">
+            <fail-property resource="AccountingUiLabels" property="AccountingPermissionError"/>
+        </check-permission>
+        <check-errors/>
+
+        <entity-and entity-name="RateAmount" list="amounts" filter-by-date="true">
+            <field-map field-name="rateTypeId" from-field="parameters.rateTypeId"/>
+            <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">
+            <entity-one entity-name="Uom" value-field="currencyUomId">
+                <field-map field-name="uomId" from-field="parameters.rateCurrencyUomId"/>
+            </entity-one>
+            <entity-one entity-name="PeriodType" value-field="periodType"/>
+            <entity-one entity-name="RateType" value-field="rateType"/>
+            <entity-one entity-name="WorkEffort" value-field="workEffort"/>
+            <entity-one entity-name="PartyNameView" value-field="partyNameView"/>
+            <log level="error" message="A valid rate entry could be found for rateType: ${rateType.description}, workEffort: ${workEffort.workEffortName}, party: ${partyNameView.lastName} ${partyNameView.middleName} ${partyNameView.firstName}${partyNameView.groupName} However.....not for the period: ${period.description} and currency: ${currencyUomId.description}"/>
+        </if-empty>
+
+        <field-to-result field="amounts" result-name="ratesList"/>
+        <field-to-result field="level"/>
+    </simple-method>
+
+    <simple-method method-name="getRatesAmountsFromPartyId" short-description="Get all the rateAmount for a given partyId">
+        <set value="_READ" field="securityAction"/>
+        <check-permission permission="ACCOUNTING" action="${securityAction}">
+            <fail-property resource="AccountingUiLabels" property="AccountingPermissionError"/>
+        </check-permission>
+        <check-errors/>
+
+        <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="periodTypeId" from-field="parameters.periodTypeId"/>
+            <field-map field-name="rateCurrencyUomId" from-field="parameters.rateCurrencyUomId"/>
+        </entity-and>
+
+        <if-empty field="amounts">
+            <entity-one entity-name="Uom" value-field="currencyUomId">
+                <field-map field-name="uomId" from-field="parameters.rateCurrencyUomId"/>
+            </entity-one>
+            <entity-one entity-name="PeriodType" value-field="periodType"/>
+            <entity-one entity-name="RateType" value-field="rateType"/>
+            <entity-one entity-name="PartyNameView" value-field="partyNameView"/>
+            <log level="error" message="A valid rate entry could be found for rateType: ${rateType.description}, party: ${partyNameView.lastName} ${partyNameView.middleName} ${partyNameView.firstName}${partyNameView.groupName} However..... NOT   for the period: ${period.description} and currency: ${currencyUomId.description}"/>
+        </if-empty>
+
+        <field-to-result field="amounts" result-name="ratesList"/>
+        <field-to-result field="level"/>
+    </simple-method>
+
+    <simple-method method-name="getRatesAmountsFromEmplPositionTypeId" short-description="Get all the rateAmount for a given emplPositionTypeId">
+        <set value="_READ" field="securityAction"/>
+        <check-permission permission="ACCOUNTING" action="${securityAction}">
+            <fail-property resource="AccountingUiLabels" property="AccountingPermissionError"/>
+        </check-permission>
+        <check-errors/>
+
+        <entity-and entity-name="RateAmount" list="amounts" filter-by-date="true">
+            <field-map field-name="rateTypeId" from-field="parameters.rateTypeId"/>
+            <field-map field-name="emplPositionTypeId" from-field="parameters.emplPositionTypeId"/>
+            <field-map field-name="periodTypeId" from-field="parameters.periodTypeId"/>
+            <field-map field-name="rateCurrencyUomId" from-field="parameters.rateCurrencyUomId"/>
+        </entity-and>
+
+        <if-empty field="amounts">
+            <entity-one entity-name="Uom" value-field="currencyUomId">
+                <field-map field-name="uomId" from-field="parameters.rateCurrencyUomId"/>
+            </entity-one>
+            <entity-one entity-name="PeriodType" value-field="periodType"/>
+            <entity-one entity-name="RateType" value-field="rateType"/>
+            <entity-one entity-name="EmplPositionType" value-field="emplPositionType"/>
+            <log level="error" message="A valid rate entry could be found for rateType: ${rateType.description}, emplPositionType: ${emplPositionType.description}.... However.....NOT for the period: ${period.description} and currency: ${currencyUomId.description}"/>
+        </if-empty>
+
+        <field-to-result field="amounts" result-name="ratesList"/>
+        <field-to-result field="level"/>
+    </simple-method>
+
+    <simple-method method-name="filterRateAmountList" short-description="Filter a list of rateAmount. The result is the
+        most heavily-filtered non-empty list">
+        <if-empty field="parameters.ratesList">
+            <log level="warning" message="The list parameters.ratesList was empty, not processing any further"/>
+            <return/>
+        </if-empty>
+        <!-- Check if there is a more specific rate -->
+        <set field="filterMap"/>
+        <!-- First : if there are rates from the list with the workEffortId from the parameter -->
+        <if-not-empty field="parameters.workEffortId">
+            <set field="filterMap.workEffortId" from-field="parameters.workEffortId"/>
+            <filter-list-by-and list="parameters.ratesList" map="filterMap" to-list="tempRatesFilteredList"/>
+            <if-not-empty field="tempRatesFilteredList">
+                <set field="parameters.ratesList" from-field="tempRatesFilteredList"/>
+            </if-not-empty>
+
+            <clear-field field="filterMap"/>
+            <clear-field field="tempRatesFilteredList"/>
+        </if-not-empty>
+
+        <!-- Then : if there are rates from the list with the partyId from the parameter -->
+        <if-not-empty field="parameters.partyId">
+            <set field="filterMap.partyId" from-field="parameters.partyId"/>
+            <filter-list-by-and list="parameters.ratesList" map="filterMap" to-list="tempRatesFilteredList"/>
+            <if-not-empty field="tempRatesFilteredList">
+                <set field="parameters.ratesList" from-field="tempRatesFilteredList"/>
+            </if-not-empty>
+
+            <clear-field field="filterMap"/>
+            <clear-field field="tempRatesFilteredList"/>
+        </if-not-empty>
+
+        <!-- Then : if there are rates from the list with the emplPositionTypeId from the parameter -->
+        <if-not-empty field="parameters.emplPositionTypeId">
+            <set field="filterMap.emplPositionTypeId" from-field="parameters.emplPositionTypeId"/>
+            <filter-list-by-and list="parameters.ratesList" map="filterMap" to-list="tempRatesFilteredList"/>
+            <if-not-empty field="tempRatesFilteredList">
+                <set field="parameters.ratesList" from-field="tempRatesFilteredList"/>
+            </if-not-empty>
+
+            <clear-field field="filterMap"/>
+            <clear-field field="tempRatesFilteredList"/>
+        </if-not-empty>
+
+        <!-- Finally : if there are rates from the list with the rateTypeId from the parameter -->
+        <if-not-empty field="parameters.rateTypeId">
+            <set field="filterMap.rateTypeId" from-field="parameters.rateTypeId"/>
+            <filter-list-by-and list="parameters.ratesList" map="filterMap" to-list="tempRatesFilteredList"/>
+            <if-not-empty field="tempRatesFilteredList">
+                <set field="parameters.ratesList" from-field="tempRatesFilteredList"/>
+            </if-not-empty>
+            <clear-field field="filterMap"/>
+            <clear-field field="tempRatesFilteredList"/>
+        </if-not-empty>
 
+        <!-- Return the list -->
+        <field-to-result field="parameters.ratesList" result-name="filteredRatesList"/>
     </simple-method>
 
     <!-- party rate services -->

Modified: ofbiz/branches/release14.12/applications/accounting/servicedef/services_rate.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/release14.12/applications/accounting/servicedef/services_rate.xml?rev=1761188&r1=1761187&r2=1761188&view=diff
==============================================================================
--- ofbiz/branches/release14.12/applications/accounting/servicedef/services_rate.xml (original)
+++ ofbiz/branches/release14.12/applications/accounting/servicedef/services_rate.xml Sat Sep 17 10:49:28 2016
@@ -49,6 +49,45 @@ under the License.
         <attribute name="fromDate" type="Timestamp" mode="OUT" optional="true"/>
         <override name="rateTypeId" optional="false"/>
     </service>
+    <service name="getRatesAmountsFromWorkEffortId" default-entity-name="RateAmount" engine="simple" auth="true"
+             location="component://accounting/minilang/rate/RateServices.xml" invoke="getRatesAmountsFromWorkEffortId">
+        <description>Get all Rates Amounts for a given workEffortId</description>
+        <auto-attributes include="pk" mode="IN" optional="true"/>
+        <attribute name="periodTypeId" type="String" mode="INOUT" optional="true"/>
+        <attribute name="rateCurrencyUomId" type="String" mode="INOUT" optional="true"/>
+        <attribute name="fromDate" type="Timestamp" mode="OUT" optional="true"/>
+        <attribute name="ratesList" type="List" mode="OUT" optional="true"/>
+        <override name="workEffortId" optional="false"/>
+    </service>
+    <service name="getRatesAmountsFromPartyId" default-entity-name="RateAmount" engine="simple" auth="true"
+             location="component://accounting/minilang/rate/RateServices.xml" invoke="getRatesAmountsFromPartyId">
+        <description>Get all Rates Amounts for a given partyId</description>
+        <auto-attributes include="pk" mode="IN" optional="true"/>
+        <attribute name="periodTypeId" type="String" mode="INOUT" optional="true"/>
+        <attribute name="rateCurrencyUomId" type="String" mode="INOUT" optional="true"/>
+        <attribute name="fromDate" type="Timestamp" mode="OUT" optional="true"/>
+        <attribute name="ratesList" type="List" mode="OUT" optional="true"/>
+        <override name="partyId" optional="false"/>
+    </service>
+    <service name="getRatesAmountsFromEmplPositionTypeId" default-entity-name="RateAmount" engine="simple" auth="true"
+             location="component://accounting/minilang/rate/RateServices.xml" invoke="getRatesAmountsFromEmplPositionTypeId">
+        <description>Get all Rates Amounts for a given emplPositionTypeId</description>
+        <auto-attributes include="pk" mode="IN" optional="true"/>
+        <attribute name="periodTypeId" type="String" mode="INOUT" optional="true"/>
+        <attribute name="rateCurrencyUomId" type="String" mode="INOUT" optional="true"/>
+        <attribute name="fromDate" type="Timestamp" mode="OUT" optional="true"/>
+        <attribute name="ratesList" type="List" mode="OUT" optional="true"/>
+        <override name="emplPositionTypeId" optional="false"/>
+    </service>
+    <service name="filterRateAmountList" default-entity-name="RateAmount" engine="simple" auth="true"
+             location="component://accounting/minilang/rate/RateServices.xml" invoke="filterRateAmountList">
+        <description>Get the most specific non-empty Rate Amount list from a list of Rate Amount, given the input parameters :
+        workEffortId, partyId, emplPositionTypeId and rateTypeId</description>
+        <auto-attributes include="pk" mode="IN" optional="true"/>
+        <auto-attributes include="nonpk" mode="IN" optional="true"/>
+        <attribute name="ratesList" type="List" mode="IN" optional="true"/>
+        <attribute name="filteredRatesList" type="List" mode="OUT" optional="true"/>
+    </service>
 
     <!-- PartyRate Services -->
     <service name="updatePartyRate" default-entity-name="PartyRate" engine="simple" auth="true"

Propchange: ofbiz/branches/release15.12/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Sep 17 10:49:28 2016
@@ -9,4 +9,4 @@
 /ofbiz/branches/json-integration-refactoring:1634077-1635900
 /ofbiz/branches/multitenant20100310:921280-927264
 /ofbiz/branches/release13.07:1547657
-/ofbiz/trunk:1722712,1723007,1723248,1724402,1724411,1724566,1724689,1724763,1724916,1724918,1724925,1724930,1724940,1724943,1724946,1724951,1724957,1724975,1724978,1725006,1725217,1725257,1725561,1725574,1726388,1726486,1726493,1726828,1727894,1728398,1728411,1729005,1729078,1729609,1729809,1730035,1730456,1730735-1730736,1730747,1730758,1730882,1730889,1731382,1731396,1732454,1732570,1732721,1733951,1733956,1734246,1734269,1734276,1734912,1734918,1735021,1735244,1735385,1735398,1735569,1735731,1735734,1735750,1735753,1735756,1735759,1735773,1736083,1736087,1736272,1736434,1736628,1736851,1736854,1736890,1737156,1737440,1738235,1738303,1738407,1738902,1739438,1739448,1739571,1740008,1740442,1740629,1741146,1741563,1741684,1741925,1741930,1741960,1742018,1742097,1742103,1742712,1742737,1742741,1743025,1743027,1743230,1743411-1743412,1743656,1743937,1744117,1744198,1744396,1744662,1744768,1744773,1744873,1744911,1745111,1745264,1745428,1745438,1745573,1745577,1745592,1745751,1746228,
 1746422,1746459,1746524,1746527,1746536,1746601,1746676,1746714,1746755,1746805,1746832,1746890,1747223,1747349,1747402,1747498,1747639,1747642,1747646,1747650,1747661,1747956,1747959,1747963,1748121,1748133,1748206,1748218,1748223,1748260,1748357,1748394,1748401,1748543,1748559,1748628,1748689,1748693,1748703,1748837,1748854,1748907,1748925,1748929,1748944,1748972,1749026,1749083,1749092,1749111,1749220,1749282,1749519,1749525,1749543,1749546,1749552,1749704,1750045,1750166,1750336,1750555,1750624,1750651,1750922,1750925,1750940,1750959,1750964,1751030,1751042,1751357,1751362,1751423,1752928,1752933,1752941,1752947,1752954,1752956,1752966,1753834,1757963,1757968,1757992,1758017,1758089,1758143,1758280,1759002,1759005,1759014,1759024,1759678,1759941,1761127,1761170
+/ofbiz/trunk:1722712,1723007,1723248,1724402,1724411,1724566,1724689,1724763,1724916,1724918,1724925,1724930,1724940,1724943,1724946,1724951,1724957,1724975,1724978,1725006,1725217,1725257,1725561,1725574,1726388,1726486,1726493,1726828,1727894,1728398,1728411,1729005,1729078,1729609,1729809,1730035,1730456,1730735-1730736,1730747,1730758,1730882,1730889,1731382,1731396,1732454,1732570,1732721,1733951,1733956,1734246,1734269,1734276,1734912,1734918,1735021,1735244,1735385,1735398,1735569,1735731,1735734,1735750,1735753,1735756,1735759,1735773,1736083,1736087,1736272,1736434,1736628,1736851,1736854,1736890,1737156,1737440,1738235,1738303,1738407,1738902,1739438,1739448,1739571,1740008,1740442,1740629,1741146,1741563,1741684,1741925,1741930,1741960,1742018,1742097,1742103,1742712,1742737,1742741,1743025,1743027,1743230,1743411-1743412,1743656,1743937,1744117,1744198,1744396,1744662,1744768,1744773,1744873,1744911,1745111,1745264,1745428,1745438,1745573,1745577,1745592,1745751,1746228,
 1746422,1746459,1746524,1746527,1746536,1746601,1746676,1746714,1746755,1746805,1746832,1746890,1747223,1747349,1747402,1747498,1747639,1747642,1747646,1747650,1747661,1747956,1747959,1747963,1748121,1748133,1748206,1748218,1748223,1748260,1748357,1748394,1748401,1748543,1748559,1748628,1748689,1748693,1748703,1748837,1748854,1748907,1748925,1748929,1748944,1748972,1749026,1749083,1749092,1749111,1749220,1749282,1749519,1749525,1749543,1749546,1749552,1749704,1750045,1750166,1750336,1750555,1750624,1750651,1750922,1750925,1750940,1750959,1750964,1751030,1751042,1751357,1751362,1751423,1752928,1752933,1752941,1752947,1752954,1752956,1752966,1753834,1757963,1757968,1757992,1758017,1758089,1758143,1758280,1759002,1759005,1759014,1759024,1759678,1759941,1761127,1761170,1761179