GitHub
Entries and accounts

Entries and accounts

Track is for the clock. Entries is for everything else you do with time: adding an hour you forgot, fixing a wrong account, writing a day off. On Accounts you set how each time account bills.

Entries

Entries, the second tab of Time (g e), lists every line of time in the period, from every file the roll-up includes, whoever wrote it. Three buttons at the end of the filter bar’s period row choose the view:

ViewShows
By dayA timesheet: one heading per day with its total, the lines under it. The default.
WeekA grid of accounts by days, Monday to Sunday, with row, day and week totals.
By accountOne heading per account with its total.

The columns are Date, Person, Account, Hours, Note, Billing and File. Billing says Unbilled, Not billable, Invoice 108 (a link to it), Bill … or Not billed, with the reason if one was given. File gives the file and line the entry is on, so you can find it in an editor. Person and File drop out in a narrow window.

The filter bar above the list is the one the Overview tab has: period, search, person, customer, billable, billing state and account. Switching between the tabs keeps the filters. They’re kept in the address, so the overview links straight to a filtered list, and Back returns to the previous filter. In Week, the grid picks its own week, so the period is hidden.

Adding time

Press a or Add time. The row asks for a date (today unless you change it), an account, a duration and an optional note. The duration takes any of these:

You typeMeans
45m45 minutes
2h2 hours
1h30, 1h 30m1 hour 30 minutes
1.51.5 hours
0:4545 minutes
90s90 seconds

The line goes under its date in the month’s tracker file, which is created if it’s new. With the Person filter set, it goes in that person’s file. Otherwise it goes in yours.

Changing and deleting

Edit on a line, or Enter on the line under the cursor, opens the same fields in place. Save rewrites only that line. You can edit lines you wrote by hand in any timedot file, not only the tracker’s. A timeclock session changes by its start and end.

Delete takes the line out of its file, after you confirm.

A line on a sent invoice, or on a contractor’s bill, is read-only. Its Billing cell has a read-only badge, and Edit explains why. For an invoice it links to the invoice: void it to change the line (see Releasing time). For a bill it offers Void bill and release time… (see Voiding a bill). A line on a draft invoice can still be changed.

Changing many lines at once

Tick the box at the start of each line, or press x on the line under the cursor. Shift+click ticks a range. A bar shows how many lines and hours you picked, with these actions:

ActionDoes
Mark billableTakes the nobill: tag off, so written-off time counts as unbilled again.
Mark not billable…Adds nobill:, with a reason if you give one. The time leaves To bill.
Move to account…Moves the lines to another account.
Set person…Sets who did the work. Leave it empty for no one.
Bill…Bills the picked lines on an invoice draft. They must be one customer’s unbilled time. See Billing time. b does the same.
ClearUnticks them all. Esc does the same.

The weekly grid

In Week, every cell is a field. Type the day’s new total for that account (2h, 1h30, 0:45) and press Enter or leave the cell. More time goes onto the day’s open line, or a new one. Less comes off the open line.

Billed and clocked time is never changed from the grid. The grid marks a cell that holds some, and refuses a cut that would need it, with the reason. To add a row for an account with no time that week yet, pick it under the grid. ← and → step through the weeks, and This week comes back.

Warnings

Above the list, Entries warns about:

Keys

KeysDoes
aAdd time
j / kMove the cursor down / up
EnterEdit the line under the cursor
xTick the line under the cursor
bBill the ticked lines
EscUntick every line
[ / ]Previous / next period (week, in Week)
/Search

Accounts

Time accounts, in the sidebar’s Library (g a), shows time-accounts.journal as a tree. Its columns are Account, Customer, Billable, Item, This month and Unbilled. A value an account inherits from a parent says where it comes from, such as “from clients:acme”. [ and ] step the month the hours are for.

Time accounts don’t have to sit under one root. Any account that has time in a file the roll-up includes is a time account, so a tree of your own such as projects:… or kunden:… works as it is.

Changing an account

Edit, or Enter, opens the account’s settings:

Save writes the tags onto the account’s line in time-accounts.journal. If an account names a customer with no Invoicer customer note, the row shows Create customer.

Add under (a) adds a child account, and Add account (A) adds a top-level one.

Rename (r) renames the account and every account under it. It shows each line it will change, in the accounts file and in every time file, as Where, Before and After, and changes nothing until you confirm. Billed lines keep their invoice: and bill: tags.

On a customer’s page

A customer’s page in the Invoicer has a Time accounts section listing every account that bills to that customer. That covers the account that names it in customer: and every account under it that inherits the link, laid out as a tree. Archived accounts are left out. Each row shows This month and Unbilled. As on this page, an account’s hours include the accounts below it.

An account’s name or its month’s hours opens Entries on that account this month, and its unbilled hours open its unbilled lines, whenever they were. All time opens all of the customer’s time in Entries, and Time accounts opens this page. A customer that no time account names has no section, and neither does any customer before time tracking is set up.

An account links to a customer when its customer: value is the customer’s name in the books (its note’s ledger_customer) or its title, the same match the Accounts page uses for Create customer.

Undeclared accounts

An account that has time but isn’t declared in time-accounts.journal appears under Not declared yet, and in the tree with an undeclared badge. Declare adds it to the file, so you can give it a customer or make it billable.

Keys

KeysDoes
j / kMove the cursor down / up
→Unfold the account, or step into it
←Fold it, or step out to its parent
EnterEdit the account
aAdd an account under this one
AAdd a top-level account
rRename the account
[ / ]Previous / next month

The accounts file

time-accounts.journal is ordinary hledger account directives with tags. hledger ignores an indented account line, so the tree is laid out by order and blank lines instead: one block per top-level account, parents before children, the tags lined up in one column.

; Time accounts. Tags: customer (links to an Invoicer customer), billable
; (yes/no, nearest ancestor wins), item (catalog code to bill as),
; archived (hide from pickers). Edit freely.

account clients                                   ; billable: yes
account clients:acme                              ; customer: Acme Corp, item: ARCH
account clients:acme:advisory
account clients:acme:tax-return                   ; item: TAX
account clients:acme:travel                       ; billable: no

account clients:globex                            ; customer: Globex, item: AUD
account clients:globex:audit

account internal                                  ; billable: no
account internal:admin
account internal:old                              ; archived: yes

Here, clients:acme:tax-return bills Acme Corp as item TAX, clients:acme:advisory bills Acme as ARCH, and travel to Acme isn’t billable.

An account’s tag comes from the account itself if it has one, else from its nearest parent that does. So the billable: no on travel beats the billable: yes on clients. hledger’s tag:billable=yes query doesn’t work that way. Time with hledger explains the difference.

The tags

TagGoes onValueMeans
customera time accountthe customer’s name in the booksIts time, and its children’s, bills this Invoicer customer.
billablea time accountyes or noWhether its time is billable. no when nothing in the chain says.
itema time accounta catalog codeThe item its time bills as, suggested when you bill.
archiveda time accountyesHidden from Track’s search and slots.
persona date line, or a linea short nameWho did the work. A line’s own tag beats its date line’s.
invoicea linean invoice numberBilled on that invoice. The same tag as in the books, so one query finds both sides.
billa linea bill referencePaid to the person who did it, through that accounts payable bill.
nobilla linea reason, or nothingWritten off: never to be billed.

The customer’s name is the one the books use: the customer note’s ledger_customer, or its title when it has none. Customer files explains it.

Any other text in a line’s comment, beside its tags, is the line’s note.

Each tag name can be changed for your books, for example to write rechnung: instead of invoice:. See Formats.