Right now records in external accounts can only be expense or income. But in fact, it can actually be a transfer from account A (expense) to account B (income). We need to allow this linking for any accounts – both system and external.
Implementation is pretty simple:
If the record is expense, then user can mark it as transfer on UI, and this record will be a source (from) account. So we need to suggest user select the destination (to) account and the record that is related to it. If there's no related transaction, the user can mark it (for example checkbox) and we will create the opposite transaction automatically.
If the record is income, then actually the same logic, but use correct source and destination accounts.
Also, we need to allow unlinking transfers. If the opposite record is related to the system account, we can suggest user automatically delete that record.
Also need to recheck how the "balance history" functionality reacts on that, since it should be handled correctly. TBD how it should be handled
Done:
[x] mark external transaction as transfer
[x] fixed ref amount inconsistency when editing transfer transactions amount
TODO:
[ ] link existing transactions instead of creating opposite ones. Requires backend and frontend changes
Right now records in external accounts can only be
expense
orincome
. But in fact, it can actually be a transfer from account A (expense) to account B (income). We need to allow this linking for any accounts – both system and external.Implementation is pretty simple:
expense
, then user can mark it astransfer
on UI, and this record will be asource (from)
account. So we need to suggest user select thedestination (to)
account and the record that is related to it. If there's no related transaction, the user can mark it (for example checkbox) and we will create the opposite transaction automatically.income
, then actually the same logic, but use correctsource
anddestination
accounts.Also, we need to allow unlinking transfers. If the opposite record is related to the system account, we can suggest user automatically delete that record.
Also need to recheck how the "balance history" functionality reacts on that, since it should be handled correctly. TBD how it should be handled
Done:
TODO: