본문으로 건너뛰기

치트시트

계정 구조, 거래 문법, 명령어 및 일반 텍스트 회계와 재무 기록 관리를 위한 실용적인 예제를 포함한 포괄적인 Beancount 치트시트.

계정 구조

계정 유형 및 부호

Type          Sign    Example
------------------------------------------------
Assets        (+)     Assets:US:BofA:Checking
Liabilities   (-)     Liabilities:Credit:Amex
Income        (-)     Income:Salary:Gross
Expenses      (+)     Expenses:Food:Restaurant
Equity        (-)     Equity:Opening-Balances

통화 형식

통화는 대문자 기호입니다 — 통화, 티커 및 사용자 정의 단위. 이는 명령어가 아닌 명명 예시입니다:

Currencies:       USD, EUR, CAD, AUD
Investments:      GOOG, AAPL, VTI
Cryptocurrencies: BTC, ETH
Custom units:     HOURS, AIRMILES, HOME_MAYST

명령어 문법

계정 관리

; Opening accounts
2024-01-01 open Assets:Checking             ; Simple
2024-01-01 open Assets:Investing USD,GOOG   ; With constraints
 
; Closing accounts
2024-12-31 close Assets:Old:Account

통화 선언

2024-01-01 commodity VTSAX
    name: "Vanguard Total Stock Market Index"
    asset-class: "equity"

거래 기록

; Basic transaction
2024-01-15 * "Grocery Store" "Weekly shopping"
    Assets:Checking     -100.00 USD
    Expenses:Food:Groceries
 
; With metadata and tags (#work is a tag, ^invoice-123 is a link)
2024-01-15 * "Restaurant" "Business dinner" #work ^invoice-123
    id: "T-1234"
    receipt: "path/to/receipt.pdf"
    Expenses:Meals      80.00 USD
    Liabilities:Credit

분개 사양

이것은 분개 줄입니다 — 각각 거래 내부에 위치하며 날짜 줄 아래 들여쓰기됩니다:

; Basic amount
Assets:Cash              100.00 USD
 
; Cost basis tracking
Assets:Invest:VTSAX      10 VTSAX {100.00 USD}        ; Per-unit cost
Assets:Invest:VTSAX      10 VTSAX {{1000.00 USD}}     ; Total cost
Assets:Invest:VTSAX      10 VTSAX {100.00 # 9.95 USD} ; Per-unit plus total fee
 
; Price specifications
Assets:Forex            1000.00 USD @ 0.85 EUR        ; Per-unit
Assets:Forex            1000.00 USD @@ 850.00 EUR     ; Total price
 
; Dated lots
Assets:Invest:VTSAX      10 VTSAX {100.00 USD, 2024-01-15}

잔액 검증

; Balance padding: fills Assets:Checking up to Equity:Opening-Balances
2024-01-01 pad Assets:Checking Equity:Opening-Balances
 
; Balance assertion: checked at the start of its date, so date it after the pad
2024-02-01 balance Assets:Checking  1000.00 USD

메타데이터 추적

; Note attachment
2024-01-15 note Assets:Checking "Called bank about fee"
 
; Document linking
2024-01-15 document Assets:Checking "path/to/statement.pdf"
 
; Price recording
2024-01-15 price VTSAX  100.00 USD

이벤트 기록

; Location tracking
2024-01-15 event "location" "New York, USA"
 
; Property changes
2024-01-15 event "address" "123 Main Street"

태그 관리

; Tag scope control: #vacation applies to every transaction between the pushtag and poptag
pushtag #vacation
2024-01-15 * "Hotel"
    Expenses:Travel:Lodging   200.00 USD
    Assets:Credit
poptag #vacation

구성 옵션

; Basic settings
option "title" "Personal Finance Ledger"
option "operating_currency" "USD"
 
; Account naming
option "name_assets" "Assets"
option "name_liabilities" "Liabilities"
option "name_income" "Income"
option "name_expenses" "Expenses"
option "name_equity" "Equity"
 
; Document handling
option "documents" "/path/to/docs"

주석 및 구성

; Single line comment
 
* Section Header
** Subsection
; Transaction block follows...
 
; Account grouping
; Assets
2024-01-15 ...
 
; Expenses
2024-01-16 ...

이 참조는 실용적인 예제와 함께 Beancount문법 요소에 대한 완전한 개요를 제공합니다.

출처: https://beancount.io/ko/docs/Basics/cheatsheet