Bug 498054 - Better position of "Last Price" column in "Investment Capital Gains by Account" possible
Summary: Better position of "Last Price" column in "Investment Capital Gains by Accoun...
Status: RESOLVED FIXED
Alias: None
Product: kmymoney
Classification: Applications
Component: reports (other bugs)
Version First Reported In: 5.1.90
Platform: Other All
: NOR normal
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-12-30 10:52 UTC by Ralf Habacker
Modified: 2026-06-09 07:14 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed/Implemented In: 5.2
Sentry Crash Report:


Attachments
test file (11.23 KB, text/xml)
2024-12-30 10:52 UTC, Ralf Habacker
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ralf Habacker 2024-12-30 10:52:00 UTC
Created attachment 176974 [details]
test file

STEPS TO REPRODUCE
1. download kmymoney snapshot from https://cdn.kde.org/ci-builds/office/kmymoney/master/
2. start kmymoney
3. open appended test file
4. Show report "Investment Capital Gains by Account (Customized)"

OBSERVED RESULT
The tiles of the report are shown as: 

Account Shares  "Buy Price" "Last Price" "Buy Value" "Ending Market Value" "Percentage Gain" "Capital Gain"

EXPECTED RESULT
The column for the "Buy Value" depends on the "Buy Price" column and the column for the "Ending market value" depends on the "Last Price" column and they should be displayed before the ... Value column as 

Account Shares  "Buy Price" "Buy Value" "Last Price" "Ending Market Value" "Percentage Gain" "Capital Gain"
Comment 1 Bug Janitor Service 2024-12-30 10:55:06 UTC
A possibly relevant merge request was started @ https://invent.kde.org/office/kmymoney/-/merge_requests/250
Comment 2 Ralf Habacker 2024-12-30 12:31:45 UTC
Git commit b1ddcd966a4c9b72cbeee99702ee34ebe84d573c by Ralf Habacker.
Committed on 30/12/2024 at 11:02.
Pushed by habacker into branch 'master'.

Use better position of "Last Price" column in "Investment Capital Gains" reports
FIXED-IN:5.2

M  +2    -2    kmymoney/plugins/views/reports/core/querytable.cpp
M  +4    -4    kmymoney/plugins/views/reports/core/tests/data/test-investment-report-querytable-Investment-Capital-Gains-by-Account-_Customized_.csv

https://invent.kde.org/office/kmymoney/-/commit/b1ddcd966a4c9b72cbeee99702ee34ebe84d573c
Comment 3 Ralf Habacker 2026-06-09 07:14:03 UTC
Git commit dfb0045928b8dd86be6c156b1021597c2d966aca by Ralf Habacker.
Committed on 09/06/2026 at 06:59.
Pushed by habacker into branch 'master'.

Add additional report test cases

The test cases were derived from tickets reporting bugs
in the reporting engine and were added to monitor the
relevant functionality.
Related: bug 385993, bug 396301, bug 403825, bug 406403, bug 406525, bug 416274, bug 426241, bug 441023, bug 452096, bug 452692, bug 498031, bug 498033, bug 499180

