Skip Navigation

How to setup hledger csv import rules for credit card statements?

My credit card statement has two kinds of debit entries:

  • Payments from my bank account
  • Refunds from retailers (say because of a return)

In my csv import rule, I have a rule that filters the first item, where I assign account2 to a dummy "transfers" account that I will match payments to from my bank statement.

if %description BPAY PAYMENTS
  account2 transfers:credit:coles

However, I am not sure how to filter the second category. They show up with seemingly random descriptions. I don't see a way to do an if condition on whether the amount if positive or negative. So all of the refunds get assigned to the default "income:unknown" category. I'd ideally like to assign account2 in this case to something like "transfers:credit:refunds".

2
2 comments