You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by "Jacopo Cappellato (JIRA)" <ji...@apache.org> on 2008/04/01 00:18:24 UTC

[jira] Commented: (OFBIZ-1630) Implement service to return an aggregated PartyAcctgPreference map containing information for all the preferences in a internal organization tree

    [ https://issues.apache.org/jira/browse/OFBIZ-1630?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12583903#action_12583903 ] 

Jacopo Cappellato commented on OFBIZ-1630:
------------------------------------------

Excellent, thanks Rashko!

I will review and commit the patch tomorrow (if no ones beats me before).

Jacopo

> Implement service to return an aggregated PartyAcctgPreference map containing information for all the preferences in a internal organization tree
> -------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: OFBIZ-1630
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1630
>             Project: OFBiz
>          Issue Type: Sub-task
>          Components: accounting
>            Reporter: Jacopo Cappellato
>         Attachments: getPartyAccountingPreferences.patch
>
>
> 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)

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