Bug 406270 - Skrooge does not import investment operations in QIF correctly
Summary: Skrooge does not import investment operations in QIF correctly
Status: RESOLVED FIXED
Alias: None
Product: skrooge
Classification: Applications
Component: general (show other bugs)
Version: 2.18.0
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: Stephane MANKOWSKI
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-04-06 05:37 UTC by skierpage
Modified: 2019-04-07 23:23 UTC (History)
1 user (show)

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 skierpage 2019-04-06 05:37:26 UTC
SUMMARY
While looking more at bug 406243 I found some oddness in share operations. They 

STEPS TO REPRODUCE
The QIF file contains 
^
!Account
NMyBrokerage 666
TInvst
^
!Type:Invst
D12/22'10
NCash
L[MyBrokerage 666]
^
D12/23'10
NShrsIn
Y 
Q31
Cc
MISHARES TRUST S&P 500   S&P 500 INDEX
^


OBSERVED RESULT

The ISHARES operation in [Shares] view appears as
Account: MyBrokerage 666
Amount: +31.00 $
Payee, Mode, Number: <blank>
Comment: ISHARES TRUST S&P 500   S&P 500 INDEX (the 'M' field)
Account for payment: <the first account in the drop-down, the default?>
Amount of shares: <blank>
Commission, Tax: <blank>

EXPECTED RESULT
The '$' for amount should be the investment symbol (available in the drop-down).
Maybe the amounts shouldn't have two decimal points when it's a Quantity of shares, though for other kinds of funds I think there can be decimal fractions of a share.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 5.14.5
KDE Frameworks Version: 5.55.0
Qt Version: 5.11.3

ADDITIONAL INFORMATION
I also noticed other glitches with shares, but I don't have time to track them down:
* NShrsOut transactions also appear as amount increases, I think they should be decreases (red).
* An NShrsOut transactions that is "MXfr To: AnotherAccount 999" doesn't seem to show up as a transfer.
* NDiv dividend transactions aren't marked as anything special, that seems useful; for other kinds of transactions the 'N' shows up as a category.
Comment 1 Stephane MANKOWSKI 2019-04-06 19:01:14 UTC
Git commit dec44f0e40fdcfd9f9e7c9e0b5f60cc8440cf181 by Stephane MANKOWSKI.
Committed on 06/04/2019 at 19:01.
Pushed by smankowski into branch 'master'.

Skrooge does not import investment operations in QIF correctly

M  +1    -0    CHANGELOG
M  +9    -5    plugins/import/skrooge_import_qif/skgimportpluginqif.cpp
A  +16   -0    tests/input/skgtestimportqif2/406270.qif
M  +19   -1    tests/skgbankmodelertest/skgtestimportqif2.cpp

https://commits.kde.org/skrooge/dec44f0e40fdcfd9f9e7c9e0b5f60cc8440cf181
Comment 2 skierpage 2019-04-07 23:23:32 UTC
Amazing, thanks so much for all these fixes!
Unfortunately, until bug 405578 is addressed it's hard for me to re-test.
(FYI to get your earlier fixes Kevin Kofler used koji-fu to build Skrooge 2.18 on Fedora 29 for me, https://koji.fedoraproject.org/koji/taskinfo?taskID=33961930 .)