M  +15   -0    kmymoney/plugins/views/reports/core/tests/data/CMakeLists.txt
A  +46   -0    kmymoney/plugins/views/reports/core/tests/data/csv/test-385993-report-querytable-Investitionsentwicklung-nach-Typen-_angepasst_.csv
A  +6    -0    kmymoney/plugins/views/reports/core/tests/data/csv/test-396301-report-querytable-Investment-Capital-Gains-by-Account-_Customized---no-conversion_.csv
A  +6    -0    kmymoney/plugins/views/reports/core/tests/data/csv/test-396301-report-querytable-Investment-Capital-Gains-by-Account-_Customized_.csv
A  +6    -0    kmymoney/plugins/views/reports/core/tests/data/csv/test-396301-report-querytable-Investment-Performance-by-Account-_Customized_.csv
A  +22   -0    kmymoney/plugins/views/reports/core/tests/data/csv/test-396301-report-querytable-Investment-Transactions-_Customized_.csv
A  +7    -0    kmymoney/plugins/views/reports/core/tests/data/csv/test-403825-report-querytable-Transactions-by-Account-_Customized_.csv
A  +4    -0    kmymoney/plugins/views/reports/core/tests/data/csv/test-403825-report-querytable-Transactions-by-Payee-_Customized_.csv
A  +12   -0    kmymoney/plugins/views/reports/core/tests/data/csv/test-416274-report-querytable-Investment-Performance-by-Account-_12m_.csv
A  +5    -0    kmymoney/plugins/views/reports/core/tests/data/csv/test-426241-report-querytable-Investment-Capital-Gains-by-Account-_Customized_.csv
A  +5    -0    kmymoney/plugins/views/reports/core/tests/data/csv/test-426241-report-querytable-Investment-Holdings-by-Account-_Customized_.csv
A  +5    -0    kmymoney/plugins/views/reports/core/tests/data/csv/test-426241-report-querytable-Investment-Performance-by-Account-_Customized---from-period---one-year--start-later_.csv
A  +5    -0    kmymoney/plugins/views/reports/core/tests/data/csv/test-426241-report-querytable-Investment-Performance-by-Account-_Customized---from-period---one-year_.csv
A  +5    -0    kmymoney/plugins/views/reports/core/tests/data/csv/test-426241-report-querytable-Investment-Performance-by-Account-_Customized---from-period---three-year_.csv
A  +5    -0    kmymoney/plugins/views/reports/core/tests/data/csv/test-426241-report-querytable-Investment-Performance-by-Account-_Customized---from-period---two-years_.csv
A  +27   -0    kmymoney/plugins/views/reports/core/tests/data/csv/test-426241-report-querytable-Investment-Transactions-_Customized_.csv
A  +9    -0    kmymoney/plugins/views/reports/core/tests/data/csv/test-452096-report-querytable-Transactions-by-Category-_Customized_.csv
A  +5    -0    kmymoney/plugins/views/reports/core/tests/data/csv/test-452692-report-querytable-Investment-Performance-by-Account-_Customized_.csv
A  +5    -0    kmymoney/plugins/views/reports/core/tests/data/csv/test-452692-report-querytable-Investment-Performance-by-Account-_From-Period_---one-year.csv
A  +5    -0    kmymoney/plugins/views/reports/core/tests/data/csv/test-452692-report-querytable-Investment-Performance-by-Account-_Only-Owned_---until-2024.csv
A  +5    -0    kmymoney/plugins/views/reports/core/tests/data/csv/test-452692-report-querytable-Investment-Performance-by-Account-_Only-Owned_-one-year.csv
A  +5    -0    kmymoney/plugins/views/reports/core/tests/data/csv/test-452692-report-querytable-Kopie-von-Investment-Performance-by-Account-_From-Period_---until-2024.csv
A  +5    -0    kmymoney/plugins/views/reports/core/tests/data/csv/test-497935-report-querytable-Investment-Capital-Gains-by-Account-_custom-report---only-owned_.csv
A  +5    -0    kmymoney/plugins/views/reports/core/tests/data/csv/test-497935-report-querytable-Investment-Performance-by-Account-_custom-report---only-owned_.csv
A  +5    -0    kmymoney/plugins/views/reports/core/tests/data/csv/test-497935-report-querytable-Investment-Performance-by-Account-_custom-report---only-sold_.csv
A  +5    -0    kmymoney/plugins/views/reports/core/tests/data/csv/test-497935-report-querytable-Investment-Performance-by-Account-_custom-report---owned-and-sold_.csv
A  +5    -0    kmymoney/plugins/views/reports/core/tests/data/csv/test-497935-report-querytable-Investment-Performance-by-Account-_custom-report---period_.csv
A  +5    -0    kmymoney/plugins/views/reports/core/tests/data/csv/test-498031-report-querytable-Investment-Capital-Gains-by-Account-_Customized_.csv
A  +5    -0    kmymoney/plugins/views/reports/core/tests/data/csv/test-498031-report-querytable-Investment-Holdings-by-Account-_Customized_.csv
A  +5    -0    kmymoney/plugins/views/reports/core/tests/data/csv/test-498031-report-querytable-Investment-Performance-by-Account-_Customized---from-period---one-year--start-later_.csv
A  +5    -0    kmymoney/plugins/views/reports/core/tests/data/csv/test-498031-report-querytable-Investment-Performance-by-Account-_Customized---from-period---one-year_.csv
A  +5    -0    kmymoney/plugins/views/reports/core/tests/data/csv/test-498031-report-querytable-Investment-Performance-by-Account-_Customized---from-period---three-year_.csv
A  +27   -0    kmymoney/plugins/views/reports/core/tests/data/csv/test-498031-report-querytable-Investment-Transactions-_Customized_.csv
A  +5    -0    kmymoney/plugins/views/reports/core/tests/data/csv/test-498033-report-querytable-Investment-Capital-Gains-by-Account-_Customized_.csv
A  +5    -0    kmymoney/plugins/views/reports/core/tests/data/csv/test-498033-report-querytable-Investment-Holdings-by-Account-_Customized_.csv
A  +5    -0    kmymoney/plugins/views/reports/core/tests/data/csv/test-498033-report-querytable-Investment-Performance-by-Account-_Customized---from-period---one-year--start-later_.csv
A  +5    -0    kmymoney/plugins/views/reports/core/tests/data/csv/test-498033-report-querytable-Investment-Performance-by-Account-_Customized---from-period---one-year_.csv
A  +5    -0    kmymoney/plugins/views/reports/core/tests/data/csv/test-498033-report-querytable-Investment-Performance-by-Account-_Customized---from-period---three-year_.csv
A  +27   -0    kmymoney/plugins/views/reports/core/tests/data/csv/test-498033-report-querytable-Investment-Transactions-_Customized_.csv
A  +5    -0    kmymoney/plugins/views/reports/core/tests/data/csv/test-498054-report-querytable-Investment-Capital-Gains-by-Account-_Customized_.csv
A  +5    -0    kmymoney/plugins/views/reports/core/tests/data/csv/test-498054-report-querytable-Investment-Holdings-by-Account-_Customized_.csv
A  +5    -0    kmymoney/plugins/views/reports/core/tests/data/csv/test-498054-report-querytable-Investment-Performance-by-Account-_Customized---from-period---one-year--start-later_.csv
A  +5    -0    kmymoney/plugins/views/reports/core/tests/data/csv/test-498054-report-querytable-Investment-Performance-by-Account-_Customized---from-period---one-year_.csv
A  +5    -0    kmymoney/plugins/views/reports/core/tests/data/csv/test-498054-report-querytable-Investment-Performance-by-Account-_Customized---from-period---three-year_.csv
A  +5    -0    kmymoney/plugins/views/reports/core/tests/data/csv/test-499180-report-querytable-Investment-Capital-Gains-by-Account-_Customized_.csv
A  +5    -0    kmymoney/plugins/views/reports/core/tests/data/csv/test-499180-report-querytable-Investment-Holdings-by-Account-_Customized_.csv
A  +5    -0    kmymoney/plugins/views/reports/core/tests/data/csv/test-499180-report-querytable-Investment-Performance-by-Account-_Customized---from-period---one-year--start-later_.csv
A  +5    -0    kmymoney/plugins/views/reports/core/tests/data/csv/test-499180-report-querytable-Investment-Performance-by-Account-_Customized---from-period---one-year_.csv
A  +5    -0    kmymoney/plugins/views/reports/core/tests/data/csv/test-499180-report-querytable-Investment-Performance-by-Account-_Customized---from-period---three-year_.csv
A  +5    -0    kmymoney/plugins/views/reports/core/tests/data/csv/test-499180-report-querytable-Investment-Performance-by-Account-_Customized---from-period---two-years_.csv
A  +27   -0    kmymoney/plugins/views/reports/core/tests/data/csv/test-499180-report-querytable-Investment-Transactions-_Customized_.csv
A  +16   -0    kmymoney/plugins/views/reports/core/tests/data/csv/test-516585-convert-currency-report-querytable-Transactions-by-Account-_Base-converted_.csv
A  +17   -0    kmymoney/plugins/views/reports/core/tests/data/csv/test-516585-convert-currency-report-querytable-Transactions-by-Account-_Base-unconverted_.csv
A  +1744 -0    kmymoney/plugins/views/reports/core/tests/data/test-385993.xml
A  +145  -0    kmymoney/plugins/views/reports/core/tests/data/test-396301.xml
A  +76   -0    kmymoney/plugins/views/reports/core/tests/data/test-403825.xml
A  +85   -0    kmymoney/plugins/views/reports/core/tests/data/test-406403.xml
A  +87   -0    kmymoney/plugins/views/reports/core/tests/data/test-406525.xml
A  +145  -0    kmymoney/plugins/views/reports/core/tests/data/test-416274.xml
A  +154  -0    kmymoney/plugins/views/reports/core/tests/data/test-426241.xml
A  +288  -0    kmymoney/plugins/views/reports/core/tests/data/test-441023.xml
A  +76   -0    kmymoney/plugins/views/reports/core/tests/data/test-452096.xml
A  +201  -0    kmymoney/plugins/views/reports/core/tests/data/test-452692.xml
A  +106  -0    kmymoney/plugins/views/reports/core/tests/data/test-497935.xml
A  +151  -0    kmymoney/plugins/views/reports/core/tests/data/test-498031.xml
A  +151  -0    kmymoney/plugins/views/reports/core/tests/data/test-498033.xml
A  +148  -0    kmymoney/plugins/views/reports/core/tests/data/test-498054.xml
A  +154  -0    kmymoney/plugins/views/reports/core/tests/data/test-499180.xml
A  +151  -0    kmymoney/plugins/views/reports/core/tests/data/test-516585-convert-currency.xml

https://invent.kde.org/office/kmymoney/-/commit/dfb0045928b8dd86be6c156b1021597c2d966aca