Bug 445591 - Enter a dividend payment transaction in foreign currency and kmymoney crashes
Summary: Enter a dividend payment transaction in foreign currency and kmymoney crashes
Status: REPORTED
Alias: None
Product: kmymoney
Classification: Applications
Component: general (show other bugs)
Version: 5.1.2
Platform: Other macOS
: NOR crash
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-11-16 14:35 UTC by labm.4v70
Modified: 2021-11-16 14:39 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
bug description (820.75 KB, application/pdf)
2021-11-16 14:35 UTC, labm.4v70
Details
kmh file (4.30 KB, application/gzip)
2021-11-16 14:37 UTC, labm.4v70
Details
crash report (116.43 KB, application/pdf)
2021-11-16 14:39 UTC, labm.4v70
Details

Note You need to log in before you can comment on or make changes to this bug.
Description labm.4v70 2021-11-16 14:35:49 UTC
Created attachment 143627 [details]
bug description

SUMMARY
The value of the total amount of the dividend transaction is correct and expressed in the brokerage account currency EUR but prefixed with SEK.  
Enter the transaction and KMM crashes.


STEPS TO REPRODUCE
1. Base currency : EUR
2. Create an investment account in currency EUR and its brokerage account in currency EUR
3. In the investment account create a security in currency SEK
4. Enter a Dividend transaction with fees and dividend in SEK with conversion

OBSERVED RESULT
1. The total amount of the transaction is correct but the prefix is wrong.
2. Enter the transaction and KMM crashes (see the trace report).

EXPECTED RESULT
1. As the brokerage account is in currency EUR the total amount of the transaction should be prefixed with EUR.  The amount of Fees and Interest should also be prefixed by the corresponding currency of the category as it could be different of EUR or SEK (it is allowed by KMM in the definition of a category).
2. … no crash  

SOFTWARE/OS VERSIONS
KMyMoney : Version 5.1.2-893f55a43
Windows: 
macOS: 10.13.6 (17G14042)
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 5.85.0
Qt Version: 5.15.2 (built against 5.15.2)
The cocoa windowing system

ADDITIONAL INFORMATION
See attached file for :
a- a detail description with screenshots 
b- a kmymoney file to easily reproduced the problem
c- a crash report
Comment 1 labm.4v70 2021-11-16 14:37:55 UTC
Created attachment 143629 [details]
kmh file

to reproduce the bug
Comment 2 labm.4v70 2021-11-16 14:39:46 UTC
Created attachment 143630 [details]
crash report