I recently upgraded to 3.5 from 3.2, and in the change my Assets over Time report has been broken. The problem seems to be that I have some asset accounts which have child liability accounts. For example, a property with a mortgage account as a child. The Assets over Time report used to show the net value of that group (i.e. property value less the outstanding mortgage) but now it is just showing the property value. I've tried adding the mortgage account manually in the report options, but as soon as I press Apply it is automatically deselected again.
I've rolled back progressively, and found that the problem appears between v3.3 and v3.4.
A minimal test case datafile will be useful.
Created attachment 373300 [details] Test case datafile This contains a very simple account hierarchy. Under Assets, there's a Property account with a positive balance of £100,000. That Property account has a child Loan account with a negative balance of £80,000. Thus the net balance of the Property account is positive £20,000. In both v3.3 and v3.4 an Assets Piechart report (with accounts shown until level 2) shows the Property account with the net balance of £20,000. However, the Assets over Time report (also with accounts shown until level 2) behaves differently between v3.3 and v3.4. In v3.3 it agrees with the Assets Piechart and shows the Property account with the net £20,000. But in v3.4 it shows the Property account with the gross balance of £100,000.
Hi Adrian Thank you for reporting this bug and the test-case. I can offer a fix, but I am not 100% sure it covers *all* combinations of accounts-selection (including different account-types), account-depth-levels, chart-of-accounts(*) etc. If you could test for me I will be very grateful. (*) I tend to set up my chart so that Loan accounts are children of a top-level Liability placeholder account rather than the asset account, so I don't use your setup, however I don't think yours is invalid/incorrect... Fix for category-barchart.scm -- replace lines as follows - delete '-' line and add '+' line, (without the - or +) Unstaged changes (1) modified gnucash/report/standard-reports/category-barchart.scm @@ -373,7 +373,10 @@ developing over time")) (not (xaccTransGetIsClosingTxn (xaccSplitGetParent s)))) (xaccSplitGetAmount s)))))))) - accounts)) + (delete-duplicates + (append accounts + (filter (lambda (acc) (not (member acc accounts))) + (gnc:acccounts-get-all-subaccounts accounts)))))) ;; Creates the <balance-list> to be used in the function ;; below.
I've pushed fix into the code. Please test fix as described, or latest maint on https://code.gnucash.org/builds/win32/maint/ tomorrow for the fix. I believe this is the right fix.
Many thanks for the quick fix! Happy to confirm that it is working as expected on my personal data file (tested on the maint build dated 20-Jun-2019).