Bug 469195 - Transaction report in native currency show wrong amount
Summary: Transaction report in native currency show wrong amount
Status: RESOLVED FIXED
Alias: None
Product: kmymoney
Classification: Applications
Component: reports (show other bugs)
Version: 5.1.3
Platform: Other Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-04-30 12:56 UTC by Tony
Modified: 2023-05-07 08:56 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 5.2


Attachments
Three files described in the bug report. (46.04 KB, application/x-7z-compressed)
2023-04-30 12:56 UTC, Tony
Details
Correct numbers (29.09 KB, image/png)
2023-04-30 12:57 UTC, Tony
Details
Incorrect numbers (16.83 KB, image/png)
2023-04-30 12:57 UTC, Tony
Details
Demonstration KMyMoney file (2.62 KB, application/gzip)
2023-04-30 12:58 UTC, Tony
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tony 2023-04-30 12:56:47 UTC
Created attachment 158564 [details]
Three files described in the bug report.

SUMMARY
***
A transaction report showing a transfer from one account into an account having a different currency displays the amount and currency incorrectly when the "from" account is not included in the report.

I do not want to include the "from" account in the report, as it includes too many transactions. I'm only interested in the transactions in the "to" account.
***

STEPS TO REPRODUCE
1. Create a transaction that transfers from account "A" to account "B", which is in a different currency to "A".
2. Create a "Transactions by account" report and customise it to show only the transactions in account "B".
3. The line in the report that shows the amount transferred from account "A" has the currency of account "A" and the amount in the currency of account "B", but rounded using the decimal points defined for the currency of account "A".
4. Customise the report to include the transactions in account "A".
5. The line described in step 3 now displays correctly.

SOFTWARE/OS VERSIONS
Windows: 

ADDITIONAL INFORMATION

Attached are 3 files: 
1. CorrectReport.png shows the report with the correct amount and currency. However, for it to display correctly, I had to include the "transfer from" account in the report, which I don't want to do.
2. IncorrectReport.png shows the report with the incorrect amount and currency. 
3. MyTest.kmy shows the problem.
Comment 1 Tony 2023-04-30 12:57:42 UTC
Created attachment 158565 [details]
Correct numbers
Comment 2 Tony 2023-04-30 12:57:59 UTC
Created attachment 158566 [details]
Incorrect numbers
Comment 3 Tony 2023-04-30 12:58:20 UTC
Created attachment 158567 [details]
Demonstration KMyMoney file
Comment 4 Tony 2023-04-30 13:00:43 UTC
I submitted the but report with the compressed attachment. After that I realised I could upload the three files separately, which I did. However, I now see that I cannot delete the compressed attachment, so the files are uploaded twice.
Comment 5 Thomas Baumgart 2023-05-07 08:56:59 UTC
Git commit d7e94f6ab6c452eaf4339f7ebffecd917d92e28a by Thomas Baumgart.
Committed on 07/05/2023 at 08:56.
Pushed by tbaumgart into branch 'master'.

Provide correct currency information if not converting to base currency
FIXED-IN: 5.2

M  +9    -1    kmymoney/plugins/views/reports/core/querytable.cpp

https://invent.kde.org/office/kmymoney/commit/d7e94f6ab6c452eaf4339f7ebffecd917d92e28a