Skip to content

A customizable double entry bookkeeping system backed by Ash resources.

Notifications You must be signed in to change notification settings

ash-project/ash_double_entry

Logo Logo

Elixir CI License: MIT Hex version badge Hexdocs badge REUSE status

AshDoubleEntry

Welcome! This is the extension for building a double entry accounting system in Ash. This extension provides the basic building blocks for you to extend as necessary.

Double Entry Accounting

Double entry is a fundamental accounting principle that ensures every financial transaction is recorded in at least two accounts. Each transaction records a debit (money going out) and credit (money coming in), where total debits must equal total credits. This dual-record system allows you to detect errors and ensures that books always balance.

AshDoubleEntry implements double entry accounting through three core resources:

  1. AshDoubleEntry.Account DSL, which represents accounts in your ledger (such as bank accounts, revenue accounts, expense accounts, etc.)
  2. AshDoubleEntry.Transfer DSL, which represents transactions between accounts, always linking a from_account and to_account with an amount
  3. AshDoubleEntry.Balance DSL, which tracks the balance of each account at the point of each transfer for recordkeeping

When you create a balance transfer, the system creates entries for both the credit and debit accounts and updates all future balances to reflect the transaction.

Why a Separate Repository?

As double entry accounting is a specialized financial feature that is only necessary for certain Ash applications, keeping it as a separate repository allows the main framework to remain focused on core functionality. This also allows the implementation of double entry to evolve separately from the core Ash framework. Ash applications that don't need double entry accounting can safely ignore this.

This follows the same pattern as other Ash extensions like AshMoney and AshAuthentication, which are also maintained as separate packages.

Tutorials

About

A customizable double entry bookkeeping system backed by Ash resources.

Resources

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Sponsor this project

Packages

No packages published

Contributors 10

Languages