Discussion:
How to model unowned money
Bob Rubbens
2018-06-01 12:41:01 UTC
Permalink
Hey everyone,

Been using hledger since the past two months, enjoying it so far. Hope you
guys don't mind if I ask a possibly accounting-technical question.

Right now I'm using an (I'm assuming) pretty standard setup. I've got my
Assets, Liabilities, Equity (only for starting balances), Revenue and
Expenses accounts. My salary comes from revenue and goes to assets,
creditcard is an account under liabilities, and when I spend money it goes
to expenses (either from creditcard or assets). Seems pretty standard I
think.

Last week a transaction happened where I got 100 euro from friend A. 40
euro of that was meant for a friend of mine, B, but A didn't have B's
account info so he just sent it to me. When I received the money I arranged
for the 40 euro's to be transferred to friend B. So far so good.

I modeled this in reverse of how borrowing money works as far as I
understand it. I am definitely not an accountant so it's probably not
correct, but here it is:

2018-05-15 Return beer crate money
Liabilities:FriendB 40
Assets:Checking 60
Revenue:FriendA

2018-05-17 Forward beer crate money to B
Expenses:FriendB 40
Liabilities:FriendB = 0

There are two problems with this:

- The liabilities account becomes positive. I've only seen the liabilities
account be negative in almost all examples so I suspect this is bad. One
good thing I can see here is that if I had borrowed money before from
FriendB, the loans cancelling each other out would work nicely this way:

2018-05-10 B bought me a few beers
Expenses:Pub 20
Liabilities:FriendB

2018-05-15 Return beer crate money
Liabilities:FriendB 40
Assets:Checking 60
Revenue:FriendA

2018-05-17 Forward beer crate money to B
Expenses:FriendB 20
Liabilities:FriendB = 0

This seems appropriate, but I might be wrong.

- When I ask hledger for an incomestatement this way, I have among all
other income and expenses also the income of receiving money that's not
mine and the expense of spending money that's not mine (the 40 euros from
friend to friend). Since the money is just meant to pass on without
actually influencing my income/expenses, I'd like my incomestatement not to
include money that's just being forwarded. I figured I could just do
something like this:

2018-05-15 Return beer crate money
Liabilities:FriendA 40
Equity:FriendA -40
Assets:Checking 60
Revenue:FriendA -60

2018-05-17 Forward beer crate money to B
Expenses:FriendB 40
Liabilities:FriendB

But I'm not sure if that's entirely sound, it feels like a hack. I could
also just ignore the transaction on my incomestatement but that doesn't
feel right to me. If I did that I'd have to carefully filter out certain
transactions every month and I dislike that idea.

Ideally I'd like income to mean "money that I can spend on whatever I
like", but right now that's not true since that 40 euros was technically
not mine. I hope someone can shed some light on this for me!
--
You received this message because you are subscribed to the Google Groups "hledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hledger+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Francesco Ariis
2018-06-01 13:08:38 UTC
Permalink
Hello Bob
Post by Bob Rubbens
Last week a transaction happened where I got 100 euro from friend A. 40
euro of that was meant for a friend of mine, B, but A didn't have B's
account info so he just sent it to me. When I received the money I arranged
for the 40 euro's to be transferred to friend B. So far so good.
I modeled this in reverse of how borrowing money works as far as I
understand it. I am definitely not an accountant so it's probably not
2018-05-15 Return beer crate money
Liabilities:FriendB 40
Assets:Checking 60
Revenue:FriendA
2018-05-17 Forward beer crate money to B
Expenses:FriendB 40
Liabilities:FriendB = 0
This is most likely not what you want. Let's look at this:

2018-04-15 I buy some beer
Assets:Cash -80 ; what I paid at the counter
Expenses:Beverage 40 ; my share of the beer
Liabilities:FriendA 40 ; friend A share

2018-05-15 Return beer crate money
Assets:Cash 90 ; what I receive
Assets:FriendA -40 ; what Friend A owed me (account goes to 0)
Liabilities:FriendB -50 ; money I now owe to B

2018-05-17 Forward beer crate money to B
Liabilities:FriendB 50 ; (account goes to 0)
Assets:Checking

The trick is to always start from "indisputable" amounts. If your friend
hands you a 100€ bill then your entry should start with:

Assets:Cash 100

Does that solve your problems?
-F
--
You received this message because you are subscribed to the Google Groups "hledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hledger+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Simon Michael
2018-06-01 14:06:54 UTC
Permalink
Post by Francesco Ariis
The trick is to always start from "indisputable" amounts.
That's a really good rule of thumb! I hadn't seen it so clearly.
--
You received this message because you are subscribed to the Google Groups "hledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hledger+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Simon Michael
2018-06-01 14:30:32 UTC
Permalink
Small typo: I think you meant to use Assets:FriendA in the first transaction there.
Post by Francesco Ariis
2018-04-15 I buy some beer
Assets:Cash -80 ; what I paid at the counter
Expenses:Beverage 40 ; my share of the beer
Liabilities:FriendA 40 ; friend A share
2018-05-15 Return beer crate money
Assets:Cash 90 ; what I receive
Assets:FriendA -40 ; what Friend A owed me (account goes to 0)
Liabilities:FriendB -50 ; money I now owe to B
2018-05-17 Forward beer crate money to B
Liabilities:FriendB 50 ; (account goes to 0)
Assets:Checking
--
You received this message because you are subscribed to the Google Groups "hledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hledger+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Francesco Ariis
2018-06-01 14:36:27 UTC
Permalink
Post by Simon Michael
Small typo: I think you meant to use Assets:FriendA in the first transaction there.
Well spotted!
--
You received this message because you are subscribed to the Google Groups "hledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hledger+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Bob Rubbens
2018-06-01 15:29:15 UTC
Permalink
Hey everyone,

