GNOME Bugzilla – Bug 710055
advanced portfolio report counts capital gains split as dividend
Last modified: 2018-06-29 23:19:57 UTC
Created attachment 257189 [details] testcase If I record capital gains on a stock/fund sale as recommended by the user guide, or as implemented by the lots tool, the advanced portfolio report counts those gains in the "income" field (twice!). An example is attached. Running the advanced portfolio report on this file, Income should be $0, and Total Return should be 0.15%. Instead, Income is $5 and Total Return is 0.29%. A one-line patch will be attached below.
Created attachment 257191 [details] [review] patch to advanced-portfolio.scm Patch.
(In reply to comment #0) > Created an attachment (id=257189) [details] > testcase > > If I record capital gains on a stock/fund sale as recommended by the user > guide, or as implemented by the lots tool, the advanced portfolio report counts > those gains in the "income" field (twice!). An example is attached. > > Running the advanced portfolio report on this file, Income should be $0, and > Total Return should be 0.15%. Instead, Income is $5 and Total Return is 0.29%. > > A one-line patch will be attached below. Jason, Thank you for reporting the bug and submitting a patch. However you are reporting this bug against 2.4.10. The latest stable release is 2.4.13 though and I know there are some fixes in the Advanced Portfolio report as of version 2.4.12. I suspect even that the sign reversal was fixed. Can you upgrade to the latest stable version and verify this please ?
Geert, I've installed 2.4.13 from Debian testing. The behavior is the same, except "Total Return" is now $10 and "Rate of Return" is 0.29%. These should be $5 and 0.15%, respectively. "Income" is still reported as $5 when it should be $0. The patch above still applies to 2.4.13, and corrects the problem. I suspect this applies to the development branch too since https://github.com/Gnucash/gnucash/blob/trunk/src/report/standard-reports/advanced-portfolio.scm has the same line.
I also noticed this issue with the report (amongst many others) and can confirm that the patch applied to 2.4.13 has indeed corrected the issue. Any capital gain is correctly recorded in the realised gain column and not in the income column. Dividend/interest income is still recorded in the income column.
Comment on attachment 257191 [details] [review] patch to advanced-portfolio.scm Thank you for the feedback. I have now committed the patch as r23309 (trunk) and r23310 (2.4). Thank you for your contribution !
This problem has been fixed in our software repository. The fix will go into the next software release. Thank you for your bug report.
Reassign version to 2.4.x so that individual 2.4 versions can be retired.
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=710055. Please update any external references or bookmarks.