Beancount.Directives.Close (beancount_ex v0.6.0)

Copy Markdown View Source

The close directive marks an account as inactive.

See the Beancount Close directive.

Beancount syntax

2026-12-31 close Assets:Bank
  archived: TRUE

General form: YYYY-MM-DD close Account

Elixir struct

%Beancount.Directives.Close{
  date: ~D[2026-12-31],
  account: "Assets:Bank",
  metadata: %{"archived" => true}
}

Or use Beancount.close/3:

Beancount.close(~D[2026-12-31], "Assets:Bank",
  metadata: %{"archived" => true}
)

Fields

  • date - Date.t() after which postings to this account are invalid.
  • account - colon-separated account name being closed.
  • metadata - optional map of key/value pairs rendered below the directive.

Summary

Types

t()

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