ledger-autosync
ledger-autosync copied to clipboard
Reading multiple ofxid/csvids from a transaction
I'd like to see the ability to read multiple ofxid | csvid
s from a given transaction. The use case is for deduplication of inter account transactions, like a credit card payment which shows up both on a bank statement, and a credit card statement. The user (or a plugin) can deduplicate these, and then place multiple ofxid | csvid
comments on a transaction. Then it wont be imported again from either account. The logic now seems to be to read the first and break. Is this a change the project would be open to?
Absolutely, that makes a lot of sense!
I myself use a transfer account to do that, but I think it makes sense to support that use case.
@bryanapperson: To clarify, does this work?
2020/01/01 Bank
Assets:Bank $-100.00
; ofxid: 123.xyz
Liabilities:Credit Cards $100.00
; ofxid: 456.abc
Or were you trying something more like this?
2020/01/01 Bank
; ofxid: 123.xyz
; ofxid: 456.abc
Assets:Bank $-100.00
Liabilities:Credit Cards $100.00
I recommend the former, because (1) that works for me, and (2) it seems to make more sense to attach the ofxid
to the appropriate account, rather than the transaction as a whole.
(In a Ledger transaction, any comment lines between the first line and the first account apply to the transaction as a whole, while any comment lines immediately after an account entry apply only to that entry.)
I've never really encountered this, but I've prepared for the eventuality by putting both accounts' IDs in like the second example that @501st-alpha1 provided. I guess I should move to the first example. This should be documented somewhere.