-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathexample.ledger
77 lines (67 loc) · 3.17 KB
/
example.ledger
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
; Personal book-keeping typically has 4 account types:
; Expense : where you record what you spent.
; Income : where you got money from others.
; Asset : money you have right now
; Liability : money you owe to others
;
; Business bookkeeping adds a 5th type:
; Equity : assets supplied by the owners
;
; The rules are:
; - When you buy something, add value to the expense account
; and subtract it from the source of the funds
; - When you receive income, subtract it from the income account
; and add it to the account it went to
;
; Income accounts read negative the more money you receive
; (i.e. the source of the income, your job, has less money)
; Expense accounts go positive as you spend more money
; Liability accounts to more negative as you owe more money
; Asset accounts go more positive as you have more money
; You can record this two ways:
2015-05-30 Salary
; Recording the gross pay here makes it easier to just look at your books
; when it comes time to fill in your tax forms at the end of the year
Personal:Income:Day Job $-1000
Personal:Expenses:Federal income tax withheld $100
Personal:Expenses:State income tax withheld $100
Personal:Assets:Checking Account
2015-06-01 Groceries
Personal:Expenses:Groceries $22
Personal:Assets:Checking Account
2015-06-02 Car servicing
Personal:Expenses:Vehicle $422.98
Personal:Liabilities:VISA
; The bucket command sets a default balancing account. Unbalanced transactions
; will be balanced with an amount to this account.
bucket Personal:Assets:Checking Account
2015-06-03 Groceries again
Personal:Expenses:Groceries $32.73
; You can verify balances using the 'assert balance' command
; This will check that the balance of the account using everything
; seen so far matches what you've got. This can be useful for verifying
; against account balances from your bank after you've entered a bunch
; of transactions.
assert balance Personal:Expenses:Groceries $54.73
; You can also use an 'asof' date for a balance check, helpful if you
; have a bank statement with a single balance and date, but you just
; want to append the check to the bottom of your ledger file (e.g.
; if doing one file per month). This checks the balance at the end of
; a certain date, using data seen up until now
assert balance 2015-06-02 Personal:Expenses:Groceries $22
; You can define alias shortcuts (just single words)
alias groceries Personal:Expenses:Groceries
2015-06-04 Even more groceries
groceries $23.99
; In my state, if you buy something online, you often don't
; pay sales tax on it. However, technically you still owe
; the 6% tax. This shows how to track that outstanding
; liability so you can send payment to the tax department
; at the end of the year
; Note that the "bucket" account is still in effect
2015-02-05 Chair from amazon
Personal:Expenses:Office ($139 * 1.06)
Personal:Liabilities:State Sales Tax ($1.39 * -0.06)
; uledger also supports the "accounting equation", where you can check
; that everything balances as it should
assert equation 2015-07-01 Personal:Assets - Personal:Liabilities = Personal:Equity + Personal:Income - Personal:Expenses