Functions to build and query an inventory.
Functions to build and query an inventory.
(accumulate inv p)Accumulate a position into an inventory according to its booking method.
Position attributes are :units, :cur, and :cost.
Accumulate a position into an inventory according to its booking method. Position attributes are `:units`, `:cur`, and `:cost`.
(accumulator booking)Create an inventory accumulator with given booking method.
Create an inventory accumulator with given booking method.
(build postings acc-booking-fn)Cumulate postings into inventory according to booking method.
acc-booking-fn is a function which returns the booking method for an account.
Cumulate postings into inventory according to booking method. `acc-booking-fn` is a function which returns the booking method for an account.
(cur-freq inv)Return map of frequency of currency use by currency.
Return map of frequency of currency use by currency.
(positions inv)Return the current balance of an inventory accumulator as a list of positions.
Return the current balance of an inventory accumulator as a list of positions.
(positions->units ps)Return positions collapsed down to units only with no costs.
Return positions collapsed down to units only with no costs.
(positions->units-of ps cur)Return positions collapsed down to units only of the specified currency with no costs, or zero if none for that currency.
Return positions collapsed down to units only of the specified currency with no costs, or zero if none for that currency.
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 |