Opening, closing, then opening an account again

75 views
Skip to first unread message

Justus Pendleton

unread,
Jan 15, 2022, 10:15:18 PM1/15/22
to Beancount
This is admittedly a fairly trivial edge case with an easy workaround but given that v3 is under development, I figured I'd bring it up.

Right now beancount doesn't allow you to close an account and then reopen it. (Only one open directive is allowed.) Should it?

This is the scenario I ran into today:

Several years ago I bought a house. So I closed the account Expenses:Rent. Now we are renovating the house and need to rent another place for a few months. So I need to re-open Expenses:Rent.

Sure, I could go back and just delete the close transaction from 2017 but that feels weird. Like I'm editing history. Also being able to have the account closed from 2017-2022 feels "right", in that there shouldn't be any transaction going to that account during that time period.

Alternatively, one could argue that the entire concept of "closing" doesn't really apply to Income/Expenses and is really just a bit of an implementation artifact since beancount doesn't have any real inherent semantics for accounts.

Does anyone else have thoughts or opinions on this?

Martin Blais

unread,
Jan 15, 2022, 10:52:39 PM1/15/22
to Beancount
Similar thoughts as you (same analysis).
The complication with allowing reopening is that code that uses those directives would have to be changed to support that.
Or perhaps the getters.py routine changes to return the (first-open, last-close).
Meh.


--
You received this message because you are subscribed to the Google Groups "Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beancount+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beancount/92eec7ae-1255-46bf-884a-c13d35587714n%40googlegroups.com.

Aaron Lindsay

unread,
Jan 21, 2022, 10:01:23 AM1/21/22
to Beancount
For whatever it's worth, I have encountered a similar situation a few times (sometimes with Expense accounts, sometimes with brokerage sub-accounts for specific investments which I close out a position but then buy it again at some later date). In each case, I shared the same hesitance about modifying history to remove a previous account closure. If its not a pain, I do think it would provide value to be able to re-open closed accounts.

-Aaron
Reply all
Reply to author
Forward
0 new messages