[jira] Created: (OFBIZ-214) Incorrect calculation of netbalance

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[jira] Created: (OFBIZ-214) Incorrect calculation of netbalance

Nicolas Malin (Jira)
Incorrect calculation of netbalance
-----------------------------------

                 Key: OFBIZ-214
                 URL: http://issues.apache.org/jira/browse/OFBIZ-214
             Project: OFBiz (The Open for Business Project)
          Issue Type: Bug
          Components: accounting
            Reporter: Eriks Dobelis
         Attachments: utilaccounting.diff

UtilAccounting.getNetBalance is incorrectly calculating balances, because it assumes that ParentGlAccountClassId should be either DEBIT or CREDIT, but actually it could be more hierarchical levels, e.g. DEBIT/ASSET/CURRENT_ASSET. For accounts with class as CURRENT_ASSET the returned balance would be 0.
Supplied patch gives a quick fix, but may be it could be done in a safer way.

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (OFBIZ-214) Incorrect calculation of netbalance

Nicolas Malin (Jira)
     [ http://issues.apache.org/jira/browse/OFBIZ-214?page=all ]

Eriks Dobelis updated OFBIZ-214:
--------------------------------

    Attachment: utilaccounting.diff

> Incorrect calculation of netbalance
> -----------------------------------
>
>                 Key: OFBIZ-214
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-214
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Bug
>          Components: accounting
>            Reporter: Eriks Dobelis
>         Attachments: utilaccounting.diff
>
>
> UtilAccounting.getNetBalance is incorrectly calculating balances, because it assumes that ParentGlAccountClassId should be either DEBIT or CREDIT, but actually it could be more hierarchical levels, e.g. DEBIT/ASSET/CURRENT_ASSET. For accounts with class as CURRENT_ASSET the returned balance would be 0.
> Supplied patch gives a quick fix, but may be it could be done in a safer way.

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] Assigned: (OFBIZ-214) Incorrect calculation of netbalance

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)
     [ http://issues.apache.org/jira/browse/OFBIZ-214?page=all ]

Si Chen reassigned OFBIZ-214:
-----------------------------

    Assignee: Si Chen

> Incorrect calculation of netbalance
> -----------------------------------
>
>                 Key: OFBIZ-214
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-214
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Bug
>          Components: accounting
>            Reporter: Eriks Dobelis
>         Assigned To: Si Chen
>         Attachments: utilaccounting.diff
>
>
> UtilAccounting.getNetBalance is incorrectly calculating balances, because it assumes that ParentGlAccountClassId should be either DEBIT or CREDIT, but actually it could be more hierarchical levels, e.g. DEBIT/ASSET/CURRENT_ASSET. For accounts with class as CURRENT_ASSET the returned balance would be 0.
> Supplied patch gives a quick fix, but may be it could be done in a safer way.

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] Closed: (OFBIZ-214) Incorrect calculation of netbalance

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)
     [ http://issues.apache.org/jira/browse/OFBIZ-214?page=all ]

Si Chen closed OFBIZ-214.
-------------------------

    Resolution: Fixed

Eriks, thanks for pointing that out and suggesting a solution, which was quite closed to what I ended up doing.  The only thing is, there already were recursive isDebit/isCredit methods in that same class, so I just used them.  See r 450254.  I think this is fixed now.  Si

> Incorrect calculation of netbalance
> -----------------------------------
>
>                 Key: OFBIZ-214
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-214
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Bug
>          Components: accounting
>            Reporter: Eriks Dobelis
>         Assigned To: Si Chen
>         Attachments: utilaccounting.diff
>
>
> UtilAccounting.getNetBalance is incorrectly calculating balances, because it assumes that ParentGlAccountClassId should be either DEBIT or CREDIT, but actually it could be more hierarchical levels, e.g. DEBIT/ASSET/CURRENT_ASSET. For accounts with class as CURRENT_ASSET the returned balance would be 0.
> Supplied patch gives a quick fix, but may be it could be done in a safer way.

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira