GNOME Bugzilla – Bug 141791
asset in liability gives wrong total in balance sheet
Last modified: 2018-06-29 20:43:25 UTC
Create a new set of books with no accounts. Create a new liability account "sample liability" with opening balance of 100. Within the liability account create an asset "component asset" with opening balance of 20. Choose the report, "Assets & Liabilities"/"Balance Sheet" Choose toolbar:options, tab:display, click on "Show Subtotals", OK. bug: shows "Total sample liability: 120" expected: "Total sample liability: 80" Also note that the Total Assets:20 and Total Liabilities:100 are confusing and could be argued should be 0 and 100 respectively.
Correction: the Total Assets:20 and Total Liabilities:100 are confusing and could be argued should be 0 and *80* respectively
Part of the issue here is the difference between the "account tree" and the accounting equation. In conventional (i.e., paper) system, the chart of accounts is required to follow the accounting equation: i.e., asset accounts can only have asset subaccounts, liability accounts liability subaccounts, etc. GnuCash imposes (few) such restrictions. In GnuCash, you can set up your account tree just about however you choose--even in a way which does not reflect the accounting equation. While this means you have to "remember" that your, for example assets, are not all grouped together, it gives you the flexibility of using a non-standard account organization. Note that, if you do this, the account balances shown in the chart of accounts will reflect *tree balances*. That is, they add the debits/credits for all subaccounts together. Since this is a summary of the account tree, this is proper behavior. The reports, however, should not depend upon asset/liability/etc accounts being in any specific account tree branch or make related assumptions about position in the account tree. Instead, reports should base their calculations on the account type (asset/liability/income/expense/...). I can confirm that this was a bug in the balance sheet report. This bug has been fixed as of gnucash-20040624-120811-cvs.diff. If you want to create an account, under liabilities, which "goes against" the parent balance, you should create a contliability account beneath it. Putting an asset beneath a liability is not the correct way to counter a liability. Since GnuCash (to date) does not support contra-account types, you have to use a liability subaccount and just give it a debit balance. While confirming this bug, I found a new bug in balance-sheet.scm and equity-statement.scm, in which debit equity balances would be reported positive (i.e., credit). This new bug is fixed with the attached patch.
Created attachment 29010 [details] [review] patch fixes balance-sheet.scm and equity-statement.scm bug: renders debit equity balance positive
When applied to the test scenario above, the new balance sheet produces this: Assets comp ass $20.00 Total Assets $20.00 Liabilities samp liability $100.00 Total Liabilities $100.00 Equity Opening Balances -$80.00 Total Equity -$80.00 Total Liabilities & Equity $20.00 This is the correct behavior for a Balance Sheet.
Uh, the patch applied has CVS conflicts in it. Can you please check that it's correct? I'd suggest running "cvs diff -u" instead of "makepatch" to generate this patch...
"phil", can you recheck your patch, please?
Created attachment 31149 [details] [review] corrected patch (does not add CVS conflict markers to source) I think this to be a correct version of the patch. fixes balance-sheet.scm and equity-statement.scm bug: renders debit equity balance positive
Hmm... This revised patch appears to already have been applied to CVS HEAD (although, obviously, not 1.8). Can you please verify that current CVS HEAD has this problem fixed? If so, please feel free to close this bug.
I've not heard anything back about this in over a month.. Does this bug still exist in HEAD?
I don't have the set up to test the HEAD version. Anyone who does have the HEAD version should be able to repeat the steps of the test procedure documented in my original report to determine whether the bug still exists.
Yep, this is fixed in HEAD. So I'll close the bug. This wont be fixed in 1.8.10 but hopefully we'll get the next major release out "soon enough".
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=141791. Please update any external references or bookmarks.