On Fri, May 4, 2018 at 2:42 AM, Stefano Zacchiroli <z...@upsilon.cc> wrote:

> 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.
>

In relational terms, this is a join of the list of accounts and the
documents.
You obtain an association list of
  (account, document)
  ...
Where each document belongs to at most one account.


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.


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.


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?
>

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?




>
> Thanks in advance for your thoughts / comments on this.
> Cheers
> --
> Stefano Zacchiroli . z...@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+unsubscr...@googlegroups.com.
> To post to this group, send email to beancount@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.
>

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to beancount@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/CAK21%2BhOi_TS6-41XMsFf%3DMDsctDeenOAd%2BSV1vQU3jN-uLQU5A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to