Beancount.Directives.Document (beancount_ex v0.6.0)

Copy Markdown View Source

The document directive links a file to an account at a date.

See Documents.

Beancount syntax

2026-01-01 document Assets:Bank "statements/2026-01.pdf"

General form: YYYY-MM-DD document Account "Path"

Elixir struct

%Beancount.Directives.Document{
  date: ~D[2026-01-01],
  account: "Assets:Bank",
  path: "statements/2026-01.pdf",
  metadata: %{}
}

Or use Beancount.document/4:

Beancount.document(~D[2026-01-01], "Assets:Bank", "statements/2026-01.pdf")

Fields

  • date - Date.t() the document is associated with.
  • account - account the file belongs to (often Assets or Liabilities).
  • path - relative or absolute file path string.
  • metadata - optional map rendered below the directive.

Summary

Types

t()

@type t() :: %Beancount.Directives.Document{
  account: String.t(),
  date: Date.t(),
  metadata: map(),
  path: String.t()
}