Hi Oliver.. I didn't understand all points of your question but here's how I bill time with hledger. John might say more about ways to do it with ledger 2.6 or 3.

1. I use timeclock.el, plus some custom key bindings, to record work sessions 
in my ~/.timelog file.

2. at billing time (first of the month) I query the timelog, something like:

$ hledger -f $TIMELOG register -p 'weekly in aug' --depth 4 -E client1 
not:unbilled

2009/08/03 - 2009/08/09         TI:work:jobs:client1        12.4h        12.4h
2009/08/17 - 2009/08/23         TI:work:jobs:client1         0.6h        13.0h
2009/08/24 - 2009/08/30         TI:work:jobs:client1         6.8h        19.8h
2009/08/31 - 2009/09/06         TI:work:jobs:client1         1.5h        21.3h

3. I send an invoice to the client, including the above info

4. I add an invoice entry to my (separate) ~/.ledger file, using the total 
hours above:

2009/9/5 (20090905c1) client1 invoice
    income:consulting:client1                  -21.3h @ $90  ; august
    assets:accounts receivable:client1          $1917        ; I print then add 
the reported total for readability

5. When payment is received, I add a payment entry to the ledger:

2009/9/15[=9/17] * (20090905c1) client1 payment
    assets:accounts receivable:client1    $-1917
    assets:bank:bank1:checking

By querying income or receivable accounts in various ways I can find out what I've earned, billed, received, or not received.

There must be better ways, but that's my current process; a separate timelog and ledger, a certain amount of manual work, but works for me. I hope it gives you some ideas.

-Simon


[1] to be precise I use "lastmonth register --depth 4 ...". lastmonth is a bash alias for "hours -p lastmonth". hours is a symbolic link to the hledger binary, which selects $TIMELOG automatically.

[2] hledger always reports time in hours.

[3] the dates are "check received" and "check deposited". Specifying the latter makes my daily checking account balance report more accurate, which helps with reconciling.

Reply via email to