Thanks John, Does the entire commodity have to be surround by parens? When does ledger distinguish between two lots of the same commodity and two different commodities?
In other words: GBP (test) GBP (abc) (GBP test) Would strip() see 1, 2, or 3 commodities in that bunch? On Wed, Nov 30, 2011 at 14:38, John Wiegley <jwieg...@gmail.com> wrote: >>>>>> Martin Michlmayr <tbm-r+vwnyxsfmfqt0dzr+a...@public.gmane.org> writes: > >> Well, this is the question I was trying to ask: are commodities with lot >> tags different commodities or not? My belief so far was that they are *not* >> different commodities (i.e. the lot tags are just some meta info), but the >> example I posted indicates otherwise. > > Lot tags/prices/dates represent a new commodity within Ledger itself, but they > are only *displayed* as unique commodities when you use --lots or > --lot-dates/prices/tags options. > > So, say you have: > > Expenses $10 (a) > Expenses $10 (b) > > Although by default this total is displayed as $20, internally the real amount > is "$10 (a) + $10 (b)". The --lot-tags option is what differentiates display. > > There is a value expression function strip() whose job is to remove/collapse > lot annotations, and scrub(), which only conditionally collapses them (based > on whether you use one of the above-mentioned options). It's this latter > function which is used by all the built-in reports. > > John -- Craig, Corona De Tucson, AZ enderw88.wordpress.com