Find a way to insert data in any order. At the moment, buys and sells have to be entered in the right order
[x] We need a way to add the time to transactions to sort them correctly. This is important to get the right cost basis when a capital gain/loss is triggered.
[x] This also means, that the current way of generating the capital gain event should be changed. Just like for the cost basis, we should calculate the capital gain every time instead of storing it in the database. This might slow things a bit, but it is necessary to allow the user to insert older transaction, without having to redo the whole database. The only time a capital gain is triggered is on a sell transaction (an exchange transaction is simply a sell transaction and a buy transaction).
Find a way to insert data in any order. At the moment, buys and sells have to be entered in the right order