Suggestions for using hledger for business

513 views
Skip to first unread message

Marko Kocić

unread,
Jan 10, 2015, 11:30:18 AM1/10/15
to hle...@googlegroups.com
Hi all,

just thinking about the best way to use hledger to track business income and expenses alongside personal and best way to do it.
I found this[1] post from year or so ago that gives some ideas, but still not sure about the best way.
What do you use right now, one or separate independent files?
Also, how do you set aside funds for tax? Do you put it as an assets with separate virtual posting for the foreseen amount, or use something like asset:fund:tax?

Regards,
Marko

Simon Michael

unread,
Jan 10, 2015, 12:08:57 PM1/10/15
to hle...@googlegroups.com
Hi Marko,

good topic. I still use one file per year for business and personal:

general-2015.journal
general-2014.journal
etc…

LEDGER_FILE is set to general.journal, a symlink to the current year

general.journal -> general-2015.journal

all.journal includes all years, with account aliases to make their chart of accounts consistent.

I use future.journal for estimating future activity. This one I broke up into parts for easier editing and navigation in my editor:

; future.journal - year to date plus projected inflows/saving/budgetting/outflows
include general.journal
include earning-plan.journal
include saving-plan.journal
include spending-plan.journal

I now use the business/personal level 2 subaccounts everywhere:

$ hledger acc depth:2 —tree
assets
business
personal
equity
closing balances
opening balances
expenses
business
personal
liabilities
business
personal
revenues
business
personal

Occasionally I’ll collapse them to see a combined view:

$ hledger bal —alias “(business|personal):=“
# (warning, something may have messed with these hyphens and quotes)

Re taxes, when I receive a client payment I:
- decrease the accounts receivable balance previously created to track it
- increase my estimated federal and state tax liability for the year (making it more negative)
- set aside a portion for estimated taxes, in a virtual sub account of checking (an envelope account)

The whole cycle looks something like this:

2015/1/1 * (201501c1) client1 invoice
(assets:business:accounts receivable:client1) $4000

2015/1/20 client1 payment received
revenues:business:client1 $-4000
(assets:business:accounts receivable:client1) $-4000
(liabilities:personal:tax:federal:2014) $-1000
(liabilities:personal:tax:state:2014) $-80
assets:business:bank:wf:bchecking:btax $1000 ; save for estimated tax
assets:business:bank:wf:bchecking $3000

2015/1/20 draw some funds from business
assets:business:bank:wf:bchecking
assets:personal:bank:wf:checking $2500

2015/1/10 pay federal 2014 estimated tax #4
assets:personal:bank:wf:checking:btax $-2000
expenses:personal:tax:federal:2014 $2000
(liabilities:personal:tax:federal:2014) $2000

2015/4/1 * adjust tax liability estimate to the actual amount, once known
(liabilities:personal:tax:federal:2014) $-3000 = $-2700

2015/4/10 pay federal 2014 remaining tax
assets:personal:bank:wf:checking:btax $-2700
expenses:personal:tax:federal:2014 $2700
(liabilities:personal:tax:federal:2014) $2700 = $0


Simon Michael

unread,
Jan 10, 2015, 12:24:33 PM1/10/15
to hle...@googlegroups.com
On Jan 10, 2015, at 9:08 AM, Simon Michael <si...@joyful.com> wrote:
2015/1/10 pay federal 2014 estimated tax #4
   assets:personal:bank:wf:checking:btax                 $-2000
   expenses:personal:tax:federal:2014                     $2000
   (liabilities:personal:tax:federal:2014)                $2000

Correction: that should have been “assets:business:bank:wf:checking:btax” above. Or, there’d need to be an additional transfer from the business checking to the personal checking account (I made this mistake in real life yesterday).

Also if you wonder why there are so many parenthesized (aka virtual, aka unbalanced, aka single-entry) postings, it’s because:
- I’m using cash basis accounting, which does not track Accounts Receivable
- the estimated tax liability is just my estimate of something in the future
So neither of these is a real transaction. But I still want hledger to track them for me, and parenthesized helps here. May others do it another way.

Marko Kocić

unread,
Jan 11, 2015, 3:41:32 PM1/11/15
to hle...@googlegroups.com
Hi Simon,

thanks for the explanation. It gives me some ideas. I think I'll go with keeping personal accounts, and go with income:freelance and expenses:freelance as a start, since it might be easier for me. Also, using virtual transactions for tax estimates is a good tip.

Since this post might be lost in the group archives, it might make sense to put it on web site. You could maybe add section with examples, best practices, where people could share thing like this.

Thanks,
Marko

Martin Blais

unread,
Jan 11, 2015, 3:59:25 PM1/11/15
to hle...@googlegroups.com
I used to run my company with command-line accounting too.
I structured it using two files, separating the personal domain from the company domain.
One file for the company, one file for myself.
In order to be square, I recommend separating those two domains; it'll be useful to focus on just company matters entirely separately if you get audited.

Also, I don't see why separating by year helps. For me, this is what the software can do for you. I want to be able to report by financial year, calendar year, quarter, etc.  These are very small datasets...  for a self-proprietorship, your file could easily cover 20 years of transactions without a hiccup. So I never split by year.

The one area that was a bit tricky is that some of the expenses were pulled from my personal accounts (e.g. I did not have a credit card associated with the company) and then I would make expense repayments from the company to personal. I used a #tag to disambiguate which expenses were applicable to the company (e.g. lunch with a client to discuss progress on project) vs. purely personal expenses, and then I would bake a zip file of the web interface just for those tagged transactions, for my accountant to peruse, who would then review it and choose what amounts to use and which to amortize and such.

I think it should be possible to write a script to automatically pull the two files, rename all the account names to insert the "business" and "personal" prefix you mention above, and run reports on the combined file, but you could do that separately without ever editing the combined file. It's nice if the input files are otherwise entirely separate.





--
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+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages