View Source Bookk.AccountClass (bookk v0.1.3)

An account class has properties that are inherited by accounts and serves as a way of grouping account's balances.

Common classes

Here are some of the most common used classes for reference:

idparent idnatural balancename
A:debitAssets
CAA:debitCurrent Assets
ARA:debitAccounts Receivables
Ac:creditContra Assets
ADAc:creditAccumulated Depreciation
E:debitExpenses
OE:creditOwner's Equity
L:creditLiabilities
APL:creditAccounts Payables
I:creditIncome
GI:creditGains
RI:creditRevenue

Summary

Types

t()

The struct that describes an account class.

Types

@type t() :: %Bookk.AccountClass{
  id: String.t(),
  name: String.t(),
  natural_balance: :credit | :debit,
  parent_id: String.t() | nil
}

The struct that describes an account class.

Fields

An account class in composed of:

  • id: it's recomended that, instead of using it with an arbitrary value, you assign it to the class' name abbreviation;
  • parent_id: If the class is a subclass, then parent_id should be set to the parent class' abbreviation. For example, Current Assets is a subclass of Assets, therefore its parent_id should be set to "A" (where "A" is the abbreviation of Assets);
  • name: The human readable name of the account class;
  • natural_balance (either :debit or :credit): specifies the direction in which accounts of this class grows their balance. For example, Assets accounts grows their balances with :debit operations.

See section Common classes for examples of classes.