The book the store's money is written into.
An entry is a set of legs whose signed minor units sum to zero; a debit is positive and a credit is negative. The builders are pure and the in-memory implementation is the default, so the double-entry law holds with no backend present. A real book lives in an adapter behind its own alias.
The book the store's money is written into. An entry is a set of legs whose signed minor units sum to zero; a debit is positive and a credit is negative. The builders are pure and the in-memory implementation is the default, so the double-entry law holds with no backend present. A real book lives in an adapter behind its own alias.
The accounts one store's money moves between.
The accounts one store's money moves between.
(balanced? legs)True when legs sum to zero minor units.
True when `legs` sum to zero minor units.
(balance this account currency-id)Signed minor units of currency-id standing in account.
Signed minor units of `currency-id` standing in `account`.
(post! this entry)Record entry. Returns it, or nil when its reference was already recorded.
Record `entry`. Returns it, or nil when its reference was already recorded.
(posted? this reference)True when reference has already been recorded.
True when `reference` has already been recorded.
One balanced movement, identified by the reference that makes it repeatable.
One balanced movement, identified by the reference that makes it repeatable.
One side of an entry. :leg/amount is signed minor units: debit positive,
credit negative.
One side of an entry. `:leg/amount` is signed minor units: debit positive, credit negative.
(memory-ledger)ILedger over an atom. The default, and what the tests run on.
post! is a swap! that keeps the first entry for a reference, so a
redelivered settlement adds nothing.
ILedger over an atom. The default, and what the tests run on. `post!` is a `swap!` that keeps the first entry for a reference, so a redelivered settlement adds nothing.
(sale-entry invoice at)The entry booking invoice as revenue owed: debit receivable, credit revenue.
at is the entry's timestamp. Pure.
The entry booking `invoice` as revenue owed: debit receivable, credit revenue. `at` is the entry's timestamp. Pure.
(settlement-entry invoice payment)The entry booking payment against invoice: debit wallet, credit receivable.
The reference is the payment's own, so the same observed movement books once however often it is seen. Pure.
The entry booking `payment` against `invoice`: debit wallet, credit receivable. The reference is the payment's own, so the same observed movement books once however often it is seen. Pure.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |