I am using Reversed Balanced Accounts for Credit accounts. I believe that since 3.7, when viewing a budget report the year's Actual Total for Liabilities and Income are reversed from the report's monthly totals and so the Total Actual and Total Difference are incorrect. When looking at a budget report, for each month it shows something like (numbers are examples): Liabilities Bgt Act Diff -4 -3 -1 (debiting the accounts, paying liabilities down) Income Bgt Act Diff +6 +6 0 (crediting the accounts, making money) For the year's totals, since 3.7 it now shows: Liabilities: Bgt Act Diff -48 +27 -75 (actual shows crediting the accounts, increasing liabilities) Income Bgt Act Diff +72 -54 -126 (actual shows debiting the accounts, like I'm making negative income) I would expect the year's actual column totals to have their signs to be reversed, so Liabilities would have -27 and Income would have +54.
I would be *very* grateful for a small test datafile please!
Created attachment 373400 [details] test datafile Here's a test datafile.
My understanding is that only the *total* column is being miscalculated, and the periodic bdt/act/diff are correct? Then it's a simple fix. Modify budget.scm as follows: modified gnucash/report/standard-reports/budget.scm @@ -396,12 +396,15 @@ budget acct total-periods)) (act-total (gnc:get-account-periodlist-actual-value budget acct total-periods)) + (act-abs (if reverse-balance? + (- act-total) + act-total)) (dif-total (if income-acct? - (- act-total bgt-total) - (- bgt-total act-total)))) + (- act-abs bgt-total) + (- bgt-total act-abs)))) (loop (cdr column-list) (disp-cols "total-number-cell" current-col - bgt-total act-total dif-total)))) + bgt-total act-abs dif-total)))) (else (let* ((period-list (cond
Or, just add one line: modified gnucash/report/standard-reports/budget.scm @@ -396,6 +396,7 @@ budget acct total-periods)) (act-total (gnc:get-account-periodlist-actual-value budget acct total-periods)) + (act-total (if reverse-balance? (- act-total) act-total)) (dif-total (if income-acct? (- act-total bgt-total) (- bgt-total act-total))))
Hmm the fix above will restore expected behaviour for this bug. But any other amount-reversal option will cause problems, probably due to bug 780717; internal budget-amounts assume 'credit accounts' and show invalid report/budget editor for any other reversal option.
Unsure what could be considered "miscalculated" or "correct" in this case. I've chosen (or not changed from) the default configuration of Reversed Credit Accounts. It was not an issue in prior versions (pre-3.7) of GnuCash. Now the budget's Total section has the Actual column reversed from what was expected. The effect of this is that the Total's Diff column is incorrect, going in the incorrect(?) direction by the absolute of the actual column. So instead of: Liabilities Budget (-5) - Actual (-3) = Total (-2) We get: Budget (-5) - Actual 3 = Total (-8) Putting aside changing the Budget module to account for whatever is selected in the Reversed Balance Accounts preferences section, would it be possible to correct whatever changed between 3.6 and 3.7 that broke budget reporting for the default Reversed Balance Accounts setting?
I've fixed as above in development branch which means the next release will fix it. If you're confident try modifying budget.scm in C:\Program Files (x86\...etc... as per comment 4 above; this should fix the total 'actual' amount sign. If you're not confident then you'll have to wait for the next release I'm afraid.
or you can try the windows nightly after it's built tomorrow: https://code.gnucash.org/builds/win32/
Thank you. Looks like there are build errors for 9/20 and 9/21 builds in the maint branch: https://code.gnucash.org/builds/win32/build-logs/maint/2019-09/
Indeed. Those should be fixed for the next nightly.
*** Bug 797427 has been marked as a duplicate of this bug. ***