Thanks for the quick response!

Francesco's second transaction contains just what I needed. Having the
money from friend A temporarily only to give it to friend B a.s.a.p. is
very comparable to borrowing money from friend B (this is the insight I got
from Francesco's transactions). I now have it modeled like this:

2018/05/15 Beer crate money return
Revenue:Friend A -60
Liabilities:Friend B -40
Assets:Checking 100

2018/05/17 Return beer crate money
Liabilities:Friend B 40
Assets:Checking -40

This feels like correct accounting so I'll stick with this. The money
transfer is now hidden properly from my income and expenses, but it is
still handled and visible internally, which is what I wanted.

The trick is to always start from "indisputable" amounts.
I like this! Thanks for your help and the clear example!

Regards, Bob
Post by Simon Michael
Post by Simon Michael
Small typo: I think you meant to use Assets:FriendA in the first
transaction there.
Well spotted!
--
You received this message because you are subscribed to a topic in the
Google Groups "hledger" group.
To unsubscribe from this topic, visit https://groups.google.com/d/
topic/hledger/ZIm3e9xiw-0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "hledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hledger+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Simon Michael
2018-06-01 16:02:07 UTC
Permalink
Post by Bob Rubbens
Hey everyone,
Thanks for the quick response!
2018/05/15 Beer crate money return
Revenue:Friend A -60
Liabilities:Friend B -40
Assets:Checking 100
2018/05/17 Return beer crate money
Liabilities:Friend B 40
Assets:Checking -40
Hey Bob, welcome.

If it works for you, then great. But if you want to be a little more precise.. money received temporarily is an inflow, but not really a revenue. It causes an increase in your assets, and a corresponding increase in your liabilities.

Here's my update of Francesco's example:

2018-04-15 I buy some beer for myself and A
Assets:Cash -80 ; what I paid at the counter
Expenses:Beverage 40 ; my share of the beer
Assets:Receivable:A 40 ; A's share, to be collected later

2018-05-15 A repays me for beer, and gives me money for B
Assets:Cash 90 ; what I receive
Assets:A -40 = 0 ; clear A's debt to me
Liabilities:B -50 ; money I now owe to B

2018-05-17 Deliver A's money to B
Assets:Checking -50
Liabilities:B 50 = 0 ; clear my debt to B

(Untested, hope I got it right!)
--
You received this message because you are subscribed to the Google Groups "hledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hledger+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Simon Michael
2018-06-01 16:05:05 UTC
Permalink
Post by Simon Michael
2018-04-15 I buy some beer for myself and A
Assets:Cash -80 ; what I paid at the counter
Expenses:Beverage 40 ; my share of the beer
Assets:Receivable:A 40 ; A's share, to be collected later
2018-05-15 A repays me for beer, and gives me money for B
Assets:Cash 90 ; what I receive
Assets:A -40 = 0 ; clear A's debt to me
Liabilities:B -50 ; money I now owe to B
2018-05-17 Deliver A's money to B
Assets:Checking -50
Liabilities:B 50 = 0 ; clear my debt to B
(Untested, hope I got it right!)
Of COURSE not. More correct:

2018-04-15 I buy some beer for myself and A
Assets:Cash -80 ; what I paid at the counter
Expenses:Beverage 40 ; my share of the beer
Assets:Receivable:A 40 ; A's share, to be collected later

2018-05-15 A repays me for beer, and gives me money for B
Assets:Cash 90 ; what I receive
Assets:Receivable:A -40 = 0 ; clear A's debt to me
Liabilities:Payable:B -50 ; money I now owe to B

2018-05-17 Deliver A's money to B
Assets:Checking -50
Liabilities:Payable:B 50 = 0 ; clear my debt to B
--
You received this message because you are subscribed to the Google Groups "hledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hledger+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Bob Rubbens
2018-06-01 18:07:36 UTC
Permalink
Very clear, thank you!
Post by Simon Michael
2018-04-15 I buy some beer for myself and A
Assets:Cash -80 ; what I paid at the counter
Expenses:Beverage 40 ; my share of the beer
Assets:Receivable:A 40 ; A's share, to be collected later
2018-05-15 A repays me for beer, and gives me money for B
Assets:Cash 90 ; what I receive
Assets:A -40 = 0 ; clear A's debt to me
Liabilities:B -50 ; money I now owe to B
2018-05-17 Deliver A's money to B
Assets:Checking -50
Liabilities:B 50 = 0 ; clear my debt to B
(Untested, hope I got it right!)
2018-04-15 I buy some beer for myself and A
Assets:Cash -80 ; what I paid at the counter
Expenses:Beverage 40 ; my share of the beer
Assets:Receivable:A 40 ; A's share, to be collected later
2018-05-15 A repays me for beer, and gives me money for B
Assets:Cash 90 ; what I receive
Assets:Receivable:A -40 = 0 ; clear A's debt to me
Liabilities:Payable:B -50 ; money I now owe to B
2018-05-17 Deliver A's money to B
Assets:Checking -50
Liabilities:Payable:B 50 = 0 ; clear my debt to B
--
You received this message because you are subscribed to a topic in the
Google Groups "hledger" group.
To unsubscribe from this topic, visit https://groups.google.com/d/
topic/hledger/ZIm3e9xiw-0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "hledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hledger+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...