It seems to me we lack a Beancount *native* (as opposed to
Fava-supported) way of associating documents to either transactions or
postings. Or am I missing something here? Is this planned and/or being
discussed anywhere else?
Heya beancounters,
I'm struggling to organize my financial documents in a way that is
both consistent and supported by Beancount/Fava and I'd like to hear
from others what best practices you're using.
The main disconnect I notice is between statements documents and
everything else:
1) via the "documents" option beancount has great support for bank
statements and similar documents. You just drop them using a name
like documents/Assets/Bank/Checking/YYYY-MM-DD.pdf and they show up
in your ledger. I want no more/less than this.
2) but I also want to store other documents and associate them to either
transactions as a whole or even individual transaction postings.
Examples are: receipts (for payments, donations, etc.), invoices,
paychecks, etc.
As far as I can tell Beancount itself has not direct support for (2),
please correct me if I'm wrong.
You can drop them into the same
directory structure for (1), but that doesn't associate them with
individual transactions or postings. Fava, OTOH, has the
"link_statement" plugin which supports (2). Aside from a lack of
generality[^], that allows to link documents to transactions/legs.
[^]: https://github.com/beancount/fava/issues/740
But where do you store the documents for use case (2)? If you store them
in the same directory for (1), there is a use clash, and documents
appear both as associated to transactions and in the journal flow --- at
least conceptually, no matter what Fava actually does, which I find
annoying.
It seems to me we lack a Beancount *native* (as opposed to
Fava-supported) way of associating documents to either transactions or
postings. Or am I missing something here? Is this planned and/or being
discussed anywhere else?
Thanks in advance for your thoughts / comments on this.
Cheers
--
Stefano Zacchiroli . za...@upsilon.cc . upsilon.cc/zack . . o . . . o . o
Computer Science Professor . CTO Software Heritage . . . . . o . . . o o
Former Debian Project Leader & OSI Board Director . . . o o o . . . o .
« the first rule of tautology club is the first rule of tautology club »
--
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+unsubscribe@googlegroups.com.
To post to this group, send email to bean...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beancount/20180504064209.GI11188%40upsilon.cc.
For more options, visit https://groups.google.com/d/optout.
On Fri, May 04, 2018 at 09:12:55AM -0400, Martin Blais wrote:
> > 1) via the "documents" option beancount has great support for bank
> In relational terms, this is a join of the list of accounts and the
> documents.
[...]
> 2) but I also want to store other documents and associate them to either
> > transactions as a whole or even individual transaction postings.
> > Examples are: receipts (for payments, donations, etc.), invoices,
> > paychecks, etc.
> In relational terms, this is a join of the transactions and the documents.
> You want to obtain an association list of
> (transaction, document)
> Where each document belongs to at most one transaction.
Ack on (1).
On (2) you also need to support associating documents to individual
postings --- you can do it in various ways in a relational model, I'm
not sure which one you prefer.
> As far as I can tell Beancount itself has not direct support for (2),
> > please correct me if I'm wrong.
>
> It supports neither. The web interface performs the first join implicitly
> by grouping all the directives by account and then rendering journals for
> any account.
Well, no. The fact that the "documents" option exists makes Beancount de
facto support use case (1). You can just drop documents in dirs, and
they will show up in the transaction flow. I'm wondering whether we can
have something similar for associating documents to individual
transactions / postings. I'm not clear on how/if the data model can
support that.
What is suboptimal right now is that people are using link_statements,
making them have document entries appear in the global ledger flow for
something that is txn/posting-specific.
> I could add clean APIs to perform either of these joins, given a particular
> meta-data field.
> For the transactions/documents join, the match could be partial (e.g.
> unique substring on the document filenames).
> Let me know.
>
> Also, how do you need to query this?
> What do you want to produce?
Ideally, I'd like to:
1) "type" (in the sense of type sytems), metadata entries, letting
Beancount know that a specific metadata key should point to a
document (via an URI, or a path, I don't particularly care).
This
will already allow a number of nice checks:
- return an error if the link is dangling
- query the txn and ask: do you link to any document? <- this will in
turn allow fava to render document links associated to txn /
postings even if there are no matching document entries in the
global ledger flow
2) understand where to put the actual documents on disk, in a way that
doesn't get in the way of the "documents" option. This looks
complicated because:
- on the one hand I want a single dir hierarchy where to put
documents, that works for both global documents (that should appear
in the flobal ledger flow) and transaction-specific documents
- on the other hand I don't want to have document entries generated
for transaction-specific documents
And the two look incompatible.
I guess that if we inform Beancount of which metadata entries point
to documents, it will be possible for the implementation of the
"documents" option to exclude them and not generate matching
"document" entries. But I'm not sure if you'd consider this a hack or
not.
Cheers
--
Stefano Zacchiroli . za...@upsilon.cc . upsilon.cc/zack . . o . . . o . o
Computer Science Professor . CTO Software Heritage . . . . . o . . . o o
Former Debian Project Leader & OSI Board Director . . . o o o . . . o .
« the first rule of tautology club is the first rule of tautology club »
--
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+unsubscribe@googlegroups.com.
To post to this group, send email to bean...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beancount/20180505081801.GH1361%40upsilon.cc.
On Sun, May 06, 2018 at 12:34:17PM -0400, Martin Blais wrote:
> It would be possible to not list the documents that are associated with
> transactions in the journals, if that's what you mean.
> That's a web UI option.
[...]
> Same as I describe above. Imagine a plugin that runs the join I'm proposing
> and removes matched Document directives from the list and moves them to
> metadata.
This is the part that wasn't entirely I clear to me. I thought that the
intended meaning of document directives was to stick document to a
specific point in time in the transaction journal.
While the interpretation you're suggesting here is that it just makes
Beancount aware of the existence of documents, the date is just an
attribute documents will have (because it's required for all Beancount
directives); but documents have no special meanings other than what
plugins / UIs make of them.
This addresses my concern, thank you. I will stop worrying about mixing
transaction-specific documents and statements.
> BTW, I'm happy to support something like this in Beancount itself,
> that functionality could move out of Fava, it's not web-specific.
That would be helpful and make more users use documents associated to
transactions, I think. But is of course up to the Fava people to decide
if they want to move the plugin over or not.
Cheers
--
Stefano Zacchiroli . za...@upsilon.cc . upsilon.cc/zack . . o . . . o . o
Computer Science Professor . CTO Software Heritage . . . . . o . . . o o
Former Debian Project Leader & OSI Board Director . . . o o o . . . o .
« the first rule of tautology club is the first rule of tautology club »
--
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+unsubscribe@googlegroups.com.
To post to this group, send email to bean...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beancount/20180506170107.GJ1361%40upsilon.cc.