Closed michielbdejong closed 3 years ago
Ha, interesting, there are no identifiers to go by. The MT940 format even gives less info than the csv. So maybe best is to combine the two? That in itself is a useful identity relation to get right.
So for two transactions (one leaving my current account and one arriving in my savings account), there is no reason to know for sure that they should be equated. But if we have the full list of transactions leaving my current account on a given day, and a full list of transactions arriving in my savings account on a given day, then if there is uniqueness by amount & description, we can equate them. If there is repetition there, then there is no good way to know which one is which, but at least we can for instance say "these three look-alike transactions in my current account correspond to exactly these three look-alike transactions in my savings account".
Amazing that this is how imprecise bank statement exports are. But let's work with it!
So when importing transactions, we also need to import a "full list" assertion saying that "this is the exact list of transactions that happened on that date for that account". will find a format to make my parsers output that.
Assigning a uuid halfTradeId is not the right thing to do probably, should just refer to the file import. and then in the fullRecord point to multiple of those
we should take care that in case of transaction fees, those are split out to a separate transaction. For instance:
Alice sends 12 EUR to Bob, including a 2 EUR transaction fee, and Bob receives only 10 EUR
should be modeled as:
Alice sends 10 EUR to Bob
Alice sends 2 EUR to transaction fee
For linking transactions that include an exchange from one currency to another it gets more complicated; for now I'll assume all transactions are denoted in EUR, and then follow up in https://github.com/solid/money-pane/issues/21 for multi-currency.
fullRecord now correctly accumulates reports of the same transaction, although it may cross-match them if two transactions have the same date, amount, from, or to field. Could maybe extract more info from the description to make work this better -> https://github.com/solid/money-pane/issues/22
When I transfer money between my savings account and my current account, the transaction should show up once in each. I should equate those in the import and only create 1 transaction in the converted result