After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 147672 - PnL report incorrect when mixing income/expense accounts
PnL report incorrect when mixing income/expense accounts
Status: VERIFIED FIXED
Product: GnuCash
Classification: Other
Component: Reports
1.8.x
Other Linux
: Normal normal
: ---
Assigned To: Chris Lyttle
Chris Lyttle
Depends on:
Blocks:
 
 
Reported: 2004-07-15 19:44 UTC by Paolo Benvenuto
Modified: 2018-06-29 20:45 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Paolo Benvenuto 2004-07-15 19:44:58 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.
Comment 1 Derek Atkins 2004-07-16 03:33:08 UTC
I believe this has been fixed in CVS (HEAD)
Comment 2 Christian Stimming 2004-07-16 09:56:27 UTC
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.
Comment 3 Phil T. Rich 2004-07-28 05:45:01 UTC
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.
Comment 4 Derek Atkins 2004-08-01 02:48:49 UTC
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.
Comment 5 Chris Lyttle 2004-08-18 05:43:36 UTC
Fixed in HEAD, reopen if it still appears
Comment 6 John Ralls 2018-06-29 20:45:17 UTC
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.