Bug 393057 - Investment Capital Gains by Account Report doesn't show transactions for today
Summary: Investment Capital Gains by Account Report doesn't show transactions for today
Status: REPORTED
Alias: None
Product: kmymoney
Classification: Applications
Component: general (show other bugs)
Version: git (master)
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-04-12 18:27 UTC by Michael Carpino
Modified: 2024-08-17 17:23 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Capital Gains report calculation (32.62 KB, image/png)
2020-09-19 06:59 UTC, Suresh PB
Details
test case (1.13 KB, application/gzip)
2020-09-19 10:52 UTC, Suresh PB
Details
Report output (13.99 KB, image/png)
2020-09-19 12:03 UTC, Thomas Baumgart
Details
Screenshot (9.70 KB, image/png)
2020-09-19 12:38 UTC, Suresh PB
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Carpino 2018-04-12 18:27:52 UTC
If I sell a stock today (04/12/2018) and record it in the ledger the transaction is not reporting on the Investment Capital Gains by Account Report.  If I change the date to 04/11 still nothing.  If I change the date to 04/10 no reporting.  If I change the ledger date to 04/09/2018 it finally shows up on the report.  Same is true for the Investment Capital Gains by Type report.  The report isn't reporting the correct transaction information for the pulled date information.

I'm running KMM 5.0.2 on Manjaro.
Comment 1 Suresh PB 2020-09-19 06:59:23 UTC
Created attachment 131762 [details]
Capital Gains report calculation

Investment Capital Gains report indicates "Capital Gains" incorrectly.  For example

Buy value:    252,138.53
Sell Value:   239,481.98
Capital Gain:  -12656.55 (negative)

But the report indicates the Capital gain as 12,656.55 (positive).  Please fix.
Comment 2 Thomas Baumgart 2020-09-19 10:25:15 UTC
Can you provide a small sample file (not your private data) that shows the problem and attach it here? TIA.
Comment 3 Suresh PB 2020-09-19 10:52:39 UTC
Created attachment 131769 [details]
test case

Added test case as requested
Comment 4 Suresh PB 2020-09-19 10:53:41 UTC
Changing the status
Comment 5 Thomas Baumgart 2020-09-19 12:03:55 UTC
Created attachment 131773 [details]
Report output

Thanks for the demo file. I don't see the problem here (master and 5.1 as of today). What environment do you have/use? Which locale settings do you use? Could it be, that this is related to bug #426406?
Comment 6 Suresh PB 2020-09-19 12:36:39 UTC
(In reply to Thomas Baumgart from comment #5)
> Created attachment 131773 [details]
> Report output
> 
> Thanks for the demo file. I don't see the problem here (master and 5.1 as of
> today). What environment do you have/use? Which locale settings do you use?
> Could it be, that this is related to bug #426406?

Using Version 5.1.0-2a911c86b

Not sure about the locale, using for Indian Rupee currency.
Comment 7 Suresh PB 2020-09-19 12:38:36 UTC
Created attachment 131775 [details]
Screenshot

Screenshot
Comment 8 Thomas Baumgart 2020-09-19 13:52:11 UTC
(In reply to Suresh PB from comment #6)

> Using Version 5.1.0-2a911c86b

That's the problem. The commit after 2a911c86b fixed the problem. See https://invent.kde.org/office/kmymoney/-/commit/322d51c2889eba0bbe8c7f362831d6de5e0e2026 and look for the parent of it.

In case you can solve it by updating your version, please mark this bug as RESOLVED and a duplicate of 426406. TIA.
Comment 9 Suresh PB 2020-09-19 14:14:58 UTC
(In reply to Thomas Baumgart from comment #8)
> (In reply to Suresh PB from comment #6)
> 
> > Using Version 5.1.0-2a911c86b
> 
> That's the problem. The commit after 2a911c86b fixed the problem. See
> https://invent.kde.org/office/kmymoney/-/commit/
> 322d51c2889eba0bbe8c7f362831d6de5e0e2026 and look for the parent of it.
> 
> In case you can solve it by updating your version, please mark this bug as
> RESOLVED and a duplicate of 426406. TIA.

How to download the latest version
Comment 10 Thomas Baumgart 2020-09-19 14:20:35 UTC
Where did you get the version from in the first place? Looking at the version it seems to be a nightly build. Just get a fresh one. Or am I missing something?

Oh, and BTW, I noticed that your problem does not have anything in common with the original problem (we call it a hijacked bug). So we better do not close it and mark it as duplicate.
Comment 11 Ralf Habacker 2024-08-17 17:23:44 UTC
Moved to 'general' components