[GNC] Transaction Report Sign Reverses

Adrien Monteleone adrien.monteleone at lusfiber.net
Mon Aug 12 15:59:18 EDT 2019


I agree, the FAQ example is incorrect. It doesn’t reverse the sign of Business:Expenses when it should.

Even if that were a contra-income account, it would still normally have a debit balance (+) and get reversed.

The same goes for using the ‘Credit Accounts’ setting.

1) Assets = Liabilities + Equity + Retained Earnings/Loss
textbook

2) Assets = Liabilities + Equity + (Income - Expenses)
expand Retained Earnings/Loss

3) Assets - Liabilities - Equity - (Income - Expenses) = 0
Move everything to the left side

4) Assets - Liabilities - Equity - Income + Expenses = 0
distribute the operation on Income and Expenses

5) Assets + (-Liabilities) + (-Equity) + (-Income) + Expenses = 0
changing all operations to (+)

Sign reversal should be for *display* not for calculations. It should happen *after* the calculation is done.

Sign reversal is only necessary because the formula used puts everything on one side equal to zero and then sets all operations to addition. If the formula was changed to the textbook version, all accounts (except expenses and contra-accounts) are positive. (or technically, *all* accounts are positive, but some operations are subtraction)

Note that in the last equation above (5), Liabilities, Equity and Income are NOT negative numbers, that is, you are not reading a double negative. Distributing the negative sign when moving all terms to the left IS the reversal for the zero balanced version of the equation. Reversing the signs again is effectively moving them back to the right, you don’t reverse the signs again and then still use the zero balanced equation leaving the reversed terms on the left.

Applying the FAQ example:

Assets = $90
Liabilities = 0
Equity = 0
Income = $110
Expenses = $20

2) $90 = 0 + 0 + ($110 - $20)

3) $90 - 0 - 0 - ($110 - $20) = 0

4) $90 - 0 - 0 - $110 + $20 = 0

5) $90 + (0) + (0) + (-$110) + $20 = 0

What you can’t do is this:

6) $90 + (0) + (0) + $110 - $20 ≠ 0 (it equals $180)
reversing Income/Expense or all Credit accounts

By reversing the signs *again* (on just Credit accounts or just Income/Expense) after moving everything to the left and *then* doing the calculation is what results in the inequality.

The current report has a bug.

(and from the question posed by the FAQ, what is the sense in running a transaction report on your entire book anyway? What might you expect to glean from that?)

Regards,
Adrien


> On Aug 12, 2019, at 3:45 AM, David T. via gnucash-user <gnucash-user at gnucash.org> wrote:
> 
> Well, it seems odd to me that "Double" display (as Adrien noted)(thank you, Adrien!) is able to display the figures as the user prefers. It is also odd to me that the report knows to switch the values of the individual transactions, but is unable to remember that fact when it comes to the totals. That right there is the problem.
> 
> As for the FAQ, it seems to me that there is a mistake in the example there: the GnuCash option is to change signs for Income *and* Expenses. But the example provided reverses Income but not Expenses. Were it to reverse both sets of accounts as the preference indicates, then the math should work out correctly ($100+10-20=$90). Or am I missing something here?
> 
> Why is it not possible to perform the calculation for totals and then apply a display modifier so that the user sees numbers as they prefer?
> 
> The current solution is a poor one.




More information about the gnucash-user mailing list