Beancount advancement Thread

I’ve got a couple of accounting questions:

  1. What is the sensible scope of what I should track? I’m a semi-freelancer. The customer pays invoices to my employer, who books it to my account within the company and uses this account to charge commission, taxes, salary. At the end of the year whatever is left is paid out as a bonus. It would make sense for me to track all this, to see if they don’t make any mistakes. But that would mean that I would have to track accounts of which I am not the owner, but the company, but from my perspective. This seems complicated. Where would I put all these accounts? In assets? The banking software that I work with does exactly this, it tracks millions of customers from the perspective of the bank. So for example, if you deposit 1’000 CHF into your current account, the bank records it as +1’000 on their cash account and -1’000 in your current account (because they owe you).
  2. Can you easily track expenses shared with flatmates / partners? Whenever I pay in supermarket or in restaurant or for holidays, I put it on Splitwise and after a month or two, my girlfriend sends me a transaction, which clears the balance. But this means that tens of my credit card bookings every month are not fully my cost, but a shared cost, for which I will receive a refund at some point later. So both my expenses and my income are too high. But splitting every transaction ex-post would be time consuming. And there comes again the question of tracking a virtual account for the money my girlfriend owes me. If I give someone a loan, do I… debit my assets and credit the liabilities?
1 Like

I am tracking this through extra assets. If I loan something, the “loan” asset increases, when they reimburse me, the balance goes to 0 because the money comes from this loan asset. If you don’t want to bother with splitting every transaction and the exact date does not matter, you can also remove this amount at once from the corresponding expense account (restaurants, groceries, …).

I guess it makes sense. If you have a current account at a bank, the bank owes you this money (the bank loans money from you), and you book it with a positive sign. So if your friend owes you money, it’s a similar situation.

But the question is, where to put the corresponding counter-posting? Income:Steve:Loans or Liabilities:Steve? :stuck_out_tongue:

Regarding hosting: I guess Docker is good for local hosting, but what if I wanted to have it in the cloud? I see that fava hosts its demo at www.pythonanywhere.com . Any experience with these kind of services? Is it possible to host fava with the free account? Is there a way to password-protect your access?

I would put it as Assets:Loans:Steve.
I see it as if I put some amount of money in another account. And then it gets transferred back to my main account when i get reimbursed.

But I mean the whole transaction, all postings. Let’s make an example. Me and you go to a restaurant, and I pay 100 CHF with my credit card. So you owe me 50 CHF. This I would try to book as:

2019-12-04 * "Burger King" "Eating out with Gesk"
  Liabilities:UBS:VisaCreditCard                  -100.00 CHF
  Expenses:Food:Restaurant                          50.00 CHF
  Assets:Loans:Gesk                                 50.00 CHF

Would this make sense? And what if I didn’t want to split every transaction like this? we went out 10 times, I put -1’000 in Credit Card and +1’000 in Restaurant / Cinema / Etc. Then you pay me off and it looks like I spend so much on restaurants and at the same time have some income from loans, which kind of falsifies the reality.

Finally, I guess the choice between Assets:Steve:Loans and Assets:Loans:Steve depends on if you care more how much a person owes you, regardless of asset type, or if you want to know how much of each asset type you have, regardless of the institution/person. The aggregation is different.

1 Like

This is exactly how I do it.

If you don’t want to do it like this and post the full amount on your credit card as food expenses, you can also remove it later like this:

2019-12-04 * "fixes"
  Expenses:Food:Restaurant                     -500.00 CHF
  Assets:YourBankAccount                        500 CHF

Assuming I wired the amount to your account, or twint or watherver. You don’t need the special asset in this case but you have to remember how much I owe you. If you use splitwise anyway this is fine.
This way you correct the restaurant expenses amount and you don’t have extra income coming from nowhere.

1 Like

What I’m developing now can be used with beancount as well. I am now testing a Bot where you can upload a conversation pattern and then every time you start a conversation with it, it will ask you proper questions for your beancount/excel/google/whatever. It will then generate a file or maybe connect to your api as you wish.
Here a screenshoot of it:
image
(disregard the mistakes for now…ehhe)
As you can see from the last question (Income or Expenses) the bot generate a custom keyboard so you can just press the correct button. The next step would have shown my own list of possible expense categories.
The number of steps is not defined, as long as you give the bot a correct configuration file, it can go on for ages.
The only thing I didn’t make yet is the possibility to define a tree of questions, so that the conversation might go to a different branch of questions.

