Is it bad practice to use multiple postings ?

63 views
Skip to first unread message

mpl...@gmail.com

unread,
Sep 25, 2019, 10:44:01 AM9/25/19
to Beancount
Guys hi,

As the title says i wonder if it's bad practice to use multiple postings.

Sometimes i use transactions with multiple postings, example:

2019-09-06 * "Paid for ..."
  Expenses:Business:Company1        200 USD
  Expenses:Business:Company2        200 USD
  Assets:Cash                 -400 USD

or

2019-09-06 * "Paid for ... & Received"
  Expenses:Business:Company1        200 USD
  Expenses:Business:Company2        200 USD
  Income:Business:Company1          -50 USD
  Assets:Cash                 -350 USD

It worked great for my needs, but now that i'd like to filter expenses/income only related to Company1 fava filter "any(account:"Expenses:Business:Company1)"
does not work for this type of transactions.

So i wonder if it's better practice to use simple transactions like

2019-09-06 * "Paid for ..."
  Expenses:Business:Company1        200 USD
  Assets:Cash                 -200 USD

......

So one can be more flexible with filters, etc if need arises.

Vivek Gani

unread,
Sep 25, 2019, 11:16:01 AM9/25/19
to Beancount
I got curious about this too a year ago, and at the time I think the opinion I formed was: 
- It's okay to have transactions with multiple postings, Martin's made plugins like https://aumayr.github.io/beancount-docs-static/_modules/beancount/plugins/split_expenses.html that will create 3+-posting transactions out of 2-posting transactions.
- It's the responsibility of whatever tool is reading/filtering your beancount file (e.g. fava) to appropriately deal with handling multiple postings. Particular to Fava, there's been some talk of this in https://github.com/beancount/fava/issues/812 , where one possible solution would be to display things better. 

The other option, if you have transactions with just one-source/multiple-sinks or one-sink/multiple-sources (but not multiple-sources/multiple-sinks) would be to have a beancount plugin that will convert transactions like: 

2019-09-06 * "Paid for ..."
  Expenses:Business:Company1        200 USD
  Expenses:Business:Company2        200 USD
  Assets:Cash                 -400 USD

-to- 

2019-09-06 * "Paid for ..."
  Expenses:Business:Company1        200 USD
  Assets:Cash                 -200 USD

2019-09-06 * "Paid for ..."
  Expenses:Business:Company2        200 USD
  Assets:Cash                 -200 USD

Martin Blais

unread,
Sep 25, 2019, 10:54:28 PM9/25/19
to Beancount
Multiple postings are absolutely fine.
My pay stubs have something like 20+ postings each.
For your particular example, filter the postings, not the transactions.
> --
> 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+...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/beancount/c2eb35fd-428b-412f-a880-552887b448ab%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages