I have been using ledger to track transactions in multiple currencies for a couple of months now. The biggest feature I would like to have is to be able to tag a transaction and then refer to the cost of something by tag. That way, when I inevitably screw up the cost, it is easy to change :-) The feature infers eliding capital gains in the selling transaction (which we've had a previous discussion about), but I'm now convinced this is how I would prefer to enter those transactions.
On 20 October 2014 04:38, Martin Blais <[email protected]> wrote: > On Sun, Oct 19, 2014 at 7:34 PM, Wm... <[email protected]> > wrote: > >> Sun, 19 Oct 2014 04:12:48 <5cba7bd6-7324-48a5-b61e- >> [email protected]> >> Tom Jones <[email protected]> wrote... >> >> To try and construct a minimal example, if we have this: >>> >>> 2014-10-15 buy widgets >>> assets:inventory 10 widgets >>> assets:GBP -80 GBP >>> >>> 2014-10-15 buy another widget >>> assets:inventory 1 widget >>> assets:GBP -9 GBP >>> >>> 2014-10-16 sell a widget >>> assets:GBP 11 GBP >>> assets:inventory -1 widgets >>> >>> >>> then is there any way the software can compute that the sold widget has a >>> cost basis of 8 GBP, if it is asked to use the FIFO basis for widgets? >>> >> >> ledger-cli doesn't, as far as I can tell, keep stock of anything physical >> or allow for the change in value unless you kick it in which case you might >> as well use a spreadsheet >> >> I'd love to be wrong > > > You are. > > The explicit method works in Ledger: > > 2014-10-15 buy widgets > assets:inventory 10 widget > assets:GBP -80 GBP > > 2014-10-15 buy another widget > assets:inventory 1 widget > assets:GBP -9 GBP > > 2014-10-16 sell a widget > assets:GBP 11 GBP > assets:inventory -1 widget {8 GBP} > income:gains > > > ledger -f /home/blais/tmp/automatch.lgr bal --lot-prices --no-color inven > 9 widget {8 GBP} > 1 widget {9 GBP} assets:inventory > > > It correctly canceled out a unit of WIDGET {8 GBP}. > > Ledger does book lots but as far as I can tell it's done (1) a posteriori > (it accumulates all the lots and only at the end books lots against each > other), and (2) it does so based on the particular method you choose for > booking via options, as you can specify whether to care about dates or not, > for example, adding in the dates: > > ledger -f /home/blais/tmp/automatch.lgr bal --lot-dates --no-color inven > -1 widget > 11 widget [2014/10/15] assets:inventory > > In this case, the dates would have had to match in order to book the > widget lots against each other. > > And if you wanted to change "the value" (which I'm assuming you're > referring to the cost basis) you can create a transaction that removes the > lot you want to change and insert a new one with the adjusted cost basis. > This should work in Ledger AFAIK, should be no problem. > > -- > > --- > 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.
