Balance assertion in effective date order?

I know ledger can check balances in file order, and hledger can check balances in date order, but can any tool check balances in effective date order? Sorry if I missed it...

For example, I have 2 different dates for checks that take days to post to my bank account. I was starting to use effective date for the bank's posting date, and normal dates for when I wrote them, but I would like to be able to assert the balance of each view separately.

Thank you for any advice.

I believe not.

To be able to assert the balances according to each set of dates, the balance assertions in your journal would need to record both balances. No PTA app has syntax supporting that; you can only assert one of the balances. So the assertions will pass in one date mode and fail in the other. This is one of the reasons to avoid effective dates and use posting dates instead.

Thank you for the reply. I assume I can't use file order instead of effective date for similar reasons. I might make a script to do it using some kind of effective balance tag.

Edit: I guess I could alternatively use a separate ledger file for the bank view...

Here is a potential alternate solution.

Assume a master journal (2025.journal)like this, where bank-import.journal is manually or semi-automatically created from bank statements, and is updated weekly (or monthly, quarterly, whatever):

;; main bank account is assets:my bank:checking
include bank-import.journal

;; manual entries here

When I write a check, i would write it from an account different to my bank account:

2025-02-28   I wrote a cheque 12345 to buy a couch
   assets:my bank:pending checks    
   expenses:house:furniture     $1000

At some point later on a new statement from the bank arrives and I import it. CSV import rules are set up in a way to ensure that cheque transactions go from checking to "pending checks" account, like this:

2025-03-05   Cheque 12345 clears
  assets:my bank:checking
  assets:my bank:pending checks    $1000

This way I can look at the balance of my bank:pending checks and see if there are any uncleared cheques, and if so - what are they.

1 Like

Using a tracking subaccount is probably the best way of doing it in ledger. I may very well use this. I have tracking subaccounts for other things, but didn't think of using it for this, for some reason. Thanks!

I'd adopt @adept's solution, but put pending checks in liabilities

1 Like