# Hledger cash transactions and envelope budgeting

**URL:** <https://forum.plaintextaccounting.org/t/hledger-cash-transactions-and-envelope-budgeting/718>\
**Category:** General\
**Tags:** hledger\
**Created:** [January 22, 2026, 3:38pm UTC](https://forum.plaintextaccounting.org/t/hledger-cash-transactions-and-envelope-budgeting/718 "2026-01-22T15:38:39Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mateja](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.plaintextaccounting.org/mateja/32/323_2.png) [@mateja](https://forum.plaintextaccounting.org/u/mateja)\
**Post date:** [January 22, 2026, 3:38pm UTC](https://forum.plaintextaccounting.org/t/hledger-cash-transactions-and-envelope-budgeting/718/1 "2026-01-22T15:38:39Z")

</div>

Hello, I'm using envelope budgeting with Hledger. I'm trying to adhere to double-entry accounting as much as possible, so I don't use virtual postings/accounts. I'm also tracking all my cash spending, since I have quite a bit of those.

Here are example asset accounts and envelopes (subaccounts) I'm using.

```auto
assets:cash ; type: Cash
assets:bank ; type: Asset
assets:bank:unallocated:month ; type: Asset
assets:bank:budget:month:food ; type: Asset

```

When I'm paying by card, I credit my `assets:bank:budget:*` accounts and check my actual bank balance using subaccount-inclusive balance assertions.  
For example:

```auto
2026-01-22 Supermarket
    expenses:groceries 10,000.00 RSD
    assets:bank:budget:month:food -10,000.00 RSD
    assets:bank =* 90,000.00 RSD

```

When I get cash from an ATM, I credit my `assets:bank:unallocated:month` account:

```auto
2026-01-22 ATM
    assets:cash 10,000.00 RSD
    assets:bank:unallocated:month -10,000.00 RSD
    assets:bank =* 80,000.00 RSD

```

When I pay for something with cash, I debit my `expenses:*` account and credit my `assets:cash` account. After that, in order to appropriately track leftover budget in my envelopes, I credit my envelope account `assets:bank:budget:month:*` and debit my `assets:bank:unallocated:month` account:

```auto
2026-01-22 Fast Food Place
    expenses:food:fast food 500.00 RSD
    assets:cash -500.00 RSD
    assets:bank:budget:month:food -500.00 RSD
    assets:bank:unallocated:month 500.00 RSD

```

As you can see, this results in rather long cash transactions. Also, when I do `hledger register assets:bank:unallocated:month` the output looks quite confusing, since expense transactions are regularly debiting the `assets:bank:unallocated:month` account.

I'm wondering, am I doing things right? Is there a better approach?

---

<div class="post-metadata">

**Author:** ![simonmic](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.plaintextaccounting.org/simonmic/32/1_2.png) [@simonmic](https://forum.plaintextaccounting.org/u/simonmic)\
**Post date:** [January 22, 2026, 4:55pm UTC](https://forum.plaintextaccounting.org/t/hledger-cash-transactions-and-envelope-budgeting/718/2 "2026-01-22T16:55:09Z")

</div>

Hi.. I used to do the same thing. It's correct if you want your budget envelope balances to be exact.

If the difference is not too large, you could choose to not bother with these budget adjustment postings.

As you say, it is quite verbose, adding noise and effort in the journal and reports. After a while I didn't need such exact envelope tracking, and I switched to goal-based budgeting which made my journal entries much simpler.

---

<div class="post-metadata">

**Author:** ![mateja](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.plaintextaccounting.org/mateja/32/323_2.png) [@mateja](https://forum.plaintextaccounting.org/u/mateja)\
**Post date:** [January 23, 2026, 10:08am UTC](https://forum.plaintextaccounting.org/t/hledger-cash-transactions-and-envelope-budgeting/718/3 "2026-01-23T10:08:11Z")

</div>

Hi Simon, thanks for the answer!

> I switched to goal-based budgeting which made my journal entries much simpler.

I know you are the creator of Hledger and I hope you don't mind some of my feedback on goal-based budgeting in Hledger. 😅 Just so you know, I love Hledger and it improved my life in measurable ways, and I'm grateful for your work.

At first, I did start using goal-based budgeting with the `balance --budget` command. I found its output quite confusing with the multicurrency setup, which forced me to use the `-X` flag, which does improve things quite a bit. However, I still didn't find its output very useful for the following reasons:

- It shows the amount I budgeted for the given amount, which is not very useful since I already have an idea of how much I assigned to a given budget.
- It shows the absolute amount I spent, but the standard `balance` command already does that.
- It shows the percentage of the budgeted amount spent (or overspent), which is (in my personal opinion) both useful and impractical at the same time. It gives you a general idea of where you stand in terms of your budget. But percentages can sometimes be kind of hard to wrap your head around, since they are relative values. And in this case, percentages are relative to a budgeted amount of every single account individually.
- It doesn't show you how much of your budget you have left to spend.

In my opinion, the `--budget` report is useful at the end of the month to see where I landed compared to my estimates. And it's also useful to see historically how my spending compares to my expectations.

However, even though it shows me where I stand in terms of my goals, it doesn't help me achieve my goals in "real-time".

I'm a beginner in R, and I'm playing around with exporting the "--budget" report to CSV, importing it, creating values (like "leftover budget"), and a PDF table that shows me data. I got somewhere, but I still don't find it ready for real use. One issue when exporting the "--budget" report to CSV is that it doesn't really give me a tidy output, `budget` columns are not labeled with a time period. There are a bunch of `budget` columns with the same name.

Then I started playing with envelope budgeting, and it seems to me that it solves my problems. I would say multicurrency setup works better with it. And most importantly, it shows me how much of my budget I have left over.

I just started to budget my expenses; maybe my opinions will change on the matter, but this is my experience so far.

---

<div class="post-metadata">

**Author:** ![mateja](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.plaintextaccounting.org/mateja/32/323_2.png) [@mateja](https://forum.plaintextaccounting.org/u/mateja)\
**Post date:** [January 23, 2026, 10:09am UTC](https://forum.plaintextaccounting.org/t/hledger-cash-transactions-and-envelope-budgeting/718/4 "2026-01-23T10:09:27Z")

</div>

> It's correct if you want your budget envelope balances to be exact.

Would it make sense to create a new account like this one?

```auto
account assets:bank:withdrawn cash ; type: Asset

```

Its balance would always be negative, and it would equal the negative amount of cash I have in my wallet. For example, if `assets:cash = 5,000.00 RSD`, then `assets:bank:withdrawn cash = -5,000.00 RSD`. When making a cash transaction for a budgeted expense, it would look something like this:

```auto
2026-01-22 Fast Food Place
    expenses:food:fast food 500.00 RSD
    assets:cash -500.00 RSD = 4,500.00 RSD
    assets:bank:withdrawn cash 500.00 RSD = -4,500.00 RSD
    assets:bank:budget:month:food -500.00 RSD

```

And if I made a cash transaction for an unbudgeted expense, it would look something like this:

```auto
2026-01-22 Ikea
    expenses:shopping:home supplies 1,000.00 RSD
    assets:cash -1,000.00 RSD = 3,500.00 RSD
    assets:bank:withdrawn cash 1,000.00 RSD = -3,500.00 RSD
    assets:bank:unallocated:month -1,000.00 RSD

```

This way, even though my cash transactions are still long, `hledger register assets:bank:unallocated:month` should not show a bunch of budgeted expenses.

The only thing is, a negative asset account feels weird; is this a valid approach, or can something else be done to achieve the same result?

---

<div class="post-metadata">

**Author:** ![simonmic](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.plaintextaccounting.org/simonmic/32/1_2.png) [@simonmic](https://forum.plaintextaccounting.org/u/simonmic)\
**Post date:** [January 23, 2026, 7:18pm UTC](https://forum.plaintextaccounting.org/t/hledger-cash-transactions-and-envelope-budgeting/718/5 "2026-01-23T19:18:18Z")

</div>

Thanks for the good feedback on --budget @mateja. It is just a (more usable) clone of Ledger's --budget report, definitely not the optimal report for all budgeting needs. ("Budgeting" is a very diverse and loose term.) I would love to see more kinds of budget report implemented, or even mocked up. Discussions on budgeting, like this one, are also valuable.
