Loosely tracking shared expenses between partners

695 views
Skip to first unread message

adde...@gmail.com

unread,
Dec 17, 2017, 9:27:59 AM12/17/17
to Beancount
Hey,

I'm trying to figure out a good simple strategy that allows me to track expenses that I share with my girlfriend. We live together and we have two types of shared expenses: the ones for our apartment like rent and utilities and the ones where usually I pay for something for the both of us.

For the first type of transactions I don't care about the balance between us, she pays a fixed amount into my account from which most bills go out from each month. I do however care about having accurate tracking of these expenses so I can tell what our fixed monthly expenses are. For example, I want the full rent and cost of all the utilities to show up among my expenses. At the moment I'm tracking this using regular expense accounts which I create posts against whenever I pay our rent for example. I post the transactions where my girlfriend sends me the fixed amount as a special income account and I'm pretty happy with this solution (I think).

I currently have no solution that I'm happy with for the second type of transactions. These transactions usually occur at an irregular basis and the amounts vary wildly and I always care about maintaining some sort of balance but whether I care about tracking the full value to an expense account or not varies. For example, if I pay for a pair of shoes she wants because she doesn't have any money in the currency then I'd want to keep track of the balance she owes me but not the expense. However if we go and buy Christmas decorations and I pay then I'd want to record the full amount to an expense account and half of the amount to an account that represents the money my girlfriend owes me. Preferably I'd like to track the balance between me and my girlfriend as an asset account as that to me seems like the quickest way to at a glance tell the status between us (but I may be wrong).

I was playing around with using an intermediate liability account (see bellow) and I think I could calculate the balance between us with a query but since we already have a history and I just started using beancount I have no account to post the current balance against and future payments to balance this would be harder to track without an asset account?

2017-11-26 * "Christmas"
  Expenses:Home:Decoration  30 GBP
  Liabilities:Shared                  -30 GBP

2017-11-26 * "Christmas"
  Liabilities:Shared  30 GBP
  Liabilities:Amex   -30 GBP

Does anyone have any idea on how to track this in a neat way, preferably without plugins. And yes I've read the expense sharing cookbok but didn't see any solution I was perfectly happy with :).

Cheers!
Andreas

Zhuoyun Wei

unread,
Dec 18, 2017, 10:25:25 AM12/18/17
to bean...@googlegroups.com
Hi Andreas,

I track my shared expenses with my roommates this way:


; My roommate pays, the dinner is 100 for each of us
2017-12-01 * "Dining out"
Equity:ARAP:Alice -100.00 CNY
Expenses:Food:DiningOut 100.00 CNY

; I pay for the rent, which is 3000 for each of us
2017-12-02 * "Rent for November"
Assets:SomeBank -6000.00 CNY
Expenses:Rent 3000.00 CNY
Equity:ARAP:Alice 3000.00 CNY

; My roommate pays me to settle up
2017-12-03 * "Settle up"
Equity:ARAP:Alice -2900.00 CNY
Assets:SomeBank 2900.00 CNY


The idea is to set up an account for each of your friends (Alice, Bob,
etc). I used to put these personal accounts under
Assets:AccountsReceivables, but I do not want them to appear under Assets
column in the Balance Sheet. Also, the balance of these accounts may be
negative sometimes. So I abuse / misuse the "Equity" root account and
renamed them to be under "Equity:ARAP". "ARAP" is a term I made up for
"Account Receivables / Account Payables".

I recommend that you try [Splitwise](https://www.splitwise.com/), which
is a great software for tracking shared expenses. My friends and I use
it to track shared expenses collaboratively. I use the CSV export
feature, and bean-extract the bills into Beancount at the end of each
month.

A side note: Splitwise does not provide a day-to-day balance. So my
friends and I settle up at least once a month. This works as a "balance"
directive in Beancount, asserting the balance to be zero. It makes
finding errors easier.


2017-12-17 06:27:59 adde...@gmail.com <adde...@gmail.com>:
> --
> 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 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/
> 4b167c55-e651-4d93-a2a1-cebd41813a59%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.


--
Zhuoyun Wei
signature.asc

Martin Blais

unread,
Dec 24, 2017, 1:03:54 AM12/24/17
to Beancount
I do this too - my partner and I share most expenses  - and the simple way is to create for your girlfriend an assets account (if she generally pays after the fact) or a liabilities account (if she generally pays ahead of time), and then to use the SQL client to generate a journal of that account to list all that was posted and compute the current balance (ours gets uploaded to a Google Sheets doc where she can review it for errors or unexpected items). When your girlfriend/roommate makes transfers to pay for those shared expenses incurred on your side, you post the payment against that account. It's really convenient to have that account as you can use it for any other purpose, e.g., transfers, gifts, etc. "I'll just put it on your account," you can say. It's purely an electronic transaction between the two of you; the actual reconciliation is a separate concern.

The other side of this coin is a bit more complicated though. I'm referring to the expenses which she pays for and which you do have to transfer to her. You can use the same account, but you need to find a way for her to communicate those expenses to you, so you can reduce the account accordingly. We use a Google Sheets document that she updates, and I simply update my corresponding transactions from that doc (I haven't automated getting all the details from it yet to create transactions, but it's doable). One challenge, you may find, is that your partner forgets to update the doc (and therefore doesn't always get the corresponding reimbursement). That's an ongoing issue; I have no solution for it other than to remind.




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

Dominik Aumayr

