Fuentes v0.0.2 Fuentes.Account
The Account module represents accounts in the system which are of asset, liability, or equity types, in accordance with the “accounting equation”.
Each account must be set to one of the following types:
TYPE | NORMAL BALANCE | DESCRIPTION
asset | Debit | Resources owned by the Business Entity |
liability | Credit | Debts owed to outsiders |
equity | Credit | Owners rights to the Assets |
Each account can also be marked as a “Contra Account”. A contra account will have it’s normal balance swapped. For example, to remove equity, a “Drawing” account may be created as a contra equity account as follows:
account = %Fuentes.Account{name: "Drawing", type: "asset", contra: true}
At all times the balance of all accounts should conform to the “accounting equation”
Assets = Liabilities + Owner’s Equity
Each account type acts as it’s own ledger.
For more details see:
Summary
Functions
Computes the trial balance for all accounts in the provided Ecto.Repo. Returns Decimal type
Computes the account balance for a list of Fuentes.Account
in a given
Ecto.Repo inclusive of all entries. This function is intended to be used with a
list of Fuentes.Account
s of the same type.
Returns Decimal type
Computes the account balance for a given Fuentes.Account
in a given
Ecto.Repo when provided with a map of dates in the format
%{from_date: from_date, to_date: to_date}
.
Returns Decimal type
Creates a changeset requiring a :name
and :type
Functions
Computes the trial balance for all accounts in the provided Ecto.Repo. Returns Decimal type.
Computes the account balance for a list of Fuentes.Account
in a given
Ecto.Repo inclusive of all entries. This function is intended to be used with a
list of Fuentes.Account
s of the same type.
Returns Decimal type.
Computes the account balance for a given Fuentes.Account
in a given
Ecto.Repo when provided with a map of dates in the format
%{from_date: from_date, to_date: to_date}
.
Returns Decimal type.