limabean.core.inventory
Functions to build and query an inventory.
accumulate
(accumulate inv p)Accumulate a position into an inventory according to its booking method.
Position attributes are :units, :cur, and :cost.
accumulator
(accumulator booking)Create an inventory accumulator with given booking method.
build
(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.
positions
(positions inv)Return the current balance of an inventory accumulator as a list of positions.
positions->units
(positions->units ps)Return positions collapsed down to units only with no costs.
positions->units-of
(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.