unread,
Dec 24, 2017, 8:57:54 AM12/24/17
to 'Paulo Matos' via Beancount
To give another example: My partner uses Beancount and Fava (https://beancount.github.io/fava/) as well, and we both have a Liabilities-account for each other. So if I buy something that belongs to her but I pay, I create an according transaction (eg. Assets:CreditCard and Liabilities:Partner), and she does the same in the opposite direction. For expenses that are split between us half of it goes to my Expenses account, and half to her Liabilities account (eg. Assets:CreditCard, Expenses:Rent and Liabilities:Partner).

At the end of each month we both compare the balance of her Liabilites-account in my journal, and mine in her's, and make a balancing (real) transaction accordingly.

After we do that, I wrote an exporter/importer for Fava that
(a) is used to export a report from my Journal with her Liabilities-account and it's transactions in the last month, and
(b) is used to import this file with transactions (beancount-format!) into her journal (via a Fava importer).
(c) vice-versa for her

This way, we both have all the transactions concerting both of us in each of our journals, and a way to correct them if something is not clear/wrong. Sounds like a little bit of work, but configured the right way (talking about the importer) and this is a 2-minute task each month.

Best,
Dominik
> To unsubscribe from this group and stop receiving emails from it, send an email to beancount+...@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/4b167c55-e651-4d93-a2a1-cebd41813a59%40googlegroups.com.
> 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+...@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/CAK21%2BhP3DgZOr62enBFA%2ByyW68bdGYHMh%3DpfqfgKhc5WHF9VZA%40mail.gmail.com.

adde...@gmail.com

unread,
Jan 24, 2018, 7:25:52 AM1/24/18
to Beancount
Hey,

Sorry all for the very slow response. The holiday period got the better of me.

All of these methods you've mentioned seem to only count half the cost on your own accounts though and the other half is counted against a generic account for your partner or roommate? What I would like to do is to count the full amount of our shared apartment expenses against a shared account and then possibly balance this shared account with payments from each of us. The reason I'm interested in doing it this way is that I'd like to get a clear picture of the actual cost of our living arrangement so that we can evaluate it against other apartments for example. If we always did split everything in half then I could use the way you described and just multiply either share by 2 and I'd got the full cost but the parts we pay vary quite regularly.

Cheers,
Andreas

Martin Blais

unread,
Jan 27, 2018, 1:05:11 AM1/27/18
to Beancount
On Wed, Jan 24, 2018 at 7:25 AM, <adde...@gmail.com> wrote:
Hey,

Sorry all for the very slow response. The holiday period got the better of me.

All of these methods you've mentioned seem to only count half the cost on your own accounts though and the other half is counted against a generic account for your partner or roommate? What I would like to do is to count the full amount of our shared apartment expenses against a shared account and then possibly balance this shared account with payments from each of us. The reason I'm interested in doing it this way is that I'd like to get a clear picture of the actual cost of our living arrangement so that we can evaluate it against other apartments for example. If we always did split everything in half then I could use the way you described and just multiply either share by 2 and I'd got the full cost but the parts we pay vary quite regularly.

Yes, this is interesting, and I've done this in the past for a common project with someone else. Essentially, I would record the transactions twice: once for my half in my own personal ledger, and once again with the full amount in a separate, shared ledger. There was also some shared account to update. For the shared account I ended up splitting the income legs manually, and copy-pasting + editing to replicate to my personal account. That's not the best, it was too much manual work and it was annoying (but it worked).

However, that being said, I'm currently gearing up for doing this once again and better this time around, especially since I'll have a lot less time to do this type of stuff. We just gave birth to a baby boy, and call me neurotic, but I'm planning to track all his related expenses separately to do just what you described. In other words, on my personal ledger, all expenses for my kid should appear to a single Expenses account to his name. For instance, my "Food" total should account for just the food I consume, not that which he does. His expenses should appear on my income statement as an outflow of general costs related to his maintenance, or perhaps just a few high-level accounts. This is more accurate as Mom will inevitably end up paying for different types of thing than Dad will. On the shared ledger, those same expenses will appear to their respective categories (e.g. "Food" will be his food this time around, and just his) and that should give a full picture of his costs, paid for by Mom and Dad, which is more interesting that just the parts which I happened to have paid for. I think this is similar to what you need to do. 

Here's how I'm planning to implement this, this time around:

- I want to stop recording transactions twice, as it required some annoying manual synchronization and editing. Instead, in my personal ledger, I will record expenses for my kid to categories as if they were my own, but tag transactions with a special and very short tag (there will be many). A plugin will convert the expenses accounts of those transactions to a single generic account to his name, as described above.

- I'll write a script that will pull out these transactions from my ledger and instead of transforming the Expenses account this time, it will transform the other (assets or liabilities accounts) postings to a generic "inflow" contribution account from his father. That will output some other file in Beancount format.

- Similarly, I'll also write another script that will pull information from a spreadsheet for his mother's expenses related to him. She doesn't maintain her own Beancount file - alas! - but can hopefully put her expenses for him on a spreadsheet, manually. That script will convert this Google spreadsheet to a Beancount file for his Mom's contributions, booked against a similar inflow-from-Mom account.

- Finally, I'll create some top-level Beancount file that will contain common definitions and such and which will include the two dad.beancount and mom.beancount file. That should form his dataset with his own report.

I made a little diagram to show this flow more clearly:

Now, one remaining question regards whether those conversion scripts ought to always reconvert the entire set of transactions. I think the answer to that is: no. For instance, once imported, spreadsheet lines which have been accounted for in the mom.beancount file can be safely ignored. Mom can delete the spreadsheet contents once the transactions have been included. That's a choice, however, it doesn't have to be that way, but if it didn't, I suspect the spreadsheet would grow very large. Also, not reimporting and doing some sort of fuzzy matching between the spreadsheet or personal.beancount file contents to identify those transactions which have already been imported would allow me to do minor manual edits to the imported transactions, such as adding comments or tags, or perhaps the occasional refinements to categorization.  Now someone more pedantic might choose to set this up such that the "pristine" source of transaction is always the upstream personal.beancount ledger and the Mom spreadsheet, and that those files be always recreated entirely from scratch. That's also a valid design, it just sets a higher level of dedication over time to those pristine sources.

Hopefully, if time allows - between moments patting the kid to sleep and feeding him bottles and responding to his cute noises and trying to guess the particular origins of his numerous and often unexplained dramatic wailing moments - you should eventually see some of these scripts appear under beancount/experiments/




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.

Martin Blais

unread,
Jan 28, 2018, 9:39:58 PM1/28/18
to Beancount

Martin Blais

unread,
Jan 29, 2018, 1:22:57 AM1/29/18
to Beancount
... and this, to operate on the personal Ledger to divert the expenses to a single "child" account:

This completes the system. It works.

Simon Michael

unread,
Jan 29, 2018, 12:51:27 PM1/29/18
to bean...@googlegroups.com

Congrats, Martin!!

Gonna present him with his ledger on his 18th birthday ? (Yikes :-)

Martin Blais

unread,
Jan 29, 2018, 12:59:27 PM1/29/18
to Beancount
On Mon, Jan 29, 2018 at 12:50 PM, Simon Michael <si...@joyful.com> wrote:

Congrats, Martin!!

Thanks!

 

Gonna present him with his ledger on his 18th birthday ? (Yikes :-)

In inflation-adjusted terms! ;-)
Just kidding


 

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

