* Martin Blais <
bl...@furius.ca> [2019-10-09 22:24 -0400]:
> On Tue, Oct 8, 2019 at 11:29 AM Phil! Gold <
phi...@pobox.com> wrote:
> > The specific problem is that I have a few different funds I need to
> > keep separate from each other. We periodically have projects in
> > collaboration with other organizations where the funding for those
> > projects has to remain separate from our general funds. I manage this
> > in Ledger by having separate income and expense accounts for these
> > projects.
>
> There's no such rule system (I don't recall coming across it in Ledger
> either, how does it work?),
Well, for Ledger I wrote my own scripts that process the Income and
Expense accounts and sort them into appropriate Net Asset accounts. For
year-to-date reports, the sums just get printed in the reports, but at the
end of the year I write the sums into that year's journal file as new
Ledger transactions.
The net result is that I can use Ledger's built-in querying tools to get
either an income statement or a complete balance sheet for a fiscal year
by querying either the last day of the FY or the first day of the next FY,
respectively. For year-to-date stuff (which is almost always current
year-to-date), if I use the built-in querying tools I have to mentally
combine the income and expense accounts myself.
Since beancount has a richer query language, I'd hoped to be able to do
all of the income/expense -> net asset stuff dynamically without fixing
the account closing stuff at the end of the fiscal year. I guess that's
not possible.
> but what I'd recommend you do is write a little script that creates the
> EOY transactions and insert those into your file.
That's what I ended up doing. In case it's useful to anyone else, I'm
attaching it here. (But its rules--encoded in the get_account_target()
function--depend heavily on the particular account structure I've set up.)
--
...computer contrarian of the first order... /
http://aperiodic.net/phil/
PGP: 026A27F2 print: D200 5BDB FC4B B24A 9248 9F7A 4322 2D22 026A 27F2
--- --
do {
:
} until (HELL_FREEZES_OVER);
---- --- --