Closing out a year -- quick question

閲覧: 28 回
最初の未読メッセージにスキップ

niels...@gmail.com

未読、
2023/04/04 15:39:032023/04/04
To: hledger
Is the "close" command supposed to generate both the closing balances and the opening balances (i.e., with one command)?

Some of the documentation suggests that, but I am not getting that behavior in 1.29.

Thank you!

Rob

Simon Michael

未読、
2023/04/04 16:14:342023/04/04
To: hledger
Hi Rob, all,

in 1.29, close changed to show only a closing transaction by default. To see both closing and opening, you should now use `hledger close --migrate`.

This is mentioned in the release notes but not clearly enough (https://github.com/simonmichael/hledger/issues/2020).

I was trying to make this command easier, but it's not yet satisfactory. The different uses and modes are still hard to explain.

It's a pain, but currently I'm leaning towards:

1. in 1.29.2, fixing the unannounced breakage, by restoring 1.28's `--open-acct` flag and legacy `--closing` and `--opening` flags and `equity` command alias.

2. in 1.30, attempting another UI cleanup: always operating on ALE accounts by default, adding --close for clarity, and deprecating --retain (at least). So it would become:

hledger close [--close|--open|--migrate] [ACCTQUERY]
  [--close-acct=ACCT] [--open-acct=ACCT] [--close-desc=STR] [--open-desc=STR]

  Show a closing transaction (default), opening transaction, or both, for the matched accounts (default: most asset/liability/equity accounts).
  The account balances will be transferred to/from ACCT (default: equity:opening/closing).
  This command is useful for transferring balances to a new file, and a few other things.
  Eg it can be used to retain revenues and expenses, like this:

  hledger close --close-desc 'retain earnings' --close-acct 'equity:retained earnings' type:rx

And if it's ever needed, the above retain incantation could be provided as an easier `hledger retain` command or script.

Comments and other ideas most welcome.

-Simon



--
You received this message because you are subscribed to the Google Groups "hledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hledger+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hledger/29c263d3-bf99-4346-818e-b7b964348cccn%40googlegroups.com.

メッセージは削除されました

Simon Michael

未読、
2023/04/04 18:09:062023/04/04
To: hledger
Or perhaps drop the --migrate flag, and make it

hledger close [--close[=FILE]|--open[=FILE]] [ACCTQUERY] [OTHEROPTS]

Examples:

hledger close   # show just the closing transaction, default behaviour
hledger close --close   # same
hledger close --open   # show just the opening transaction
hledger close --close --open   # show both transactions
hledger close --close=2023.journal --open=2024.journal   # append the two transactions to their respective files



Simon Michael

未読、
2023/04/04 18:13:312023/04/04
To: hledger
Or make some use of the existing -o/--output-file option:

hledger close --close --open -o NEWFILE    # -o causes it to write the closing txn to default journal and opening txn to NEWFILE


Simon Michael

未読、
2023/04/04 20:44:342023/04/04
To: hledger
On Apr 4, 2023, at 09:39, niels...@gmail.com <niels...@gmail.com> wrote:

Is the "close" command supposed to generate both the closing balances and the opening balances (i.e., with one command)?

Some of the documentation suggests that, but I am not getting that behavior in 1.29.


Which documentation, by the way ? The manuals are expected to be always up to date, but random cookbook docs are not.

niels...@gmail.com

未読、
2023/04/05 9:49:592023/04/05
To: hledger
I think I now see what was happening. In some of my internet searches, I was coming across old documentation, which described the prior behavior (i.e., "close" generating both the closing and opening transactions).

I then got confused when I looked at the hledger documentation, which says:

--open: as above, but prints just the opening transaction. This can be useful for starting a new file, leaving the old file unchanged.

When I read "as above," my eyes went up to the main heading of "close" rather than immediately above to "--migrate." This was my misreading. For any who might be tempted to make the same mistake, the "--open" section could be rewritten as:

--open: the same as --migrate, but prints just the opening transaction. This can be useful for starting a new file, leaving the old file unchanged.

Rob
メッセージは削除されました

Simon Michael

未読、
2023/04/05 19:08:002023/04/05
To: hledger
Thanks Rob. That doc has been rewritten, and will hopefully be clearer when I push it.

Simon Michael

未読、
2023/04/07 12:24:282023/04/07
To: hledger
Latest plans for `close` in 1.29.2:


On Apr 4, 2023, at 10:19, niels...@gmail.com <niels...@gmail.com> wrote:

Thank you, and I have some ideas re the documentation that may be helpful in the meantime.

Once I get confident enough with GitHub, I will submit the requests there. 

Rob

全員に返信
投稿者に返信
転送
新着メール 0 件