Thanks, John. That helps my understanding.
Le vendredi 8 mai 2020 00:07:03 UTC-4, John Wiegley a écrit : > > >>>>> "JS" == Joel Swanson <[email protected] <javascript:>> 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. > > John > -- --- 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/b9f5afd8-91c3-4579-9729-6fec1d151a59%40googlegroups.com.
