Description
in bank1.journal
, imported from bank1.csv
2018/11/09 (6138507615589995706)
Personal:Assets:BANK1:Checking:EUR EUR -11,22 = EUR 33,44
Personal:Assets:BANK2:Girokonto:EUR
in bank2.journal
, imported from bank2.csv
2018/11/09 (6138507615589995706)
Personal:Assets:BANK2:Girokonto:EUR EUR11,22
Personal:Assets:BANK1:Checking:EUR EUR-11,22
When I then run hledger-ui
, I get an balance assertion error, because it sees two debits of EUR-11,22, not a single one, within the same day. I added the transaction code to try to make hledger-ui see one unique transaction, to no avail. It seems to work that way by design, which makes it difficult to handle transfers between my accounts in the hledger-flow world.
I tried to use virtual postings for bank2, to no avail.
What is the correct way to do this in the hledger world, and most importantly in the hledger-flow world?
Approach 1: Remove problematic line in the bank2 preprocess
script
Probably the simplest approach, the bank2 preprocess
script could have a grep -v <txid we want to ignore>
, so that the transaction ends up in only one journal.
Problem: In the bank subdirectory, there is a CSV line for the transaction in question in 1-in
, but no corresponding transaction in 3-journal
. It feels like we're rewriting history.
Additionally, we now lose some information, such as when the day on which the money leaves bank1 is different from the day on which the money arrives in bank2.
Approach 2: Comment out the problematic journal entry using a bank2 construct
script
Problem: You need to switch to using a construct
file, you lose the ability to use a .rules
file.
My current approach is Approach 1, since in my case bank2 uses a .rules
file.
Have you encountered this situation, and how did you resolve it?