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 710055 - advanced portfolio report counts capital gains split as dividend
advanced portfolio report counts capital gains split as dividend
Status: RESOLVED FIXED
Product: GnuCash
Classification: Other
Component: Reports
2.4.x
Other Linux
: Normal normal
: ---
Assigned To: gnucash-reports-maint
gnucash-reports-maint
Depends on:
Blocks:
 
 
Reported: 2013-10-13 18:56 UTC by Jason McCarty
Modified: 2018-06-29 23:19 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
testcase (1.93 KB, application/x-gnucash)
2013-10-13 18:56 UTC, Jason McCarty
  Details
patch to advanced-portfolio.scm (554 bytes, patch)
2013-10-13 18:57 UTC, Jason McCarty
committed Details | Review

Description Jason McCarty 2013-10-13 18:56:51 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.
Comment 1 Jason McCarty 2013-10-13 18:57:53 UTC
Created attachment 257191 [details] [review]
patch to advanced-portfolio.scm

Patch.
Comment 2 Geert Janssens 2013-10-18 15:55:39 UTC
(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 ?
Comment 3 Jason McCarty 2013-10-19 19:26:17 UTC
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.
Comment 4 Richard Ullger 2013-10-20 12:34:16 UTC
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 5 Geert Janssens 2013-10-22 10:42:54 UTC
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 !
Comment 6 Geert Janssens 2013-10-22 10:43:32 UTC
This problem has been fixed in our software repository. The fix will go into the next software release. Thank you for your bug report.
Comment 7 John Ralls 2017-09-24 22:41:42 UTC
Reassign version to 2.4.x so that individual 2.4 versions can be retired.
Comment 8 John Ralls 2018-06-29 23:19:57 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=710055. Please update any external references or bookmarks.