This tool is surely better than typing those long lines on a mobile phone…

3 Likes

Would you share your transferwise importer? Would save me some time to do it :slight_smile:

I can also recommend to have a look at some of the beancount doc. E.g. http://furius.ca/beancount/doc/double-entry explains a lot about double entry accounting.

1 Like

@Bojack, you are around in zurich, right?
there is a nice cafe at Schaffhauserplatz where people use to go with their laptops. should we have a coffee there?^^

@everyone else: this would not be a closed session :wink:

I’ve put my importers/price updaters/other plugins now in a github repo

Will look at cleaning them up a bit and releasing them to pypi.

2 Likes

only if we put the expenses into Beancount :stuck_out_tongue: but seriously, yes, we can meet, but maybe first I would like to at least prepare some data and have some time to learn the basics of the tool.

haha you are like “let me first sort out stuff on my own”, i’m more like “lets find out stuff together”
:smiley: however you know where you can reach out to me^^

Exciting to see everybody in the thread working toward a working Beancount setup! Makes me want to pick up mine and keep improving it :slight_smile:

1 Like

I’m also interested to see it working. The fact that you need freaking Doker to start to use it make me facepalm though…

I’m still thinking about my own software…

You don’t need Docker. Everything is python and can be installed through pip quite easily.
Docker is just something that’s nowadays more and more common for isolating apps/tools.

If you have python 3 installed on your machine it should just be.

pip install beancount

and for fava

pip install fava

1 Like

i started asking for docker since i wasnt able to install some packages on my WSL. with docker i get rid of this problem. and docker is a cool tool anyway :smiley:
but no, it is by no means required for beancount

And that’s when you get Two malicious Python libraries caught stealing SSH and GPG keys | Hacker News

Isolation through docker is just basic common sense. Not to mention it solves the problem of “can’t run linux stuff on mac os/windows”.

Well the alternative is pay someone money (or with your data for reselling) to figure it out all, provide a hosted solution for you and take care of it and security. I think i’ve actually seen somewhere a beancount saas hosted solution somewhere, i forgot url.

Lightweight VM, if you will, that shares kernel with the host (although on Windows AFAIK they run a VM). A proper VM is better security-wise but just more heavyweight and much harder to provision. Docker’s got provisioning figured out alright with a simple Dockerfile langauge and dockerhub.

2 Likes

not entirely true, on mac it’s pip3 :slight_smile:

Makes sense, but at the same time, how is beancount & fava any different from other software? You don’t run MS Office, browser, games or other 3rd party apps isolated, or?

Yes, to me that is really ridiculous. It’s a shame that there is no good software available. You need beancount, and not standalone, you also need fava to make it enough user-friendly for an average consumer.

Also I am not super-convinced to the flat file format. I am used to working with Oracle SQL Database. The developer of beancount says that it would be hard to implement the features in an SQL database, but somehow all the serious banking software is using a database, there is no way around it. You can also store inserts in a text file and have git versioning, although I admit it does not look that nice. And then, when you do have a database, you can write queries, updates etc. But maybe I’m not deep enough into the details of the implementation to see that flat file is superior.

What I would like to set up, but without too much effort, is a cloud-hosted beancount. I googled for it, and you can either have a python console, like fava does it with their demo, or you can host a docker container, which are also available for fava. I found a thread where they wrote something about HTTPS authentication with nginx or sth like that. That’s the point where I say: hell, I just want to track my net worth, not learn how to use Python, Docker, Apache etc etc. This stuff is really for nerds only. I also don’t like that the software is so niche, backed by a single developer. Open Source is a plus, but I wonder if anybody would pick up after him.

Actually I do.

I use a Linux desktop, so MS Office if I need it would go into a windows VM. But these days office suites are mostly done online - office 365 or gsuite.

Games are distraction from work, I don’t have them installed. If I want to play a GPU-demanding video game, I’d just flash a throwaway windows image I keep for such emergencies on a spare ssd and boot from it baremetal. With some work (setting up gpu passthrough) i can actually run them directly from a vm under linux with minimal performance loss but it’s not really for the faint hearted.

I started isolating browser with firejail after some past local file access vulnerabilities - some websites were using them to steal ssh keys, can’t have that happen to me.