For example, in my top-level directory I create subdirectories for every year, i.e.
2019/, 2020/, 2021/, etc. Also in my top-level directory I create a bunch of ledger
files that *only* contain include directives, e.g. 2021.ledger contains just the two
lines "include 2021/business.ledger" and "include 2021/personal.ledger"; these are
the files I pass to ledger on the command line. Then inside each year-based subdir
I create a bunch of files that actually record all of my financial transactions,
organized in whatever way makes the most sense (e.g. my "2021/personal.ledger" file
also just includes a bunch of files, like "include checking.ledger" and
"include mortgage.ledger").
Ok, so how would this help with different tax year end date? Currently, all of my
tax years end on December 31, but if I ever had a need to support something else I
would just add a new file in my top-level directory such as "2020-tax-year.ledger"
that just contains the lines "include 2019/whatever.ledger" and
"include 2020/whatever.ledger". And then so I don't forget to add the appropriate
--begin and --end command line arguments I would write a wrapper script in my
top-level directory such as "tax-year-report.sh".
--
---
You received this message because you are subscribed to the Google Groups "Ledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ledger-cli+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ledger-cli/87v9akqlcu.fsf%40ucl.ac.uk.
Exactly, but you can work around that issue by using the include directive (see:
https://www.ledger-cli.org/3.0/doc/ledger3.html#Command-Directives).
For example, I have a script that writes out my year-end balances to the next year's
directory (I create subdirectories in my top-level directory for every year) with a
filename of "<organization>-opening-balances.ledger" (e.g.
"2021/business-opening-balances.ledger" and "2021/personal-opening-balances.ledger").
Then at the top of my "2021/business.ledger" and "2021/personal.ledger" files I just
"include business-opening-balances.ledger" or "personal-opening-balances.ledger"
respectively.
That allows me to go back and automatically overwrite those files to adjust my opening
balances at any time without having to edit any subsequent transaction.
--
---
You received this message because you are subscribed to the Google Groups "Ledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ledger-cli+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ledger-cli/1614004814.116413098%40apps.rackspace.com.