Closed scanta2 closed 2 years ago
Ah, beancount.plugins.auto_accounts
inserts an open
for Expenses:Non-Retirement:Auto:Fit
because it sees the close directive for it. The open
and Close
occur on the same date, leading to this error.
~The solution here might be to get auto_accounts
to not add open
s for close
directives.~
Fixed by special casing this.
On vacation, so not getting the full context of this, only on my phone, but closing an account without opening one will trigger an error. If the error is that open and close happen on the same date maybe adjusting the generation of open date makes more sense.
On Thu, Aug 25, 2022, 01:08 Red S @.***> wrote:
Ah, beancount.plugins.auto_accounts inserts an Open for Expenses:Non-Retirement:Auto:Fit because it sees the close directive for it. The Open and Close occur on the same date, leading to this error.
The solution here might be to get auto_accounts to not add opens for close directives. Let me ask @blais https://github.com/blais for his thoughts.
— Reply to this email directly, view it on GitHub https://github.com/redstreet/beancount_reds_plugins/issues/19#issuecomment-1226583110, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACSBE3U3OSRVZMRL2GXOVTV22TP7ANCNFSM57PS6SRQ . You are receiving this because you were mentioned.Message ID: @.***>
@blais, please ignore this thread, it's been resolved. If you're curious, here's context. The source below:
plugin beancount.plugins.auto_accounts
2020-01-01 close Assets:Bank
looks like this after the auto_accounts
plugin runs:
2020-01-01 open Assets:Bank
2020-01-01 close Assets:Bank
This is fine normally, but the new autoclose_tree
plugin I wrote overloads the close syntax to close children of parent accounts that were never opened. Except, when used in conjunction with auto-accounts
, that parent account inadvertently gets opened (on the same date as the close). See OP's example on the top of this thread.
I originally tagged you because a "clean" solution is to get auto_accounts
to not generate open
s for accounts which appear solely in a close
directive. Instead, I decided to solve it by detecting this case in autoclose_tree
.
Enjoy your vaction!
Thanks! Works well now
Here's an example of a project that shows an error in fava about the parent account getting closed before the opening date. I think the parent account does not get opened properly, or possibly it is assigned an opening date that is not earlier than the children's date.