limabean.core.inventory
Functions to build and query an inventory.
build
(build postings acc-booking-fn)Cumulate postings into inventory indexed by date.
acc-booking-fn is a function which returns the booking method for an account.
build-with-history
(build-with-history postings acc-booking-fn)Cumulate postings into inventory and inventory history indexed by date.
acc-booking-fn is a function which returns the booking method for an account.
diff
(diff inv1 inv2 acc-booking-fn)Build an inventory whose positions are the difference between two inventories
merge-position
(merge-position positions pst booking-method)Merge position in currency order, then by cost attributes.
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.
sub-accs
(sub-accs inv parent-accs)Discard all but non-struct sub-accounts of any of parent-accs