by seabass-labrax · 1y ago · 0 comments
hledger, however, has support for adding 'posting dates' as specially formatted comments. What's really clever is how it automatically chooses which date to sort the reports by depending on the query!
For example, say I have a ledger that exclusively contains entries consisting of credits to a assets account (bank) and debits to an expense account (shopping). The date of the debit is earlier, because I acquired the goods at the shop. The date of the credit is later because it takes a while for the payment to clear between the banks. Some payments take longer to clear than others so the order isn't the same.
If I ask hledger for a report of all recent transactions that involve expenses, it will sort by the dates on the debit lines. But if I ask hledger for a report of all the recent transactions that involve assets it'll use the credit dates instead! This makes reconciliation with my bank statements so much easier and tidier whilst still keeping an accurate record of when I actually made the transactions.
Just recently I bought an item on sale for 15 Euros with a card in Sterling (my bank did the currency conversion). Pretty much immediately after paying, though, I exchanged it for a different item for 25 Euros, making up the difference in cash. The cash is obviously 'cleared' instantly but the card payment could clear later. That said, in this case it happened to clear the same day anyway so no special posting date was required.
2025-08-10 Redacted
Expenses: Redacted 13.03 GBP
Expenses: Redacted 10 EUR
Assets: Bank -13.03 GBP
Assets: Cash -10 EUR
I suppose the main question is at what point these splits become complex enough to create a dedicated liabilities account specifically to track the payment of that one expense, à la accounts payable, which you can of course do with any plain text ledger.