Bug 502604 - All Reports include PRICE column
Summary: All Reports include PRICE column
Status: RESOLVED FIXED
Alias: None
Product: kmymoney
Classification: Applications
Component: reports (other bugs)
Version First Reported In: git (master)
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
: 502226 (view as bug list)
Depends on:
Blocks:
 
Reported: 2025-04-09 11:13 UTC by Mark Medoff
Modified: 2025-04-29 23:19 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Medoff 2025-04-09 11:13:42 UTC
SUMMARY
All reports in Master since a little after Master kmymoney-master-4236-linux-gcc-x86_64.AppImage have an extra PRICE column on all reports. Even non-investment reports have this field now and there is no way to remove it.

STEPS TO REPRODUCE
1. Run any report
2. Output has a price field, even non-investment reports
3. 

OBSERVED RESULT
Output has a price field, even non-investment reports

EXPECTED RESULT
Only reports with "Price" selected in Rows/Columns tab for "Configure your report" should display a price column.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
(available in the Info Center app, or by running `kinfo` in a terminal window)
Linux/KDE Plasma: Linux Mint 22.1
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 Ralf Habacker 2025-04-25 07:02:14 UTC
*** Bug 502226 has been marked as a duplicate of this bug. ***
Comment 2 Ralf Habacker 2025-04-25 07:12:10 UTC
The mentioned price column is displayed in any case if the checkbox for “Convert to base currency” is activated in the report configuration, as prices play a decisive role in the amount of the displayed values in this configuration. If prices are not displayed, it is not possible to determine whether the displayed value is correct or not. There are some error reports in which KMyMoney is accused of calculating incorrectly, although the entry of an incorrect price is responsible.

If only one currency is used, the setting “Convert to base currency” can currently be deactivated as a workaround, which then displays the same values.
Comment 3 Mark Medoff 2025-04-25 10:04:17 UTC
Unchecking the convert to base currency boxes comes with problems as a 
workaround.

In my case, it puts USD in front of all subtotals and totals. This 
causes the column sizes to be enlarged and often overlap the previous 
column.

Mark
Comment 4 Mark Medoff 2025-04-25 13:14:50 UTC
As a further workaround to unchecking checkbox for “Convert to base 
currency” and getting the lengthy ISO currency designation with every 
amount, is there a way to have the reports display the shorter currency 
symbol?

In my case in the US, I would rather have report subtotals and totals 
displayed as $xxx rather than USDxxx. I don't see any way to achieve 
this setting. It appears the only Currency option has the ISO box 
unchangeable.


Mark
Comment 5 Bug Janitor Service 2025-04-29 22:29:18 UTC
A possibly relevant merge request was started @ https://invent.kde.org/office/kmymoney/-/merge_requests/275
Comment 6 Ralf Habacker 2025-04-29 22:40:32 UTC
(In reply to Mark Medoff from comment #4)
..
> is there a way to have the reports display the shorter currency symbol?

Currently not, it is hardcoded in the report engine. Feel free to open a dedicated feature request. 

In connection with the reported problem: Since the underlying problem only occurs when prices are available, the fixed activation of the price column is made dependent on this (see the link in comment 5)
Comment 7 Ralf Habacker 2025-04-29 23:19:42 UTC
Git commit a70cb789b1fcfa7c4eb9cb379c6d28cacc69e378 by Ralf Habacker.
Committed on 29/04/2025 at 22:30.
Pushed by habacker into branch 'master'.

Force the price column to be added only if prices are available

In cases where no prices are available, in reports it is ensured
that the price used for currency conversion is always 1.0, which
makes it unnecessary to display the price column.

When loading files, it is ensured that the price column is not
displayed in this case in all reports.
FIXED-IN:5.2

M  +28   -0    kmymoney/mymoney/mymoneyfile.cpp
M  +1    -1    kmymoney/mymoney/mymoneyfile.h
M  +1    -1    kmymoney/plugins/sql/mymoneydbdef.cpp
M  +13   -11   kmymoney/plugins/views/reports/core/querytable.cpp
M  +24   -24   kmymoney/plugins/views/reports/core/tests/data/refinance-loan-report-querytable-refinance-loan.csv
M  +4    -4    kmymoney/plugins/views/reports/core/tests/data/test-424674-report-querytable-Transactions-by-account-_Customised_.csv
M  +4    -4    kmymoney/plugins/views/reports/core/tests/data/test-424674-report-querytable-Transactions-by-category-_Customised_.csv
M  +20   -20   kmymoney/plugins/views/reports/core/tests/data/test-cash-flow-report-querytable-Cash-Flow-Transactions-This-Month-_Customized_.csv
M  +6    -6    kmymoney/plugins/views/reports/core/tests/data/test-net-worth-report-querytable-Account-Balances-by-Type-_Customized_.csv
M  +12   -12   kmymoney/plugins/views/reports/core/tests/data/test-transactions-report-querytable-Transactions-by-Account-_Customized_.csv
M  +10   -10   kmymoney/plugins/views/reports/core/tests/data/test-transactions-report-querytable-Transactions-by-Category-_Customized_.csv
M  +7    -7    kmymoney/plugins/views/reports/core/tests/data/test-transactions-report-querytable-Transactions-by-Month-_Customized_.csv
M  +5    -5    kmymoney/plugins/views/reports/core/tests/data/test-transactions-report-querytable-Transactions-by-Payee-_Customized_.csv
M  +12   -12   kmymoney/plugins/views/reports/core/tests/data/test-transactions-report-querytable-Transactions-by-Reconciliation-Status-_Customized_.csv
M  +3    -3    kmymoney/plugins/views/reports/core/tests/data/test-transactions-report-querytable-Transactions-by-Tag-_Customized_.csv
M  +7    -7    kmymoney/plugins/views/reports/core/tests/data/test-transactions-report-querytable-Transactions-by-Week-_Customized_.csv
M  +2    -4    kmymoney/plugins/views/reports/core/tests/querytable-test.cpp
M  +10   -7    kmymoney/plugins/views/reports/kreportconfigurationfilterdlg.cpp

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