>>>>> "JS" == Joel Swanson <jkep...@gmail.com> 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 ledger-cli+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ledger-cli/m2k11n2hpe.fsf%40newartisans.com.

Reply via email to