ledger-autosync icon indicating copy to clipboard operation
ledger-autosync copied to clipboard

Reading multiple ofxid/csvids from a transaction

Open bryanapperson opened this issue 4 years ago • 4 comments

I'd like to see the ability to read multiple ofxid | csvids 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?

bryanapperson avatar Jun 03 '20 19:06 bryanapperson

Absolutely, that makes a lot of sense!

egh avatar Jun 04 '20 04:06 egh

I myself use a transfer account to do that, but I think it makes sense to support that use case.

egh avatar Jun 04 '20 04:06 egh

@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.)

501st-alpha1 avatar Jun 07 '20 08:06 501st-alpha1

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.

colindean avatar Jun 16 '20 01:06 colindean