Uploaded image for project: 'OFBiz'
  1. OFBiz
  2. OFBIZ-7957

RateAmount is not found when the level is 'WorkEffort'

    XMLWordPrintableJSON

Details

    • Community Day 3 - 2016

    Description

      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.

      I think we have 2 options here :

      1. Remove the partyId constraint but then the retrieving may be less accurate
      2. Make 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. At the end, we would have the most accurate RateAmount.

      What do you think of it ?

      Attachments

        1. OFBIZ-7957.patch
          26 kB
          Montalbano Florian

        Activity

          People

            jleroux Jacques Le Roux
            Florian M Montalbano Florian
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: