It's a bit more complicated than I think you imagine. If you define a commodity as a measurement, it will keep its value across accounts. For example
Expenses:Drinks:Beer 1 liter @ $3.50 will set the price of "liter" to $3.50, not the price of "liter of beer". So if you then have Expenses:Drinks:Wine 1 liter @ $12.00 Then the price of "liter" changes to $12.00. If you view your balance sheet with -X $, you will see that you beer has changed price. To combat this, you can say Expenses:Drinks:Beer 1 liter @ =$3.50 And this will fix the price of that 1 liter of beer. I'm not sure if measuring things this way is a good idea. As long as you simply consume your beer and wine, then it probably doesn't matter, but if you tried trading them and wanted to track them later, I think it might make sense to have dedicated units for each one. Expenses:Drinks 1 "liter beer" @ $3.50 On 12 October 2014 19:46, Roman Grazhdan <[email protected]> wrote: > So I just define kilos/liters/sixpacks etc. and then use them and it gets > calculated. And brand name just goes to metadata, and it can all be written > down in one line! And with account aliases it would look even better! > > Looks very neat and clean and trivial to parse/printf, going to give it a > test. By the way I can define any measurement unit, so I can write down my > electricity or water bills very precisely. > > This makes anything else look bloated, redundant and stiff. > > Pretty exciting, thanks for the example. > > -- > > --- > You received this message because you are subscribed to the Google Groups > "Ledger" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- --- You received this message because you are subscribed to the Google Groups "Ledger" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