Stefano Zacchiroli

unread,
Jan 29, 2018, 2:13:27 PM1/29/18
to bean...@googlegroups.com
On Mon, Jan 29, 2018 at 12:59:04PM -0500, Martin Blais wrote:
> On Mon, Jan 29, 2018 at 12:50 PM, Simon Michael <si...@joyful.com> wrote:
> > Congrats, Martin!!

Ditto!

> > Gonna present him with his ledger on his 18th birthday ? (Yikes :-)

So, *cough* I'm actually doing the same think for my kid *cough*, with a
tag for each transaction that is related to him.

(Digression: the fact that you need the tag to be short looks like due
to the current Beancount limitation of having to put tags on the same
line of payee/description, which can get pretty long. I'm still doing
this in Ledger-CLI --- and generating a beancount automatically from it
for Fava and SQL-ish queries --- where tags can be on subsequent
(comment) lines so the tag can get long-ish, without being too much of a
hassle.)

But I'm not exactly sure to understand what's the benefit of Martin
rewriting plugin --- aside from showing off the beautiful data
model/flow that Beancount offers and which I love, that is :-)). Even
with just a simple tag, I can filter all transactions with a simple
query, and get a current balance (or filtered ledger, or whatever),
where the categories are the "right" ones, in the sense that grocery
would be (baby-related) Expenses:Grocery, clothes Expenses:Clothes, etc.

What am I missing here?

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 »

Martin Blais

unread,
Jan 29, 2018, 10:53:11 PM1/29/18
to Beancount
On Mon, Jan 29, 2018 at 2:13 PM, Stefano Zacchiroli <za...@upsilon.cc> wrote:
On Mon, Jan 29, 2018 at 12:59:04PM -0500, Martin Blais wrote:
> On Mon, Jan 29, 2018 at 12:50 PM, Simon Michael <si...@joyful.com> wrote:
> > Congrats, Martin!!

Ditto!

> > Gonna present him with his ledger on his 18th birthday ? (Yikes :-)

So, *cough* I'm actually doing the same think for my kid *cough*, with a
tag for each transaction that is related to him.

(Digression: the fact that you need the tag to be short looks like due
to the current Beancount limitation of having to put tags on the same
line of payee/description, which can get pretty long. I'm still doing
this in Ledger-CLI --- and generating a beancount automatically from it
for Fava and SQL-ish queries --- where tags can be on subsequent
(comment) lines so the tag can get long-ish, without being too much of a
hassle.)

I could do this using metadata (and change the scripts), same same.
In fact, I could put the metadata on the postings instead of the transaction, which would be more flexible.


But I'm not exactly sure to understand what's the benefit of Martin
rewriting plugin --- aside from showing off the beautiful data
model/flow that Beancount offers and which I love, that is :-)). Even
with just a simple tag, I can filter all transactions with a simple
query, and get a current balance (or filtered ledger, or whatever),
where the categories are the "right" ones, in the sense that grocery
would be (baby-related) Expenses:Grocery, clothes Expenses:Clothes, etc.

My goals are different. On my personal ledger I don't want to see my son's expenses categories. It wouldn't make much sense because my mix of payments differs from the total costs associated with his maintenance. Say, for example, that I tend to pay for all the nanny stuff and the mother pays for all the food stuff. I would see a lot of nanny stuff on my balance sheet, and no food expenses. The reality is that I pay for a good portion of everything, and my son's ledger will more accurately reflect that breakdown, and my costs are some fraction of that. So I choose not to track this on my personal one, and I replace all these expenses by a single account.

