Bug 451392 - Capital Gains report lists wrong cost value when purchase is in foreign currency
Summary: Capital Gains report lists wrong cost value when purchase is in foreign currency
Status: REPORTED
Alias: None
Product: kmymoney
Classification: Applications
Component: reports (show other bugs)
Version: 5.1.2
Platform: Mint (Ubuntu based) Linux
: NOR major
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-03-11 12:23 UTC by Mark Medoff
Modified: 2022-03-11 12:23 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Medoff 2022-03-11 12:23:35 UTC
SUMMARY
My Brokerage account and investments are in local currency (US$) with one exception. One investment was purchased in a foreign currency (JPY) and that investment account is designated in JPY. When I run the Capital Gains report (for investments I still own), it lists the correct market value for the JPY investment but cost is wrong. It appears to have divided the cost in JPY twice by the US$ to JPY rate. In this case, correct cost per share is $52.24 (5550 JPY @ 106.2392 JPY/USD) but the program reports a cost of $0.49. Reviewing Price pairs, only the correct price pair of USD -> JPY = 106.2392 exists for that date. There is no JPY -> USD pair that might conflict. Investment Ledger also shows all amounts correctly.


STEPS TO REPRODUCE
1.  Setup a foreign currency investment account
2.  Purchase an investment in the foreign currency
3.  Run Capital Gains report for owned investments

OBSERVED RESULT
Market value of foreign currency is correctly displayed in local currency but cost is wrong

EXPECTED RESULT
Cost should be calculated correctly in local currency

SOFTWARE/OS VERSIONS

(available in About System) 
KDE Frameworks 
Version 5.91.0

Qt 
Version 5.15.2 (built against 5.15.2)

ADDITIONAL INFORMATION