Postive total price required when commodity count is negative, why?

Skip to first unread message

Allan Odgaard

Jul 3, 2021, 7:22:21 AM7/3/21
to hledger

While creating ledger entries for selling stock, I found that giving the total price when the quantity is negative, requires that the total price be positive, as shown in the entry below.

I wonder what the logic is behind this? Should the item be read as -(2 "SKU#001" @@ 200.00)?

2021-06-03 (RCPT#00001) John Doe | Cash purchase

    Assets:Cash                                   230

    Income:Sales                                 -230

    Expenses:Cost of Inventory                    200

    Assets:Inventory              -2 "SKU#001" @@ 200

Simon Michael

Jul 3, 2021, 2:12:03 PM7/3/21
From memory: yes, it should be read that way. This is to keep things simple, so there's no confusion about the meaning of a negative price, and the resulting four possible combinations of amount and price signs. 

On Jul 3, 2021, at 01:22, Allan Odgaard <> wrote:

You received this message because you are subscribed to the Google Groups "hledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit
Reply all
Reply to author
0 new messages