Another way of doing what you do (and FWIW that's what I was going to do originally), is to create a plugin that inserts a root for your kid in the account name. For example, Expenses:Grocery could become Expenses:Kid:Grocery, and so on. This way your balance sheet doesn't blend your Grocery and your kid's.


What am I missing here?

Let me provide a full example, and this should serve to clarify for others as well.

In my personal Beancount ledger, I import a transaction like this:

  2018-01-26 * "CVS" "Pampers size 1"
    Liabilities:CreditCard           -30.17 USD

I categorize it manually as I currently do, and while doing that, I also notice it's for my kid. I insert a tag, so this is what I write:

  2018-01-26 * "CVS" "Pampers size 1" #kid
    Liabilities:CreditCard           -30.17 USD
    Expenses:Pharmacy

Note here that my categorization books to the same set of account which I use for myself. That "Pharmacy" account is the same as mine, but it won't show up there.
The beancount.plugins.divert_expenses plugin renames that to this automatically:

  2018-01-26 * "CVS" "Pampers size 1" #kid
    Liabilities:CreditCard           -30.17 USD
    Expenses:Kid

Now, when I filter and extract his transactions from my personal ledger using the extract_beancount script, I have to disable the plugin (I just realized this bit is missing, will code it right away) when I read it, and instead change the inflow account, so it becomes this:

  2018-01-26 * "CVS" "Pampers size 1" #kid
    Income:Dad           -30.17 USD
    Expenses:Pharmacy

Furthermore, the Google Sheets script which imports the mother's expenses produces something like this:

  2018-01-26 * "Union Mkt" "Baby food" #kid
    Income:Mom           -15.36 USD
    Expenses:Grocery

And his ledger includes both of these files.
There are no assets (yet), and two income accounts.
Optionally, I could attempt to maintain the particular source of the payments on his side (e.g. Income:Dad:CreditCard1).

I hope this helps,


 

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.

Jeremy Maitin-Shepard

unread,
Feb 2, 2018, 8:23:20 AM2/2/18
to bean...@googlegroups.com
How about booking shared expenses to an Expenses:Joint:Rent (or similar) account?  If you want to keep track of joint expenses that your girlfriend paid for, you could make the source account:  Equity:Girlfriend-Paid or something similar?

Tags on accounts (or postings?) would be a nice thing to have.  Using tags on transactions for this purpose seems like a hack.

Account tags can be simulated by just adding more colon-separated components, but that is annoying in various ways.

Martin Blais

unread,
Feb 6, 2018, 12:39:29 AM2/6/18
to Beancount
On Thu, Feb 1, 2018 at 2:00 PM, Jeremy Maitin-Shepard <jer...@jeremyms.com> wrote:
How about booking shared expenses to an Expenses:Joint:Rent (or similar) account?  If you want to keep track of joint expenses that your girlfriend paid for, you could make the source account:  Equity:Girlfriend-Paid or something similar?

You don't want to reflect the other person's expenses on your income statement.
Or maybe I don't understand the particular transactions you envision (provide a detailed example if you like).
 

Tags on accounts (or postings?) would be a nice thing to have.

Metadata is supported at the moment.
Maybe a grammar redesign where either transactions AND postings both support tags might be a good idea.
The thing is, I think it should be accompanied by a refactoring that automatically merges tags into the metadata, perhaps with just a boolean value.

 
  Using tags on transactions for this purpose seems like a hack.

Oh no! It's exactly the type of usage it was designed for.

 

Account tags can be simulated by just adding more colon-separated components, but that is annoying in various ways.

Yep indeed.

 

Jeremy Maitin-Shepard

unread,
Feb 16, 2018, 10:40:38 AM2/16/18
to bean...@googlegroups.com
On Mon, Feb 5, 2018 at 9:39 PM, Martin Blais <bl...@furius.ca> wrote:
On Thu, Feb 1, 2018 at 2:00 PM, Jeremy Maitin-Shepard <jer...@jeremyms.com> wrote:
How about booking shared expenses to an Expenses:Joint:Rent (or similar) account?  If you want to keep track of joint expenses that your girlfriend paid for, you could make the source account:  Equity:Girlfriend-Paid or something similar?

You don't want to reflect the other person's expenses on your income statement.
Or maybe I don't understand the particular transactions you envision (provide a detailed example if you like).

My understanding is that the OP wanted to track the total expenditure on rent.  How should that be done if not by having an Expense account containing the total rent payments?  I guess to make the income statement work it should be Income:Girlfriend-Paid rather than Equity:Girlfriend-Paid.
 

Tags on accounts (or postings?) would be a nice thing to have.

Metadata is supported at the moment.
Maybe a grammar redesign where either transactions AND postings both support tags might be a good idea.
The thing is, I think it should be accompanied by a refactoring that automatically merges tags into the metadata, perhaps with just a boolean value.

I guess the question is to what extent is it possible to tailor the representation/semantics assigned by beancount to common use cases so that we get useful behavior out of the box (e.g. from fava) without having to code it ourselves either in Python or complicated queries.  Maybe the use cases are too varied for that to be possible, though.
 

 
  Using tags on transactions for this purpose seems like a hack.

Oh no! It's exactly the type of usage it was designed for.

For your #kid tagging example, suppose you bought a couple different items as CVS, some for yourself, and some for your kid.  Presumably you'd want to split the expense part into multiple postings, but you'd need a way to tag individual postings as being associated with the kid or not.  I'm guessing you probably try to use a separate credit card transaction for your kids expenses, in order to avoid this problem, and avoid having to manually split the expense, but it still seems like any general approach should support this -- that is what I mean by a hack.  In particular, why not use an Expenses:Kid:Pharmacy account instead of the rewriting?
 

Martin Blais

unread,
Feb 16, 2018, 10:28:37 PM2/16/18
to Beancount
On Thu, Feb 15, 2018 at 12:45 PM, Jeremy Maitin-Shepard <jer...@jeremyms.com> wrote:


On Mon, Feb 5, 2018 at 9:39 PM, Martin Blais <bl...@furius.ca> wrote:
On Thu, Feb 1, 2018 at 2:00 PM, Jeremy Maitin-Shepard <jer...@jeremyms.com> wrote:
How about booking shared expenses to an Expenses:Joint:Rent (or similar) account?  If you want to keep track of joint expenses that your girlfriend paid for, you could make the source account:  Equity:Girlfriend-Paid or something similar?

You don't want to reflect the other person's expenses on your income statement.
Or maybe I don't understand the particular transactions you envision (provide a detailed example if you like).

My understanding is that the OP wanted to track the total expenditure on rent.  How should that be done if not by having an Expense account containing the total rent payments?  I guess to make the income statement work it should be Income:Girlfriend-Paid rather than Equity:Girlfriend-Paid.

If the other person is paying some of the rent and the ledger is for one person, then the right way to do this is to put the whole rent on another, shared ledger. I don't see any other way that wouldn't corrupt his income statement - he'd have to show income from the girlfriend. I suppose that could easily be done.


Tags on accounts (or postings?) would be a nice thing to have.

Metadata is supported at the moment.
Maybe a grammar redesign where either transactions AND postings both support tags might be a good idea.
The thing is, I think it should be accompanied by a refactoring that automatically merges tags into the metadata, perhaps with just a boolean value.

I guess the question is to what extent is it possible to tailor the representation/semantics assigned by beancount to common use cases so that we get useful behavior out of the box (e.g. from fava) without having to code it ourselves either in Python or complicated queries.  Maybe the use cases are too varied for that to be possible, though.

I'm not sure I understand. My point is only that the current plan for transaction tags is to eventually have them folded into the metadata and remove their explicit field storage, in order to simplify / unify those two concepts. The syntax would remain. All I'm saying is that I'd like to do that and extend the same syntax to postings at the same time.

 
  Using tags on transactions for this purpose seems like a hack.

Oh no! It's exactly the type of usage it was designed for.

For your #kid tagging example, suppose you bought a couple different items as CVS, some for yourself, and some for your kid.  Presumably you'd want to split the expense part into multiple postings, but you'd need a way to tag individual postings as being associated with the kid or not. 

That's right. That's actually a simple modification to the existing plugin; the only method to "tag" that posting right now is to use metadata.

 
I'm guessing you probably try to use a separate credit card transaction for your kids expenses, in order to avoid this problem, and avoid having to manually split the expense, but it still seems like any general approach should support this -- that is what I mean by a hack.

Actually you don't have to use a separate credit card. At the moment, you might have to split the transaction, but modifying the plugin to look at posting metadata you wouldn't even have to. e.g.

  2017-12-16 * "CVS" "Thermometer and diapers"
    Expenses:Pharmacy                           12.03 USD
      kid: TRUE
    Expenses:Pharmacy             15.04 USD
    Liabilities:CreditCard

The idea of supporting tags would allow this (it's just an idea):

  2017-12-16 * "CVS" "Thermometer and diapers"
    Expenses:Pharmacy                           12.03 USD   #kid
    Expenses:Pharmacy             15.04 USD
    Liabilities:CreditCard


    

 
  In particular, why not use an Expenses:Kid:Pharmacy account instead of the rewriting?

You could do that too, but then you'd have to define a ton of accounts twice.

Remember - and this is illuminating - the whole thing is just a giant table of postings, with some constraints between postings belonging to the same transactions. Whether you single out a subgroup of postings - those for the kid - with tags, metadata, or a convention on the account name, is entirely equivalent. Think about it.



jus...@abrah.ms

unread,
Apr 17, 2018, 12:21:29 AM4/17/18
to Beancount
This thread feels suspiciously close to the change I'm trying to model, but it's still not quite making sense to me.

I have several roommates. I originally thought that each person would pay into an "Asset:Pending:GoesToRent" account, then that would pay out to the "Expenses:Housing:TheMortgage" expense.

The wrinkle comes in that they're paying me into my "Assets:Checking" account, and I want to do balance assertions on it. The account diversion stuff mentioned previously appears to be just syntatic sugar for mapping to a tag. Is that right?

My goal is to understand how much of my housing expense is coming from me versus everyone else, so an intermediate account seems necessary?

Would love to hear your thoughts,
 -justin

Martin Blais

unread,
Apr 17, 2018, 1:22:33 AM4/17/18
to Beancount
There are two methods going on in this thread, a simple method of keeping a running account of the other person's contributions and paying their share of expenses from that account, and a more complex method of maintaining a separate beancount ledger dedicated for the project and that recording contributions from all parties. I'll assume you meant the former, simpler method, not the latter.

It's simple: you book the other side of the deposit to the account for each person's contribution:

2018-01-25 * "Money for rent and other expenses"
  Assets:Pending:Bob      -1000.00 USD
  Assets:Checking          1000.00 USD

2018-01-25 * "Money for rent and other expenses"
  Assets:Pending:Alice    -1100.00 USD
  Assets:Checking          1100.00 USD

When it's time to pay the rent, you just pay your bit (Expenses:Rent) and use their account to pay the remaining portions:

2018-02-01 * "Paying the rent"
  Assets:Checking        -2400.00 USD
  Assets:Pending:Bob       800.00 USD
  Assets:Pending:Alice     800.00 USD
  Expenses:Rent             800.00 USD

Whether you choose to maintain their accounts as assets or liabilities - merely a naming change - is a matter of whether they choose to pay you ahead of time most of the time (you safeguard some of their money in preparation for spending - Assets), or after the fact, i.e., after expenses have accrued (they always owe you after you've paid for them - Liabilities). In either case, the signs all stay the same. When you pay the rent, you increase their accounts (if they started at zero, those hold a receivable that you have on them). When they pay you, you decrease that receivable  (or increase the liability - a negative number).

Hope this helps,






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

Justin Abrahms

unread,
Apr 17, 2018, 2:22:29 AM4/17/18
to bean...@googlegroups.com
That makes perfect sense. Thanks. :)

--
You received this message because you are subscribed to a topic in the Google Groups "Beancount" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/beancount/p05e3hMqpJY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to beancount+unsubscribe@googlegroups.com.

To post to this group, send email to bean...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages