GNOME Bugzilla – Bug 147672
PnL report incorrect when mixing income/expense accounts
Last modified: 2018-06-29 20:45:17 UTC
generate an account tree of this kind: NAME ACCOUNT TYPE In-Out Income Salary Income Food Expense Cash Cash there is a cash account and an account whose children are incomes and expenses. Put two txns: an income from Salary to Cash, and a expense from Cash to Food. Calculate Reports -> Income & Expenses -> Profits & Loss The result: ----cut---- Profit And Loss - 14. 7.2004 to 16. 7.2004 Income In-Out Salary (Spouse) USD 1,000.00 food USD 100.00 Total In-Out DOP 1,100.00 Total Income DOP 900.00 Profit DOP 900.00 ---cut---- The result shows that the amount for the account In-Out is calculated (Income)+(Expense) instead of (Income)-(Expense) I think this happens because I have Expenses and Incomes below the same account. On the contrary, the total income is well.
I believe this has been fixed in CVS (HEAD)
This has been discussed in a differnt bug report in great length. Basically the whole point of the account structure should be that some account types should only be used as subaccounts of the same account type. In your case it would be the wrong approach to have an expense account as subaccount of income. By making the account "In-Out" an income account, you already made it something different that what you wanted: There is no such thing as an "income-expense" account in gnucash. Only the imaginary top of the hierarchy is such a point. Maybe it is wrong that gnucash lets you do this at all -- but then people would complain even more about these further restrictions. Bottom line: The gnucash reports are set up for a "sensible" account structure, where expense and income accounts are *not* mixed. If you still mix them, you will shoot yourself in the foot. Gnucash doesn't stop you to do this. Maybe it should.
Actually, having an expense account subsidiary to an income account *does* make sense... at least until GnuCash has bona fide contra-account types. Use, say "Net Sales" as income account, with "Sales" (an income account) and "Sales Returns & Allowances" (an expense account) beneath it. That way, Sales Returns & Allowances acts as a contra-account to Sales. I think that, as a matter of good programming practice, the reports *should* be written to account for any plausible (i.e., possible) account arrangement. I have tried to do this with balance-sheet.scm, equity-statement.scm, and income-statement.scm. So shooting the occasional oddball in the foot really shouldn't be necessary. :) I can't vouch for any of the Guppi or cash flow reports, though... haven't even looked at them.
Well, this *is* what I meant by "I believe this has been fixed in CVS HEAD".. I agree with comment #3 in that the reports should handle any gnucash-support account hierarchy.
Fixed in HEAD, reopen if it still appears
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=147672. Please update any external references or bookmarks.