Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Balance Sheet opening balance calculation issue #16782

chdecultot opened this Issue Feb 26, 2019 · 1 comment


None yet
2 participants
Copy link

commented Feb 26, 2019


There is a design issue in the balance sheet opening balance calculation.
Currently, for assets, liabilities and equities, the calculation is as follow:

flt(asset[0].get("opening_balance", 0), float_precision) is added or deducted (liabilities/equities) from the opening balance.

But this works only if we have one root account for each root type, as this calculation only selects the first one.
In the french CoA, we have 4 root accounts in the asset category, which leads to the calculation of an incorrect opening balance.

The calculation should be something like:

for a in asset:
    if 'parent_account' in a and a['parent_account'] == '':
        opening_balance += flt(asset[0].get("opening_balance", 0), float_precision)

That would take into account the opening balance for each root account.

@chdecultot chdecultot changed the title Balance Sheet opening balance calculation issue [Bug] Balance Sheet opening balance calculation issue Feb 26, 2019

@chdecultot chdecultot added the Accounts label Feb 26, 2019


This comment has been minimized.

Copy link

commented Feb 26, 2019

Hi Charles,
Correct we have similar issue for Tunisian COA.
Since account grouping is not based on root type (asset, liability etc...), but they follow grouping by class. As a workaround I have created two root account for each class (based on a hint from you, thx), yes for asset accounts I have created four root accounts (class 2 - asset, class 3 - asset, class 4 - asset, class 5- asset ).

Note: This issue is generic for any country where account grouping is based on a mixed account types.

Thanks to implement this correction ASAP.


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.