Import investment splits in order matching manual entering

Authored by wojnilowicz on Feb 22 2017, 5:47 PM.

Description

Import investment splits in order matching manual entering

Commit "Prevent overwrite of assetAccountSplit" uncovered bug in
detecting right category for fee split when importing investment
statement. Bug is caused because of some assumptions and different
approach to splits order between manual transaction entering and
transaction importing.
MyMoneyFile::addTransaction adds buy transaction with splits in
following order:

  1. manual entering

brokerage split
fee split
stock split

  1. importing

fee split
stock split
brokerage split

This patch unifies two approaches and makes it working for already
imported transactions.

Differential Revision: https://phabricator.kde.org/D4722

Details