[
https://issues.apache.org/jira/browse/OFBIZ-5282?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13856911#comment-13856911
]
Jacopo Cappellato commented on OFBIZ-5282:
------------------------------------------
First of all I apologize for the late response: it took time to review this big
patch because I had to do it in my spare time.
Thanks to Hans and to all the persons that added reviews and information, it
was really useful. I will try to summarize here my point of view.
This is indeed a lot of work and I appreciate the effort; and it is clear that
it was written to address concrete requirements; however they are very specific
and limited and with this code the system looks more complex and I feel that
the same requirements could be tackled with different alternative options (some
of them completely different from the one proposed here, some of them have been
mentioned in some other comment); this patch also covers a very small part of
the acc transaction segmentation/tagging (e.g. default tags are not supported);
I think it would be good, if there is enough interest in this feature, that the
community agrees on the best way to implement this segmentation after a
thorough review and analysis of the requirements, then the foundation could be
defined in a more consistent way.
Here are some of my concerns:
1) the original patch (and also the reviewed patch) deals with specific
workflows and ui that assume specific scenarios (e.g. a maximum system wide
value of segments defined as %; or only one); in a different context they may
seem arbitrary and may limit the reusability of this patch and add complexity
to the codebase
2) I understand that the original work was not final, but the proposed patch
contained a series of defects; even if some of them are minor and easy to fix,
they are really easy to spot with a cursory review; the fact that they were
included in the proposed patch don’t make me comfortable that the work
(including its more complex parts) has been fully reviewed and tested and well
designed and crafted; here is a non exhaustive list of issues:
* the definition of OrderItemSegment entity should be in the order component
* there are several log entries that are not clear and should be removed, for
example:
{code}
<log message="======112============ledgerSegmentListId:
${parameters.ledgerSegmentListId} list: ${parameters.ledgerSegmentList}"
level="info"/>
{code}
* an upper cased service name/simple method name: DeleteSegment
* there are code blocks that could cause rounding issues, see for example (but
there are several others, including some code in the data preparation scripts
of the financial reports and in ViewAcctgTransEntries):
{code}+ <iterate entry="totalDebitsToOpeningDatesEntry"
list="totalDebitsToOpeningDates">
+ <set field="totalDebitsToOpeningDate.amount"
+ value="${totalDebitsToOpeningDate.amount +
(totalDebitsToOpeningDatesEntry.amount *
totalDebitsToOpeningDatesEntry.percentageApplic) / 100}"/>
+ </iterate>
{code}
* inconsistent formatting:
{code}+ }
+ else {
{code}
* a Groovy file name with a typo, I guess (LIst should be List):
GetAllLedgerSegmentLIstIds.groovy
* code like the following makes the controller entries difficult to read:
{code} <request-map uri="createInvoiceItem">
<security https="true" auth="true"/>
- <event type="service" invoke="createInvoiceItem"/>
+ <event type="simple" invoke="createLedgerSegmentsMap"
path="component://accounting/script/org/ofbiz/accounting/ledger/AcctgTransEvents.xml"/>
<response name="success" type="view" value="listInvoiceItems"/>
<response name="error" type="view" value="listInvoiceItems"/>
</request-map>
{code}
* what is this (from ShoppingCartEvents.java)?
{code}+ private static final List<Map<String, Object>>[] LinkedList =
null;{code}
> Introduce Accounting ledger segmentation
> ----------------------------------------
>
> Key: OFBIZ-5282
> URL: https://issues.apache.org/jira/browse/OFBIZ-5282
> Project: OFBiz
> Issue Type: Improvement
> Components: accounting
> Affects Versions: SVN trunk
> Environment: any
> Reporter: Hans Bakker
> Assignee: Jacopo Cappellato
> Fix For: SVN trunk
>
> Attachments: ledgersegment-2013-12-24.patch, ledgersegmentOct18.patch
>
>
> We have the possibility here to be able to introduce Apache OFBiz accounting
> in a large multi company organization. This organization is evaluating the
> several alternatives and after evaluation of OFBiz, came up with a function
> which OFBiz needs to have, in order to be considered.
> The user story:
> Although OFBiz accounting has the 'costcenter' function, it is not
> fine-grained enough, we need to be able to segment the ledger to a lower
> level that the GL accounts namely to the accounting transaction.. Further,
> all existing reports should have the facility to be able to select a segment
> of the ledger for either costing, profit or other purposes like special
> projects.
> The proposed user interface.
> We need at least at the order item level the ability to specify a
> parent-segment/segment and a percentage, if the percentange is not 100% the
> remainder to 100% should be assigned to another segment.
> These segments can be defined and assigned by the user to the order item upon
> entry. When the related invoice is created the segment(s) will be copied and
> can overridden before posting when these segment names will be copied to the
> accounting transaction.
> The proposed user reporting.
> All existing ledger reports will have the additional ability to select these
> segments and will only incorporate accounting transactions where this segment
> is specified.
> The proposed technical implementation.
> 1. add a new entity called LedgerSegment with fields: ledgerSegmentId,
> parentSegmentId, description
> 2. add another 3 similar entities: OrderItemSegment, InvoiceItemSegment,
> AcctTransSegment to make the relation to the LedgerSegment entity and to
> specify the percentage.
> 3. Change the order, invoice, accounting transaction screens and ledger
> report entity views to be able to use the segment names when available in the
> LedgerSegment entity
> As i said , please let me know what you think, this is a great opportunity
> for OFBiz accounting.
> Regards,
> Hans Bakker
> CEO AntWebsystems.com
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)