Uploaded image for project: 'OFBiz'
  1. OFBiz
  2. OFBIZ-1434 General Ledger
  3. OFBIZ-1630

Implement service to return an aggregated PartyAcctgPreference map containing information for all the preferences in a internal organization tree

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • None
    • accounting
    • None

    Description

      The final goal is to (from a message to the dev list by David Jones):
      "[...] for most settings have child organizations use parent organization settings if that setting is not present for the child. These should be considered on a granular level, like fields on the PartyAcctgPreference entity rather than looking for the entire record."

      Implement a service that, given an organizationPartyId, create an in memory GenericValue for the PartyAccountingPreference entity.

      The contents of the fields of the GenericValue are composed following this logic:
      1) an empty GenericValue for the PartyAccountingPreference entity, is created (in memory)
      2) select the PartyAccountingPreference entity, associated to the organizationPartyId (organizationPartyId = PartyAccountingPreference.partyId), if it exists, and copy all its fields into the GenericValue created at point 1.
      3) if, in the GenericValue created at point 1, there are some fields that are empty, then:
      3.a) select the parent organization associated to the organizationPartyId; here is an example of the association:
      <PartyRelationship partyIdFrom="Company" partyIdTo="MARKETING" partyRelationshipTypeId="GROUP_ROLLUP" roleTypeIdFrom="NA" roleTypeIdTo="NA" fromDate="2001-05-13 00:00:00.000"/>
      where "Company" is the parent organization of the "MARKETING" organizationPartyId
      3.b) if the parent organization exists, select its PartyAccountingPreference entity; if it exists, copy its fields to the GenericValue created at point 1, but don't override existing content; you have only to copy fields that are null in the destination map
      4) repeat step 3: if, in the GenericValue created at point 1, there are still some fields that are empty, then continue with 3.a and 3.b

      To summarize:
      proposed name of the service: "getPartyAccountingPreferences"
      IN parameter: organizationPartyId
      OUT parameter: partyAccountingPreference (a GenericValue for the PartyAccountingPreference entity)

      Attachments

        Issue Links

          Activity

            People

              jacopoc Jacopo Cappellato
              jacopoc Jacopo Cappellato
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: