On Thu, May 7, 2020 at 11:07 PM John Wiegley <[email protected]> wrote: > > >>>>> "JS" == Joel Swanson <[email protected]> writes: > > JS> Does posting order affect stock or commodity cost basis in Ledger? > > JS> Is that really the desired behavior, where changing the order of postings > JS> changes the items for which ledger tracks lots? Does this have something > JS> to do with which postings are considered primary and secondary in a > JS> transaction with three or more postings? > > Yes, that is actually the reasoning. The first posting establishes the > secondary commodity, while the second is the primary. > > You can avoid this confusing by not using the auto-calculation logic, and > identifying your lots explicitly: > > 2004/05/01 Stock purchase > Expenses:Broker:Commissions $19.95 > Assets:Broker 50 AAPL {$30.00} [2004/05/01] > (<TransactionId>) @ $30.00 > Assets:Broker $-1,519.95 > > If you use this fully elaborated lot specification everywhere, then you'll > always know what Ledger is based its numbers on. Generally when I sell a > commodity I just copy the details from the opening transaction. >
A semantical question - - - - AIUI what you are referring to in the above is a 'stock' not a 'commodity' - - - yes? Regards -- --- 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]. To view this discussion on the web visit https://groups.google.com/d/msgid/ledger-cli/CAPpdf58Sce7aFoDS21Y0hMBTHgYVypig1Y%2BQbCpWxpMUYfde4Q%40mail.gmail.com.
